You are not logged in.

#1 2009-08-06 21:23:06

camphor
Member
Registered: 2009-03-01
Posts: 32

Wacky error: USB headphone sound crackles in everything BUT mpd.

Here's a weird error for you all. Though it hasn't come from any recent upgrade or anything I've noticed that the sound output of my 3.5 mm --> USB adapter crackles consistently at a volume loud enough to be annoying, and the odd thing is that this doesn't happen while listening to music through MPD.

A script runs at start-up to check if the headphones are plugged in, and switches out the ~/.asoundrc's accordingly.

Script:

#!/bin/bash
if [ -e /proc/asound/Device ]; then
cp -f ~/.asoundrc.usb .asoundrc
else
cp -f ~/.asoundrc.builtin .asoundrc
fi

.asoundrc.usb:

pcm.builtin { type hw; card NVidia; }
ctl.builtin { type hw; card NVidia; }

pcm.usb { type hw; card Device; }
ctl.usb { type hw; card Device; }

pcm.!default pcm.usb
ctl.!default ctl.usb

And for good measure, the relevant mpd.conf parts:

port "6600"
gapless_mp3_playback "yes"
audio_output {
type "alsa"
device "default"
name "ALSA"
}
mixer_type "alsa"'
mixer_device "default"
mixer_control "PCM"

Though they play through my speakers, the ALSA test sounds don't play through my headphones, citing the "Non channel count" error. I'm guessing this is just because it doesn't like to play sounds in Mono.

And to narrow things down a bit more, I'm using mpd 0.14.2-1 because the new version (mpd 0.15.1-1) does crackle, and I assume it's because upgrading the package requires me to install libmikmod, libmms, and libmodplug. Sorry for any weird parts, English is not my first language. Hope that's enough information!

Offline

Board footer

Powered by FluxBB