aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2009-02-06 02:13:07 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-06 03:47:12 -0500
commit894dcd78782842924527598b0b764c9b4e679e21 (patch)
treef0522de45c1d10a2e3da460b2359b9ef198a061f /sound/usb
parent18e352e4a73465349711a9324767e1b2453383e2 (diff)
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: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbaudio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index c709b9563226..2ab83129d9b0 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -2966,6 +2966,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
2966 return -EINVAL; 2966 return -EINVAL;
2967 } 2967 }
2968 alts = &iface->altsetting[fp->altset_idx]; 2968 alts = &iface->altsetting[fp->altset_idx];
2969 fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
2969 usb_set_interface(chip->dev, fp->iface, 0); 2970 usb_set_interface(chip->dev, fp->iface, 0);
2970 init_usb_pitch(chip->dev, fp->iface, alts, fp); 2971 init_usb_pitch(chip->dev, fp->iface, alts, fp);
2971 init_usb_sample_rate(chip->dev, fp->iface, alts, fp, fp->rate_max); 2972 init_usb_sample_rate(chip->dev, fp->iface, alts, fp, fp->rate_max);