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