diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-05-16 20:07:18 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-05-16 20:07:18 +0200 |
commit | 377a879d9832f4ba69bd6a1fc996bb4181b1e504 (patch) | |
tree | 818fda45eceb507f5407ef9b6bf1cfa98f6778df /sound/usb/pcm.c | |
parent | 862154bbd7d7f9c70eabd0e72b00a39673df71e5 (diff) | |
download | linux-377a879d9832f4ba69bd6a1fc996bb4181b1e504.tar.gz linux-377a879d9832f4ba69bd6a1fc996bb4181b1e504.tar.bz2 linux-377a879d9832f4ba69bd6a1fc996bb4181b1e504.zip |
ALSA: usb-audio: Apply rate limit to warning messages in URB complete callback
retire_capture_urb() may print warning messages when the given URB
doesn't align, and this may flood the system log easily.
Put the rate limit to the message for avoiding it.
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1093485
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r-- | sound/usb/pcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index dc2dfec9effd..20bed1c7a312 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -1303,7 +1303,7 @@ static void retire_capture_urb(struct snd_usb_substream *subs, if (bytes % (runtime->sample_bits >> 3) != 0) { int oldbytes = bytes; bytes = frames * stride; - dev_warn(&subs->dev->dev, + dev_warn_ratelimited(&subs->dev->dev, "Corrected urb data len. %d->%d\n", oldbytes, bytes); } |