aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/midi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/midi.c')
-rw-r--r--sound/usb/midi.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/usb/midi.c b/sound/usb/midi.c
index d7021cb01047..db2dc5ffe6dd 100644
--- a/sound/usb/midi.c
+++ b/sound/usb/midi.c
@@ -850,8 +850,8 @@ static void snd_usbmidi_us122l_output(struct snd_usb_midi_out_endpoint *ep,
850 return; 850 return;
851 } 851 }
852 852
853 memset(urb->transfer_buffer + count, 0xFD, 9 - count); 853 memset(urb->transfer_buffer + count, 0xFD, ep->max_transfer - count);
854 urb->transfer_buffer_length = count; 854 urb->transfer_buffer_length = ep->max_transfer;
855} 855}
856 856
857static struct usb_protocol_ops snd_usbmidi_122l_ops = { 857static struct usb_protocol_ops snd_usbmidi_122l_ops = {
@@ -1295,6 +1295,13 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi,
1295 case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */ 1295 case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */
1296 ep->max_transfer = 4; 1296 ep->max_transfer = 4;
1297 break; 1297 break;
1298 /*
1299 * Some devices only work with 9 bytes packet size:
1300 */
1301 case USB_ID(0x0644, 0x800E): /* Tascam US-122L */
1302 case USB_ID(0x0644, 0x800F): /* Tascam US-144 */
1303 ep->max_transfer = 9;
1304 break;
1298 } 1305 }
1299 for (i = 0; i < OUTPUT_URBS; ++i) { 1306 for (i = 0; i < OUTPUT_URBS; ++i) {
1300 buffer = usb_alloc_coherent(umidi->dev, 1307 buffer = usb_alloc_coherent(umidi->dev,