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 b9c2bc65f51a..0eb1ade87345 100644
--- a/sound/usb/midi.c
+++ b/sound/usb/midi.c
@@ -843,8 +843,8 @@ static void snd_usbmidi_us122l_output(struct snd_usb_midi_out_endpoint *ep,
843 return; 843 return;
844 } 844 }
845 845
846 memset(urb->transfer_buffer + count, 0xFD, 9 - count); 846 memset(urb->transfer_buffer + count, 0xFD, ep->max_transfer - count);
847 urb->transfer_buffer_length = count; 847 urb->transfer_buffer_length = ep->max_transfer;
848} 848}
849 849
850static struct usb_protocol_ops snd_usbmidi_122l_ops = { 850static struct usb_protocol_ops snd_usbmidi_122l_ops = {
@@ -1288,6 +1288,13 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi,
1288 case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */ 1288 case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */
1289 ep->max_transfer = 4; 1289 ep->max_transfer = 4;
1290 break; 1290 break;
1291 /*
1292 * Some devices only work with 9 bytes packet size:
1293 */
1294 case USB_ID(0x0644, 0x800E): /* Tascam US-122L */
1295 case USB_ID(0x0644, 0x800F): /* Tascam US-144 */
1296 ep->max_transfer = 9;
1297 break;
1291 } 1298 }
1292 for (i = 0; i < OUTPUT_URBS; ++i) { 1299 for (i = 0; i < OUTPUT_URBS; ++i) {
1293 buffer = usb_alloc_coherent(umidi->dev, 1300 buffer = usb_alloc_coherent(umidi->dev,