From 54dad91f079a88f7f7dfb17692ff09af70d30e2e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 24 Jan 2009 00:12:12 +0100 Subject: use pa_log_ratelimit() at a few places --- src/modules/alsa/alsa-sink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/alsa/alsa-sink.c') diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index f092b5d0..94b289ff 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -251,7 +251,7 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle if (PA_UNLIKELY(n <= u->hwbuf_unused_frames)) { - if (polled) + if (polled && pa_log_ratelimit()) pa_log("ALSA woke us up to write new data to the device, but there was actually nothing to write! " "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. " "We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail_update() returned 0."); @@ -374,7 +374,7 @@ static int unix_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle if (PA_UNLIKELY(n <= u->hwbuf_unused_frames)) { - if (polled) + if (polled && pa_log_ratelimit()) pa_log("ALSA woke us up to write new data to the device, but there was actually nothing to write! " "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. " "We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail_update() returned 0."); @@ -1194,7 +1194,7 @@ static void thread_func(void *userdata) { u->since_start = 0; } - if (revents && u->use_tsched) + if (revents && u->use_tsched && pa_log_ratelimit()) pa_log_debug("Wakeup from ALSA!%s%s", (revents & POLLIN) ? " INPUT" : "", (revents & POLLOUT) ? " OUTPUT" : ""); } else revents = 0; -- cgit