[PATCH] reset revents if meet underrun case

xingchao xingchao.wang at intel.com
Wed Jul 13 11:29:48 PDT 2011


When meet underrun, driver will also report POLLOUT event masked with
POLLOUT|POLLERR|POLLWRNORM, that doesnot mean "wake up pa to write data".
So reset revents to 0 in case PA get confused.
---
 src/modules/alsa/alsa-sink.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index c5ded40..dd2546c 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1594,6 +1594,7 @@ static void thread_func(void *userdata) {

                 u->first = TRUE;
                 u->since_start = 0;
+                               revents = 0;
                 pa_log_debug("Wakeup From Ayncmq!");
             } else if (revents && u->use_tsched &&
pa_log_ratelimit(PA_LOG_DEBUG))
                 pa_log_debug("Wakeup from ALSA!");
-- 
1.7.1


More information about the pulseaudio-discuss mailing list