diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2013-08-16 13:19:00 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-08-19 09:48:48 -0400 |
commit | 74d779ab7c9f9024cfead259206e0e0b20ee37e4 (patch) | |
tree | 40dcfe380a577f85e8ed3c0bcd9de59378511377 | |
parent | bcbb15530ebe9737622cb7779b35c61f48b49734 (diff) |
ALSA: pcm: Use snd_printd_ratelimit()
The use of snd_printd_ratelimit() supresses superfluous output from
printk_ratelimit() when CONFIG_SND_DEBUG is not defined. For example,
[ 43.753692] snd_pcm_update_hw_ptr0: 26 callbacks suppressed
[ 48.822131] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
[ 53.894953] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
[ 58.997761] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
[ 64.100952] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
fills the log even when no debug output is actually produced.
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Yacine Belkadi <yacine.belkadi.1@gmail.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/core/pcm_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 82bb029d4414..6e03b465e44e 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c | |||
@@ -184,7 +184,7 @@ static void xrun(struct snd_pcm_substream *substream) | |||
184 | do { \ | 184 | do { \ |
185 | if (xrun_debug(substream, XRUN_DEBUG_BASIC)) { \ | 185 | if (xrun_debug(substream, XRUN_DEBUG_BASIC)) { \ |
186 | xrun_log_show(substream); \ | 186 | xrun_log_show(substream); \ |
187 | if (printk_ratelimit()) { \ | 187 | if (snd_printd_ratelimit()) { \ |
188 | snd_printd("PCM: " fmt, ##args); \ | 188 | snd_printd("PCM: " fmt, ##args); \ |
189 | } \ | 189 | } \ |
190 | dump_stack_on_xrun(substream); \ | 190 | dump_stack_on_xrun(substream); \ |
@@ -342,7 +342,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream, | |||
342 | return -EPIPE; | 342 | return -EPIPE; |
343 | } | 343 | } |
344 | if (pos >= runtime->buffer_size) { | 344 | if (pos >= runtime->buffer_size) { |
345 | if (printk_ratelimit()) { | 345 | if (snd_printd_ratelimit()) { |
346 | char name[16]; | 346 | char name[16]; |
347 | snd_pcm_debug_name(substream, name, sizeof(name)); | 347 | snd_pcm_debug_name(substream, name, sizeof(name)); |
348 | xrun_log_show(substream); | 348 | xrun_log_show(substream); |