Asterisk on Freerunner was: voip on Debian
nicola.mfb at gmail.com
Sun Apr 19 21:14:51 CEST 2009
2009/4/19 Nicola Mfb <nicola.mfb at gmail.com>:
> 2009/4/19 Al Johnson <openmoko at mazikeen.demon.co.uk>:
> I have stuttered outgoing audio, so I think the problem is with alsa
> buffer/periods etc., the proposed asound.conf file should work as
> create longer buffer/periods both for input and output, but using it
> asterisk does not speak anymore to the erapiece. I enabled the logging
> to maximum details and I may see effectively "Alsa/default is ringing"
> but no sound is emitted, and I do not know why, as in this situation
> aplay works fine.
I did some test and think (hope) isolated the problem.
Asterisk get an fd poll descriptor from alsa playback pcm, when a
sound has to be emitted this fd is added to the write fdset. The alsa
thread loops around select() and when the alsa driver is ready to
receive more frames to write the select is waken and asterisk
effectively send out the sound.
Now that's working only if using plughw:0,0 as the output device, with
some sort of dmix, multiplexer etc, the select will never be waken by
the write fd descriptor so asterisk will never emit any sound.
Some alsa guru may take a look at the chan_alsa.c file of asterisk 1.4.17?
More information about the community