summaryrefslogtreecommitdiffstats
path: root/sound/usb/midi.c
diff options
context:
space:
mode:
authorKarsten Wiese <fzu@wemgehoertderstaat.de>2011-01-03 02:41:58 +0100
committerTakashi Iwai <tiwai@suse.de>2011-01-11 19:48:58 +0100
commit921eebdc18c82268eab446592191b39e35d031d6 (patch)
treeada80734c2f0014dcfd236b64d429791c33fa114 /sound/usb/midi.c
parentd1d7093f3f639e693fa763eb51d8d9c349bfd606 (diff)
downloadlinux-stable-921eebdc18c82268eab446592191b39e35d031d6.tar.gz
linux-stable-921eebdc18c82268eab446592191b39e35d031d6.tar.bz2
linux-stable-921eebdc18c82268eab446592191b39e35d031d6.zip
ALSA: snd-usb-us122l: Fix MIDI output
The US-122L always reads 9 bytes per urb unless they are set to 0xFD. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: stable@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
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,
return;
}
- memset(urb->transfer_buffer + count, 0xFD, 9 - count);
- urb->transfer_buffer_length = count;
+ memset(urb->transfer_buffer + count, 0xFD, ep->max_transfer - count);
+ urb->transfer_buffer_length = ep->max_transfer;
}
static struct usb_protocol_ops snd_usbmidi_122l_ops = {
@@ -1295,6 +1295,13 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi* umidi,
case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */
ep->max_transfer = 4;
break;
+ /*
+ * Some devices only work with 9 bytes packet size:
+ */
+ case USB_ID(0x0644, 0x800E): /* Tascam US-122L */
+ case USB_ID(0x0644, 0x800F): /* Tascam US-144 */
+ ep->max_transfer = 9;
+ break;
}
for (i = 0; i < OUTPUT_URBS; ++i) {
buffer = usb_alloc_coherent(umidi->dev,