Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d32d552e authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Takashi Iwai
Browse files

ALSA: usb-audio: silence a superfluous warning



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: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 54a3b8dc
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;