Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to configure forked-daapd on my computer, and everything goes well except that in configuration file I can not set a new value for the line corresponding to soundcard. This is the default code in the config file:

#card = "default"

I want to use a soundcard called "DG2", which is the soundcard no.1 and has a first device that ALSA recognizes as no.0. So, I change the line to the following:

card = "hw:DG2,0"

I restart the daapd service and the next time I play a file through iTune remote, I get a message in my server log file saying that it can not play the file because the device is busy. Any change in the device name will return a different error, saying that the device does not exist. I am pretty sure no other uses this external device, and I don't understand why I get this message. I have tried plughw as well, with the same result.

When running lsof, I get the following result:

mah@HomeServer:~$ lsof /dev/snd/*
pulseaudi 1579  mah   20u   CHR  116,3      0t0 9083 /dev/snd/controlC1
pulseaudi 1579  mah   26u   CHR 116,10      0t0 9542 /dev/snd/controlC0
pulseaudi 1579  mah   32u   CHR 116,10      0t0 9542 /dev/snd/controlC0

Let me add one last detail. This soundcard is just a SPDIF-out USB dongle with very limited functionality (e.g. no volume control). Alsamixersays it only has a PCM channel (which would be the device number 0).

share|improve this question
The controlC* devices are harmless. Does aplay -D hw:DG2 something.wav work? – CL. Nov 21 '12 at 13:02
Yes, it does. No issues at all. – retrography Nov 21 '12 at 13:13
It works for all the following as well: hw:DG2,0, hw:1, hw:1,0. Also for the plughws. – retrography Nov 21 '12 at 13:21
Then there must be some other program when forked-daapd is running. – CL. Nov 21 '12 at 13:50
Well, that is the point: really, no other program. Right when I receive an error from daapd, shairport can still successfully open the device. – retrography Nov 22 '12 at 13:20

The default device automatically uses a plugin that can mix multiple streams together.

Try using default:DG2 (but this will not work if the other program does not also go through default).

Run lsof /dev/snd/* to see which programs are accessing sound devices.

share|improve this answer
Thanks for your response! I added details to the question. Does this mean that pulseaudiois reserving the device to itself and any other software has to pass through it to get access to the device? But isn't forked-daapd doing so? Shouldn't pulseaudio block the other applications from accessing the device as well? I open hw:0,1 with no issues on shairport. Actually, I don't want two programs to access the card, and prefer to give exclusive access to forked-daapd. Is there any way to do so? – retrography Nov 21 '12 at 12:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.