[PATCH] make usbaudio less noisy when CONFIG_SND_DEBUG_VERBOSE is not set

From: drago01
Date: Wed Dec 10 2008 - 10:02:47 EST


This puts changes the usbaudio debug messages to be less noisy, when
CONFIG_SND_DEBUG_VERBOSE is not set.

Some distrubutions (ex: fedora) enable CONFIG_SND_DEBUG to get more debug
information from their users, but some messages can be triggered very
frequently and therefore flood the logs.

This patch fixes this by only print them when CONFIG_SND_DEBUG_VERBOSE is set.

Cc: Takashi Iwai <tiwai@xxxxxxx>
Cc: Chuck Ebbert <cebbert@xxxxxxxxxx>
Signed-off-by: Adel Gadllah <adel.gadllah@xxxxxxxxx>

diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index bbd70d5..6ddaa86 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -351,7 +351,7 @@ static int retire_capture_urb(struct
snd_usb_substream *subs,
for (i = 0; i < urb->number_of_packets; i++) {
cp = (unsigned char *)urb->transfer_buffer +
urb->iso_frame_desc[i].offset;
if (urb->iso_frame_desc[i].status) {
- snd_printd(KERN_ERR "frame %d active: %d\n", i,
urb->iso_frame_desc[i].status);
+ snd_printdd(KERN_ERR "frame %d active: %d\n", i,
urb->iso_frame_desc[i].status);
// continue;
}
len = urb->iso_frame_desc[i].actual_length / stride;
@@ -1299,7 +1299,7 @@ static int init_usb_sample_rate(struct
usb_device *dev, int iface,
if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), GET_CUR,
USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_IN,
SAMPLING_FREQ_CONTROL << 8, ep, data, 3, 1000)) < 0) {
- snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq at ep 0x%x\n",
+ snd_printdd(KERN_WARNING "%d:%d:%d: cannot get freq at ep 0x%x\n",
dev->devnum, iface, fmt->altsetting, ep);
return 0; /* some devices don't support reading */
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/