]> code.delx.au - pulseaudio/commitdiff
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 395432a56fecfd51bd87cf95fe85a4b35421b448..c4aa75b4be7c09a158d8c5d80be482230ed34fdb 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 bdd4493da0ef63e3d953d588da796f1a893ece0a..1dd63f0d6b36e2f6fa10d7a906ed1a9840744ea1 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!");