aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/usbmidi.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2007-08-21 02:57:34 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:59:19 -0400
commit56162aabb2fb8b9f4a8266feb7eb4edd9d1a4d49 (patch)
tree13ec1f2e3234807792517bde27932c37df549cc7 /sound/usb/usbmidi.c
parent076639f6aca365d83a01ee48343f13ec62b23af1 (diff)
[ALSA] usb-audio: add workaround for ESI MIDI Mate/RomIO II
Force low speed USB MIDI devices like the ESI MIDI Mate and RomIO II to use interrupt transfers because the USB core would not be happy about low speed bulk transfers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/usb/usbmidi.c')
-rw-r--r--sound/usb/usbmidi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index 4bacb50e9ad9..6330788c1c2b 100644
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -1351,6 +1351,13 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
1351 endpoints[epidx].out_ep = ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; 1351 endpoints[epidx].out_ep = ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
1352 if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) 1352 if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)
1353 endpoints[epidx].out_interval = ep->bInterval; 1353 endpoints[epidx].out_interval = ep->bInterval;
1354 else if (snd_usb_get_speed(umidi->chip->dev) == USB_SPEED_LOW)
1355 /*
1356 * Low speed bulk transfers don't exist, so
1357 * force interrupt transfers for devices like
1358 * ESI MIDI Mate that try to use them anyway.
1359 */
1360 endpoints[epidx].out_interval = 1;
1354 endpoints[epidx].out_cables = (1 << ms_ep->bNumEmbMIDIJack) - 1; 1361 endpoints[epidx].out_cables = (1 << ms_ep->bNumEmbMIDIJack) - 1;
1355 snd_printdd(KERN_INFO "EP %02X: %d jack(s)\n", 1362 snd_printdd(KERN_INFO "EP %02X: %d jack(s)\n",
1356 ep->bEndpointAddress, ms_ep->bNumEmbMIDIJack); 1363 ep->bEndpointAddress, ms_ep->bNumEmbMIDIJack);
@@ -1364,6 +1371,8 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* umidi,
1364 endpoints[epidx].in_ep = ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; 1371 endpoints[epidx].in_ep = ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
1365 if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT) 1372 if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)
1366 endpoints[epidx].in_interval = ep->bInterval; 1373 endpoints[epidx].in_interval = ep->bInterval;
1374 else if (snd_usb_get_speed(umidi->chip->dev) == USB_SPEED_LOW)
1375 endpoints[epidx].in_interval = 1;
1367 endpoints[epidx].in_cables = (1 << ms_ep->bNumEmbMIDIJack) - 1; 1376 endpoints[epidx].in_cables = (1 << ms_ep->bNumEmbMIDIJack) - 1;
1368 snd_printdd(KERN_INFO "EP %02X: %d jack(s)\n", 1377 snd_printdd(KERN_INFO "EP %02X: %d jack(s)\n",
1369 ep->bEndpointAddress, ms_ep->bNumEmbMIDIJack); 1378 ep->bEndpointAddress, ms_ep->bNumEmbMIDIJack);