Fwd: Corrections in alsa_dev's error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I noticed a problem with the pjmedia alsa audio device error handling.
I've fixed it in the atttached patch against version 2.0.

 - Earlier an error (stream was suspended, interrupt, unknown) would
   lead to a busy wait, maxing out a core.
 - EPIPE, ESTRPIPE, EINTR and EAGAIN are now handled by snd_pcm_recover.

Other errors are ignored and we sleep for 100ms before snd_pcm_prepar-ing the
device and trying again. This is probably not the best way - we need an error
callback to handle things like devices being unplugged etc, but this seems to
recover from alsa 'Unknown error' returned by alsa in snd_pcm_readi/writei when
using pulseaudio as the back end


Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 1362 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130611/38810f9f/attachment-0001.obj>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux