[alsa-devel] default is working, but hw:0,0 is do not...

David Henningsson david.henningsson at canonical.com
Tue Jan 24 21:00:16 CET 2012


On 01/24/2012 08:15 PM, Dmitrij K wrote:
> Hi all.
>
> I have problem with openning a device for playback.
>
>
> this is working code:
> snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, 0);
>
>
> but this is not working:
> snd_pcm_open(&handle, "hw:0,0", SND_PCM_STREAM_PLAYBACK, 0);
>
> I get this is: Device or resource busy
>
>
> PS: I have been started the `phonon' (KDE sound daemon), and the amarok (audio
> player).
>
>
> My question: what I need to do for correct open "hw:0,0" for multiply playback
> ?

Make sure that nobody else is using the device at the same time. 
"hw:0,0" requires exclusive access to the device.

You can see who is currently using your sound device(s) using this command:

sudo fuser -v /dev/snd/*

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic


More information about the Alsa-devel mailing list