From 0ac2ac0ad7d1e8c84241d1c40b0d196b9b7c8104 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Fri, 1 Jul 2005 16:19:39 +0200 Subject: [ALSA] usb-audio: add support for an unknown Yamaha USB MIDI device USB generic driver Add a quirk for the Yamaha USB MIDI device with USB ID 0x103d. Signed-off-by: Clemens Ladisch --- sound/usb/usbquirks.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/usb/usbquirks.h') diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index f5135641b3e2..cc2e3c9933ee 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h @@ -116,6 +116,7 @@ YAMAHA_DEVICE(0x1039, NULL), YAMAHA_DEVICE(0x103a, NULL), YAMAHA_DEVICE(0x103b, NULL), YAMAHA_DEVICE(0x103c, NULL), +YAMAHA_DEVICE(0x103d, NULL), YAMAHA_DEVICE(0x2000, "DGP-7"), YAMAHA_DEVICE(0x2001, "DGP-5"), YAMAHA_DEVICE(0x2002, NULL), -- cgit v1.2.3 From 6155aff84b98b2aa35eaa4384b539dfbab86afcc Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 4 Jul 2005 09:20:42 +0200 Subject: [ALSA] usb-audio - rename QUIRK_MIDI_MOTU to QUIRK_MIDI_RAW USB generic driver Rename the protocol used by the MOTU FastLane to 'raw' because it might be useful with other devices, and there are other MOTU interfaces that do not use this protocol. Signed-off-by: Clemens Ladisch --- sound/usb/usbaudio.c | 2 +- sound/usb/usbaudio.h | 4 ++-- sound/usb/usbmidi.c | 18 +++++++++--------- sound/usb/usbquirks.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'sound/usb/usbquirks.h') diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index aee3c0f28eb6..3eaa08e3e6a6 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2970,7 +2970,7 @@ static int snd_usb_create_quirk(snd_usb_audio_t *chip, case QUIRK_MIDI_YAMAHA: case QUIRK_MIDI_MIDIMAN: case QUIRK_MIDI_NOVATION: - case QUIRK_MIDI_MOTU: + case QUIRK_MIDI_RAW: case QUIRK_MIDI_EMAGIC: return snd_usb_create_midi_interface(chip, iface, quirk); case QUIRK_COMPOSITE: diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index aedb42aaa749..a87912205477 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -165,7 +165,7 @@ struct snd_usb_audio { #define QUIRK_AUDIO_EDIROL_UA1000 8 #define QUIRK_IGNORE_INTERFACE 9 #define QUIRK_MIDI_NOVATION 10 -#define QUIRK_MIDI_MOTU 11 +#define QUIRK_MIDI_RAW 11 #define QUIRK_MIDI_EMAGIC 12 typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t; @@ -205,7 +205,7 @@ struct snd_usb_midi_endpoint_info { /* for QUIRK_IGNORE_INTERFACE, data is NULL */ -/* for QUIRK_MIDI_NOVATION and _MOTU, data is NULL */ +/* for QUIRK_MIDI_NOVATION and _RAW, data is NULL */ /* for QUIRK_MIDI_EMAGIC, data points to a snd_usb_midi_endpoint_info * structure (out_cables and in_cables only) */ diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index bee70068dce0..5c754879c2b6 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c @@ -524,16 +524,16 @@ static struct usb_protocol_ops snd_usbmidi_novation_ops = { }; /* - * Mark of the Unicorn USB MIDI protocol: raw MIDI. + * "raw" protocol: used by the MOTU FastLane. */ -static void snd_usbmidi_motu_input(snd_usb_midi_in_endpoint_t* ep, - uint8_t* buffer, int buffer_length) +static void snd_usbmidi_raw_input(snd_usb_midi_in_endpoint_t* ep, + uint8_t* buffer, int buffer_length) { snd_usbmidi_input_data(ep, 0, buffer, buffer_length); } -static void snd_usbmidi_motu_output(snd_usb_midi_out_endpoint_t* ep) +static void snd_usbmidi_raw_output(snd_usb_midi_out_endpoint_t* ep) { int count; @@ -549,9 +549,9 @@ static void snd_usbmidi_motu_output(snd_usb_midi_out_endpoint_t* ep) ep->urb->transfer_buffer_length = count; } -static struct usb_protocol_ops snd_usbmidi_motu_ops = { - .input = snd_usbmidi_motu_input, - .output = snd_usbmidi_motu_output, +static struct usb_protocol_ops snd_usbmidi_raw_ops = { + .input = snd_usbmidi_raw_input, + .output = snd_usbmidi_raw_output, }; /* @@ -1505,8 +1505,8 @@ int snd_usb_create_midi_interface(snd_usb_audio_t* chip, umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); break; - case QUIRK_MIDI_MOTU: - umidi->usb_protocol_ops = &snd_usbmidi_motu_ops; + case QUIRK_MIDI_RAW: + umidi->usb_protocol_ops = &snd_usbmidi_raw_ops; err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); break; case QUIRK_MIDI_EMAGIC: diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index cc2e3c9933ee..ed1eba1ef5c6 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h @@ -1269,7 +1269,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), .data = & (const snd_usb_audio_quirk_t[]) { { .ifnum = 0, - .type = QUIRK_MIDI_MOTU + .type = QUIRK_MIDI_RAW }, { .ifnum = 1, -- cgit v1.2.3 From bbd4615cdb68de943b2814e956ec14899606dc45 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 4 Jul 2005 09:21:45 +0200 Subject: [ALSA] usb-audio - use bDeviceSubClass to detect MOTU FastLane USB generic driver MOTU builds other USB MIDI interfaces with the same product ID as the FastLane, so we have to check the bDeviceSubClass field to differentiate between them. Signed-off-by: Clemens Ladisch --- sound/usb/usbquirks.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sound/usb/usbquirks.h') diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index ed1eba1ef5c6..67796430e588 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h @@ -1260,7 +1260,12 @@ YAMAHA_DEVICE(0x7010, "UB99"), /* Mark of the Unicorn devices */ { /* thanks to Robert A. Lerche */ - USB_DEVICE(0x07fd, 0x0001), + .match_flags = USB_DEVICE_ID_MATCH_VENDOR | + USB_DEVICE_ID_MATCH_PRODUCT | + USB_DEVICE_ID_MATCH_DEV_SUBCLASS, + .idVendor = 0x07fd, + .idProduct = 0x0001, + .bDeviceSubClass = 2, .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { .vendor_name = "MOTU", .product_name = "Fastlane", -- cgit v1.2.3 From f38275fe994c333b809796230f4f98090f8d919b Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 25 Jul 2005 16:17:29 +0200 Subject: [ALSA] usb-audio - add support for Miditech USB MIDI keyboards USB generic driver Add support for Miditech Midistart and MidiStudio keyboards (another case of devices using the standard protocol but having no descriptors). Signed-off-by: Clemens Ladisch --- sound/usb/usbaudio.c | 1 + sound/usb/usbaudio.h | 3 +++ sound/usb/usbmidi.c | 3 +++ sound/usb/usbquirks.h | 19 +++++++++++++++++++ 4 files changed, 26 insertions(+) (limited to 'sound/usb/usbquirks.h') diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index f2b760d8d77e..9a0b0899d156 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -2972,6 +2972,7 @@ static int snd_usb_create_quirk(snd_usb_audio_t *chip, case QUIRK_MIDI_NOVATION: case QUIRK_MIDI_RAW: case QUIRK_MIDI_EMAGIC: + case QUIRK_MIDI_MIDITECH: return snd_usb_create_midi_interface(chip, iface, quirk); case QUIRK_COMPOSITE: return create_composite_quirk(chip, iface, quirk); diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index a87912205477..c1415f4b6004 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -167,6 +167,7 @@ struct snd_usb_audio { #define QUIRK_MIDI_NOVATION 10 #define QUIRK_MIDI_RAW 11 #define QUIRK_MIDI_EMAGIC 12 +#define QUIRK_MIDI_MIDITECH 13 typedef struct snd_usb_audio_quirk snd_usb_audio_quirk_t; typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t; @@ -210,6 +211,8 @@ struct snd_usb_midi_endpoint_info { /* for QUIRK_MIDI_EMAGIC, data points to a snd_usb_midi_endpoint_info * structure (out_cables and in_cables only) */ +/* for QUIRK_MIDI_MIDITECH, data is NULL */ + /* */ diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 5c754879c2b6..5778a9b725ec 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c @@ -1515,6 +1515,9 @@ int snd_usb_create_midi_interface(snd_usb_audio_t* chip, sizeof(snd_usb_midi_endpoint_info_t)); err = snd_usbmidi_detect_endpoints(umidi, &endpoints[0], 1); break; + case QUIRK_MIDI_MIDITECH: + err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints); + break; default: snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type); err = -ENXIO; diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h index 67796430e588..f74e652a1e51 100644 --- a/sound/usb/usbquirks.h +++ b/sound/usb/usbquirks.h @@ -1378,6 +1378,25 @@ YAMAHA_DEVICE(0x7010, "UB99"), } }, +{ + USB_DEVICE(0x4752, 0x0011), + .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { + .vendor_name = "Miditech", + .product_name = "Midistart-2", + .ifnum = 0, + .type = QUIRK_MIDI_MIDITECH + } +}, +{ + USB_DEVICE(0x7104, 0x2202), + .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { + .vendor_name = "Miditech", + .product_name = "MidiStudio-2", + .ifnum = 0, + .type = QUIRK_MIDI_MIDITECH + } +}, + { /* * Some USB MIDI devices don't have an audio control interface, -- cgit v1.2.3