2 usb-midi.h -- USB-MIDI driver
5 NAGANO Daisuke <breeze.nagano@nifty.ne.jp>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 /* ------------------------------------------------------------------------- */
27 #ifndef USB_SUBCLASS_MIDISTREAMING
28 #define USB_SUBCLASS_MIDISTREAMING 3
31 #define USB_DT_CS_DEVICE 0x21
32 #define USB_DT_CS_CONFIG 0x22
33 #define USB_DT_CS_STRING 0x23
34 #define USB_DT_CS_INTERFACE 0x24
35 #define USB_DT_CS_ENDPOINT 0x25
37 /* ------------------------------------------------------------------------- */
38 /* Roland MIDI Devices */
40 #ifndef USB_VENDOR_ID_ROLAND
41 #define USB_VENDOR_ID_ROLAND 0x0582
43 #define USBMIDI_ROLAND_UA100G 0x0000
44 #define USBMIDI_ROLAND_MPU64 0x0002
45 #define USBMIDI_ROLAND_SC8850 0x0003
46 #define USBMIDI_ROLAND_UM2 0x0005
47 #define USBMIDI_ROLAND_SC8820 0x0007
48 #define USBMIDI_ROLAND_PC300 0x0008
49 #define USBMIDI_ROLAND_UM1 0x0009
51 /* YAMAHA MIDI Devices */
52 #ifndef USB_VENDOR_ID_YAMAHA
53 #define USB_VENDOR_ID_YAMAHA 0x0499
55 #define USBMIDI_YAMAHA_MU1000 0x1001
57 /* Steinberg MIDI Devices */
58 #ifndef USB_VENDOR_ID_STEINBERG
59 #define USB_VENDOR_ID_STEINBERG 0x0763
61 #define USBMIDI_STEINBERG_USB2MIDI 0x1001
63 /* Mark of the Unicorn devices */
64 #ifndef USB_VENDOR_ID_MOTU
65 #define USB_VENDOR_ID_MOTU 0x07fd
67 #define USBMIDI_MOTU_FASTLANE 0x0001
69 /* ------------------------------------------------------------------------- */
70 /* Supported devices */
72 struct usb_midi_endpoint {
74 int cableId; /* if bit-n == 1 then cableId-n is enabled (n: 0 - 15) */
77 struct usb_midi_device {
83 int altSetting; /* -1: auto detect */
85 struct usb_midi_endpoint in[15];
86 struct usb_midi_endpoint out[15];
89 static struct usb_midi_device usb_midi_devices[] = {
92 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1, 2, -1,
93 { { 0x81, 1 }, {-1, -1} },
94 { { 0x01, 1,}, {-1, -1} },
99 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2, 2, -1,
100 { { 0x81, 3 }, {-1, -1} },
101 { { 0x01, 3,}, {-1, -1} },
104 /** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
105 { /* Roland UA-100 */
107 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G, 2, -1,
108 { { 0x82, 7 }, {-1, -1} }, /** cables 0,1 and 2 for SYSEX **/
109 { { 0x02, 7 }, {-1, -1} },
112 /** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
113 { /* Roland SC8850 */
115 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850, 2, -1,
116 { { 0x81, 0x3f }, {-1, -1} },
117 { { 0x01, 0x3f }, {-1, -1} },
120 { /* Roland SC8820 */
122 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820, 2, -1,
123 { { 0x81, 0x13 }, {-1, -1} },
124 { { 0x01, 0x13 }, {-1, -1} },
127 { /* YAMAHA MU1000 */
129 USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000, 0, -1,
130 { { 0x81, 1 }, {-1, -1} },
131 { { 0x01, 15 }, {-1, -1} },
133 { /* Roland PC-300 */
135 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300, 2, -1,
136 { { 0x81, 1 }, {-1, -1} },
137 { { 0x01, 1 }, {-1, -1} },
139 { /* MOTU Fastlane USB */
141 USB_VENDOR_ID_MOTU, USBMIDI_MOTU_FASTLANE, 1, 0,
142 { { 0x82, 3 }, {-1, -1} },
143 { { 0x02, 3 }, {-1, -1} },
147 #define VENDOR_SPECIFIC_USB_MIDI_DEVICES (sizeof(usb_midi_devices)/sizeof(struct usb_midi_device))
149 /* for Hot-Plugging */
151 static struct usb_device_id usb_midi_ids [] = {
152 { match_flags: (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS),
153 bInterfaceClass: USB_CLASS_AUDIO, bInterfaceSubClass: USB_SUBCLASS_MIDISTREAMING},
154 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1 ) },
155 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2 ) },
156 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G ) },
157 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300 ) },
158 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850 ) },
159 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820 ) },
160 { USB_DEVICE( USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000 ) },
161 { USB_DEVICE( USB_VENDOR_ID_MOTU, USBMIDI_MOTU_FASTLANE ) },
162 /* { USB_DEVICE( USB_VENDOR_ID_STEINBERG, USBMIDI_STEINBERG_USB2MIDI ) },*/
163 { } /* Terminating entry */
166 MODULE_DEVICE_TABLE (usb, usb_midi_ids);
168 /* ------------------------------------------------------------------------- */
169 #endif /* _USB_MIDI_H_ */