]> git.tuebingen.mpg.de Git - paraslash.git/commit
alsa: Avoid busy loop.
authorAndre Noll <maan@systemlinux.org>
Sun, 24 Jul 2011 20:18:42 +0000 (22:18 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 24 Jul 2011 20:19:15 +0000 (22:19 +0200)
commit4773c4fe3f00eaad35850cb0424cdece8e2a5a91
treeee581d4f6c229041f65c74287a10bd1501ebda5d
parent85c2ed9bb21a7576e10c63c0273ff1ecc5e45b9b
alsa: Avoid busy loop.

It is possible that snd_pcm_writei() returns zero rather than -EAGAIN
in case nothing was written because the alsa buffer was already full.

Currently we try again, and eventually succeed. However, this is
ugly, burns CPU cycles and might even lead to an endless loop for
misconfigured alsa devices. So simply return from alsa_post_select()
if snd_pcm_writei() returned zero.
alsa_write.c