Commit c7f572168fc4840727c9bda955b7f103922209cd

Authored by Clemens Ladisch
Committed by Takashi Iwai
1 parent f3305da35a

ALSA: usb-audio: add Novation Launchpad support

Add a quirk entry for the Novation Launchpad USB MIDI controller.

QUIRK_MIDI_FASTLANE gets renamed to *_RAW_BYTES because this quirk type
is now shared by different devices.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Jakob Flierl <jakob.flierl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

Showing 4 changed files with 16 additions and 6 deletions Side-by-side Diff

... ... @@ -784,7 +784,7 @@
784 784 };
785 785  
786 786 /*
787   - * "raw" protocol: used by the MOTU FastLane.
  787 + * "raw" protocol: just move raw MIDI bytes from/to the endpoint
788 788 */
789 789  
790 790 static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint* ep,
... ... @@ -2122,7 +2122,7 @@
2122 2122 umidi->usb_protocol_ops = &snd_usbmidi_novation_ops;
2123 2123 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
2124 2124 break;
2125   - case QUIRK_MIDI_FASTLANE:
  2125 + case QUIRK_MIDI_RAW_BYTES:
2126 2126 umidi->usb_protocol_ops = &snd_usbmidi_raw_ops;
2127 2127 /*
2128 2128 * Interface 1 contains isochronous endpoints, but with the same
... ... @@ -2133,7 +2133,8 @@
2133 2133 * interface 0, so we have to make sure that the USB core looks
2134 2134 * again at interface 0 by calling usb_set_interface() on it.
2135 2135 */
2136   - usb_set_interface(umidi->dev, 0, 0);
  2136 + if (umidi->usb_id == USB_ID(0x07fd, 0x0001)) /* MOTU Fastlane */
  2137 + usb_set_interface(umidi->dev, 0, 0);
2137 2138 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
2138 2139 break;
2139 2140 case QUIRK_MIDI_EMAGIC:
sound/usb/quirks-table.h
... ... @@ -2078,7 +2078,7 @@
2078 2078 .data = & (const struct snd_usb_audio_quirk[]) {
2079 2079 {
2080 2080 .ifnum = 0,
2081   - .type = QUIRK_MIDI_FASTLANE
  2081 + .type = QUIRK_MIDI_RAW_BYTES
2082 2082 },
2083 2083 {
2084 2084 .ifnum = 1,
... ... @@ -2224,6 +2224,15 @@
2224 2224 .product_name = "Speedio",
2225 2225 .ifnum = 3,
2226 2226 .type = QUIRK_MIDI_NOVATION
  2227 + }
  2228 +},
  2229 +{
  2230 + USB_DEVICE(0x1235, 0x000e),
  2231 + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
  2232 + /* .vendor_name = "Novation", */
  2233 + /* .product_name = "Launchpad", */
  2234 + .ifnum = 0,
  2235 + .type = QUIRK_MIDI_RAW_BYTES
2227 2236 }
2228 2237 },
2229 2238 {
... ... @@ -287,7 +287,7 @@
287 287 [QUIRK_MIDI_YAMAHA] = create_any_midi_quirk,
288 288 [QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk,
289 289 [QUIRK_MIDI_NOVATION] = create_any_midi_quirk,
290   - [QUIRK_MIDI_FASTLANE] = create_any_midi_quirk,
  290 + [QUIRK_MIDI_RAW_BYTES] = create_any_midi_quirk,
291 291 [QUIRK_MIDI_EMAGIC] = create_any_midi_quirk,
292 292 [QUIRK_MIDI_CME] = create_any_midi_quirk,
293 293 [QUIRK_MIDI_AKAI] = create_any_midi_quirk,
sound/usb/usbaudio.h
... ... @@ -70,7 +70,7 @@
70 70 QUIRK_MIDI_YAMAHA,
71 71 QUIRK_MIDI_MIDIMAN,
72 72 QUIRK_MIDI_NOVATION,
73   - QUIRK_MIDI_FASTLANE,
  73 + QUIRK_MIDI_RAW_BYTES,
74 74 QUIRK_MIDI_EMAGIC,
75 75 QUIRK_MIDI_CME,
76 76 QUIRK_MIDI_AKAI,