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

Commit 748a1ccc authored by Oliver Neukum's avatar Oliver Neukum Committed by Takashi Iwai
Browse files

ALSA: usb-audio: correct speed checking



Allow handling SS+ USB devices correctly.

Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent dcd4f0db
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -351,6 +351,7 @@ static int snd_usb_audio_create(struct usb_interface *intf,
	case USB_SPEED_HIGH:
	case USB_SPEED_WIRELESS:
	case USB_SPEED_SUPER:
	case USB_SPEED_SUPER_PLUS:
		break;
	default:
		dev_err(&dev->dev, "unknown device speed %d\n", snd_usb_get_speed(dev));
@@ -451,6 +452,9 @@ static int snd_usb_audio_create(struct usb_interface *intf,
	case USB_SPEED_SUPER:
		strlcat(card->longname, ", super speed", sizeof(card->longname));
		break;
	case USB_SPEED_SUPER_PLUS:
		strlcat(card->longname, ", super speed plus", sizeof(card->longname));
		break;
	default:
		break;
	}
+1 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ unsigned char snd_usb_parse_datainterval(struct snd_usb_audio *chip,
	case USB_SPEED_HIGH:
	case USB_SPEED_WIRELESS:
	case USB_SPEED_SUPER:
	case USB_SPEED_SUPER_PLUS:
		if (get_endpoint(alts, 0)->bInterval >= 1 &&
		    get_endpoint(alts, 0)->bInterval <= 4)
			return get_endpoint(alts, 0)->bInterval - 1;