diff options
author | Keith A. Milner <maillist@superlative.org> | 2015-10-11 15:19:48 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-11 18:18:59 +0200 |
commit | ac77423609aa499265a0ab75c497661bc7157f37 (patch) | |
tree | 6fe45d7e13583a37871f0884c3f6fe3587108cc4 /sound/usb/midi.c | |
parent | 2a7e1713cd652e7d2fdb54057fb6b2508cab15dc (diff) | |
download | op-kernel-dev-ac77423609aa499265a0ab75c497661bc7157f37.zip op-kernel-dev-ac77423609aa499265a0ab75c497661bc7157f37.tar.gz |
ALSA: usb-audio: Allow any MIDI endpoint to drive use of interrupt transfer on newer Roland devices
This patch enables interrupt transfer mode for MIDI ports on newer
Boss/Roland devices such as the GT-100/001 which support interrupt
transfer on both IN and OUT MIDI endpoints. Previously this wasn't being
enabled for these devices as the code was specifically looking for the
scenario where the IN endpoint supported interrupt transfer and the OUT
endpoint was bulk transfer. Newer devices support interrupt transfer for
both endpoints.
This has been tested on Boss devices GT-001, BR-80 and JS-8 and Roland
VS-20.
It would benefit from some regresison testing with other devices if
possible.
Signed-off-by: Keith A. Milner <maillist@superlative.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/midi.c')
-rw-r--r-- | sound/usb/midi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/usb/midi.c b/sound/usb/midi.c index 417ebb1..7661616 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c @@ -1903,11 +1903,14 @@ static void snd_usbmidi_switch_roland_altsetting(struct snd_usb_midi *umidi) hostif = &intf->altsetting[1]; intfd = get_iface_desc(hostif); + /* If either or both of the endpoints support interrupt transfer, + * then use the alternate setting + */ if (intfd->bNumEndpoints != 2 || - (get_endpoint(hostif, 0)->bmAttributes & - USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_BULK || - (get_endpoint(hostif, 1)->bmAttributes & - USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_INT) + !((get_endpoint(hostif, 0)->bmAttributes & + USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT || + (get_endpoint(hostif, 1)->bmAttributes & + USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) return; dev_dbg(&umidi->dev->dev, "switching to altsetting %d with int ep\n", |