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>
This commit is contained in:
parent
f3305da35a
commit
c7f572168f
4 changed files with 16 additions and 6 deletions
|
@ -784,7 +784,7 @@ static struct usb_protocol_ops snd_usbmidi_novation_ops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "raw" protocol: used by the MOTU FastLane.
|
* "raw" protocol: just move raw MIDI bytes from/to the endpoint
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint* ep,
|
static void snd_usbmidi_raw_input(struct snd_usb_midi_in_endpoint* ep,
|
||||||
|
@ -2122,7 +2122,7 @@ int snd_usbmidi_create(struct snd_card *card,
|
||||||
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_FASTLANE:
|
case QUIRK_MIDI_RAW_BYTES:
|
||||||
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
|
* Interface 1 contains isochronous endpoints, but with the same
|
||||||
|
@ -2133,7 +2133,8 @@ int snd_usbmidi_create(struct snd_card *card,
|
||||||
* interface 0, so we have to make sure that the USB core looks
|
* interface 0, so we have to make sure that the USB core looks
|
||||||
* again at interface 0 by calling usb_set_interface() on it.
|
* again at interface 0 by calling usb_set_interface() on it.
|
||||||
*/
|
*/
|
||||||
usb_set_interface(umidi->dev, 0, 0);
|
if (umidi->usb_id == USB_ID(0x07fd, 0x0001)) /* MOTU Fastlane */
|
||||||
|
usb_set_interface(umidi->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:
|
||||||
|
|
|
@ -2078,7 +2078,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_FASTLANE
|
.type = QUIRK_MIDI_RAW_BYTES
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.ifnum = 1,
|
.ifnum = 1,
|
||||||
|
@ -2226,6 +2226,15 @@ YAMAHA_DEVICE(0x7010, "UB99"),
|
||||||
.type = QUIRK_MIDI_NOVATION
|
.type = QUIRK_MIDI_NOVATION
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
USB_DEVICE(0x1235, 0x000e),
|
||||||
|
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
||||||
|
/* .vendor_name = "Novation", */
|
||||||
|
/* .product_name = "Launchpad", */
|
||||||
|
.ifnum = 0,
|
||||||
|
.type = QUIRK_MIDI_RAW_BYTES
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
|
USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
|
||||||
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
|
||||||
|
|
|
@ -287,7 +287,7 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
|
||||||
[QUIRK_MIDI_YAMAHA] = create_any_midi_quirk,
|
[QUIRK_MIDI_YAMAHA] = create_any_midi_quirk,
|
||||||
[QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk,
|
[QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk,
|
||||||
[QUIRK_MIDI_NOVATION] = create_any_midi_quirk,
|
[QUIRK_MIDI_NOVATION] = create_any_midi_quirk,
|
||||||
[QUIRK_MIDI_FASTLANE] = create_any_midi_quirk,
|
[QUIRK_MIDI_RAW_BYTES] = create_any_midi_quirk,
|
||||||
[QUIRK_MIDI_EMAGIC] = create_any_midi_quirk,
|
[QUIRK_MIDI_EMAGIC] = create_any_midi_quirk,
|
||||||
[QUIRK_MIDI_CME] = create_any_midi_quirk,
|
[QUIRK_MIDI_CME] = create_any_midi_quirk,
|
||||||
[QUIRK_MIDI_AKAI] = create_any_midi_quirk,
|
[QUIRK_MIDI_AKAI] = create_any_midi_quirk,
|
||||||
|
|
|
@ -70,7 +70,7 @@ enum quirk_type {
|
||||||
QUIRK_MIDI_YAMAHA,
|
QUIRK_MIDI_YAMAHA,
|
||||||
QUIRK_MIDI_MIDIMAN,
|
QUIRK_MIDI_MIDIMAN,
|
||||||
QUIRK_MIDI_NOVATION,
|
QUIRK_MIDI_NOVATION,
|
||||||
QUIRK_MIDI_FASTLANE,
|
QUIRK_MIDI_RAW_BYTES,
|
||||||
QUIRK_MIDI_EMAGIC,
|
QUIRK_MIDI_EMAGIC,
|
||||||
QUIRK_MIDI_CME,
|
QUIRK_MIDI_CME,
|
||||||
QUIRK_MIDI_AKAI,
|
QUIRK_MIDI_AKAI,
|
||||||
|
|
Loading…
Reference in a new issue