[patch 14/56] sound: usb-audio: handle wMaxPacketSize forFIXED_ENDPOINT devices

From: Greg KH
Date: Tue Feb 10 2009 - 19:33:01 EST


2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------

From: Clemens Ladisch <clemens@xxxxxxxxxx>

commit 894dcd78782842924527598b0b764c9b4e679e21 upstream.

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@xxxxxxxxxx>
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
sound/usb/usbaudio.c | 1 +
1 file changed, 1 insertion(+)

--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -2958,6 +2958,7 @@ static int create_fixed_stream_quirk(str
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);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/