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

Commit 660877cd authored by Hemant Kumar's avatar Hemant Kumar Committed by Gerrit - the friendly Code Review server
Browse files

sound: usb: Increase upper bound check for bInterval to 16



Driver currently restrict upper bound check for bInterval
to 4 which corresponds to 1 ms. Fix the bInterval range
check as per the USB spec for ISOC endpoint.

Change-Id: I580e1fdfab0eeb1231642b920239691e7af67727
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 5027ffca
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -122,7 +122,7 @@ unsigned char snd_usb_parse_datainterval(struct snd_usb_audio *chip,
	case USB_SPEED_SUPER:
	case USB_SPEED_SUPER:
	case USB_SPEED_SUPER_PLUS:
	case USB_SPEED_SUPER_PLUS:
		if (get_endpoint(alts, 0)->bInterval >= 1 &&
		if (get_endpoint(alts, 0)->bInterval >= 1 &&
		    get_endpoint(alts, 0)->bInterval <= 4)
		    get_endpoint(alts, 0)->bInterval <= 16)
			return get_endpoint(alts, 0)->bInterval - 1;
			return get_endpoint(alts, 0)->bInterval - 1;
		break;
		break;
	default:
	default: