use pa_log_ratelimit() at a few places

This commit is contained in:
Lennart Poettering 2009-01-24 00:12:12 +01:00
parent 77c4ccfcaf
commit 54dad91f07
2 changed files with 6 additions and 6 deletions

View file

@ -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 (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! " 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. " "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."); "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 (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! " 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. " "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."); "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; 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" : ""); pa_log_debug("Wakeup from ALSA!%s%s", (revents & POLLIN) ? " INPUT" : "", (revents & POLLOUT) ? " OUTPUT" : "");
} else } else
revents = 0; revents = 0;

View file

@ -238,7 +238,7 @@ static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled
if (PA_UNLIKELY(n <= 0)) { if (PA_UNLIKELY(n <= 0)) {
if (polled) if (polled && pa_log_ratelimit())
pa_log("ALSA woke us up to read new data from the device, but there was actually nothing to read! " pa_log("ALSA woke us up to read new data from the device, but there was actually nothing to read! "
"Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. " "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. "
"We were woken up with POLLIN set -- however a subsequent snd_pcm_avail_update() returned 0."); "We were woken up with POLLIN set -- however a subsequent snd_pcm_avail_update() returned 0.");
@ -346,7 +346,7 @@ static int unix_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled
if (PA_UNLIKELY(n <= 0)) { if (PA_UNLIKELY(n <= 0)) {
if (polled) if (polled && pa_log_ratelimit())
pa_log("ALSA woke us up to read new data from the device, but there was actually nothing to read! " pa_log("ALSA woke us up to read new data from the device, but there was actually nothing to read! "
"Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. " "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. "
"We were woken up with POLLIN set -- however a subsequent snd_pcm_avail_update() returned 0."); "We were woken up with POLLIN set -- however a subsequent snd_pcm_avail_update() returned 0.");
@ -1029,7 +1029,7 @@ static void thread_func(void *userdata) {
snd_pcm_start(u->pcm_handle); snd_pcm_start(u->pcm_handle);
} }
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" : ""); pa_log_debug("Wakeup from ALSA!%s%s", (revents & POLLIN) ? " INPUT" : "", (revents & POLLOUT) ? " OUTPUT" : "");
} else } else
revents = 0; revents = 0;