Commit 80c8a2a3 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: usb-audio - Avoid flood of frame-active debug messages

With some buggy devices, the usb-audio driver may give "frame xxx active"
kernel messages too often.  Better to keep it as debug-only using
snd_printdd(), and also add the rate-limit for avoiding floods.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=738681

Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d0f3a2eb
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/gfp.h> #include <linux/gfp.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/ratelimit.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/usb/audio.h> #include <linux/usb/audio.h>
...@@ -458,8 +459,8 @@ static int retire_capture_urb(struct snd_usb_substream *subs, ...@@ -458,8 +459,8 @@ static int retire_capture_urb(struct snd_usb_substream *subs,
for (i = 0; i < urb->number_of_packets; i++) { for (i = 0; i < urb->number_of_packets; i++) {
cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset; cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset;
if (urb->iso_frame_desc[i].status) { if (urb->iso_frame_desc[i].status && printk_ratelimit()) {
snd_printd(KERN_ERR "frame %d active: %d\n", i, urb->iso_frame_desc[i].status); snd_printdd("frame %d active: %d\n", i, urb->iso_frame_desc[i].status);
// continue; // continue;
} }
bytes = urb->iso_frame_desc[i].actual_length; bytes = urb->iso_frame_desc[i].actual_length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment