Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ALSA] usb-audio: work around wrong wMaxPacketSize on ESI M4U

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 <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>

authored by

Clemens Ladisch and committed by
Jaroslav Kysela
490cbd92 d05cc104

+5 -1
+5 -1
sound/usb/usbmidi.c
··· 965 965 } 966 966 /* we never use interrupt output pipes */ 967 967 pipe = usb_sndbulkpipe(umidi->chip->dev, ep_info->out_ep); 968 - ep->max_transfer = usb_maxpacket(umidi->chip->dev, pipe, 1); 968 + if (umidi->chip->usb_id == USB_ID(0x0a92, 0x1020)) /* ESI M4U */ 969 + /* FIXME: we need more URBs to get reasonable bandwidth here: */ 970 + ep->max_transfer = 4; 971 + else 972 + ep->max_transfer = usb_maxpacket(umidi->chip->dev, pipe, 1); 969 973 buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer, 970 974 GFP_KERNEL, &ep->urb->transfer_dma); 971 975 if (!buffer) {