kbuild: document howto build external modules using several directories
[linux-2.6/verdex.git] / drivers / usb / class / usb-midi.h
blob358cdef8492eafe23cb13a93ecd078d7d1e3e08f
1 /*
2 usb-midi.h -- USB-MIDI driver
4 Copyright (C) 2001
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)
10 any later version.
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 /* ------------------------------------------------------------------------- */
24 #ifndef _USB_MIDI_H_
25 #define _USB_MIDI_H_
27 #ifndef USB_SUBCLASS_MIDISTREAMING
28 #define USB_SUBCLASS_MIDISTREAMING 3
29 #endif
31 /* ------------------------------------------------------------------------- */
32 /* Roland MIDI Devices */
34 #define USB_VENDOR_ID_ROLAND 0x0582
35 #define USBMIDI_ROLAND_UA100G 0x0000
36 #define USBMIDI_ROLAND_MPU64 0x0002
37 #define USBMIDI_ROLAND_SC8850 0x0003
38 #define USBMIDI_ROLAND_SC8820 0x0007
39 #define USBMIDI_ROLAND_UM2 0x0005
40 #define USBMIDI_ROLAND_UM1 0x0009
41 #define USBMIDI_ROLAND_PC300 0x0008
43 /* YAMAHA MIDI Devices */
44 #define USB_VENDOR_ID_YAMAHA 0x0499
45 #define USBMIDI_YAMAHA_MU1000 0x1001
47 /* Steinberg MIDI Devices */
48 #define USB_VENDOR_ID_STEINBERG 0x0763
49 #define USBMIDI_STEINBERG_USB2MIDI 0x1001
51 /* Mark of the Unicorn MIDI Devices */
52 #define USB_VENDOR_ID_MOTU 0x07fd
53 #define USBMIDI_MOTU_FASTLANE 0x0001
55 /* ------------------------------------------------------------------------- */
56 /* Supported devices */
58 struct usb_midi_endpoint {
59 int endpoint;
60 int cableId; /* if bit-n == 1 then cableId-n is enabled (n: 0 - 15) */
63 struct usb_midi_device {
64 char *deviceName;
66 u16 idVendor;
67 u16 idProduct;
68 int interface;
69 int altSetting; /* -1: auto detect */
71 struct usb_midi_endpoint in[15];
72 struct usb_midi_endpoint out[15];
75 static struct usb_midi_device usb_midi_devices[] = {
76 { /* Roland UM-1 */
77 "Roland UM-1",
78 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1, 2, -1,
79 { { 0x81, 1 }, {-1, -1} },
80 { { 0x01, 1,}, {-1, -1} },
83 { /* Roland UM-2 */
84 "Roland UM-2" ,
85 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2, 2, -1,
86 { { 0x81, 3 }, {-1, -1} },
87 { { 0x01, 3,}, {-1, -1} },
90 /** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
91 { /* Roland UA-100 */
92 "Roland UA-100",
93 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G, 2, -1,
94 { { 0x82, 7 }, {-1, -1} }, /** cables 0,1 and 2 for SYSEX **/
95 { { 0x02, 7 }, {-1, -1} },
98 /** Next entry courtesy research by Michael Minn <michael@michaelminn.com> **/
99 { /* Roland SC8850 */
100 "Roland SC8850",
101 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850, 2, -1,
102 { { 0x81, 0x3f }, {-1, -1} },
103 { { 0x01, 0x3f }, {-1, -1} },
106 { /* Roland SC8820 */
107 "Roland SC8820",
108 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820, 2, -1,
109 { { 0x81, 0x13 }, {-1, -1} },
110 { { 0x01, 0x13 }, {-1, -1} },
113 { /* Roland SC8820 */
114 "Roland SC8820",
115 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820, 2, -1,
116 { { 0x81, 17 }, {-1, -1} },
117 { { 0x01, 17 }, {-1, -1} },
120 { /* YAMAHA MU1000 */
121 "YAMAHA MU1000",
122 USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000, 0, -1,
123 { { 0x81, 1 }, {-1, -1} },
124 { { 0x01, 15 }, {-1, -1} },
126 { /* Roland PC-300 */
127 "Roland PC-300",
128 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300, 2, -1,
129 { { 0x81, 1 }, {-1, -1} },
130 { { 0x01, 1 }, {-1, -1} },
132 { /* MOTU Fastlane USB */
133 "MOTU Fastlane USB",
134 USB_VENDOR_ID_MOTU, USBMIDI_MOTU_FASTLANE, 1, 0,
135 { { 0x82, 3 }, {-1, -1} },
136 { { 0x02, 3 }, {-1, -1} },
140 #define VENDOR_SPECIFIC_USB_MIDI_DEVICES (sizeof(usb_midi_devices)/sizeof(struct usb_midi_device))
142 /* for Hot-Plugging */
144 static struct usb_device_id usb_midi_ids [] = {
145 { .match_flags = (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS),
146 .bInterfaceClass = USB_CLASS_AUDIO, .bInterfaceSubClass = USB_SUBCLASS_MIDISTREAMING},
147 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1 ) },
148 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2 ) },
149 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G ) },
150 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300 ) },
151 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850 ) },
152 { USB_DEVICE( USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820 ) },
153 { USB_DEVICE( USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000 ) },
154 { USB_DEVICE( USB_VENDOR_ID_MOTU, USBMIDI_MOTU_FASTLANE ) },
155 /* { USB_DEVICE( USB_VENDOR_ID_STEINBERG, USBMIDI_STEINBERG_USB2MIDI ) },*/
156 { } /* Terminating entry */
159 MODULE_DEVICE_TABLE (usb, usb_midi_ids);
161 /* ------------------------------------------------------------------------- */
162 #endif /* _USB_MIDI_H_ */