aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-01-09 05:37:20 -0500
committerTakashi Iwai <tiwai@suse.de>2012-01-09 05:40:46 -0500
commit80c8a2a372599e604b04a9c568952fe39cd1851d (patch)
treee31d7b227474ad8887790d8a842ca55265be5cb0 /sound/usb
parentd0f3a2eb9062560bebca8b923424f3ca02a331ba (diff)
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/endpoint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 81c6edecd862..08dcce53720b 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -17,6 +17,7 @@
17 17
18#include <linux/gfp.h> 18#include <linux/gfp.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/ratelimit.h>
20#include <linux/usb.h> 21#include <linux/usb.h>
21#include <linux/usb/audio.h> 22#include <linux/usb/audio.h>
22 23
@@ -458,8 +459,8 @@ static int retire_capture_urb(struct snd_usb_substream *subs,
458 459
459 for (i = 0; i < urb->number_of_packets; i++) { 460 for (i = 0; i < urb->number_of_packets; i++) {
460 cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset; 461 cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset;
461 if (urb->iso_frame_desc[i].status) { 462 if (urb->iso_frame_desc[i].status && printk_ratelimit()) {
462 snd_printd(KERN_ERR "frame %d active: %d\n", i, urb->iso_frame_desc[i].status); 463 snd_printdd("frame %d active: %d\n", i, urb->iso_frame_desc[i].status);
463 // continue; 464 // continue;
464 } 465 }
465 bytes = urb->iso_frame_desc[i].actual_length; 466 bytes = urb->iso_frame_desc[i].actual_length;