summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-sink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-02-21 16:33:46 +0100
committerLennart Poettering <lennart@poettering.net>2009-02-21 16:33:46 +0100
commit14ee8d471aa5aa2eeefd9de0911ee51d0439409e (patch)
tree88c6949e4a4b91ab91aba1d5cf772d2e0fe94afe /src/modules/alsa/alsa-sink.c
parent4505bc9cc6bb1f9206f922a992a9be0e17703df1 (diff)
print warnings about driver bugs at most once
Diffstat (limited to 'src/modules/alsa/alsa-sink.c')
-rw-r--r--src/modules/alsa/alsa-sink.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index ed25a6f3..ef51f1db 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -304,10 +304,12 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle
if (PA_UNLIKELY(n_bytes <= u->hwbuf_unused)) {
- 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."));
+ if (polled)
+ PA_ONCE_BEGIN {
+ 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."));
+ } PA_ONCE_END;
#ifdef DEBUG_TIMING
pa_log_debug("Not filling up, because not necessary.");
@@ -431,10 +433,12 @@ static int unix_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle
if (PA_UNLIKELY(n_bytes <= u->hwbuf_unused)) {
- 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."));
+ if (polled)
+ PA_ONCE_BEGIN {
+ 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."));
+ } PA_ONCE_END;
break;
}