Skip to content

Commit

Permalink
sound: usb-audio: handle wMaxPacketSize for FIXED_ENDPOINT devices
Browse files Browse the repository at this point in the history
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: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Feb 6, 2009
1 parent 18e352e commit 894dcd7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 894dcd7

Please sign in to comment.