Commit 079508e7 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Novation and MOTU USB MIDI support

USB generic driver
Rewrote USB MIDI protocol handling code to use callbacks
for each protocol;
added support for Novation and MOTU protocols;
changed detection code to allow interrupt endpoints.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
parent 480ca440
......@@ -2968,6 +2968,8 @@ static int snd_usb_create_quirk(snd_usb_audio_t *chip,
case QUIRK_MIDI_FIXED_ENDPOINT:
case QUIRK_MIDI_YAMAHA:
case QUIRK_MIDI_MIDIMAN:
case QUIRK_MIDI_NOVATION:
case QUIRK_MIDI_MOTU:
return snd_usb_create_midi_interface(chip, iface, quirk);
case QUIRK_COMPOSITE:
return create_composite_quirk(chip, iface, quirk);
......
......@@ -158,6 +158,8 @@ struct snd_usb_audio {
#define QUIRK_AUDIO_EDIROL_UA700_UA25 7
#define QUIRK_AUDIO_EDIROL_UA1000 8
#define QUIRK_IGNORE_INTERFACE 9
#define QUIRK_MIDI_NOVATION 10
#define QUIRK_MIDI_MOTU 11
typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t;
typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t;
......@@ -172,7 +174,10 @@ struct snd_usb_audio_quirk {
/* data for QUIRK_MIDI_FIXED_ENDPOINT */
struct snd_usb_midi_endpoint_info {
int8_t out_ep, in_ep; /* ep number, 0 autodetect */
int8_t out_ep; /* ep number, 0 autodetect */
uint8_t out_interval; /* interval for interrupt endpoints */
int8_t in_ep;
uint8_t in_interval;
uint16_t out_cables; /* bitmask */
uint16_t in_cables; /* bitmask */
};
......@@ -191,7 +196,9 @@ struct snd_usb_midi_endpoint_info {
/* for QUIRK_AUDIO_EDIROL_UA700_UA25/UA1000, data is NULL */
/* for QUIRK_IGNORE_INTERFACE, data is null */
/* for QUIRK_IGNORE_INTERFACE, data is NULL */
/* for QUIRK_MIDI_NOVATION and _MOTU, data is NULL */
/*
*/
......
This diff is collapsed.
......@@ -1018,16 +1018,25 @@ YAMAHA_DEVICE(0x7010, "UB99"),
/* Mark of the Unicorn devices */
{
/* thanks to Woodley Packard <sweaglesw@thibs.menloschool.org> */
/* thanks to Robert A. Lerche <ral 'at' msbit.com> */
USB_DEVICE(0x07fd, 0x0001),
.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
.vendor_name = "MOTU",
.product_name = "Fastlane",
.ifnum = QUIRK_ANY_INTERFACE,
.type = QUIRK_COMPOSITE,
.data = & (const snd_usb_audio_quirk_t[]) {
{
.ifnum = 0,
.type = QUIRK_MIDI_MOTU
},
{
.ifnum = 1,
.type = QUIRK_MIDI_FIXED_ENDPOINT,
.data = & (const snd_usb_midi_endpoint_info_t) {
.out_cables = 0x0003,
.in_cables = 0x0003
.type = QUIRK_IGNORE_INTERFACE
},
{
.ifnum = -1
}
}
}
},
......@@ -1053,6 +1062,35 @@ YAMAHA_DEVICE(0x7010, "UB99"),
}
},
/* Novation EMS devices */
{
USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001),
.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
.vendor_name = "Novation",
.product_name = "ReMOTE Audio/XStation",
.ifnum = 4,
.type = QUIRK_MIDI_NOVATION
}
},
{
USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002),
.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
.vendor_name = "Novation",
.product_name = "Speedio",
.ifnum = 3,
.type = QUIRK_MIDI_NOVATION
}
},
{
USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
.driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
.vendor_name = "Novation",
.product_name = "ReMOTE25",
.ifnum = 0,
.type = QUIRK_MIDI_NOVATION
}
},
{
/*
* Some USB MIDI devices don't have an audio control interface,
......
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