]> code.delx.au - pulseaudio/commit
alsa: Make mixer error handling more robust still
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 4 Oct 2011 19:28:52 +0000 (00:58 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 4 Oct 2011 20:25:15 +0000 (01:55 +0530)
commit42d056593de4bd94bf706c0bd62d05d2aaff77bf
treebdfb79f47396679cd33c5fe5bcab72e035c79be2
parent9e92b1977b45373024f5b33aa23ffe3e7b7c7ea0
alsa: Make mixer error handling more robust still

Instead of relying on the snd_mixer_* functions failing, we check for
POLLERR and POLLNVAL first. After this, any errors in handling the mixer
events are deemed fatal (that is we cause the ALSA source/sink thread to
terminate).

The case where POLLERR is set but POLLNVAL is not does not actually
occur, but we're making this a soft failure (stop polling the mixer, but
don't kill the I/O thread). If other conditions where POLLERR occurs
turn up, we need to handle them explicitly.

Thanks to Linus Torvalds for helping get this right.
src/modules/alsa/alsa-mixer.c