[alsa-devel] Asterisk 1.4.17 and alsa 1.0.19 dmix plugin problem.

Nicola Mfb nicola.mfb at gmail.com
Mon Apr 20 20:22:21 CEST 2009

I'm sorry if this is an old issue but I did not found help in
archives/alsaweb/google and I'm new to alsa, so this report is what I
guessed reading sources and compiling test apps for about 2 days, and
the following assumptions may be completely wrong.

Asterisk has an alsa channel that works fine when using plughw:0,0
both for read and for writing, but if use plug:dmix/plug:dsnoop or
default with a dmix/dsnoop wrapper in /etc/asound.conf it does not
emit any sound. It uses select on poll fd descriptor to know if the
pcm is ready to be sent output samples.
The select will never return as it seems the dmix plugin is not able
to signal when is ready.
I noted that using snd_pcm_wait works well but cannot be used in
asterisk as it needs to select on two fd.
I guess that snd_pcm_wait with dmix check the shared memory and not
the fd descriptor.
So should poll/select be avoided completely in applications (as they
does not know if the default pcm is a dmix) and asterisk alsa channel
be rewritten or is there a workaround?

Best Regards


More information about the Alsa-devel mailing list