Commit f38275fe authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Jaroslav Kysela

[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: default avatarClemens Ladisch <clemens@ladisch.de>
parent d06e4c40
...@@ -2972,6 +2972,7 @@ static int snd_usb_create_quirk(snd_usb_audio_t *chip, ...@@ -2972,6 +2972,7 @@ static int snd_usb_create_quirk(snd_usb_audio_t *chip,
case QUIRK_MIDI_NOVATION: case QUIRK_MIDI_NOVATION:
case QUIRK_MIDI_RAW: case QUIRK_MIDI_RAW:
case QUIRK_MIDI_EMAGIC: case QUIRK_MIDI_EMAGIC:
case QUIRK_MIDI_MIDITECH:
return snd_usb_create_midi_interface(chip, iface, quirk); return snd_usb_create_midi_interface(chip, iface, quirk);
case QUIRK_COMPOSITE: case QUIRK_COMPOSITE:
return create_composite_quirk(chip, iface, quirk); return create_composite_quirk(chip, iface, quirk);
......
...@@ -167,6 +167,7 @@ struct snd_usb_audio { ...@@ -167,6 +167,7 @@ struct snd_usb_audio {
#define QUIRK_MIDI_NOVATION 10 #define QUIRK_MIDI_NOVATION 10
#define QUIRK_MIDI_RAW 11 #define QUIRK_MIDI_RAW 11
#define QUIRK_MIDI_EMAGIC 12 #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_audio_quirk snd_usb_audio_quirk_t;
typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t; typedef struct snd_usb_midi_endpoint_info snd_usb_midi_endpoint_info_t;
...@@ -210,6 +211,8 @@ struct snd_usb_midi_endpoint_info { ...@@ -210,6 +211,8 @@ struct snd_usb_midi_endpoint_info {
/* for QUIRK_MIDI_EMAGIC, data points to a 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) */ * structure (out_cables and in_cables only) */
/* for QUIRK_MIDI_MIDITECH, data is NULL */
/* /*
*/ */
......
...@@ -1515,6 +1515,9 @@ int snd_usb_create_midi_interface(snd_usb_audio_t* chip, ...@@ -1515,6 +1515,9 @@ int snd_usb_create_midi_interface(snd_usb_audio_t* chip,
sizeof(snd_usb_midi_endpoint_info_t)); sizeof(snd_usb_midi_endpoint_info_t));
err = snd_usbmidi_detect_endpoints(umidi, &endpoints[0], 1); err = snd_usbmidi_detect_endpoints(umidi, &endpoints[0], 1);
break; break;
case QUIRK_MIDI_MIDITECH:
err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
break;
default: default:
snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type); snd_printd(KERN_ERR "invalid quirk type %d\n", quirk->type);
err = -ENXIO; err = -ENXIO;
......
...@@ -1378,6 +1378,25 @@ YAMAHA_DEVICE(0x7010, "UB99"), ...@@ -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, * 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