[alsa-devel] Card driver: device or resource busy

Raymond Yau superquad.vortex2 at gmail.com
Sun Jan 16 02:13:29 CET 2011


2011/1/16 torsten.schenk <torsten.schenk at zoho.com>

> Hello,
>
> I'm currently developing a driver for a card. PCM playback works so far, I
> just encountered some playback issues when firefox (flash) and another alsa
> client wanted to play back at the same time. I figured out that the
> difference between my driver and existing ones is, that my driver only
> allows one client and others multiple. I get a "Device or resource busy"
> when I play back two times the same file (also different ones of course)
> with mplayer f.ex.
>

if your sound card 's DSP can mix more than one audio stream, you need to
specify the number of playback streams in snd_pcm_new()

 int snd_pcm_new(struct snd_card *card, const char *id, int device,
        int playback_count, int capture_count,
        struct snd_pcm **rpcm);

otherwise you will need to use a sound server or dmix for software mixing


More information about the Alsa-devel mailing list