Commit 55de5ef9 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Takashi Iwai

sound: usb-audio: make the MotU Fastlane work again

Kernel 2.6.18 broke the MotU Fastlane, which uses duplicate endpoint
numbers in a manner that is not only illegal but also confuses the
kernel's endpoint descriptor caching mechanism.  To work around this, we
have to add a separate usb_set_interface() call to guide the USB core to
the correct descriptors.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: default avatarDavid Fries <david@fries.net>
Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 59a3759d
...@@ -3347,7 +3347,7 @@ static int snd_usb_create_quirk(struct snd_usb_audio *chip, ...@@ -3347,7 +3347,7 @@ static int snd_usb_create_quirk(struct snd_usb_audio *chip,
[QUIRK_MIDI_YAMAHA] = snd_usb_create_midi_interface, [QUIRK_MIDI_YAMAHA] = snd_usb_create_midi_interface,
[QUIRK_MIDI_MIDIMAN] = snd_usb_create_midi_interface, [QUIRK_MIDI_MIDIMAN] = snd_usb_create_midi_interface,
[QUIRK_MIDI_NOVATION] = snd_usb_create_midi_interface, [QUIRK_MIDI_NOVATION] = snd_usb_create_midi_interface,
[QUIRK_MIDI_RAW] = snd_usb_create_midi_interface, [QUIRK_MIDI_FASTLANE] = snd_usb_create_midi_interface,
[QUIRK_MIDI_EMAGIC] = snd_usb_create_midi_interface, [QUIRK_MIDI_EMAGIC] = snd_usb_create_midi_interface,
[QUIRK_MIDI_CME] = snd_usb_create_midi_interface, [QUIRK_MIDI_CME] = snd_usb_create_midi_interface,
[QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk, [QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk,
......
...@@ -153,7 +153,7 @@ enum quirk_type { ...@@ -153,7 +153,7 @@ enum quirk_type {
QUIRK_MIDI_YAMAHA, QUIRK_MIDI_YAMAHA,
QUIRK_MIDI_MIDIMAN, QUIRK_MIDI_MIDIMAN,
QUIRK_MIDI_NOVATION, QUIRK_MIDI_NOVATION,
QUIRK_MIDI_RAW, QUIRK_MIDI_FASTLANE,
QUIRK_MIDI_EMAGIC, QUIRK_MIDI_EMAGIC,
QUIRK_MIDI_CME, QUIRK_MIDI_CME,
QUIRK_MIDI_US122L, QUIRK_MIDI_US122L,
......
...@@ -1778,8 +1778,18 @@ int snd_usb_create_midi_interface(struct snd_usb_audio* chip, ...@@ -1778,8 +1778,18 @@ int snd_usb_create_midi_interface(struct snd_usb_audio* chip,
umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; umidi->usb_protocol_ops = &snd_usbmidi_novation_ops;
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break; break;
case QUIRK_MIDI_RAW: case QUIRK_MIDI_FASTLANE:
umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; umidi->usb_protocol_ops = &snd_usbmidi_raw_ops;
/*
* Interface 1 contains isochronous endpoints, but with the same
* numbers as in interface 0. Since it is interface 1 that the
* USB core has most recently seen, these descriptors are now
* associated with the endpoint numbers. This will foul up our
* attempts to submit bulk/interrupt URBs to the endpoints in
* interface 0, so we have to make sure that the USB core looks
* again at interface 0 by calling usb_set_interface() on it.
*/
usb_set_interface(umidi->chip->dev, 0, 0);
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break; break;
case QUIRK_MIDI_EMAGIC: case QUIRK_MIDI_EMAGIC:
......
...@@ -1868,7 +1868,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), ...@@ -1868,7 +1868,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
.data = & (const struct snd_usb_audio_quirk[]) { .data = & (const struct snd_usb_audio_quirk[]) {
{ {
.ifnum = 0, .ifnum = 0,
.type = QUIRK_MIDI_RAW .type = QUIRK_MIDI_FASTLANE
}, },
{ {
.ifnum = 1, .ifnum = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment