Skip to content

Commit

Permalink
ALSA: usb-audio: silence a superfluous warning
Browse files Browse the repository at this point in the history
It is not advisable to print a warning when a device does not support
setting the sample rate because this is perfectly valid for devices with
a single rate or where rates are implicitly changed by selecting another
alternate setting.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Jul 9, 2010
1 parent 54a3b8d commit d32d552
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/usb/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,8 @@ static int set_sample_rate_v1(struct snd_usb_audio *chip, int iface,
ep = get_endpoint(alts, 0)->bEndpointAddress;

/* if endpoint doesn't have sampling rate control, bail out */
if (!(fmt->attributes & UAC_EP_CS_ATTR_SAMPLE_RATE)) {
snd_printk(KERN_WARNING "%d:%d:%d: endpoint lacks sample rate attribute bit, cannot set.\n",
dev->devnum, iface, fmt->altsetting);
if (!(fmt->attributes & UAC_EP_CS_ATTR_SAMPLE_RATE))
return 0;
}

data[0] = rate;
data[1] = rate >> 8;
Expand Down

0 comments on commit d32d552

Please sign in to comment.