[alsa-devel] VOIP xrun problem
jamey.drennan at gmail.com
Mon Oct 22 22:40:15 CEST 2012
A quick background: I'm developing a VOIP program for an embedded system.
In the first phase of the program everything was event driven. Basically
ask ALSA for samples, encode them, and send them via UDP to the connected
client. On the other end, receive the packet, decode, play the samples.
After setting the correct value for the start_threshold function everything
worked great no xruns at all.
Now in the second phase, events are timed due to specification
requirements. The same Alsa setup code is used yet xruns (mostly
underruns) are all over the place. The underruns are periodic and can be
reduced by increasing the period size and number of periods (this also
increases the latency obviously and is undersirable) but never removed
My question is how to reduce/remove the xruns. I am not currently at a
point where installing a real-time OS or patching to get these features is
possible. Also, when aplay/arecord is run on the system, no xruns occur.
Finally, the CPU is not being overloaded, actually in the second phase the
CPU usage is much less. Any help/suggestions are greatly appreciated.
Thanks in advance!
More information about the Alsa-devel