alsa: resets POLLOUT event
authorWang Xingchao <xingchao.wang@intel.com>
Fri, 5 Aug 2011 14:33:17 +0000 (10:33 -0400)
committerColin Guthrie <colin@mageia.org>
Thu, 11 Aug 2011 13:31:48 +0000 (15:31 +0200)
revents marked as POLLOUT|POLLERR|POLLWRNORM in "underrun" case that will
trigger unexpected log "ALSA woke us up to write new data to the device, but
there was acturally nothing to write...".

This patch avoids this log message.

src/modules/alsa/alsa-sink.c
src/modules/alsa/alsa-source.c

index 395432a..c4aa75b 100644 (file)
@@ -1670,6 +1670,7 @@ static void thread_func(void *userdata) {
 
                 u->first = TRUE;
                 u->since_start = 0;
+                revents = 0;
             } else if (revents && u->use_tsched && pa_log_ratelimit(PA_LOG_DEBUG))
                 pa_log_debug("Wakeup from ALSA!");
 
index bdd4493..1dd63f0 100644 (file)
@@ -1445,6 +1445,7 @@ static void thread_func(void *userdata) {
                     goto fail;
 
                 u->first = TRUE;
+                revents = 0;
             } else if (revents && u->use_tsched && pa_log_ratelimit(PA_LOG_DEBUG))
                 pa_log_debug("Wakeup from ALSA!");