mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tim Gardner <tim.gardner@canonical.com>
To: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Cc: Tim Gardner <tim.gardner@canonical.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Yacine Belkadi <yacine.belkadi.1@gmail.com>
Subject: [PATCH 3.11-rc5 2/2] ALSA: pcm: Use snd_printd_ratelimit()
Date: Fri, 16 Aug 2013 11:19:00 -0600	[thread overview]
Message-ID: <1376673540-2201-2-git-send-email-tim.gardner@canonical.com> (raw)
In-Reply-To: <1376673540-2201-1-git-send-email-tim.gardner@canonical.com>

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>
---
 sound/core/pcm_lib.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 82bb029..6e03b46 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)
 	do {								\
 		if (xrun_debug(substream, XRUN_DEBUG_BASIC)) {		\
 			xrun_log_show(substream);			\
-			if (printk_ratelimit()) {			\
+			if (snd_printd_ratelimit()) {			\
 				snd_printd("PCM: " fmt, ##args);	\
 			}						\
 			dump_stack_on_xrun(substream);			\
@@ -342,7 +342,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
 		return -EPIPE;
 	}
 	if (pos >= runtime->buffer_size) {
-		if (printk_ratelimit()) {
+		if (snd_printd_ratelimit()) {
 			char name[16];
 			snd_pcm_debug_name(substream, name, sizeof(name));
 			xrun_log_show(substream);
-- 
1.7.9.5


  reply	other threads:[~2013-08-16 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-16 17:18 [PATCH 3.11-rc5 1/2] ALSA: pcm: Add snd_printd_ratelimit() Tim Gardner
2013-08-16 17:19 ` Tim Gardner [this message]
2013-08-19 13:49 ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376673540-2201-2-git-send-email-tim.gardner@canonical.com \
    --to=tim.gardner@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=yacine.belkadi.1@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®