aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-10-22 12:20:48 -0400
committerTakashi Iwai <tiwai@suse.de>2010-10-22 12:48:40 -0400
commitc7f572168fc4840727c9bda955b7f103922209cd (patch)
tree0d0480506cf8d78a77549e9dec15d1d2356a7814 /sound/usb
parentf3305da35a26def93b476051f4d7b6bc791e561e (diff)
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>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/midi.c7
-rw-r--r--sound/usb/quirks-table.h11
-rw-r--r--sound/usb/quirks.c2
-rw-r--r--sound/usb/usbaudio.h2
4 files changed, 16 insertions, 6 deletions
diff --git a/sound/usb/midi.c b/sound/usb/midi.c
index 156cd0716c42..25bce7e5b1af 100644
--- a/sound/usb/midi.c
+++ b/sound/usb/midi.c
@@ -784,7 +784,7 @@ static struct usb_protocol_ops snd_usbmidi_novation_ops = {
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
790static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint* ep, 790static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint* ep,
@@ -2122,7 +2122,7 @@ int snd_usbmidi_create(struct snd_card *card,
2122 umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; 2122 umidi->usb_protocol_ops = &snd_usbmidi_novation_ops;
2123 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); 2123 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
2124 break; 2124 break;
2125 case QUIRK_MIDI_FASTLANE: 2125 case QUIRK_MIDI_RAW_BYTES:
2126 umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; 2126 umidi->usb_protocol_ops = &snd_usbmidi_raw_ops;
2127 /* 2127 /*
2128 * Interface 1 contains isochronous endpoints, but with the same 2128 * Interface 1 contains isochronous endpoints, but with the same
@@ -2133,7 +2133,8 @@ int snd_usbmidi_create(struct snd_card *card,
2133 * interface 0, so we have to make sure that the USB core looks 2133 * interface 0, so we have to make sure that the USB core looks
2134 * again at interface 0 by calling usb_set_interface() on it. 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 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); 2138 err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
2138 break; 2139 break;
2139 case QUIRK_MIDI_EMAGIC: 2140 case QUIRK_MIDI_EMAGIC:
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 682e3e06b07c..ad7079d1676c 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -2078,7 +2078,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
2078 .data = & (const struct snd_usb_audio_quirk[]) { 2078 .data = & (const struct snd_usb_audio_quirk[]) {
2079 { 2079 {
2080 .ifnum = 0, 2080 .ifnum = 0,
2081 .type = QUIRK_MIDI_FASTLANE 2081 .type = QUIRK_MIDI_RAW_BYTES
2082 }, 2082 },
2083 { 2083 {
2084 .ifnum = 1, 2084 .ifnum = 1,
@@ -2227,6 +2227,15 @@ YAMAHA_DEVICE(0x7010, "UB99"),
2227 } 2227 }
2228}, 2228},
2229{ 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
2236 }
2237},
2238{
2230 USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661), 2239 USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
2231 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 2240 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2232 .vendor_name = "Novation", 2241 .vendor_name = "Novation",
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 9a9da09586a5..cf8bf088394b 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -287,7 +287,7 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
287 [QUIRK_MIDI_YAMAHA] = create_any_midi_quirk, 287 [QUIRK_MIDI_YAMAHA] = create_any_midi_quirk,
288 [QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk, 288 [QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk,
289 [QUIRK_MIDI_NOVATION] = create_any_midi_quirk, 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 [QUIRK_MIDI_EMAGIC] = create_any_midi_quirk, 291 [QUIRK_MIDI_EMAGIC] = create_any_midi_quirk,
292 [QUIRK_MIDI_CME] = create_any_midi_quirk, 292 [QUIRK_MIDI_CME] = create_any_midi_quirk,
293 [QUIRK_MIDI_AKAI] = create_any_midi_quirk, 293 [QUIRK_MIDI_AKAI] = create_any_midi_quirk,
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 24d3319cc34d..db3eb21627ee 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -70,7 +70,7 @@ enum quirk_type {
70 QUIRK_MIDI_YAMAHA, 70 QUIRK_MIDI_YAMAHA,
71 QUIRK_MIDI_MIDIMAN, 71 QUIRK_MIDI_MIDIMAN,
72 QUIRK_MIDI_NOVATION, 72 QUIRK_MIDI_NOVATION,
73 QUIRK_MIDI_FASTLANE, 73 QUIRK_MIDI_RAW_BYTES,
74 QUIRK_MIDI_EMAGIC, 74 QUIRK_MIDI_EMAGIC,
75 QUIRK_MIDI_CME, 75 QUIRK_MIDI_CME,
76 QUIRK_MIDI_AKAI, 76 QUIRK_MIDI_AKAI,