0

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/*
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
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).

8
  • The controlC* devices are harmless. Does aplay -D hw:DG2 something.wav work?
    – CL.
    Nov 21, 2012 at 13:02
  • Yes, it does. No issues at all. Nov 21, 2012 at 13:13
  • It works for all the following as well: hw:DG2,0, hw:1, hw:1,0. Also for the plughws. Nov 21, 2012 at 13:21
  • Then there must be some other program when forked-daapd is running.
    – CL.
    Nov 21, 2012 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. Nov 22, 2012 at 13:20

1 Answer 1

0

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.

1
  • 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? Nov 21, 2012 at 12:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .