Skip to content

Commit

Permalink
[ALSA] usb-audio: work around wrong wMaxPacketSize on ESI M4U
Browse files Browse the repository at this point in the history
Add a workaround for the ESI M4U that claims to support 32-byte packets
but ignores the remaining bytes of packets bigger than four bytes.

Signed-off-by: Clemens Ladisch <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
cladisch authored and Jaroslav Kysela committed May 11, 2007
1 parent d05cc10 commit 490cbd9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sound/usb/usbmidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,11 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi,
}
/* we never use interrupt output pipes */
pipe = usb_sndbulkpipe(umidi->chip->dev, ep_info->out_ep);
ep->max_transfer = usb_maxpacket(umidi->chip->dev, pipe, 1);
if (umidi->chip->usb_id == USB_ID(0x0a92, 0x1020)) /* ESI M4U */
/* FIXME: we need more URBs to get reasonable bandwidth here: */
ep->max_transfer = 4;
else
ep->max_transfer = usb_maxpacket(umidi->chip->dev, pipe, 1);
buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
GFP_KERNEL, &ep->urb->transfer_dma);
if (!buffer) {
Expand Down

0 comments on commit 490cbd9

Please sign in to comment.