1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef _USB_MIDI_H_
25#define _USB_MIDI_H_
26
27#ifndef USB_SUBCLASS_MIDISTREAMING
28#define USB_SUBCLASS_MIDISTREAMING 3
29#endif
30
31
32
33
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
42
43
44#define USB_VENDOR_ID_YAMAHA 0x0499
45#define USBMIDI_YAMAHA_MU1000 0x1001
46
47
48#define USB_VENDOR_ID_STEINBERG 0x0763
49#define USBMIDI_STEINBERG_USB2MIDI 0x1001
50
51
52#define USB_VENDOR_ID_MOTU 0x07fd
53#define USBMIDI_MOTU_FASTLANE 0x0001
54
55
56
57
58struct usb_midi_endpoint {
59 int endpoint;
60 int cableId;
61};
62
63struct usb_midi_device {
64 char *deviceName;
65
66 u16 idVendor;
67 u16 idProduct;
68 int interface;
69 int altSetting;
70
71 struct usb_midi_endpoint in[15];
72 struct usb_midi_endpoint out[15];
73};
74
75static struct usb_midi_device usb_midi_devices[] = {
76 {
77 "Roland UM-1",
78 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM1, 2, -1,
79 { { 0x81, 1 }, {-1, -1} },
80 { { 0x01, 1,}, {-1, -1} },
81 },
82
83 {
84 "Roland UM-2" ,
85 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UM2, 2, -1,
86 { { 0x81, 3 }, {-1, -1} },
87 { { 0x01, 3,}, {-1, -1} },
88 },
89
90
91 {
92 "Roland UA-100",
93 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_UA100G, 2, -1,
94 { { 0x82, 7 }, {-1, -1} },
95 { { 0x02, 7 }, {-1, -1} },
96 },
97
98
99 {
100 "Roland SC8850",
101 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8850, 2, -1,
102 { { 0x81, 0x3f }, {-1, -1} },
103 { { 0x01, 0x3f }, {-1, -1} },
104 },
105
106 {
107 "Roland SC8820",
108 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820, 2, -1,
109 { { 0x81, 0x13 }, {-1, -1} },
110 { { 0x01, 0x13 }, {-1, -1} },
111 },
112
113 {
114 "Roland SC8820",
115 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_SC8820, 2, -1,
116 { { 0x81, 17 }, {-1, -1} },
117 { { 0x01, 17 }, {-1, -1} },
118 },
119
120 {
121 "YAMAHA MU1000",
122 USB_VENDOR_ID_YAMAHA, USBMIDI_YAMAHA_MU1000, 0, -1,
123 { { 0x81, 1 }, {-1, -1} },
124 { { 0x01, 15 }, {-1, -1} },
125 },
126 {
127 "Roland PC-300",
128 USB_VENDOR_ID_ROLAND, USBMIDI_ROLAND_PC300, 2, -1,
129 { { 0x81, 1 }, {-1, -1} },
130 { { 0x01, 1 }, {-1, -1} },
131 },
132 {
133 "MOTU Fastlane USB",
134 USB_VENDOR_ID_MOTU, USBMIDI_MOTU_FASTLANE, 1, 0,
135 { { 0x82, 3 }, {-1, -1} },
136 { { 0x02, 3 }, {-1, -1} },
137 }
138};
139
140#define VENDOR_SPECIFIC_USB_MIDI_DEVICES (sizeof(usb_midi_devices)/sizeof(struct usb_midi_device))
141
142
143
144static 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
156 { }
157};
158
159MODULE_DEVICE_TABLE (usb, usb_midi_ids);
160
161
162#endif
163
164
165