lkml.org 
[lkml]   [2008]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] make usbaudio less noisy when CONFIG_SND_DEBUG_VERBOSE is not set
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@suse.de>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>

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 */
}

\
 
 \ /
  Last update: 2008-12-10 16:05    [W:0.119 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site