[ALSA] usb-audio - Fix audiophile-USB quirk for little-endian
[linux-2.6] / sound / usb / usbquirks.h
1 /*
2  * ALSA USB Audio Driver
3  *
4  * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>,
5  *                       Clemens Ladisch <clemens@ladisch.de>
6  *
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21  */
22
23 /*
24  * The contents of this file are part of the driver's id_table.
25  *
26  * In a perfect world, this file would be empty.
27  */
28
29 /*
30  * Use this for devices where other interfaces are standard compliant,
31  * to prevent the quirk being applied to those interfaces. (To work with
32  * hotplugging, bDeviceClass must be set to USB_CLASS_PER_INTERFACE.)
33  */
34 #define USB_DEVICE_VENDOR_SPEC(vend, prod) \
35         .match_flags = USB_DEVICE_ID_MATCH_VENDOR | \
36                        USB_DEVICE_ID_MATCH_PRODUCT | \
37                        USB_DEVICE_ID_MATCH_INT_CLASS, \
38         .idVendor = vend, \
39         .idProduct = prod, \
40         .bInterfaceClass = USB_CLASS_VENDOR_SPEC
41
42 /*
43  * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
44  * class matches do not take effect without an explicit ID match.
45  */
46 {
47         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
48                        USB_DEVICE_ID_MATCH_INT_CLASS |
49                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
50         .idVendor = 0x046d,
51         .idProduct = 0x0850,
52         .bInterfaceClass = USB_CLASS_AUDIO,
53         .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
54 },
55 {
56         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
57                        USB_DEVICE_ID_MATCH_INT_CLASS |
58                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
59         .idVendor = 0x046d,
60         .idProduct = 0x08ae,
61         .bInterfaceClass = USB_CLASS_AUDIO,
62         .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
63 },
64 {
65         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
66                        USB_DEVICE_ID_MATCH_INT_CLASS |
67                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
68         .idVendor = 0x046d,
69         .idProduct = 0x08c6,
70         .bInterfaceClass = USB_CLASS_AUDIO,
71         .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
72 },
73 {
74         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
75                        USB_DEVICE_ID_MATCH_INT_CLASS |
76                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
77         .idVendor = 0x046d,
78         .idProduct = 0x0850,
79         .bInterfaceClass = USB_CLASS_AUDIO,
80         .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
81 },
82 {
83         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
84                        USB_DEVICE_ID_MATCH_INT_CLASS |
85                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
86         .idVendor = 0x046d,
87         .idProduct = 0x08f0,
88         .bInterfaceClass = USB_CLASS_AUDIO,
89         .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
90 },
91 {
92         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
93                        USB_DEVICE_ID_MATCH_INT_CLASS |
94                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
95         .idVendor = 0x046d,
96         .idProduct = 0x08f6,
97         .bInterfaceClass = USB_CLASS_AUDIO,
98         .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
99 },
100
101 /*
102  * Yamaha devices
103  */
104
105 #define YAMAHA_DEVICE(id, name) { \
106         USB_DEVICE(0x0499, id), \
107         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
108                 .vendor_name = "Yamaha", \
109                 .product_name = name, \
110                 .ifnum = QUIRK_ANY_INTERFACE, \
111                 .type = QUIRK_MIDI_YAMAHA \
112         } \
113 }
114 #define YAMAHA_INTERFACE(id, intf, name) { \
115         USB_DEVICE_VENDOR_SPEC(0x0499, id), \
116         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
117                 .vendor_name = "Yamaha", \
118                 .product_name = name, \
119                 .ifnum = intf, \
120                 .type = QUIRK_MIDI_YAMAHA \
121         } \
122 }
123 YAMAHA_DEVICE(0x1000, "UX256"),
124 YAMAHA_DEVICE(0x1001, "MU1000"),
125 YAMAHA_DEVICE(0x1002, "MU2000"),
126 YAMAHA_DEVICE(0x1003, "MU500"),
127 YAMAHA_INTERFACE(0x1004, 3, "UW500"),
128 YAMAHA_DEVICE(0x1005, "MOTIF6"),
129 YAMAHA_DEVICE(0x1006, "MOTIF7"),
130 YAMAHA_DEVICE(0x1007, "MOTIF8"),
131 YAMAHA_DEVICE(0x1008, "UX96"),
132 YAMAHA_DEVICE(0x1009, "UX16"),
133 YAMAHA_INTERFACE(0x100a, 3, "EOS BX"),
134 YAMAHA_DEVICE(0x100c, "UC-MX"),
135 YAMAHA_DEVICE(0x100d, "UC-KX"),
136 YAMAHA_DEVICE(0x100e, "S08"),
137 YAMAHA_DEVICE(0x100f, "CLP-150"),
138 YAMAHA_DEVICE(0x1010, "CLP-170"),
139 YAMAHA_DEVICE(0x1011, "P-250"),
140 YAMAHA_DEVICE(0x1012, "TYROS"),
141 YAMAHA_DEVICE(0x1013, "PF-500"),
142 YAMAHA_DEVICE(0x1014, "S90"),
143 YAMAHA_DEVICE(0x1015, "MOTIF-R"),
144 YAMAHA_DEVICE(0x1016, "MDP-5"),
145 YAMAHA_DEVICE(0x1017, "CVP-204"),
146 YAMAHA_DEVICE(0x1018, "CVP-206"),
147 YAMAHA_DEVICE(0x1019, "CVP-208"),
148 YAMAHA_DEVICE(0x101a, "CVP-210"),
149 YAMAHA_DEVICE(0x101b, "PSR-1100"),
150 YAMAHA_DEVICE(0x101c, "PSR-2100"),
151 YAMAHA_DEVICE(0x101d, "CLP-175"),
152 YAMAHA_DEVICE(0x101e, "PSR-K1"),
153 YAMAHA_DEVICE(0x101f, "EZ-J24"),
154 YAMAHA_DEVICE(0x1020, "EZ-250i"),
155 YAMAHA_DEVICE(0x1021, "MOTIF ES 6"),
156 YAMAHA_DEVICE(0x1022, "MOTIF ES 7"),
157 YAMAHA_DEVICE(0x1023, "MOTIF ES 8"),
158 YAMAHA_DEVICE(0x1024, "CVP-301"),
159 YAMAHA_DEVICE(0x1025, "CVP-303"),
160 YAMAHA_DEVICE(0x1026, "CVP-305"),
161 YAMAHA_DEVICE(0x1027, "CVP-307"),
162 YAMAHA_DEVICE(0x1028, "CVP-309"),
163 YAMAHA_DEVICE(0x1029, "CVP-309GP"),
164 YAMAHA_DEVICE(0x102a, "PSR-1500"),
165 YAMAHA_DEVICE(0x102b, "PSR-3000"),
166 YAMAHA_DEVICE(0x102e, "ELS-01/01C"),
167 YAMAHA_DEVICE(0x1030, "PSR-295/293"),
168 YAMAHA_DEVICE(0x1031, "DGX-205/203"),
169 YAMAHA_DEVICE(0x1032, "DGX-305"),
170 YAMAHA_DEVICE(0x1033, "DGX-505"),
171 YAMAHA_DEVICE(0x1034, NULL),
172 YAMAHA_DEVICE(0x1035, NULL),
173 YAMAHA_DEVICE(0x1036, NULL),
174 YAMAHA_DEVICE(0x1037, NULL),
175 YAMAHA_DEVICE(0x1038, NULL),
176 YAMAHA_DEVICE(0x1039, NULL),
177 YAMAHA_DEVICE(0x103a, NULL),
178 YAMAHA_DEVICE(0x103b, NULL),
179 YAMAHA_DEVICE(0x103c, NULL),
180 YAMAHA_DEVICE(0x103d, NULL),
181 YAMAHA_DEVICE(0x103e, NULL),
182 YAMAHA_DEVICE(0x103f, NULL),
183 YAMAHA_DEVICE(0x1040, NULL),
184 YAMAHA_DEVICE(0x1041, NULL),
185 YAMAHA_DEVICE(0x1042, NULL),
186 YAMAHA_DEVICE(0x1043, NULL),
187 YAMAHA_DEVICE(0x1044, NULL),
188 YAMAHA_DEVICE(0x1045, NULL),
189 YAMAHA_DEVICE(0x2000, "DGP-7"),
190 YAMAHA_DEVICE(0x2001, "DGP-5"),
191 YAMAHA_DEVICE(0x2002, NULL),
192 YAMAHA_DEVICE(0x5000, "CS1D"),
193 YAMAHA_DEVICE(0x5001, "DSP1D"),
194 YAMAHA_DEVICE(0x5002, "DME32"),
195 YAMAHA_DEVICE(0x5003, "DM2000"),
196 YAMAHA_DEVICE(0x5004, "02R96"),
197 YAMAHA_DEVICE(0x5005, "ACU16-C"),
198 YAMAHA_DEVICE(0x5006, "NHB32-C"),
199 YAMAHA_DEVICE(0x5007, "DM1000"),
200 YAMAHA_DEVICE(0x5008, "01V96"),
201 YAMAHA_DEVICE(0x5009, "SPX2000"),
202 YAMAHA_DEVICE(0x500a, "PM5D"),
203 YAMAHA_DEVICE(0x500b, "DME64N"),
204 YAMAHA_DEVICE(0x500c, "DME24N"),
205 YAMAHA_DEVICE(0x500d, NULL),
206 YAMAHA_DEVICE(0x500e, NULL),
207 YAMAHA_DEVICE(0x500f, NULL),
208 YAMAHA_DEVICE(0x7000, "DTX"),
209 YAMAHA_DEVICE(0x7010, "UB99"),
210 #undef YAMAHA_DEVICE
211 #undef YAMAHA_INTERFACE
212
213 /*
214  * Roland/RolandED/Edirol/BOSS devices
215  */
216 {
217         USB_DEVICE(0x0582, 0x0000),
218         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
219                 .vendor_name = "Roland",
220                 .product_name = "UA-100",
221                 .ifnum = QUIRK_ANY_INTERFACE,
222                 .type = QUIRK_COMPOSITE,
223                 .data = (const struct snd_usb_audio_quirk[]) {
224                         {
225                                 .ifnum = 0,
226                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
227                                 .data = & (const struct audioformat) {
228                                         .format = SNDRV_PCM_FORMAT_S16_LE,
229                                         .channels = 4,
230                                         .iface = 0,
231                                         .altsetting = 1,
232                                         .altset_idx = 1,
233                                         .attributes = 0,
234                                         .endpoint = 0x01,
235                                         .ep_attr = 0x09,
236                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
237                                         .rate_min = 44100,
238                                         .rate_max = 44100,
239                                 }
240                         },
241                         {
242                                 .ifnum = 1,
243                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
244                                 .data = & (const struct audioformat) {
245                                         .format = SNDRV_PCM_FORMAT_S16_LE,
246                                         .channels = 2,
247                                         .iface = 1,
248                                         .altsetting = 1,
249                                         .altset_idx = 1,
250                                         .attributes = EP_CS_ATTR_FILL_MAX,
251                                         .endpoint = 0x81,
252                                         .ep_attr = 0x05,
253                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
254                                         .rate_min = 44100,
255                                         .rate_max = 44100,
256                                 }
257                         },
258                         {
259                                 .ifnum = 2,
260                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
261                                 .data = & (const struct snd_usb_midi_endpoint_info) {
262                                         .out_cables = 0x0007,
263                                         .in_cables  = 0x0007
264                                 }
265                         },
266                         {
267                                 .ifnum = -1
268                         }
269                 }
270         }
271 },
272 {
273         USB_DEVICE(0x0582, 0x0002),
274         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
275                 .vendor_name = "EDIROL",
276                 .product_name = "UM-4",
277                 .ifnum = QUIRK_ANY_INTERFACE,
278                 .type = QUIRK_COMPOSITE,
279                 .data = (const struct snd_usb_audio_quirk[]) {
280                         {
281                                 .ifnum = 0,
282                                 .type = QUIRK_IGNORE_INTERFACE
283                         },
284                         {
285                                 .ifnum = 1,
286                                 .type = QUIRK_IGNORE_INTERFACE
287                         },
288                         {
289                                 .ifnum = 2,
290                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
291                                 .data = & (const struct snd_usb_midi_endpoint_info) {
292                                         .out_cables = 0x000f,
293                                         .in_cables  = 0x000f
294                                 }
295                         },
296                         {
297                                 .ifnum = -1
298                         }
299                 }
300         }
301 },
302 {
303         USB_DEVICE(0x0582, 0x0003),
304         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
305                 .vendor_name = "Roland",
306                 .product_name = "SC-8850",
307                 .ifnum = QUIRK_ANY_INTERFACE,
308                 .type = QUIRK_COMPOSITE,
309                 .data = (const struct snd_usb_audio_quirk[]) {
310                         {
311                                 .ifnum = 0,
312                                 .type = QUIRK_IGNORE_INTERFACE
313                         },
314                         {
315                                 .ifnum = 1,
316                                 .type = QUIRK_IGNORE_INTERFACE
317                         },
318                         {
319                                 .ifnum = 2,
320                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
321                                 .data = & (const struct snd_usb_midi_endpoint_info) {
322                                         .out_cables = 0x003f,
323                                         .in_cables  = 0x003f
324                                 }
325                         },
326                         {
327                                 .ifnum = -1
328                         }
329                 }
330         }
331 },
332 {
333         USB_DEVICE(0x0582, 0x0004),
334         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
335                 .vendor_name = "Roland",
336                 .product_name = "U-8",
337                 .ifnum = QUIRK_ANY_INTERFACE,
338                 .type = QUIRK_COMPOSITE,
339                 .data = (const struct snd_usb_audio_quirk[]) {
340                         {
341                                 .ifnum = 0,
342                                 .type = QUIRK_IGNORE_INTERFACE
343                         },
344                         {
345                                 .ifnum = 1,
346                                 .type = QUIRK_IGNORE_INTERFACE
347                         },
348                         {
349                                 .ifnum = 2,
350                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
351                                 .data = & (const struct snd_usb_midi_endpoint_info) {
352                                         .out_cables = 0x0005,
353                                         .in_cables  = 0x0005
354                                 }
355                         },
356                         {
357                                 .ifnum = -1
358                         }
359                 }
360         }
361 },
362 {
363         /* Has ID 0x0099 when not in "Advanced Driver" mode.
364          * The UM-2EX has only one input, but we cannot detect this. */
365         USB_DEVICE(0x0582, 0x0005),
366         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
367                 .vendor_name = "EDIROL",
368                 .product_name = "UM-2",
369                 .ifnum = QUIRK_ANY_INTERFACE,
370                 .type = QUIRK_COMPOSITE,
371                 .data = (const struct snd_usb_audio_quirk[]) {
372                         {
373                                 .ifnum = 0,
374                                 .type = QUIRK_IGNORE_INTERFACE
375                         },
376                         {
377                                 .ifnum = 1,
378                                 .type = QUIRK_IGNORE_INTERFACE
379                         },
380                         {
381                                 .ifnum = 2,
382                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
383                                 .data = & (const struct snd_usb_midi_endpoint_info) {
384                                         .out_cables = 0x0003,
385                                         .in_cables  = 0x0003
386                                 }
387                         },
388                         {
389                                 .ifnum = -1
390                         }
391                 }
392         }
393 },
394 {
395         USB_DEVICE(0x0582, 0x0007),
396         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
397                 .vendor_name = "Roland",
398                 .product_name = "SC-8820",
399                 .ifnum = QUIRK_ANY_INTERFACE,
400                 .type = QUIRK_COMPOSITE,
401                 .data = (const struct snd_usb_audio_quirk[]) {
402                         {
403                                 .ifnum = 0,
404                                 .type = QUIRK_IGNORE_INTERFACE
405                         },
406                         {
407                                 .ifnum = 1,
408                                 .type = QUIRK_IGNORE_INTERFACE
409                         },
410                         {
411                                 .ifnum = 2,
412                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
413                                 .data = & (const struct snd_usb_midi_endpoint_info) {
414                                         .out_cables = 0x0013,
415                                         .in_cables  = 0x0013
416                                 }
417                         },
418                         {
419                                 .ifnum = -1
420                         }
421                 }
422         }
423 },
424 {
425         USB_DEVICE(0x0582, 0x0008),
426         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
427                 .vendor_name = "Roland",
428                 .product_name = "PC-300",
429                 .ifnum = QUIRK_ANY_INTERFACE,
430                 .type = QUIRK_COMPOSITE,
431                 .data = (const struct snd_usb_audio_quirk[]) {
432                         {
433                                 .ifnum = 0,
434                                 .type = QUIRK_IGNORE_INTERFACE
435                         },
436                         {
437                                 .ifnum = 1,
438                                 .type = QUIRK_IGNORE_INTERFACE
439                         },
440                         {
441                                 .ifnum = 2,
442                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
443                                 .data = & (const struct snd_usb_midi_endpoint_info) {
444                                         .out_cables = 0x0001,
445                                         .in_cables  = 0x0001
446                                 }
447                         },
448                         {
449                                 .ifnum = -1
450                         }
451                 }
452         }
453 },
454 {
455         /* has ID 0x009d when not in "Advanced Driver" mode */
456         USB_DEVICE(0x0582, 0x0009),
457         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
458                 .vendor_name = "EDIROL",
459                 .product_name = "UM-1",
460                 .ifnum = QUIRK_ANY_INTERFACE,
461                 .type = QUIRK_COMPOSITE,
462                 .data = (const struct snd_usb_audio_quirk[]) {
463                         {
464                                 .ifnum = 0,
465                                 .type = QUIRK_IGNORE_INTERFACE
466                         },
467                         {
468                                 .ifnum = 1,
469                                 .type = QUIRK_IGNORE_INTERFACE
470                         },
471                         {
472                                 .ifnum = 2,
473                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
474                                 .data = & (const struct snd_usb_midi_endpoint_info) {
475                                         .out_cables = 0x0001,
476                                         .in_cables  = 0x0001
477                                 }
478                         },
479                         {
480                                 .ifnum = -1
481                         }
482                 }
483         }
484 },
485 {
486         USB_DEVICE(0x0582, 0x000b),
487         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
488                 .vendor_name = "Roland",
489                 .product_name = "SK-500",
490                 .ifnum = QUIRK_ANY_INTERFACE,
491                 .type = QUIRK_COMPOSITE,
492                 .data = (const struct snd_usb_audio_quirk[]) {
493                         {
494                                 .ifnum = 0,
495                                 .type = QUIRK_IGNORE_INTERFACE
496                         },
497                         {
498                                 .ifnum = 1,
499                                 .type = QUIRK_IGNORE_INTERFACE
500                         },
501                         {
502                                 .ifnum = 2,
503                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
504                                 .data = & (const struct snd_usb_midi_endpoint_info) {
505                                         .out_cables = 0x0013,
506                                         .in_cables  = 0x0013
507                                 }
508                         },
509                         {
510                                 .ifnum = -1
511                         }
512                 }
513         }
514 },
515 {
516         /* thanks to Emiliano Grilli <emillo@libero.it>
517          * for helping researching this data */
518         USB_DEVICE(0x0582, 0x000c),
519         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
520                 .vendor_name = "Roland",
521                 .product_name = "SC-D70",
522                 .ifnum = QUIRK_ANY_INTERFACE,
523                 .type = QUIRK_COMPOSITE,
524                 .data = (const struct snd_usb_audio_quirk[]) {
525                         {
526                                 .ifnum = 0,
527                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
528                                 .data = & (const struct audioformat) {
529                                         .format = SNDRV_PCM_FORMAT_S24_3LE,
530                                         .channels = 2,
531                                         .iface = 0,
532                                         .altsetting = 1,
533                                         .altset_idx = 1,
534                                         .attributes = 0,
535                                         .endpoint = 0x01,
536                                         .ep_attr = 0x01,
537                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
538                                         .rate_min = 44100,
539                                         .rate_max = 44100,
540                                 }
541                         },
542                         {
543                                 .ifnum = 1,
544                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
545                                 .data = & (const struct audioformat) {
546                                         .format = SNDRV_PCM_FORMAT_S24_3LE,
547                                         .channels = 2,
548                                         .iface = 1,
549                                         .altsetting = 1,
550                                         .altset_idx = 1,
551                                         .attributes = 0,
552                                         .endpoint = 0x81,
553                                         .ep_attr = 0x01,
554                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
555                                         .rate_min = 44100,
556                                         .rate_max = 44100,
557                                 }
558                         },
559                         {
560                                 .ifnum = 2,
561                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
562                                 .data = & (const struct snd_usb_midi_endpoint_info) {
563                                         .out_cables = 0x0007,
564                                         .in_cables  = 0x0007
565                                 }
566                         },
567                         {
568                                 .ifnum = -1
569                         }
570                 }
571         }
572 },
573 {       /*
574          * This quirk is for the "Advanced Driver" mode of the Edirol UA-5.
575          * If the advanced mode switch at the back of the unit is off, the
576          * UA-5 has ID 0x0582/0x0011 and is standard compliant (no quirks),
577          * but offers only 16-bit PCM.
578          * In advanced mode, the UA-5 will output S24_3LE samples (two
579          * channels) at the rate indicated on the front switch, including
580          * the 96kHz sample rate.
581          */
582         USB_DEVICE(0x0582, 0x0010),
583         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
584                 .vendor_name = "EDIROL",
585                 .product_name = "UA-5",
586                 .ifnum = QUIRK_ANY_INTERFACE,
587                 .type = QUIRK_COMPOSITE,
588                 .data = (const struct snd_usb_audio_quirk[]) {
589                         {
590                                 .ifnum = 1,
591                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
592                         },
593                         {
594                                 .ifnum = 2,
595                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
596                         },
597                         {
598                                 .ifnum = -1
599                         }
600                 }
601         }
602 },
603 {
604         /* has ID 0x0013 when not in "Advanced Driver" mode */
605         USB_DEVICE(0x0582, 0x0012),
606         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
607                 .vendor_name = "Roland",
608                 .product_name = "XV-5050",
609                 .ifnum = 0,
610                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
611                 .data = & (const struct snd_usb_midi_endpoint_info) {
612                         .out_cables = 0x0001,
613                         .in_cables  = 0x0001
614                 }
615         }
616 },
617 {
618         /* has ID 0x0015 when not in "Advanced Driver" mode */
619         USB_DEVICE(0x0582, 0x0014),
620         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
621                 .vendor_name = "EDIROL",
622                 .product_name = "UM-880",
623                 .ifnum = 0,
624                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
625                 .data = & (const struct snd_usb_midi_endpoint_info) {
626                         .out_cables = 0x01ff,
627                         .in_cables  = 0x01ff
628                 }
629         }
630 },
631 {
632         /* has ID 0x0017 when not in "Advanced Driver" mode */
633         USB_DEVICE(0x0582, 0x0016),
634         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
635                 .vendor_name = "EDIROL",
636                 .product_name = "SD-90",
637                 .ifnum = QUIRK_ANY_INTERFACE,
638                 .type = QUIRK_COMPOSITE,
639                 .data = (const struct snd_usb_audio_quirk[]) {
640                         {
641                                 .ifnum = 0,
642                                 .type = QUIRK_IGNORE_INTERFACE
643                         },
644                         {
645                                 .ifnum = 1,
646                                 .type = QUIRK_IGNORE_INTERFACE
647                         },
648                         {
649                                 .ifnum = 2,
650                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
651                                 .data = & (const struct snd_usb_midi_endpoint_info) {
652                                         .out_cables = 0x000f,
653                                         .in_cables  = 0x000f
654                                 }
655                         },
656                         {
657                                 .ifnum = -1
658                         }
659                 }
660         }
661 },
662 {
663         /* has ID 0x001c when not in "Advanced Driver" mode */
664         USB_DEVICE(0x0582, 0x001b),
665         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
666                 .vendor_name = "Roland",
667                 .product_name = "MMP-2",
668                 .ifnum = QUIRK_ANY_INTERFACE,
669                 .type = QUIRK_COMPOSITE,
670                 .data = (const struct snd_usb_audio_quirk[]) {
671                         {
672                                 .ifnum = 0,
673                                 .type = QUIRK_IGNORE_INTERFACE
674                         },
675                         {
676                                 .ifnum = 1,
677                                 .type = QUIRK_IGNORE_INTERFACE
678                         },
679                         {
680                                 .ifnum = 2,
681                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
682                                 .data = & (const struct snd_usb_midi_endpoint_info) {
683                                         .out_cables = 0x0001,
684                                         .in_cables  = 0x0001
685                                 }
686                         },
687                         {
688                                 .ifnum = -1
689                         }
690                 }
691         }
692 },
693 {
694         /* has ID 0x001e when not in "Advanced Driver" mode */
695         USB_DEVICE(0x0582, 0x001d),
696         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
697                 .vendor_name = "Roland",
698                 .product_name = "V-SYNTH",
699                 .ifnum = 0,
700                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
701                 .data = & (const struct snd_usb_midi_endpoint_info) {
702                         .out_cables = 0x0001,
703                         .in_cables  = 0x0001
704                 }
705         }
706 },
707 {
708         /* has ID 0x0024 when not in "Advanced Driver" mode */
709         USB_DEVICE(0x0582, 0x0023),
710         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
711                 .vendor_name = "EDIROL",
712                 .product_name = "UM-550",
713                 .ifnum = 0,
714                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
715                 .data = & (const struct snd_usb_midi_endpoint_info) {
716                         .out_cables = 0x003f,
717                         .in_cables  = 0x003f
718                 }
719         }
720 },
721 {
722         /*
723          * This quirk is for the "Advanced Driver" mode. If off, the UA-20
724          * has ID 0x0026 and is standard compliant, but has only 16-bit PCM
725          * and no MIDI.
726          */
727         USB_DEVICE(0x0582, 0x0025),
728         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
729                 .vendor_name = "EDIROL",
730                 .product_name = "UA-20",
731                 .ifnum = QUIRK_ANY_INTERFACE,
732                 .type = QUIRK_COMPOSITE,
733                 .data = (const struct snd_usb_audio_quirk[]) {
734                         {
735                                 .ifnum = 0,
736                                 .type = QUIRK_IGNORE_INTERFACE
737                         },
738                         {
739                                 .ifnum = 1,
740                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
741                                 .data = & (const struct audioformat) {
742                                         .format = SNDRV_PCM_FORMAT_S24_3LE,
743                                         .channels = 2,
744                                         .iface = 1,
745                                         .altsetting = 1,
746                                         .altset_idx = 1,
747                                         .attributes = 0,
748                                         .endpoint = 0x01,
749                                         .ep_attr = 0x01,
750                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
751                                         .rate_min = 44100,
752                                         .rate_max = 44100,
753                                 }
754                         },
755                         {
756                                 .ifnum = 2,
757                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
758                                 .data = & (const struct audioformat) {
759                                         .format = SNDRV_PCM_FORMAT_S24_3LE,
760                                         .channels = 2,
761                                         .iface = 2,
762                                         .altsetting = 1,
763                                         .altset_idx = 1,
764                                         .attributes = 0,
765                                         .endpoint = 0x82,
766                                         .ep_attr = 0x01,
767                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
768                                         .rate_min = 44100,
769                                         .rate_max = 44100,
770                                 }
771                         },
772                         {
773                                 .ifnum = 3,
774                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
775                                 .data = & (const struct snd_usb_midi_endpoint_info) {
776                                         .out_cables = 0x0001,
777                                         .in_cables  = 0x0001
778                                 }
779                         },
780                         {
781                                 .ifnum = -1
782                         }
783                 }
784         }
785 },
786 {
787         /* has ID 0x0028 when not in "Advanced Driver" mode */
788         USB_DEVICE(0x0582, 0x0027),
789         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
790                 .vendor_name = "EDIROL",
791                 .product_name = "SD-20",
792                 .ifnum = 0,
793                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
794                 .data = & (const struct snd_usb_midi_endpoint_info) {
795                         .out_cables = 0x0003,
796                         .in_cables  = 0x0007
797                 }
798         }
799 },
800 {
801         /* has ID 0x002a when not in "Advanced Driver" mode */
802         USB_DEVICE(0x0582, 0x0029),
803         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
804                 .vendor_name = "EDIROL",
805                 .product_name = "SD-80",
806                 .ifnum = 0,
807                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
808                 .data = & (const struct snd_usb_midi_endpoint_info) {
809                         .out_cables = 0x000f,
810                         .in_cables  = 0x000f
811                 }
812         }
813 },
814 {       /*
815          * This quirk is for the "Advanced" modes of the Edirol UA-700.
816          * If the sample format switch is not in an advanced setting, the
817          * UA-700 has ID 0x0582/0x002c and is standard compliant (no quirks),
818          * but offers only 16-bit PCM and no MIDI.
819          */
820         USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b),
821         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
822                 .vendor_name = "EDIROL",
823                 .product_name = "UA-700",
824                 .ifnum = QUIRK_ANY_INTERFACE,
825                 .type = QUIRK_COMPOSITE,
826                 .data = (const struct snd_usb_audio_quirk[]) {
827                         {
828                                 .ifnum = 1,
829                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
830                         },
831                         {
832                                 .ifnum = 2,
833                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
834                         },
835                         {
836                                 .ifnum = 3,
837                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
838                         },
839                         {
840                                 .ifnum = -1
841                         }
842                 }
843         }
844 },
845 {
846         /* has ID 0x002e when not in "Advanced Driver" mode */
847         USB_DEVICE(0x0582, 0x002d),
848         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
849                 .vendor_name = "Roland",
850                 .product_name = "XV-2020",
851                 .ifnum = 0,
852                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
853                 .data = & (const struct snd_usb_midi_endpoint_info) {
854                         .out_cables = 0x0001,
855                         .in_cables  = 0x0001
856                 }
857         }
858 },
859 {
860         /* has ID 0x0030 when not in "Advanced Driver" mode */
861         USB_DEVICE(0x0582, 0x002f),
862         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
863                 .vendor_name = "Roland",
864                 .product_name = "VariOS",
865                 .ifnum = 0,
866                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
867                 .data = & (const struct snd_usb_midi_endpoint_info) {
868                         .out_cables = 0x0007,
869                         .in_cables  = 0x0007
870                 }
871         }
872 },
873 {
874         /* has ID 0x0034 when not in "Advanced Driver" mode */
875         USB_DEVICE(0x0582, 0x0033),
876         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
877                 .vendor_name = "EDIROL",
878                 .product_name = "PCR",
879                 .ifnum = 0,
880                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
881                 .data = & (const struct snd_usb_midi_endpoint_info) {
882                         .out_cables = 0x0003,
883                         .in_cables  = 0x0007
884                 }
885         }
886 },
887         /* TODO: add Roland M-1000 support */
888 {
889         /*
890          * Has ID 0x0038 when not in "Advanced Driver" mode;
891          * later revisions use IDs 0x0054 and 0x00a2.
892          */
893         USB_DEVICE(0x0582, 0x0037),
894         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
895                 .vendor_name = "Roland",
896                 .product_name = "Digital Piano",
897                 .ifnum = 0,
898                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
899                 .data = & (const struct snd_usb_midi_endpoint_info) {
900                         .out_cables = 0x0001,
901                         .in_cables  = 0x0001
902                 }
903         }
904 },
905 {
906         /*
907          * This quirk is for the "Advanced Driver" mode.  If off, the GS-10
908          * has ID 0x003c and is standard compliant, but has only 16-bit PCM
909          * and no MIDI.
910          */
911         USB_DEVICE_VENDOR_SPEC(0x0582, 0x003b),
912         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
913                 .vendor_name = "BOSS",
914                 .product_name = "GS-10",
915                 .ifnum = QUIRK_ANY_INTERFACE,
916                 .type = QUIRK_COMPOSITE,
917                 .data = & (const struct snd_usb_audio_quirk[]) {
918                         {
919                                 .ifnum = 1,
920                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
921                         },
922                         {
923                                 .ifnum = 2,
924                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
925                         },
926                         {
927                                 .ifnum = 3,
928                                 .type = QUIRK_MIDI_STANDARD_INTERFACE
929                         },
930                         {
931                                 .ifnum = -1
932                         }
933                 }
934         }
935 },
936 {
937         /* has ID 0x0041 when not in "Advanced Driver" mode */
938         USB_DEVICE(0x0582, 0x0040),
939         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
940                 .vendor_name = "Roland",
941                 .product_name = "GI-20",
942                 .ifnum = 0,
943                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
944                 .data = & (const struct snd_usb_midi_endpoint_info) {
945                         .out_cables = 0x0001,
946                         .in_cables  = 0x0001
947                 }
948         }
949 },
950 {
951         /* has ID 0x0043 when not in "Advanced Driver" mode */
952         USB_DEVICE(0x0582, 0x0042),
953         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
954                 .vendor_name = "Roland",
955                 .product_name = "RS-70",
956                 .ifnum = 0,
957                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
958                 .data = & (const struct snd_usb_midi_endpoint_info) {
959                         .out_cables = 0x0001,
960                         .in_cables  = 0x0001
961                 }
962         }
963 },
964 {
965         USB_DEVICE(0x0582, 0x0044),
966         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
967                 .vendor_name = "Roland",
968                 .product_name = "UA-1000",
969                 .ifnum = QUIRK_ANY_INTERFACE,
970                 .type = QUIRK_COMPOSITE,
971                 .data = (const struct snd_usb_audio_quirk[]) {
972                         {
973                                 .ifnum = 1,
974                                 .type = QUIRK_AUDIO_EDIROL_UA1000
975                         },
976                         {
977                                 .ifnum = 2,
978                                 .type = QUIRK_AUDIO_EDIROL_UA1000
979                         },
980                         {
981                                 .ifnum = 3,
982                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
983                                 .data = & (const struct snd_usb_midi_endpoint_info) {
984                                         .out_cables = 0x0003,
985                                         .in_cables  = 0x0003
986                                 }
987                         },
988                         {
989                                 .ifnum = -1
990                         }
991                 }
992         }
993 },
994 {
995         /* has ID 0x004a when not in "Advanced Driver" mode */
996         USB_DEVICE(0x0582, 0x0048),
997         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
998                 .vendor_name = "EDIROL",
999                 .product_name = "UR-80",
1000                 .ifnum = 0,
1001                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1002                 .data = & (const struct snd_usb_midi_endpoint_info) {
1003                         .out_cables = 0x0003,
1004                         .in_cables  = 0x0007
1005                 }
1006         }
1007 },
1008         /* TODO: add Edirol M-100FX support */
1009 {
1010         /* has ID 0x004e when not in "Advanced Driver" mode */
1011         USB_DEVICE(0x0582, 0x004c),
1012         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1013                 .vendor_name = "EDIROL",
1014                 .product_name = "PCR-A",
1015                 .ifnum = QUIRK_ANY_INTERFACE,
1016                 .type = QUIRK_COMPOSITE,
1017                 .data = (const struct snd_usb_audio_quirk[]) {
1018                         {
1019                                 .ifnum = 1,
1020                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1021                         },
1022                         {
1023                                 .ifnum = 2,
1024                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1025                         },
1026                         {
1027                                 .ifnum = -1
1028                         }
1029                 }
1030         }
1031 },
1032 {
1033         /* has ID 0x004f when not in "Advanced Driver" mode */
1034         USB_DEVICE(0x0582, 0x004d),
1035         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1036                 .vendor_name = "EDIROL",
1037                 .product_name = "PCR-A",
1038                 .ifnum = 0,
1039                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1040                 .data = & (const struct snd_usb_midi_endpoint_info) {
1041                         .out_cables = 0x0003,
1042                         .in_cables  = 0x0007
1043                 }
1044         }
1045 },
1046 {
1047         /*
1048          * This quirk is for the "Advanced Driver" mode. If off, the UA-3FX
1049          * is standard compliant, but has only 16-bit PCM.
1050          */
1051         USB_DEVICE(0x0582, 0x0050),
1052         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1053                 .vendor_name = "EDIROL",
1054                 .product_name = "UA-3FX",
1055                 .ifnum = QUIRK_ANY_INTERFACE,
1056                 .type = QUIRK_COMPOSITE,
1057                 .data = (const struct snd_usb_audio_quirk[]) {
1058                         {
1059                                 .ifnum = 1,
1060                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1061                         },
1062                         {
1063                                 .ifnum = 2,
1064                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1065                         },
1066                         {
1067                                 .ifnum = -1
1068                         }
1069                 }
1070         }
1071 },
1072 {
1073         USB_DEVICE(0x0582, 0x0052),
1074         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1075                 .vendor_name = "EDIROL",
1076                 .product_name = "UM-1SX",
1077                 .ifnum = 0,
1078                 .type = QUIRK_MIDI_STANDARD_INTERFACE
1079         }
1080 },
1081 {
1082         USB_DEVICE(0x0582, 0x0060),
1083         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1084                 .vendor_name = "Roland",
1085                 .product_name = "EXR Series",
1086                 .ifnum = 0,
1087                 .type = QUIRK_MIDI_STANDARD_INTERFACE
1088         }
1089 },
1090 {
1091         /* has ID 0x0067 when not in "Advanced Driver" mode */
1092         USB_DEVICE(0x0582, 0x0065),
1093         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1094                 .vendor_name = "EDIROL",
1095                 .product_name = "PCR-1",
1096                 .ifnum = 0,
1097                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1098                 .data = & (const struct snd_usb_midi_endpoint_info) {
1099                         .out_cables = 0x0001,
1100                         .in_cables  = 0x0003
1101                 }
1102         }
1103 },
1104 {
1105         /* has ID 0x006b when not in "Advanced Driver" mode */
1106         USB_DEVICE_VENDOR_SPEC(0x0582, 0x006a),
1107         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1108                 .vendor_name = "Roland",
1109                 .product_name = "SP-606",
1110                 .ifnum = 3,
1111                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1112                 .data = & (const struct snd_usb_midi_endpoint_info) {
1113                         .out_cables = 0x0001,
1114                         .in_cables  = 0x0001
1115                 }
1116         }
1117 },
1118 {
1119         /* has ID 0x006e when not in "Advanced Driver" mode */
1120         USB_DEVICE(0x0582, 0x006d),
1121         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1122                 .vendor_name = "Roland",
1123                 .product_name = "FANTOM-X",
1124                 .ifnum = 0,
1125                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1126                 .data = & (const struct snd_usb_midi_endpoint_info) {
1127                         .out_cables = 0x0001,
1128                         .in_cables  = 0x0001
1129                 }
1130         }
1131 },
1132 {
1133         USB_DEVICE(0x582, 0x00a6),
1134         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1135                 .vendor_name = "Roland",
1136                 .product_name = "Juno-G",
1137                 .ifnum = 0,
1138                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1139                 .data = & (const struct snd_usb_midi_endpoint_info) {
1140                         .out_cables = 0x0001,
1141                         .in_cables  = 0x0001
1142                 }
1143         }
1144 },
1145 {       /*
1146          * This quirk is for the "Advanced" modes of the Edirol UA-25.
1147          * If the switch is not in an advanced setting, the UA-25 has
1148          * ID 0x0582/0x0073 and is standard compliant (no quirks), but
1149          * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1150          */
1151         USB_DEVICE_VENDOR_SPEC(0x0582, 0x0074),
1152         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1153                 .vendor_name = "EDIROL",
1154                 .product_name = "UA-25",
1155                 .ifnum = QUIRK_ANY_INTERFACE,
1156                 .type = QUIRK_COMPOSITE,
1157                 .data = (const struct snd_usb_audio_quirk[]) {
1158                         {
1159                                 .ifnum = 0,
1160                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
1161                         },
1162                         {
1163                                 .ifnum = 1,
1164                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
1165                         },
1166                         {
1167                                 .ifnum = 2,
1168                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
1169                         },
1170                         {
1171                                 .ifnum = -1
1172                         }
1173                 }
1174         }
1175 },
1176 {
1177         /* has ID 0x0076 when not in "Advanced Driver" mode */
1178         USB_DEVICE(0x0582, 0x0075),
1179         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1180                 .vendor_name = "BOSS",
1181                 .product_name = "DR-880",
1182                 .ifnum = 0,
1183                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1184                 .data = & (const struct snd_usb_midi_endpoint_info) {
1185                         .out_cables = 0x0001,
1186                         .in_cables  = 0x0001
1187                 }
1188         }
1189 },
1190 {
1191         /* has ID 0x007b when not in "Advanced Driver" mode */
1192         USB_DEVICE_VENDOR_SPEC(0x0582, 0x007a),
1193         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1194                 .vendor_name = "Roland",
1195                 /* "RD" or "RD-700SX"? */
1196                 .ifnum = 0,
1197                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1198                 .data = & (const struct snd_usb_midi_endpoint_info) {
1199                         .out_cables = 0x0003,
1200                         .in_cables  = 0x0003
1201                 }
1202         }
1203 },
1204 /* Roland UA-101 in High-Speed Mode only */
1205 {
1206         USB_DEVICE(0x0582, 0x007d),
1207         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1208                 .vendor_name = "Roland",
1209                 .product_name = "UA-101",
1210                 .ifnum = QUIRK_ANY_INTERFACE,
1211                 .type = QUIRK_COMPOSITE,
1212                 .data = (const struct snd_usb_audio_quirk[]) {
1213                         {
1214                                 .ifnum = 0,
1215                                 .type = QUIRK_AUDIO_EDIROL_UA101
1216                         },
1217                         {
1218                                 .ifnum = 1,
1219                                 .type = QUIRK_AUDIO_EDIROL_UA101
1220                         },
1221                         {
1222                                 .ifnum = 2,
1223                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1224                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1225                                         .out_cables = 0x0001,
1226                                         .in_cables  = 0x0001
1227                                 }
1228                         },
1229                         {
1230                                 .ifnum = -1
1231                         }
1232                 }
1233         }
1234 },
1235 {
1236         /* has ID 0x0081 when not in "Advanced Driver" mode */
1237         USB_DEVICE(0x0582, 0x0080),
1238         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1239                 .vendor_name = "Roland",
1240                 .product_name = "G-70",
1241                 .ifnum = 0,
1242                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1243                 .data = & (const struct snd_usb_midi_endpoint_info) {
1244                         .out_cables = 0x0001,
1245                         .in_cables  = 0x0001
1246                 }
1247         }
1248 },
1249         /* TODO: add Roland V-SYNTH XT support */
1250         /* TODO: add BOSS GT-PRO support */
1251 {
1252         /* has ID 0x008c when not in "Advanced Driver" mode */
1253         USB_DEVICE(0x0582, 0x008b),
1254         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1255                 .vendor_name = "EDIROL",
1256                 .product_name = "PC-50",
1257                 .ifnum = 0,
1258                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1259                 .data = & (const struct snd_usb_midi_endpoint_info) {
1260                         .out_cables = 0x0001,
1261                         .in_cables  = 0x0001
1262                 }
1263         }
1264 },
1265         /* TODO: add Edirol PC-80 support */
1266         /* TODO: add Edirol UA-1EX support */
1267 {
1268         USB_DEVICE(0x0582, 0x009a),
1269         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1270                 .vendor_name = "EDIROL",
1271                 .product_name = "UM-3EX",
1272                 .ifnum = 0,
1273                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1274                 .data = & (const struct snd_usb_midi_endpoint_info) {
1275                         .out_cables = 0x000f,
1276                         .in_cables  = 0x000f
1277                 }
1278         }
1279 },
1280         /* TODO: add Edirol MD-P1 support */
1281 {
1282         /* Roland SH-201 */
1283         USB_DEVICE(0x0582, 0x00ad),
1284         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1285                 .vendor_name = "Roland",
1286                 .product_name = "SH-201",
1287                 .ifnum = QUIRK_ANY_INTERFACE,
1288                 .type = QUIRK_COMPOSITE,
1289                 .data = (const struct snd_usb_audio_quirk[]) {
1290                         {
1291                                 .ifnum = 0,
1292                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1293                         },
1294                         {
1295                                 .ifnum = 1,
1296                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1297                         },
1298                         {
1299                                 .ifnum = 2,
1300                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1301                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1302                                         .out_cables = 0x0001,
1303                                         .in_cables  = 0x0001
1304                                 }
1305                         },
1306                         {
1307                                 .ifnum = -1
1308                         }
1309                 }
1310         }
1311 },
1312
1313 /* Guillemot devices */
1314 {
1315         /*
1316          * This is for the "Windows Edition" where the external MIDI ports are
1317          * the only MIDI ports; the control data is reported through HID
1318          * interfaces.  The "Macintosh Edition" has ID 0xd002 and uses standard
1319          * compliant USB MIDI ports for external MIDI and controls.
1320          */
1321         USB_DEVICE_VENDOR_SPEC(0x06f8, 0xb000),
1322         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1323                 .vendor_name = "Hercules",
1324                 .product_name = "DJ Console (WE)",
1325                 .ifnum = 4,
1326                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1327                 .data = & (const struct snd_usb_midi_endpoint_info) {
1328                         .out_cables = 0x0001,
1329                         .in_cables = 0x0001
1330                 }
1331         }
1332 },
1333
1334 /* Midiman/M-Audio devices */
1335 {
1336         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002),
1337         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1338                 .vendor_name = "M-Audio",
1339                 .product_name = "MidiSport 2x2",
1340                 .ifnum = QUIRK_ANY_INTERFACE,
1341                 .type = QUIRK_MIDI_MIDIMAN,
1342                 .data = & (const struct snd_usb_midi_endpoint_info) {
1343                         .out_cables = 0x0003,
1344                         .in_cables  = 0x0003
1345                 }
1346         }
1347 },
1348 {
1349         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011),
1350         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1351                 .vendor_name = "M-Audio",
1352                 .product_name = "MidiSport 1x1",
1353                 .ifnum = QUIRK_ANY_INTERFACE,
1354                 .type = QUIRK_MIDI_MIDIMAN,
1355                 .data = & (const struct snd_usb_midi_endpoint_info) {
1356                         .out_cables = 0x0001,
1357                         .in_cables  = 0x0001
1358                 }
1359         }
1360 },
1361 {
1362         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015),
1363         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1364                 .vendor_name = "M-Audio",
1365                 .product_name = "Keystation",
1366                 .ifnum = QUIRK_ANY_INTERFACE,
1367                 .type = QUIRK_MIDI_MIDIMAN,
1368                 .data = & (const struct snd_usb_midi_endpoint_info) {
1369                         .out_cables = 0x0001,
1370                         .in_cables  = 0x0001
1371                 }
1372         }
1373 },
1374 {
1375         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021),
1376         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1377                 .vendor_name = "M-Audio",
1378                 .product_name = "MidiSport 4x4",
1379                 .ifnum = QUIRK_ANY_INTERFACE,
1380                 .type = QUIRK_MIDI_MIDIMAN,
1381                 .data = & (const struct snd_usb_midi_endpoint_info) {
1382                         .out_cables = 0x000f,
1383                         .in_cables  = 0x000f
1384                 }
1385         }
1386 },
1387 {
1388         /*
1389          * For hardware revision 1.05; in the later revisions (1.10 and
1390          * 1.21), 0x1031 is the ID for the device without firmware.
1391          * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de>
1392          */
1393         USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109),
1394         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1395                 .vendor_name = "M-Audio",
1396                 .product_name = "MidiSport 8x8",
1397                 .ifnum = QUIRK_ANY_INTERFACE,
1398                 .type = QUIRK_MIDI_MIDIMAN,
1399                 .data = & (const struct snd_usb_midi_endpoint_info) {
1400                         .out_cables = 0x01ff,
1401                         .in_cables  = 0x01ff
1402                 }
1403         }
1404 },
1405 {
1406         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033),
1407         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1408                 .vendor_name = "M-Audio",
1409                 .product_name = "MidiSport 8x8",
1410                 .ifnum = QUIRK_ANY_INTERFACE,
1411                 .type = QUIRK_MIDI_MIDIMAN,
1412                 .data = & (const struct snd_usb_midi_endpoint_info) {
1413                         .out_cables = 0x01ff,
1414                         .in_cables  = 0x01ff
1415                 }
1416         }
1417 },
1418 {
1419         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041),
1420         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1421                 .vendor_name = "M-Audio",
1422                 .product_name = "MidiSport 2x4",
1423                 .ifnum = QUIRK_ANY_INTERFACE,
1424                 .type = QUIRK_MIDI_MIDIMAN,
1425                 .data = & (const struct snd_usb_midi_endpoint_info) {
1426                         .out_cables = 0x000f,
1427                         .in_cables  = 0x0003
1428                 }
1429         }
1430 },
1431 {
1432         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001),
1433         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1434                 .vendor_name = "M-Audio",
1435                 .product_name = "Quattro",
1436                 .ifnum = QUIRK_ANY_INTERFACE,
1437                 .type = QUIRK_COMPOSITE,
1438                 .data = & (const struct snd_usb_audio_quirk[]) {
1439                         /*
1440                          * Interfaces 0-2 are "Windows-compatible", 16-bit only,
1441                          * and share endpoints with the other interfaces.
1442                          * Ignore them.  The other interfaces can do 24 bits,
1443                          * but captured samples are big-endian (see usbaudio.c).
1444                          */
1445                         {
1446                                 .ifnum = 0,
1447                                 .type = QUIRK_IGNORE_INTERFACE
1448                         },
1449                         {
1450                                 .ifnum = 1,
1451                                 .type = QUIRK_IGNORE_INTERFACE
1452                         },
1453                         {
1454                                 .ifnum = 2,
1455                                 .type = QUIRK_IGNORE_INTERFACE
1456                         },
1457                         {
1458                                 .ifnum = 3,
1459                                 .type = QUIRK_IGNORE_INTERFACE
1460                         },
1461                         {
1462                                 .ifnum = 4,
1463                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1464                         },
1465                         {
1466                                 .ifnum = 5,
1467                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1468                         },
1469                         {
1470                                 .ifnum = 6,
1471                                 .type = QUIRK_IGNORE_INTERFACE
1472                         },
1473                         {
1474                                 .ifnum = 7,
1475                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1476                         },
1477                         {
1478                                 .ifnum = 8,
1479                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1480                         },
1481                         {
1482                                 .ifnum = 9,
1483                                 .type = QUIRK_MIDI_MIDIMAN,
1484                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1485                                         .out_cables = 0x0001,
1486                                         .in_cables  = 0x0001
1487                                 }
1488                         },
1489                         {
1490                                 .ifnum = -1
1491                         }
1492                 }
1493         }
1494 },
1495 {
1496         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003),
1497         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1498                 .vendor_name = "M-Audio",
1499                 .product_name = "AudioPhile",
1500                 .ifnum = 6,
1501                 .type = QUIRK_MIDI_MIDIMAN,
1502                 .data = & (const struct snd_usb_midi_endpoint_info) {
1503                         .out_cables = 0x0001,
1504                         .in_cables  = 0x0001
1505                 }
1506         }
1507 },
1508 {
1509         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008),
1510         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1511                 .vendor_name = "M-Audio",
1512                 .product_name = "Ozone",
1513                 .ifnum = 3,
1514                 .type = QUIRK_MIDI_MIDIMAN,
1515                 .data = & (const struct snd_usb_midi_endpoint_info) {
1516                         .out_cables = 0x0001,
1517                         .in_cables  = 0x0001
1518                 }
1519         }
1520 },
1521 {
1522         USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d),
1523         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1524                 .vendor_name = "M-Audio",
1525                 .product_name = "OmniStudio",
1526                 .ifnum = QUIRK_ANY_INTERFACE,
1527                 .type = QUIRK_COMPOSITE,
1528                 .data = & (const struct snd_usb_audio_quirk[]) {
1529                         {
1530                                 .ifnum = 0,
1531                                 .type = QUIRK_IGNORE_INTERFACE
1532                         },
1533                         {
1534                                 .ifnum = 1,
1535                                 .type = QUIRK_IGNORE_INTERFACE
1536                         },
1537                         {
1538                                 .ifnum = 2,
1539                                 .type = QUIRK_IGNORE_INTERFACE
1540                         },
1541                         {
1542                                 .ifnum = 3,
1543                                 .type = QUIRK_IGNORE_INTERFACE
1544                         },
1545                         {
1546                                 .ifnum = 4,
1547                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1548                         },
1549                         {
1550                                 .ifnum = 5,
1551                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1552                         },
1553                         {
1554                                 .ifnum = 6,
1555                                 .type = QUIRK_IGNORE_INTERFACE
1556                         },
1557                         {
1558                                 .ifnum = 7,
1559                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1560                         },
1561                         {
1562                                 .ifnum = 8,
1563                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1564                         },
1565                         {
1566                                 .ifnum = 9,
1567                                 .type = QUIRK_MIDI_MIDIMAN,
1568                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1569                                         .out_cables = 0x0001,
1570                                         .in_cables  = 0x0001
1571                                 }
1572                         },
1573                         {
1574                                 .ifnum = -1
1575                         }
1576                 }
1577         }
1578 },
1579
1580 /* Casio devices */
1581 {
1582         USB_DEVICE(0x07cf, 0x6801),
1583         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1584                 .vendor_name = "Casio",
1585                 .product_name = "PL-40R",
1586                 .ifnum = 0,
1587                 .type = QUIRK_MIDI_YAMAHA
1588         }
1589 },
1590 {
1591         /* this ID is used by several devices without a product ID */
1592         USB_DEVICE(0x07cf, 0x6802),
1593         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1594                 .vendor_name = "Casio",
1595                 .product_name = "Keyboard",
1596                 .ifnum = 0,
1597                 .type = QUIRK_MIDI_YAMAHA
1598         }
1599 },
1600
1601 /* Mark of the Unicorn devices */
1602 {
1603         /* thanks to Robert A. Lerche <ral 'at' msbit.com> */
1604         .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
1605                        USB_DEVICE_ID_MATCH_PRODUCT |
1606                        USB_DEVICE_ID_MATCH_DEV_SUBCLASS,
1607         .idVendor = 0x07fd,
1608         .idProduct = 0x0001,
1609         .bDeviceSubClass = 2,
1610         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1611                 .vendor_name = "MOTU",
1612                 .product_name = "Fastlane",
1613                 .ifnum = QUIRK_ANY_INTERFACE,
1614                 .type = QUIRK_COMPOSITE,
1615                 .data = & (const struct snd_usb_audio_quirk[]) {
1616                         {
1617                                 .ifnum = 0,
1618                                 .type = QUIRK_MIDI_RAW
1619                         },
1620                         {
1621                                 .ifnum = 1,
1622                                 .type = QUIRK_IGNORE_INTERFACE
1623                         },
1624                         {
1625                                 .ifnum = -1
1626                         }
1627                 }
1628         }
1629 },
1630
1631 {
1632         /* Creative Sound Blaster MP3+ */
1633         USB_DEVICE(0x041e, 0x3010),
1634         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1635                 .vendor_name = "Creative Labs",
1636                 .product_name = "Sound Blaster MP3+",
1637                 .ifnum = QUIRK_NO_INTERFACE
1638         }
1639         
1640 },
1641
1642 /* Emagic devices */
1643 {
1644         USB_DEVICE(0x086a, 0x0001),
1645         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1646                 .vendor_name = "Emagic",
1647                 /* .product_name = "Unitor8", */
1648                 .ifnum = 2,
1649                 .type = QUIRK_MIDI_EMAGIC,
1650                 .data = & (const struct snd_usb_midi_endpoint_info) {
1651                         .out_cables = 0x80ff,
1652                         .in_cables  = 0x80ff
1653                 }
1654         }
1655 },
1656 {
1657         USB_DEVICE(0x086a, 0x0002),
1658         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1659                 .vendor_name = "Emagic",
1660                 /* .product_name = "AMT8", */
1661                 .ifnum = 2,
1662                 .type = QUIRK_MIDI_EMAGIC,
1663                 .data = & (const struct snd_usb_midi_endpoint_info) {
1664                         .out_cables = 0x80ff,
1665                         .in_cables  = 0x80ff
1666                 }
1667         }
1668 },
1669 {
1670         USB_DEVICE(0x086a, 0x0003),
1671         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1672                 .vendor_name = "Emagic",
1673                 /* .product_name = "MT4", */
1674                 .ifnum = 2,
1675                 .type = QUIRK_MIDI_EMAGIC,
1676                 .data = & (const struct snd_usb_midi_endpoint_info) {
1677                         .out_cables = 0x800f,
1678                         .in_cables  = 0x8003
1679                 }
1680         }
1681 },
1682
1683 /* TerraTec devices */
1684 {
1685         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),
1686         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1687                 .vendor_name = "TerraTec",
1688                 .product_name = "PHASE 26",
1689                 .ifnum = 3,
1690                 .type = QUIRK_MIDI_STANDARD_INTERFACE
1691         }
1692 },
1693 {
1694         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013),
1695         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1696                 .vendor_name = "TerraTec",
1697                 .product_name = "PHASE 26",
1698                 .ifnum = 3,
1699                 .type = QUIRK_MIDI_STANDARD_INTERFACE
1700         }
1701 },
1702 {
1703         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0014),
1704         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1705                 .vendor_name = "TerraTec",
1706                 .product_name = "PHASE 26",
1707                 .ifnum = 3,
1708                 .type = QUIRK_MIDI_STANDARD_INTERFACE
1709         }
1710 },
1711 {
1712         USB_DEVICE(0x0ccd, 0x0035),
1713         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1714                 .vendor_name = "Miditech",
1715                 .product_name = "Play'n Roll",
1716                 .ifnum = 0,
1717                 .type = QUIRK_MIDI_CME
1718         }
1719 },
1720
1721 /* Novation EMS devices */
1722 {
1723         USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001),
1724         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1725                 .vendor_name = "Novation",
1726                 .product_name = "ReMOTE Audio/XStation",
1727                 .ifnum = 4,
1728                 .type = QUIRK_MIDI_NOVATION
1729         }
1730 },
1731 {
1732         USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002),
1733         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1734                 .vendor_name = "Novation",
1735                 .product_name = "Speedio",
1736                 .ifnum = 3,
1737                 .type = QUIRK_MIDI_NOVATION
1738         }
1739 },
1740 {
1741         USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
1742         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1743                 .vendor_name = "Novation",
1744                 .product_name = "ReMOTE25",
1745                 .ifnum = 0,
1746                 .type = QUIRK_MIDI_NOVATION
1747         }
1748 },
1749
1750 /* Miditech devices */
1751 {
1752         USB_DEVICE(0x4752, 0x0011),
1753         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1754                 .vendor_name = "Miditech",
1755                 .product_name = "Midistart-2",
1756                 .ifnum = 0,
1757                 .type = QUIRK_MIDI_CME
1758         }
1759 },
1760
1761 /* Central Music devices */
1762 {
1763         /* this ID used by both Miditech MidiStudio-2 and CME UF-x */
1764         USB_DEVICE(0x7104, 0x2202),
1765         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1766                 .ifnum = 0,
1767                 .type = QUIRK_MIDI_CME
1768         }
1769 },
1770
1771 {
1772         /*
1773          * Some USB MIDI devices don't have an audio control interface,
1774          * so we have to grab MIDI streaming interfaces here.
1775          */
1776         .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
1777                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
1778         .bInterfaceClass = USB_CLASS_AUDIO,
1779         .bInterfaceSubClass = USB_SUBCLASS_MIDI_STREAMING,
1780         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1781                 .ifnum = QUIRK_ANY_INTERFACE,
1782                 .type = QUIRK_MIDI_STANDARD_INTERFACE
1783         }
1784 },
1785
1786 #undef USB_DEVICE_VENDOR_SPEC