Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=56162aabb2fb8b9f4a8266feb7eb4edd9d1a4d49
Commit:     56162aabb2fb8b9f4a8266feb7eb4edd9d1a4d49
Parent:     076639f6aca365d83a01ee48343f13ec62b23af1
Author:     Clemens Ladisch <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 21 08:57:34 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 15:59:19 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/usb/usbmidi.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c
index 4bacb50..6330788 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,
                        endpoints[epidx].out_ep = ep->bEndpointAddress & 
USB_ENDPOINT_NUMBER_MASK;
                        if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == 
USB_ENDPOINT_XFER_INT)
                                endpoints[epidx].out_interval = ep->bInterval;
+                       else if (snd_usb_get_speed(umidi->chip->dev) == 
USB_SPEED_LOW)
+                               /*
+                                * Low speed bulk transfers don't exist, so
+                                * force interrupt transfers for devices like
+                                * ESI MIDI Mate that try to use them anyway.
+                                */
+                               endpoints[epidx].out_interval = 1;
                        endpoints[epidx].out_cables = (1 << 
ms_ep->bNumEmbMIDIJack) - 1;
                        snd_printdd(KERN_INFO "EP %02X: %d jack(s)\n",
                                    ep->bEndpointAddress, 
ms_ep->bNumEmbMIDIJack);
@@ -1364,6 +1371,8 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi* 
umidi,
                        endpoints[epidx].in_ep = ep->bEndpointAddress & 
USB_ENDPOINT_NUMBER_MASK;
                        if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == 
USB_ENDPOINT_XFER_INT)
                                endpoints[epidx].in_interval = ep->bInterval;
+                       else if (snd_usb_get_speed(umidi->chip->dev) == 
USB_SPEED_LOW)
+                               endpoints[epidx].in_interval = 1;
                        endpoints[epidx].in_cables = (1 << 
ms_ep->bNumEmbMIDIJack) - 1;
                        snd_printdd(KERN_INFO "EP %02X: %d jack(s)\n",
                                    ep->bEndpointAddress, 
ms_ep->bNumEmbMIDIJack);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to