From: Clemens Ladisch Date: Thu, 4 Aug 2011 14:17:42 +0000 (+0200) Subject: ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6 X-Git-Tag: v3.0.2~50 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=eb473dd5ad8785d35142966cdcd6896d8dff5a22;p=karo-tx-linux.git ALSA: snd-usb: Accept UAC2 FORMAT_TYPE descriptors with bLength > 6 commit 824818b148db42173446707df4cbd61cd7133272 upstream. The Focusrite Scarlett 18i6 USB has them that way, which is probably a bug. Anyway, the driver should simply ignore this fact. Signed-off-by: Daniel Mack Reported-by: Nicolai Krakowiak Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index b0ef9f501896..05842c8b0672 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c @@ -352,7 +352,7 @@ int snd_usb_parse_audio_endpoints(struct snd_usb_audio *chip, int iface_no) continue; } if (((protocol == UAC_VERSION_1) && (fmt->bLength < 8)) || - ((protocol == UAC_VERSION_2) && (fmt->bLength != 6))) { + ((protocol == UAC_VERSION_2) && (fmt->bLength < 6))) { snd_printk(KERN_ERR "%d:%u:%d : invalid UAC_FORMAT_TYPE desc\n", dev->devnum, iface_no, altno); continue;