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

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

sound: usb-audio: handle wMaxPacketSize for FIXED_ENDPOINT devices



For audio devices that do not have proper audio descriptors (e.g.,
Edirol UA-20), we use hardcoded parameters from our quirks list.
However, we must still read the maximum packet size from the standard
endpoint descriptor; otherwise, we might use packets that are too big
and therefore rejected by the USB core.

Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 18e352e4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2966,6 +2966,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
		return -EINVAL;
	}
	alts = &iface->altsetting[fp->altset_idx];
	fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
	usb_set_interface(chip->dev, fp->iface, 0);
	init_usb_pitch(chip->dev, fp->iface, alts, fp);
	init_usb_sample_rate(chip->dev, fp->iface, alts, fp, fp->rate_max);