Corrections in alsa_dev's error handling

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

 



Hi,

I noticed a few issues with the pjmedia alsa audio device.
I've fixed it in the atttached patch.

 - Earlier an error (stream was suspended, interrupt, unknown) would
   lead to a busy wait, maxing out the CPU.
 - EPIPE, ESTRPIPE, EINTR and EAGAIN are 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.
 - The snd_pcm_prepare seems to recover from alsa 'Unknown error' returned by
   alsa in snd_pcm_readi/writei.


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/20130312/18875c19/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