ALSA: usb-audio: Move device rename and profile quirks to an internal table
[linux-2.6-microblaze.git] / sound / usb / quirks-table.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * ALSA USB Audio Driver
4  *
5  * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>,
6  *                       Clemens Ladisch <clemens@ladisch.de>
7  */
8
9 /*
10  * The contents of this file are part of the driver's id_table.
11  *
12  * In a perfect world, this file would be empty.
13  */
14
15 /*
16  * Use this for devices where other interfaces are standard compliant,
17  * to prevent the quirk being applied to those interfaces. (To work with
18  * hotplugging, bDeviceClass must be set to USB_CLASS_PER_INTERFACE.)
19  */
20 #define USB_DEVICE_VENDOR_SPEC(vend, prod) \
21         .match_flags = USB_DEVICE_ID_MATCH_VENDOR | \
22                        USB_DEVICE_ID_MATCH_PRODUCT | \
23                        USB_DEVICE_ID_MATCH_INT_CLASS, \
24         .idVendor = vend, \
25         .idProduct = prod, \
26         .bInterfaceClass = USB_CLASS_VENDOR_SPEC
27
28 /* FTDI devices */
29 {
30         USB_DEVICE(0x0403, 0xb8d8),
31         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
32                 /* .vendor_name = "STARR LABS", */
33                 /* .product_name = "Starr Labs MIDI USB device", */
34                 .ifnum = 0,
35                 .type = QUIRK_MIDI_FTDI
36         }
37 },
38
39 {
40         /* Creative BT-D1 */
41         USB_DEVICE(0x041e, 0x0005),
42         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
43                 .ifnum = 1,
44                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
45                 .data = &(const struct audioformat) {
46                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
47                         .channels = 2,
48                         .iface = 1,
49                         .altsetting = 1,
50                         .altset_idx = 1,
51                         .endpoint = 0x03,
52                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
53                         .attributes = 0,
54                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
55                         .rate_min = 48000,
56                         .rate_max = 48000,
57                 }
58         }
59 },
60
61 {
62         /* E-Mu 0202 USB */
63         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
64         .idVendor = 0x041e,
65         .idProduct = 0x3f02,
66         .bInterfaceClass = USB_CLASS_AUDIO,
67 },
68 {
69         /* E-Mu 0404 USB */
70         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
71         .idVendor = 0x041e,
72         .idProduct = 0x3f04,
73         .bInterfaceClass = USB_CLASS_AUDIO,
74 },
75 {
76         /* E-Mu Tracker Pre */
77         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
78         .idVendor = 0x041e,
79         .idProduct = 0x3f0a,
80         .bInterfaceClass = USB_CLASS_AUDIO,
81 },
82 {
83         /* E-Mu 0204 USB */
84         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
85         .idVendor = 0x041e,
86         .idProduct = 0x3f19,
87         .bInterfaceClass = USB_CLASS_AUDIO,
88 },
89
90 /*
91  * HP Wireless Audio
92  * When not ignored, causes instability issues for some users, forcing them to
93  * skip the entire module.
94  */
95 {
96         USB_DEVICE(0x0424, 0xb832),
97         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
98                 .vendor_name = "Standard Microsystems Corp.",
99                 .product_name = "HP Wireless Audio",
100                 .ifnum = QUIRK_ANY_INTERFACE,
101                 .type = QUIRK_COMPOSITE,
102                 .data = (const struct snd_usb_audio_quirk[]) {
103                         /* Mixer */
104                         {
105                                 .ifnum = 0,
106                                 .type = QUIRK_IGNORE_INTERFACE,
107                         },
108                         /* Playback */
109                         {
110                                 .ifnum = 1,
111                                 .type = QUIRK_IGNORE_INTERFACE,
112                         },
113                         /* Capture */
114                         {
115                                 .ifnum = 2,
116                                 .type = QUIRK_IGNORE_INTERFACE,
117                         },
118                         /* HID Device, .ifnum = 3 */
119                         {
120                                 .ifnum = -1,
121                         }
122                 }
123         }
124 },
125
126 /*
127  * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
128  * class matches do not take effect without an explicit ID match.
129  */
130 {
131         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
132                        USB_DEVICE_ID_MATCH_INT_CLASS |
133                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
134         .idVendor = 0x046d,
135         .idProduct = 0x0850,
136         .bInterfaceClass = USB_CLASS_AUDIO,
137         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
138 },
139 {
140         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
141                        USB_DEVICE_ID_MATCH_INT_CLASS |
142                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
143         .idVendor = 0x046d,
144         .idProduct = 0x08ae,
145         .bInterfaceClass = USB_CLASS_AUDIO,
146         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
147 },
148 {
149         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
150                        USB_DEVICE_ID_MATCH_INT_CLASS |
151                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
152         .idVendor = 0x046d,
153         .idProduct = 0x08c6,
154         .bInterfaceClass = USB_CLASS_AUDIO,
155         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
156 },
157 {
158         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
159                        USB_DEVICE_ID_MATCH_INT_CLASS |
160                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
161         .idVendor = 0x046d,
162         .idProduct = 0x08f0,
163         .bInterfaceClass = USB_CLASS_AUDIO,
164         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
165 },
166 {
167         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
168                        USB_DEVICE_ID_MATCH_INT_CLASS |
169                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
170         .idVendor = 0x046d,
171         .idProduct = 0x08f5,
172         .bInterfaceClass = USB_CLASS_AUDIO,
173         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
174 },
175 {
176         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
177                        USB_DEVICE_ID_MATCH_INT_CLASS |
178                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
179         .idVendor = 0x046d,
180         .idProduct = 0x08f6,
181         .bInterfaceClass = USB_CLASS_AUDIO,
182         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
183 },
184 {
185         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
186                        USB_DEVICE_ID_MATCH_INT_CLASS |
187                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
188         .idVendor = 0x046d,
189         .idProduct = 0x0990,
190         .bInterfaceClass = USB_CLASS_AUDIO,
191         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
192 },
193
194 /*
195  * Yamaha devices
196  */
197
198 #define YAMAHA_DEVICE(id, name) { \
199         USB_DEVICE(0x0499, id), \
200         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
201                 .vendor_name = "Yamaha", \
202                 .product_name = name, \
203                 .ifnum = QUIRK_ANY_INTERFACE, \
204                 .type = QUIRK_MIDI_YAMAHA \
205         } \
206 }
207 #define YAMAHA_INTERFACE(id, intf, name) { \
208         USB_DEVICE_VENDOR_SPEC(0x0499, id), \
209         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
210                 .vendor_name = "Yamaha", \
211                 .product_name = name, \
212                 .ifnum = intf, \
213                 .type = QUIRK_MIDI_YAMAHA \
214         } \
215 }
216 YAMAHA_DEVICE(0x1000, "UX256"),
217 YAMAHA_DEVICE(0x1001, "MU1000"),
218 YAMAHA_DEVICE(0x1002, "MU2000"),
219 YAMAHA_DEVICE(0x1003, "MU500"),
220 YAMAHA_INTERFACE(0x1004, 3, "UW500"),
221 YAMAHA_DEVICE(0x1005, "MOTIF6"),
222 YAMAHA_DEVICE(0x1006, "MOTIF7"),
223 YAMAHA_DEVICE(0x1007, "MOTIF8"),
224 YAMAHA_DEVICE(0x1008, "UX96"),
225 YAMAHA_DEVICE(0x1009, "UX16"),
226 YAMAHA_INTERFACE(0x100a, 3, "EOS BX"),
227 YAMAHA_DEVICE(0x100c, "UC-MX"),
228 YAMAHA_DEVICE(0x100d, "UC-KX"),
229 YAMAHA_DEVICE(0x100e, "S08"),
230 YAMAHA_DEVICE(0x100f, "CLP-150"),
231 YAMAHA_DEVICE(0x1010, "CLP-170"),
232 YAMAHA_DEVICE(0x1011, "P-250"),
233 YAMAHA_DEVICE(0x1012, "TYROS"),
234 YAMAHA_DEVICE(0x1013, "PF-500"),
235 YAMAHA_DEVICE(0x1014, "S90"),
236 YAMAHA_DEVICE(0x1015, "MOTIF-R"),
237 YAMAHA_DEVICE(0x1016, "MDP-5"),
238 YAMAHA_DEVICE(0x1017, "CVP-204"),
239 YAMAHA_DEVICE(0x1018, "CVP-206"),
240 YAMAHA_DEVICE(0x1019, "CVP-208"),
241 YAMAHA_DEVICE(0x101a, "CVP-210"),
242 YAMAHA_DEVICE(0x101b, "PSR-1100"),
243 YAMAHA_DEVICE(0x101c, "PSR-2100"),
244 YAMAHA_DEVICE(0x101d, "CLP-175"),
245 YAMAHA_DEVICE(0x101e, "PSR-K1"),
246 YAMAHA_DEVICE(0x101f, "EZ-J24"),
247 YAMAHA_DEVICE(0x1020, "EZ-250i"),
248 YAMAHA_DEVICE(0x1021, "MOTIF ES 6"),
249 YAMAHA_DEVICE(0x1022, "MOTIF ES 7"),
250 YAMAHA_DEVICE(0x1023, "MOTIF ES 8"),
251 YAMAHA_DEVICE(0x1024, "CVP-301"),
252 YAMAHA_DEVICE(0x1025, "CVP-303"),
253 YAMAHA_DEVICE(0x1026, "CVP-305"),
254 YAMAHA_DEVICE(0x1027, "CVP-307"),
255 YAMAHA_DEVICE(0x1028, "CVP-309"),
256 YAMAHA_DEVICE(0x1029, "CVP-309GP"),
257 YAMAHA_DEVICE(0x102a, "PSR-1500"),
258 YAMAHA_DEVICE(0x102b, "PSR-3000"),
259 YAMAHA_DEVICE(0x102e, "ELS-01/01C"),
260 YAMAHA_DEVICE(0x1030, "PSR-295/293"),
261 YAMAHA_DEVICE(0x1031, "DGX-205/203"),
262 YAMAHA_DEVICE(0x1032, "DGX-305"),
263 YAMAHA_DEVICE(0x1033, "DGX-505"),
264 YAMAHA_DEVICE(0x1034, NULL),
265 YAMAHA_DEVICE(0x1035, NULL),
266 YAMAHA_DEVICE(0x1036, NULL),
267 YAMAHA_DEVICE(0x1037, NULL),
268 YAMAHA_DEVICE(0x1038, NULL),
269 YAMAHA_DEVICE(0x1039, NULL),
270 YAMAHA_DEVICE(0x103a, NULL),
271 YAMAHA_DEVICE(0x103b, NULL),
272 YAMAHA_DEVICE(0x103c, NULL),
273 YAMAHA_DEVICE(0x103d, NULL),
274 YAMAHA_DEVICE(0x103e, NULL),
275 YAMAHA_DEVICE(0x103f, NULL),
276 YAMAHA_DEVICE(0x1040, NULL),
277 YAMAHA_DEVICE(0x1041, NULL),
278 YAMAHA_DEVICE(0x1042, NULL),
279 YAMAHA_DEVICE(0x1043, NULL),
280 YAMAHA_DEVICE(0x1044, NULL),
281 YAMAHA_DEVICE(0x1045, NULL),
282 YAMAHA_INTERFACE(0x104e, 0, NULL),
283 YAMAHA_DEVICE(0x104f, NULL),
284 YAMAHA_DEVICE(0x1050, NULL),
285 YAMAHA_DEVICE(0x1051, NULL),
286 YAMAHA_DEVICE(0x1052, NULL),
287 YAMAHA_INTERFACE(0x1053, 0, NULL),
288 YAMAHA_INTERFACE(0x1054, 0, NULL),
289 YAMAHA_DEVICE(0x1055, NULL),
290 YAMAHA_DEVICE(0x1056, NULL),
291 YAMAHA_DEVICE(0x1057, NULL),
292 YAMAHA_DEVICE(0x1058, NULL),
293 YAMAHA_DEVICE(0x1059, NULL),
294 YAMAHA_DEVICE(0x105a, NULL),
295 YAMAHA_DEVICE(0x105b, NULL),
296 YAMAHA_DEVICE(0x105c, NULL),
297 YAMAHA_DEVICE(0x105d, NULL),
298 {
299         USB_DEVICE(0x0499, 0x1503),
300         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
301                 /* .vendor_name = "Yamaha", */
302                 /* .product_name = "MOX6/MOX8", */
303                 .ifnum = QUIRK_ANY_INTERFACE,
304                 .type = QUIRK_COMPOSITE,
305                 .data = (const struct snd_usb_audio_quirk[]) {
306                         {
307                                 .ifnum = 1,
308                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
309                         },
310                         {
311                                 .ifnum = 2,
312                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
313                         },
314                         {
315                                 .ifnum = 3,
316                                 .type = QUIRK_MIDI_YAMAHA
317                         },
318                         {
319                                 .ifnum = -1
320                         }
321                 }
322         }
323 },
324 {
325         USB_DEVICE(0x0499, 0x1507),
326         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
327                 /* .vendor_name = "Yamaha", */
328                 /* .product_name = "THR10", */
329                 .ifnum = QUIRK_ANY_INTERFACE,
330                 .type = QUIRK_COMPOSITE,
331                 .data = (const struct snd_usb_audio_quirk[]) {
332                         {
333                                 .ifnum = 1,
334                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
335                         },
336                         {
337                                 .ifnum = 2,
338                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
339                         },
340                         {
341                                 .ifnum = 3,
342                                 .type = QUIRK_MIDI_YAMAHA
343                         },
344                         {
345                                 .ifnum = -1
346                         }
347                 }
348         }
349 },
350 {
351         USB_DEVICE(0x0499, 0x1509),
352         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
353                 /* .vendor_name = "Yamaha", */
354                 /* .product_name = "Steinberg UR22", */
355                 .ifnum = QUIRK_ANY_INTERFACE,
356                 .type = QUIRK_COMPOSITE,
357                 .data = (const struct snd_usb_audio_quirk[]) {
358                         {
359                                 .ifnum = 1,
360                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
361                         },
362                         {
363                                 .ifnum = 2,
364                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
365                         },
366                         {
367                                 .ifnum = 3,
368                                 .type = QUIRK_MIDI_YAMAHA
369                         },
370                         {
371                                 .ifnum = 4,
372                                 .type = QUIRK_IGNORE_INTERFACE
373                         },
374                         {
375                                 .ifnum = -1
376                         }
377                 }
378         }
379 },
380 {
381         USB_DEVICE(0x0499, 0x150a),
382         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
383                 /* .vendor_name = "Yamaha", */
384                 /* .product_name = "THR5A", */
385                 .ifnum = QUIRK_ANY_INTERFACE,
386                 .type = QUIRK_COMPOSITE,
387                 .data = (const struct snd_usb_audio_quirk[]) {
388                         {
389                                 .ifnum = 1,
390                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
391                         },
392                         {
393                                 .ifnum = 2,
394                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
395                         },
396                         {
397                                 .ifnum = 3,
398                                 .type = QUIRK_MIDI_YAMAHA
399                         },
400                         {
401                                 .ifnum = -1
402                         }
403                 }
404         }
405 },
406 {
407         USB_DEVICE(0x0499, 0x150c),
408         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
409                 /* .vendor_name = "Yamaha", */
410                 /* .product_name = "THR10C", */
411                 .ifnum = QUIRK_ANY_INTERFACE,
412                 .type = QUIRK_COMPOSITE,
413                 .data = (const struct snd_usb_audio_quirk[]) {
414                         {
415                                 .ifnum = 1,
416                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
417                         },
418                         {
419                                 .ifnum = 2,
420                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
421                         },
422                         {
423                                 .ifnum = 3,
424                                 .type = QUIRK_MIDI_YAMAHA
425                         },
426                         {
427                                 .ifnum = -1
428                         }
429                 }
430         }
431 },
432 YAMAHA_DEVICE(0x2000, "DGP-7"),
433 YAMAHA_DEVICE(0x2001, "DGP-5"),
434 YAMAHA_DEVICE(0x2002, NULL),
435 YAMAHA_DEVICE(0x2003, NULL),
436 YAMAHA_DEVICE(0x5000, "CS1D"),
437 YAMAHA_DEVICE(0x5001, "DSP1D"),
438 YAMAHA_DEVICE(0x5002, "DME32"),
439 YAMAHA_DEVICE(0x5003, "DM2000"),
440 YAMAHA_DEVICE(0x5004, "02R96"),
441 YAMAHA_DEVICE(0x5005, "ACU16-C"),
442 YAMAHA_DEVICE(0x5006, "NHB32-C"),
443 YAMAHA_DEVICE(0x5007, "DM1000"),
444 YAMAHA_DEVICE(0x5008, "01V96"),
445 YAMAHA_DEVICE(0x5009, "SPX2000"),
446 YAMAHA_DEVICE(0x500a, "PM5D"),
447 YAMAHA_DEVICE(0x500b, "DME64N"),
448 YAMAHA_DEVICE(0x500c, "DME24N"),
449 YAMAHA_DEVICE(0x500d, NULL),
450 YAMAHA_DEVICE(0x500e, NULL),
451 YAMAHA_DEVICE(0x500f, NULL),
452 YAMAHA_DEVICE(0x7000, "DTX"),
453 YAMAHA_DEVICE(0x7010, "UB99"),
454 #undef YAMAHA_DEVICE
455 #undef YAMAHA_INTERFACE
456 /* this catches most recent vendor-specific Yamaha devices */
457 {
458         .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
459                        USB_DEVICE_ID_MATCH_INT_CLASS,
460         .idVendor = 0x0499,
461         .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
462         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
463                 .ifnum = QUIRK_ANY_INTERFACE,
464                 .type = QUIRK_AUTODETECT
465         }
466 },
467
468 /*
469  * Roland/RolandED/Edirol/BOSS devices
470  */
471 {
472         USB_DEVICE(0x0582, 0x0000),
473         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
474                 .vendor_name = "Roland",
475                 .product_name = "UA-100",
476                 .ifnum = QUIRK_ANY_INTERFACE,
477                 .type = QUIRK_COMPOSITE,
478                 .data = (const struct snd_usb_audio_quirk[]) {
479                         {
480                                 .ifnum = 0,
481                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
482                                 .data = & (const struct audioformat) {
483                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
484                                         .channels = 4,
485                                         .iface = 0,
486                                         .altsetting = 1,
487                                         .altset_idx = 1,
488                                         .attributes = 0,
489                                         .endpoint = 0x01,
490                                         .ep_attr = 0x09,
491                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
492                                         .rate_min = 44100,
493                                         .rate_max = 44100,
494                                 }
495                         },
496                         {
497                                 .ifnum = 1,
498                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
499                                 .data = & (const struct audioformat) {
500                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
501                                         .channels = 2,
502                                         .iface = 1,
503                                         .altsetting = 1,
504                                         .altset_idx = 1,
505                                         .attributes = UAC_EP_CS_ATTR_FILL_MAX,
506                                         .endpoint = 0x81,
507                                         .ep_attr = 0x05,
508                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
509                                         .rate_min = 44100,
510                                         .rate_max = 44100,
511                                 }
512                         },
513                         {
514                                 .ifnum = 2,
515                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
516                                 .data = & (const struct snd_usb_midi_endpoint_info) {
517                                         .out_cables = 0x0007,
518                                         .in_cables  = 0x0007
519                                 }
520                         },
521                         {
522                                 .ifnum = -1
523                         }
524                 }
525         }
526 },
527 {
528         USB_DEVICE(0x0582, 0x0002),
529         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
530                 .vendor_name = "EDIROL",
531                 .product_name = "UM-4",
532                 .ifnum = QUIRK_ANY_INTERFACE,
533                 .type = QUIRK_COMPOSITE,
534                 .data = (const struct snd_usb_audio_quirk[]) {
535                         {
536                                 .ifnum = 0,
537                                 .type = QUIRK_IGNORE_INTERFACE
538                         },
539                         {
540                                 .ifnum = 1,
541                                 .type = QUIRK_IGNORE_INTERFACE
542                         },
543                         {
544                                 .ifnum = 2,
545                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
546                                 .data = & (const struct snd_usb_midi_endpoint_info) {
547                                         .out_cables = 0x000f,
548                                         .in_cables  = 0x000f
549                                 }
550                         },
551                         {
552                                 .ifnum = -1
553                         }
554                 }
555         }
556 },
557 {
558         USB_DEVICE(0x0582, 0x0003),
559         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
560                 .vendor_name = "Roland",
561                 .product_name = "SC-8850",
562                 .ifnum = QUIRK_ANY_INTERFACE,
563                 .type = QUIRK_COMPOSITE,
564                 .data = (const struct snd_usb_audio_quirk[]) {
565                         {
566                                 .ifnum = 0,
567                                 .type = QUIRK_IGNORE_INTERFACE
568                         },
569                         {
570                                 .ifnum = 1,
571                                 .type = QUIRK_IGNORE_INTERFACE
572                         },
573                         {
574                                 .ifnum = 2,
575                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
576                                 .data = & (const struct snd_usb_midi_endpoint_info) {
577                                         .out_cables = 0x003f,
578                                         .in_cables  = 0x003f
579                                 }
580                         },
581                         {
582                                 .ifnum = -1
583                         }
584                 }
585         }
586 },
587 {
588         USB_DEVICE(0x0582, 0x0004),
589         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
590                 .vendor_name = "Roland",
591                 .product_name = "U-8",
592                 .ifnum = QUIRK_ANY_INTERFACE,
593                 .type = QUIRK_COMPOSITE,
594                 .data = (const struct snd_usb_audio_quirk[]) {
595                         {
596                                 .ifnum = 0,
597                                 .type = QUIRK_IGNORE_INTERFACE
598                         },
599                         {
600                                 .ifnum = 1,
601                                 .type = QUIRK_IGNORE_INTERFACE
602                         },
603                         {
604                                 .ifnum = 2,
605                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
606                                 .data = & (const struct snd_usb_midi_endpoint_info) {
607                                         .out_cables = 0x0005,
608                                         .in_cables  = 0x0005
609                                 }
610                         },
611                         {
612                                 .ifnum = -1
613                         }
614                 }
615         }
616 },
617 {
618         /* Has ID 0x0099 when not in "Advanced Driver" mode.
619          * The UM-2EX has only one input, but we cannot detect this. */
620         USB_DEVICE(0x0582, 0x0005),
621         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
622                 .vendor_name = "EDIROL",
623                 .product_name = "UM-2",
624                 .ifnum = QUIRK_ANY_INTERFACE,
625                 .type = QUIRK_COMPOSITE,
626                 .data = (const struct snd_usb_audio_quirk[]) {
627                         {
628                                 .ifnum = 0,
629                                 .type = QUIRK_IGNORE_INTERFACE
630                         },
631                         {
632                                 .ifnum = 1,
633                                 .type = QUIRK_IGNORE_INTERFACE
634                         },
635                         {
636                                 .ifnum = 2,
637                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
638                                 .data = & (const struct snd_usb_midi_endpoint_info) {
639                                         .out_cables = 0x0003,
640                                         .in_cables  = 0x0003
641                                 }
642                         },
643                         {
644                                 .ifnum = -1
645                         }
646                 }
647         }
648 },
649 {
650         USB_DEVICE(0x0582, 0x0007),
651         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
652                 .vendor_name = "Roland",
653                 .product_name = "SC-8820",
654                 .ifnum = QUIRK_ANY_INTERFACE,
655                 .type = QUIRK_COMPOSITE,
656                 .data = (const struct snd_usb_audio_quirk[]) {
657                         {
658                                 .ifnum = 0,
659                                 .type = QUIRK_IGNORE_INTERFACE
660                         },
661                         {
662                                 .ifnum = 1,
663                                 .type = QUIRK_IGNORE_INTERFACE
664                         },
665                         {
666                                 .ifnum = 2,
667                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
668                                 .data = & (const struct snd_usb_midi_endpoint_info) {
669                                         .out_cables = 0x0013,
670                                         .in_cables  = 0x0013
671                                 }
672                         },
673                         {
674                                 .ifnum = -1
675                         }
676                 }
677         }
678 },
679 {
680         USB_DEVICE(0x0582, 0x0008),
681         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
682                 .vendor_name = "Roland",
683                 .product_name = "PC-300",
684                 .ifnum = QUIRK_ANY_INTERFACE,
685                 .type = QUIRK_COMPOSITE,
686                 .data = (const struct snd_usb_audio_quirk[]) {
687                         {
688                                 .ifnum = 0,
689                                 .type = QUIRK_IGNORE_INTERFACE
690                         },
691                         {
692                                 .ifnum = 1,
693                                 .type = QUIRK_IGNORE_INTERFACE
694                         },
695                         {
696                                 .ifnum = 2,
697                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
698                                 .data = & (const struct snd_usb_midi_endpoint_info) {
699                                         .out_cables = 0x0001,
700                                         .in_cables  = 0x0001
701                                 }
702                         },
703                         {
704                                 .ifnum = -1
705                         }
706                 }
707         }
708 },
709 {
710         /* has ID 0x009d when not in "Advanced Driver" mode */
711         USB_DEVICE(0x0582, 0x0009),
712         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
713                 .vendor_name = "EDIROL",
714                 .product_name = "UM-1",
715                 .ifnum = QUIRK_ANY_INTERFACE,
716                 .type = QUIRK_COMPOSITE,
717                 .data = (const struct snd_usb_audio_quirk[]) {
718                         {
719                                 .ifnum = 0,
720                                 .type = QUIRK_IGNORE_INTERFACE
721                         },
722                         {
723                                 .ifnum = 1,
724                                 .type = QUIRK_IGNORE_INTERFACE
725                         },
726                         {
727                                 .ifnum = 2,
728                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
729                                 .data = & (const struct snd_usb_midi_endpoint_info) {
730                                         .out_cables = 0x0001,
731                                         .in_cables  = 0x0001
732                                 }
733                         },
734                         {
735                                 .ifnum = -1
736                         }
737                 }
738         }
739 },
740 {
741         USB_DEVICE(0x0582, 0x000b),
742         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
743                 .vendor_name = "Roland",
744                 .product_name = "SK-500",
745                 .ifnum = QUIRK_ANY_INTERFACE,
746                 .type = QUIRK_COMPOSITE,
747                 .data = (const struct snd_usb_audio_quirk[]) {
748                         {
749                                 .ifnum = 0,
750                                 .type = QUIRK_IGNORE_INTERFACE
751                         },
752                         {
753                                 .ifnum = 1,
754                                 .type = QUIRK_IGNORE_INTERFACE
755                         },
756                         {
757                                 .ifnum = 2,
758                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
759                                 .data = & (const struct snd_usb_midi_endpoint_info) {
760                                         .out_cables = 0x0013,
761                                         .in_cables  = 0x0013
762                                 }
763                         },
764                         {
765                                 .ifnum = -1
766                         }
767                 }
768         }
769 },
770 {
771         /* thanks to Emiliano Grilli <emillo@libero.it>
772          * for helping researching this data */
773         USB_DEVICE(0x0582, 0x000c),
774         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
775                 .vendor_name = "Roland",
776                 .product_name = "SC-D70",
777                 .ifnum = QUIRK_ANY_INTERFACE,
778                 .type = QUIRK_COMPOSITE,
779                 .data = (const struct snd_usb_audio_quirk[]) {
780                         {
781                                 .ifnum = 0,
782                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
783                         },
784                         {
785                                 .ifnum = 1,
786                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
787                         },
788                         {
789                                 .ifnum = 2,
790                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
791                                 .data = & (const struct snd_usb_midi_endpoint_info) {
792                                         .out_cables = 0x0007,
793                                         .in_cables  = 0x0007
794                                 }
795                         },
796                         {
797                                 .ifnum = -1
798                         }
799                 }
800         }
801 },
802 {       /*
803          * This quirk is for the "Advanced Driver" mode of the Edirol UA-5.
804          * If the advanced mode switch at the back of the unit is off, the
805          * UA-5 has ID 0x0582/0x0011 and is standard compliant (no quirks),
806          * but offers only 16-bit PCM.
807          * In advanced mode, the UA-5 will output S24_3LE samples (two
808          * channels) at the rate indicated on the front switch, including
809          * the 96kHz sample rate.
810          */
811         USB_DEVICE(0x0582, 0x0010),
812         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
813                 .vendor_name = "EDIROL",
814                 .product_name = "UA-5",
815                 .ifnum = QUIRK_ANY_INTERFACE,
816                 .type = QUIRK_COMPOSITE,
817                 .data = (const struct snd_usb_audio_quirk[]) {
818                         {
819                                 .ifnum = 1,
820                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
821                         },
822                         {
823                                 .ifnum = 2,
824                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
825                         },
826                         {
827                                 .ifnum = -1
828                         }
829                 }
830         }
831 },
832 {
833         /* has ID 0x0013 when not in "Advanced Driver" mode */
834         USB_DEVICE(0x0582, 0x0012),
835         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
836                 .vendor_name = "Roland",
837                 .product_name = "XV-5050",
838                 .ifnum = 0,
839                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
840                 .data = & (const struct snd_usb_midi_endpoint_info) {
841                         .out_cables = 0x0001,
842                         .in_cables  = 0x0001
843                 }
844         }
845 },
846 {
847         /* has ID 0x0015 when not in "Advanced Driver" mode */
848         USB_DEVICE(0x0582, 0x0014),
849         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
850                 .vendor_name = "EDIROL",
851                 .product_name = "UM-880",
852                 .ifnum = 0,
853                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
854                 .data = & (const struct snd_usb_midi_endpoint_info) {
855                         .out_cables = 0x01ff,
856                         .in_cables  = 0x01ff
857                 }
858         }
859 },
860 {
861         /* has ID 0x0017 when not in "Advanced Driver" mode */
862         USB_DEVICE(0x0582, 0x0016),
863         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
864                 .vendor_name = "EDIROL",
865                 .product_name = "SD-90",
866                 .ifnum = QUIRK_ANY_INTERFACE,
867                 .type = QUIRK_COMPOSITE,
868                 .data = (const struct snd_usb_audio_quirk[]) {
869                         {
870                                 .ifnum = 0,
871                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
872                         },
873                         {
874                                 .ifnum = 1,
875                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
876                         },
877                         {
878                                 .ifnum = 2,
879                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
880                                 .data = & (const struct snd_usb_midi_endpoint_info) {
881                                         .out_cables = 0x000f,
882                                         .in_cables  = 0x000f
883                                 }
884                         },
885                         {
886                                 .ifnum = -1
887                         }
888                 }
889         }
890 },
891 {
892         /* has ID 0x001c when not in "Advanced Driver" mode */
893         USB_DEVICE(0x0582, 0x001b),
894         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
895                 .vendor_name = "Roland",
896                 .product_name = "MMP-2",
897                 .ifnum = QUIRK_ANY_INTERFACE,
898                 .type = QUIRK_COMPOSITE,
899                 .data = (const struct snd_usb_audio_quirk[]) {
900                         {
901                                 .ifnum = 0,
902                                 .type = QUIRK_IGNORE_INTERFACE
903                         },
904                         {
905                                 .ifnum = 1,
906                                 .type = QUIRK_IGNORE_INTERFACE
907                         },
908                         {
909                                 .ifnum = 2,
910                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
911                                 .data = & (const struct snd_usb_midi_endpoint_info) {
912                                         .out_cables = 0x0001,
913                                         .in_cables  = 0x0001
914                                 }
915                         },
916                         {
917                                 .ifnum = -1
918                         }
919                 }
920         }
921 },
922 {
923         /* has ID 0x001e when not in "Advanced Driver" mode */
924         USB_DEVICE(0x0582, 0x001d),
925         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
926                 .vendor_name = "Roland",
927                 .product_name = "V-SYNTH",
928                 .ifnum = 0,
929                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
930                 .data = & (const struct snd_usb_midi_endpoint_info) {
931                         .out_cables = 0x0001,
932                         .in_cables  = 0x0001
933                 }
934         }
935 },
936 {
937         /* has ID 0x0024 when not in "Advanced Driver" mode */
938         USB_DEVICE(0x0582, 0x0023),
939         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
940                 .vendor_name = "EDIROL",
941                 .product_name = "UM-550",
942                 .ifnum = 0,
943                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
944                 .data = & (const struct snd_usb_midi_endpoint_info) {
945                         .out_cables = 0x003f,
946                         .in_cables  = 0x003f
947                 }
948         }
949 },
950 {
951         /*
952          * This quirk is for the "Advanced Driver" mode. If off, the UA-20
953          * has ID 0x0026 and is standard compliant, but has only 16-bit PCM
954          * and no MIDI.
955          */
956         USB_DEVICE(0x0582, 0x0025),
957         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
958                 .vendor_name = "EDIROL",
959                 .product_name = "UA-20",
960                 .ifnum = QUIRK_ANY_INTERFACE,
961                 .type = QUIRK_COMPOSITE,
962                 .data = (const struct snd_usb_audio_quirk[]) {
963                         {
964                                 .ifnum = 0,
965                                 .type = QUIRK_IGNORE_INTERFACE
966                         },
967                         {
968                                 .ifnum = 1,
969                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
970                                 .data = & (const struct audioformat) {
971                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
972                                         .channels = 2,
973                                         .iface = 1,
974                                         .altsetting = 1,
975                                         .altset_idx = 1,
976                                         .attributes = 0,
977                                         .endpoint = 0x01,
978                                         .ep_attr = 0x01,
979                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
980                                         .rate_min = 44100,
981                                         .rate_max = 44100,
982                                 }
983                         },
984                         {
985                                 .ifnum = 2,
986                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
987                                 .data = & (const struct audioformat) {
988                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
989                                         .channels = 2,
990                                         .iface = 2,
991                                         .altsetting = 1,
992                                         .altset_idx = 1,
993                                         .attributes = 0,
994                                         .endpoint = 0x82,
995                                         .ep_attr = 0x01,
996                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
997                                         .rate_min = 44100,
998                                         .rate_max = 44100,
999                                 }
1000                         },
1001                         {
1002                                 .ifnum = 3,
1003                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1004                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1005                                         .out_cables = 0x0001,
1006                                         .in_cables  = 0x0001
1007                                 }
1008                         },
1009                         {
1010                                 .ifnum = -1
1011                         }
1012                 }
1013         }
1014 },
1015 {
1016         /* has ID 0x0028 when not in "Advanced Driver" mode */
1017         USB_DEVICE(0x0582, 0x0027),
1018         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1019                 .vendor_name = "EDIROL",
1020                 .product_name = "SD-20",
1021                 .ifnum = 0,
1022                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1023                 .data = & (const struct snd_usb_midi_endpoint_info) {
1024                         .out_cables = 0x0003,
1025                         .in_cables  = 0x0007
1026                 }
1027         }
1028 },
1029 {
1030         /* has ID 0x002a when not in "Advanced Driver" mode */
1031         USB_DEVICE(0x0582, 0x0029),
1032         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1033                 .vendor_name = "EDIROL",
1034                 .product_name = "SD-80",
1035                 .ifnum = 0,
1036                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1037                 .data = & (const struct snd_usb_midi_endpoint_info) {
1038                         .out_cables = 0x000f,
1039                         .in_cables  = 0x000f
1040                 }
1041         }
1042 },
1043 {       /*
1044          * This quirk is for the "Advanced" modes of the Edirol UA-700.
1045          * If the sample format switch is not in an advanced setting, the
1046          * UA-700 has ID 0x0582/0x002c and is standard compliant (no quirks),
1047          * but offers only 16-bit PCM and no MIDI.
1048          */
1049         USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b),
1050         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1051                 .vendor_name = "EDIROL",
1052                 .product_name = "UA-700",
1053                 .ifnum = QUIRK_ANY_INTERFACE,
1054                 .type = QUIRK_COMPOSITE,
1055                 .data = (const struct snd_usb_audio_quirk[]) {
1056                         {
1057                                 .ifnum = 1,
1058                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1059                         },
1060                         {
1061                                 .ifnum = 2,
1062                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1063                         },
1064                         {
1065                                 .ifnum = 3,
1066                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1067                         },
1068                         {
1069                                 .ifnum = -1
1070                         }
1071                 }
1072         }
1073 },
1074 {
1075         /* has ID 0x002e when not in "Advanced Driver" mode */
1076         USB_DEVICE(0x0582, 0x002d),
1077         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1078                 .vendor_name = "Roland",
1079                 .product_name = "XV-2020",
1080                 .ifnum = 0,
1081                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1082                 .data = & (const struct snd_usb_midi_endpoint_info) {
1083                         .out_cables = 0x0001,
1084                         .in_cables  = 0x0001
1085                 }
1086         }
1087 },
1088 {
1089         /* has ID 0x0030 when not in "Advanced Driver" mode */
1090         USB_DEVICE(0x0582, 0x002f),
1091         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1092                 .vendor_name = "Roland",
1093                 .product_name = "VariOS",
1094                 .ifnum = 0,
1095                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1096                 .data = & (const struct snd_usb_midi_endpoint_info) {
1097                         .out_cables = 0x0007,
1098                         .in_cables  = 0x0007
1099                 }
1100         }
1101 },
1102 {
1103         /* has ID 0x0034 when not in "Advanced Driver" mode */
1104         USB_DEVICE(0x0582, 0x0033),
1105         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1106                 .vendor_name = "EDIROL",
1107                 .product_name = "PCR",
1108                 .ifnum = 0,
1109                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1110                 .data = & (const struct snd_usb_midi_endpoint_info) {
1111                         .out_cables = 0x0003,
1112                         .in_cables  = 0x0007
1113                 }
1114         }
1115 },
1116 {
1117         /*
1118          * Has ID 0x0038 when not in "Advanced Driver" mode;
1119          * later revisions use IDs 0x0054 and 0x00a2.
1120          */
1121         USB_DEVICE(0x0582, 0x0037),
1122         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1123                 .vendor_name = "Roland",
1124                 .product_name = "Digital Piano",
1125                 .ifnum = 0,
1126                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1127                 .data = & (const struct snd_usb_midi_endpoint_info) {
1128                         .out_cables = 0x0001,
1129                         .in_cables  = 0x0001
1130                 }
1131         }
1132 },
1133 {
1134         /*
1135          * This quirk is for the "Advanced Driver" mode.  If off, the GS-10
1136          * has ID 0x003c and is standard compliant, but has only 16-bit PCM
1137          * and no MIDI.
1138          */
1139         USB_DEVICE_VENDOR_SPEC(0x0582, 0x003b),
1140         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1141                 .vendor_name = "BOSS",
1142                 .product_name = "GS-10",
1143                 .ifnum = QUIRK_ANY_INTERFACE,
1144                 .type = QUIRK_COMPOSITE,
1145                 .data = & (const struct snd_usb_audio_quirk[]) {
1146                         {
1147                                 .ifnum = 1,
1148                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1149                         },
1150                         {
1151                                 .ifnum = 2,
1152                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1153                         },
1154                         {
1155                                 .ifnum = 3,
1156                                 .type = QUIRK_MIDI_STANDARD_INTERFACE
1157                         },
1158                         {
1159                                 .ifnum = -1
1160                         }
1161                 }
1162         }
1163 },
1164 {
1165         /* has ID 0x0041 when not in "Advanced Driver" mode */
1166         USB_DEVICE(0x0582, 0x0040),
1167         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1168                 .vendor_name = "Roland",
1169                 .product_name = "GI-20",
1170                 .ifnum = 0,
1171                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1172                 .data = & (const struct snd_usb_midi_endpoint_info) {
1173                         .out_cables = 0x0001,
1174                         .in_cables  = 0x0001
1175                 }
1176         }
1177 },
1178 {
1179         /* has ID 0x0043 when not in "Advanced Driver" mode */
1180         USB_DEVICE(0x0582, 0x0042),
1181         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1182                 .vendor_name = "Roland",
1183                 .product_name = "RS-70",
1184                 .ifnum = 0,
1185                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1186                 .data = & (const struct snd_usb_midi_endpoint_info) {
1187                         .out_cables = 0x0001,
1188                         .in_cables  = 0x0001
1189                 }
1190         }
1191 },
1192 {
1193         /* has ID 0x0049 when not in "Advanced Driver" mode */
1194         USB_DEVICE(0x0582, 0x0047),
1195         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1196                 /* .vendor_name = "EDIROL", */
1197                 /* .product_name = "UR-80", */
1198                 .ifnum = QUIRK_ANY_INTERFACE,
1199                 .type = QUIRK_COMPOSITE,
1200                 .data = (const struct snd_usb_audio_quirk[]) {
1201                         /* in the 96 kHz modes, only interface 1 is there */
1202                         {
1203                                 .ifnum = 1,
1204                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1205                         },
1206                         {
1207                                 .ifnum = 2,
1208                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1209                         },
1210                         {
1211                                 .ifnum = -1
1212                         }
1213                 }
1214         }
1215 },
1216 {
1217         /* has ID 0x004a when not in "Advanced Driver" mode */
1218         USB_DEVICE(0x0582, 0x0048),
1219         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1220                 /* .vendor_name = "EDIROL", */
1221                 /* .product_name = "UR-80", */
1222                 .ifnum = 0,
1223                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1224                 .data = & (const struct snd_usb_midi_endpoint_info) {
1225                         .out_cables = 0x0003,
1226                         .in_cables  = 0x0007
1227                 }
1228         }
1229 },
1230 {
1231         /* has ID 0x004e when not in "Advanced Driver" mode */
1232         USB_DEVICE(0x0582, 0x004c),
1233         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1234                 .vendor_name = "EDIROL",
1235                 .product_name = "PCR-A",
1236                 .ifnum = QUIRK_ANY_INTERFACE,
1237                 .type = QUIRK_COMPOSITE,
1238                 .data = (const struct snd_usb_audio_quirk[]) {
1239                         {
1240                                 .ifnum = 1,
1241                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1242                         },
1243                         {
1244                                 .ifnum = 2,
1245                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1246                         },
1247                         {
1248                                 .ifnum = -1
1249                         }
1250                 }
1251         }
1252 },
1253 {
1254         /* has ID 0x004f when not in "Advanced Driver" mode */
1255         USB_DEVICE(0x0582, 0x004d),
1256         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1257                 .vendor_name = "EDIROL",
1258                 .product_name = "PCR-A",
1259                 .ifnum = 0,
1260                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1261                 .data = & (const struct snd_usb_midi_endpoint_info) {
1262                         .out_cables = 0x0003,
1263                         .in_cables  = 0x0007
1264                 }
1265         }
1266 },
1267 {
1268         /*
1269          * This quirk is for the "Advanced Driver" mode. If off, the UA-3FX
1270          * is standard compliant, but has only 16-bit PCM.
1271          */
1272         USB_DEVICE(0x0582, 0x0050),
1273         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1274                 .vendor_name = "EDIROL",
1275                 .product_name = "UA-3FX",
1276                 .ifnum = QUIRK_ANY_INTERFACE,
1277                 .type = QUIRK_COMPOSITE,
1278                 .data = (const struct snd_usb_audio_quirk[]) {
1279                         {
1280                                 .ifnum = 1,
1281                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1282                         },
1283                         {
1284                                 .ifnum = 2,
1285                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1286                         },
1287                         {
1288                                 .ifnum = -1
1289                         }
1290                 }
1291         }
1292 },
1293 {
1294         USB_DEVICE(0x0582, 0x0052),
1295         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1296                 .vendor_name = "EDIROL",
1297                 .product_name = "UM-1SX",
1298                 .ifnum = 0,
1299                 .type = QUIRK_MIDI_STANDARD_INTERFACE
1300         }
1301 },
1302 {
1303         USB_DEVICE(0x0582, 0x0060),
1304         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1305                 .vendor_name = "Roland",
1306                 .product_name = "EXR Series",
1307                 .ifnum = 0,
1308                 .type = QUIRK_MIDI_STANDARD_INTERFACE
1309         }
1310 },
1311 {
1312         /* has ID 0x0066 when not in "Advanced Driver" mode */
1313         USB_DEVICE(0x0582, 0x0064),
1314         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1315                 /* .vendor_name = "EDIROL", */
1316                 /* .product_name = "PCR-1", */
1317                 .ifnum = QUIRK_ANY_INTERFACE,
1318                 .type = QUIRK_COMPOSITE,
1319                 .data = (const struct snd_usb_audio_quirk[]) {
1320                         {
1321                                 .ifnum = 1,
1322                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1323                         },
1324                         {
1325                                 .ifnum = 2,
1326                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1327                         },
1328                         {
1329                                 .ifnum = -1
1330                         }
1331                 }
1332         }
1333 },
1334 {
1335         /* has ID 0x0067 when not in "Advanced Driver" mode */
1336         USB_DEVICE(0x0582, 0x0065),
1337         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1338                 /* .vendor_name = "EDIROL", */
1339                 /* .product_name = "PCR-1", */
1340                 .ifnum = 0,
1341                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1342                 .data = & (const struct snd_usb_midi_endpoint_info) {
1343                         .out_cables = 0x0001,
1344                         .in_cables  = 0x0003
1345                 }
1346         }
1347 },
1348 {
1349         /* has ID 0x006e when not in "Advanced Driver" mode */
1350         USB_DEVICE(0x0582, 0x006d),
1351         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1352                 .vendor_name = "Roland",
1353                 .product_name = "FANTOM-X",
1354                 .ifnum = 0,
1355                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1356                 .data = & (const struct snd_usb_midi_endpoint_info) {
1357                         .out_cables = 0x0001,
1358                         .in_cables  = 0x0001
1359                 }
1360         }
1361 },
1362 {       /*
1363          * This quirk is for the "Advanced" modes of the Edirol UA-25.
1364          * If the switch is not in an advanced setting, the UA-25 has
1365          * ID 0x0582/0x0073 and is standard compliant (no quirks), but
1366          * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1367          */
1368         USB_DEVICE_VENDOR_SPEC(0x0582, 0x0074),
1369         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1370                 .vendor_name = "EDIROL",
1371                 .product_name = "UA-25",
1372                 .ifnum = QUIRK_ANY_INTERFACE,
1373                 .type = QUIRK_COMPOSITE,
1374                 .data = (const struct snd_usb_audio_quirk[]) {
1375                         {
1376                                 .ifnum = 0,
1377                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1378                         },
1379                         {
1380                                 .ifnum = 1,
1381                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1382                         },
1383                         {
1384                                 .ifnum = 2,
1385                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1386                         },
1387                         {
1388                                 .ifnum = -1
1389                         }
1390                 }
1391         }
1392 },
1393 {
1394         /* has ID 0x0076 when not in "Advanced Driver" mode */
1395         USB_DEVICE(0x0582, 0x0075),
1396         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1397                 .vendor_name = "BOSS",
1398                 .product_name = "DR-880",
1399                 .ifnum = 0,
1400                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1401                 .data = & (const struct snd_usb_midi_endpoint_info) {
1402                         .out_cables = 0x0001,
1403                         .in_cables  = 0x0001
1404                 }
1405         }
1406 },
1407 {
1408         /* has ID 0x007b when not in "Advanced Driver" mode */
1409         USB_DEVICE_VENDOR_SPEC(0x0582, 0x007a),
1410         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1411                 .vendor_name = "Roland",
1412                 /* "RD" or "RD-700SX"? */
1413                 .ifnum = 0,
1414                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1415                 .data = & (const struct snd_usb_midi_endpoint_info) {
1416                         .out_cables = 0x0003,
1417                         .in_cables  = 0x0003
1418                 }
1419         }
1420 },
1421 {
1422         /* has ID 0x0081 when not in "Advanced Driver" mode */
1423         USB_DEVICE(0x0582, 0x0080),
1424         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1425                 .vendor_name = "Roland",
1426                 .product_name = "G-70",
1427                 .ifnum = 0,
1428                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1429                 .data = & (const struct snd_usb_midi_endpoint_info) {
1430                         .out_cables = 0x0001,
1431                         .in_cables  = 0x0001
1432                 }
1433         }
1434 },
1435 {
1436         /* has ID 0x008c when not in "Advanced Driver" mode */
1437         USB_DEVICE(0x0582, 0x008b),
1438         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1439                 .vendor_name = "EDIROL",
1440                 .product_name = "PC-50",
1441                 .ifnum = 0,
1442                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1443                 .data = & (const struct snd_usb_midi_endpoint_info) {
1444                         .out_cables = 0x0001,
1445                         .in_cables  = 0x0001
1446                 }
1447         }
1448 },
1449 {
1450         /*
1451          * This quirk is for the "Advanced Driver" mode. If off, the UA-4FX
1452          * is standard compliant, but has only 16-bit PCM and no MIDI.
1453          */
1454         USB_DEVICE(0x0582, 0x00a3),
1455         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1456                 .vendor_name = "EDIROL",
1457                 .product_name = "UA-4FX",
1458                 .ifnum = QUIRK_ANY_INTERFACE,
1459                 .type = QUIRK_COMPOSITE,
1460                 .data = (const struct snd_usb_audio_quirk[]) {
1461                         {
1462                                 .ifnum = 0,
1463                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1464                         },
1465                         {
1466                                 .ifnum = 1,
1467                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1468                         },
1469                         {
1470                                 .ifnum = 2,
1471                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1472                         },
1473                         {
1474                                 .ifnum = -1
1475                         }
1476                 }
1477         }
1478 },
1479 {
1480         /* Edirol M-16DX */
1481         USB_DEVICE(0x0582, 0x00c4),
1482         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1483                 .ifnum = QUIRK_ANY_INTERFACE,
1484                 .type = QUIRK_COMPOSITE,
1485                 .data = (const struct snd_usb_audio_quirk[]) {
1486                         {
1487                                 .ifnum = 0,
1488                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1489                         },
1490                         {
1491                                 .ifnum = 1,
1492                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1493                         },
1494                         {
1495                                 .ifnum = 2,
1496                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1497                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1498                                         .out_cables = 0x0001,
1499                                         .in_cables  = 0x0001
1500                                 }
1501                         },
1502                         {
1503                                 .ifnum = -1
1504                         }
1505                 }
1506         }
1507 },
1508 {
1509         /* Advanced modes of the Edirol UA-25EX.
1510          * For the standard mode, UA-25EX has ID 0582:00e7, which
1511          * offers only 16-bit PCM at 44.1 kHz and no MIDI.
1512          */
1513         USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6),
1514         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1515                 .vendor_name = "EDIROL",
1516                 .product_name = "UA-25EX",
1517                 .ifnum = QUIRK_ANY_INTERFACE,
1518                 .type = QUIRK_COMPOSITE,
1519                 .data = (const struct snd_usb_audio_quirk[]) {
1520                         {
1521                                 .ifnum = 0,
1522                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1523                         },
1524                         {
1525                                 .ifnum = 1,
1526                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1527                         },
1528                         {
1529                                 .ifnum = 2,
1530                                 .type = QUIRK_AUDIO_EDIROL_UAXX
1531                         },
1532                         {
1533                                 .ifnum = -1
1534                         }
1535                 }
1536         }
1537 },
1538 {
1539         /* Edirol UM-3G */
1540         USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108),
1541         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1542                 .ifnum = 0,
1543                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1544                 .data = & (const struct snd_usb_midi_endpoint_info) {
1545                         .out_cables = 0x0007,
1546                         .in_cables  = 0x0007
1547                 }
1548         }
1549 },
1550 {
1551         /* BOSS ME-25 */
1552         USB_DEVICE(0x0582, 0x0113),
1553         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1554                 .ifnum = QUIRK_ANY_INTERFACE,
1555                 .type = QUIRK_COMPOSITE,
1556                 .data = (const struct snd_usb_audio_quirk[]) {
1557                         {
1558                                 .ifnum = 0,
1559                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1560                         },
1561                         {
1562                                 .ifnum = 1,
1563                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1564                         },
1565                         {
1566                                 .ifnum = 2,
1567                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
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         /* only 44.1 kHz works at the moment */
1581         USB_DEVICE(0x0582, 0x0120),
1582         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1583                 /* .vendor_name = "Roland", */
1584                 /* .product_name = "OCTO-CAPTURE", */
1585                 .ifnum = QUIRK_ANY_INTERFACE,
1586                 .type = QUIRK_COMPOSITE,
1587                 .data = (const struct snd_usb_audio_quirk[]) {
1588                         {
1589                                 .ifnum = 0,
1590                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1591                                 .data = & (const struct audioformat) {
1592                                         .formats = SNDRV_PCM_FMTBIT_S32_LE,
1593                                         .channels = 10,
1594                                         .iface = 0,
1595                                         .altsetting = 1,
1596                                         .altset_idx = 1,
1597                                         .endpoint = 0x05,
1598                                         .ep_attr = 0x05,
1599                                         .rates = SNDRV_PCM_RATE_44100,
1600                                         .rate_min = 44100,
1601                                         .rate_max = 44100,
1602                                         .nr_rates = 1,
1603                                         .rate_table = (unsigned int[]) { 44100 }
1604                                 }
1605                         },
1606                         {
1607                                 .ifnum = 1,
1608                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1609                                 .data = & (const struct audioformat) {
1610                                         .formats = SNDRV_PCM_FMTBIT_S32_LE,
1611                                         .channels = 12,
1612                                         .iface = 1,
1613                                         .altsetting = 1,
1614                                         .altset_idx = 1,
1615                                         .endpoint = 0x85,
1616                                         .ep_attr = 0x25,
1617                                         .rates = SNDRV_PCM_RATE_44100,
1618                                         .rate_min = 44100,
1619                                         .rate_max = 44100,
1620                                         .nr_rates = 1,
1621                                         .rate_table = (unsigned int[]) { 44100 }
1622                                 }
1623                         },
1624                         {
1625                                 .ifnum = 2,
1626                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1627                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1628                                         .out_cables = 0x0001,
1629                                         .in_cables  = 0x0001
1630                                 }
1631                         },
1632                         {
1633                                 .ifnum = 3,
1634                                 .type = QUIRK_IGNORE_INTERFACE
1635                         },
1636                         {
1637                                 .ifnum = 4,
1638                                 .type = QUIRK_IGNORE_INTERFACE
1639                         },
1640                         {
1641                                 .ifnum = -1
1642                         }
1643                 }
1644         }
1645 },
1646 {
1647         /* only 44.1 kHz works at the moment */
1648         USB_DEVICE(0x0582, 0x012f),
1649         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1650                 /* .vendor_name = "Roland", */
1651                 /* .product_name = "QUAD-CAPTURE", */
1652                 .ifnum = QUIRK_ANY_INTERFACE,
1653                 .type = QUIRK_COMPOSITE,
1654                 .data = (const struct snd_usb_audio_quirk[]) {
1655                         {
1656                                 .ifnum = 0,
1657                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1658                                 .data = & (const struct audioformat) {
1659                                         .formats = SNDRV_PCM_FMTBIT_S32_LE,
1660                                         .channels = 4,
1661                                         .iface = 0,
1662                                         .altsetting = 1,
1663                                         .altset_idx = 1,
1664                                         .endpoint = 0x05,
1665                                         .ep_attr = 0x05,
1666                                         .rates = SNDRV_PCM_RATE_44100,
1667                                         .rate_min = 44100,
1668                                         .rate_max = 44100,
1669                                         .nr_rates = 1,
1670                                         .rate_table = (unsigned int[]) { 44100 }
1671                                 }
1672                         },
1673                         {
1674                                 .ifnum = 1,
1675                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
1676                                 .data = & (const struct audioformat) {
1677                                         .formats = SNDRV_PCM_FMTBIT_S32_LE,
1678                                         .channels = 6,
1679                                         .iface = 1,
1680                                         .altsetting = 1,
1681                                         .altset_idx = 1,
1682                                         .endpoint = 0x85,
1683                                         .ep_attr = 0x25,
1684                                         .rates = SNDRV_PCM_RATE_44100,
1685                                         .rate_min = 44100,
1686                                         .rate_max = 44100,
1687                                         .nr_rates = 1,
1688                                         .rate_table = (unsigned int[]) { 44100 }
1689                                 }
1690                         },
1691                         {
1692                                 .ifnum = 2,
1693                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1694                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1695                                         .out_cables = 0x0001,
1696                                         .in_cables  = 0x0001
1697                                 }
1698                         },
1699                         {
1700                                 .ifnum = 3,
1701                                 .type = QUIRK_IGNORE_INTERFACE
1702                         },
1703                         {
1704                                 .ifnum = 4,
1705                                 .type = QUIRK_IGNORE_INTERFACE
1706                         },
1707                         {
1708                                 .ifnum = -1
1709                         }
1710                 }
1711         }
1712 },
1713 {
1714         USB_DEVICE(0x0582, 0x0159),
1715         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1716                 /* .vendor_name = "Roland", */
1717                 /* .product_name = "UA-22", */
1718                 .ifnum = QUIRK_ANY_INTERFACE,
1719                 .type = QUIRK_COMPOSITE,
1720                 .data = (const struct snd_usb_audio_quirk[]) {
1721                         {
1722                                 .ifnum = 0,
1723                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1724                         },
1725                         {
1726                                 .ifnum = 1,
1727                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1728                         },
1729                         {
1730                                 .ifnum = 2,
1731                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1732                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1733                                         .out_cables = 0x0001,
1734                                         .in_cables = 0x0001
1735                                 }
1736                         },
1737                         {
1738                                 .ifnum = -1
1739                         }
1740                 }
1741         }
1742 },
1743 /* this catches most recent vendor-specific Roland devices */
1744 {
1745         .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
1746                        USB_DEVICE_ID_MATCH_INT_CLASS,
1747         .idVendor = 0x0582,
1748         .bInterfaceClass = USB_CLASS_VENDOR_SPEC,
1749         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
1750                 .ifnum = QUIRK_ANY_INTERFACE,
1751                 .type = QUIRK_AUTODETECT
1752         }
1753 },
1754
1755 /* Guillemot devices */
1756 {
1757         /*
1758          * This is for the "Windows Edition" where the external MIDI ports are
1759          * the only MIDI ports; the control data is reported through HID
1760          * interfaces.  The "Macintosh Edition" has ID 0xd002 and uses standard
1761          * compliant USB MIDI ports for external MIDI and controls.
1762          */
1763         USB_DEVICE_VENDOR_SPEC(0x06f8, 0xb000),
1764         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1765                 .vendor_name = "Hercules",
1766                 .product_name = "DJ Console (WE)",
1767                 .ifnum = 4,
1768                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1769                 .data = & (const struct snd_usb_midi_endpoint_info) {
1770                         .out_cables = 0x0001,
1771                         .in_cables = 0x0001
1772                 }
1773         }
1774 },
1775
1776 /* Midiman/M-Audio devices */
1777 {
1778         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002),
1779         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1780                 .vendor_name = "M-Audio",
1781                 .product_name = "MidiSport 2x2",
1782                 .ifnum = QUIRK_ANY_INTERFACE,
1783                 .type = QUIRK_MIDI_MIDIMAN,
1784                 .data = & (const struct snd_usb_midi_endpoint_info) {
1785                         .out_cables = 0x0003,
1786                         .in_cables  = 0x0003
1787                 }
1788         }
1789 },
1790 {
1791         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011),
1792         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1793                 .vendor_name = "M-Audio",
1794                 .product_name = "MidiSport 1x1",
1795                 .ifnum = QUIRK_ANY_INTERFACE,
1796                 .type = QUIRK_MIDI_MIDIMAN,
1797                 .data = & (const struct snd_usb_midi_endpoint_info) {
1798                         .out_cables = 0x0001,
1799                         .in_cables  = 0x0001
1800                 }
1801         }
1802 },
1803 {
1804         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015),
1805         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1806                 .vendor_name = "M-Audio",
1807                 .product_name = "Keystation",
1808                 .ifnum = QUIRK_ANY_INTERFACE,
1809                 .type = QUIRK_MIDI_MIDIMAN,
1810                 .data = & (const struct snd_usb_midi_endpoint_info) {
1811                         .out_cables = 0x0001,
1812                         .in_cables  = 0x0001
1813                 }
1814         }
1815 },
1816 {
1817         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021),
1818         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1819                 .vendor_name = "M-Audio",
1820                 .product_name = "MidiSport 4x4",
1821                 .ifnum = QUIRK_ANY_INTERFACE,
1822                 .type = QUIRK_MIDI_MIDIMAN,
1823                 .data = & (const struct snd_usb_midi_endpoint_info) {
1824                         .out_cables = 0x000f,
1825                         .in_cables  = 0x000f
1826                 }
1827         }
1828 },
1829 {
1830         /*
1831          * For hardware revision 1.05; in the later revisions (1.10 and
1832          * 1.21), 0x1031 is the ID for the device without firmware.
1833          * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de>
1834          */
1835         USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109),
1836         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1837                 .vendor_name = "M-Audio",
1838                 .product_name = "MidiSport 8x8",
1839                 .ifnum = QUIRK_ANY_INTERFACE,
1840                 .type = QUIRK_MIDI_MIDIMAN,
1841                 .data = & (const struct snd_usb_midi_endpoint_info) {
1842                         .out_cables = 0x01ff,
1843                         .in_cables  = 0x01ff
1844                 }
1845         }
1846 },
1847 {
1848         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033),
1849         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1850                 .vendor_name = "M-Audio",
1851                 .product_name = "MidiSport 8x8",
1852                 .ifnum = QUIRK_ANY_INTERFACE,
1853                 .type = QUIRK_MIDI_MIDIMAN,
1854                 .data = & (const struct snd_usb_midi_endpoint_info) {
1855                         .out_cables = 0x01ff,
1856                         .in_cables  = 0x01ff
1857                 }
1858         }
1859 },
1860 {
1861         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041),
1862         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1863                 .vendor_name = "M-Audio",
1864                 .product_name = "MidiSport 2x4",
1865                 .ifnum = QUIRK_ANY_INTERFACE,
1866                 .type = QUIRK_MIDI_MIDIMAN,
1867                 .data = & (const struct snd_usb_midi_endpoint_info) {
1868                         .out_cables = 0x000f,
1869                         .in_cables  = 0x0003
1870                 }
1871         }
1872 },
1873 {
1874         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001),
1875         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1876                 .vendor_name = "M-Audio",
1877                 .product_name = "Quattro",
1878                 .ifnum = QUIRK_ANY_INTERFACE,
1879                 .type = QUIRK_COMPOSITE,
1880                 .data = & (const struct snd_usb_audio_quirk[]) {
1881                         /*
1882                          * Interfaces 0-2 are "Windows-compatible", 16-bit only,
1883                          * and share endpoints with the other interfaces.
1884                          * Ignore them.  The other interfaces can do 24 bits,
1885                          * but captured samples are big-endian (see usbaudio.c).
1886                          */
1887                         {
1888                                 .ifnum = 0,
1889                                 .type = QUIRK_IGNORE_INTERFACE
1890                         },
1891                         {
1892                                 .ifnum = 1,
1893                                 .type = QUIRK_IGNORE_INTERFACE
1894                         },
1895                         {
1896                                 .ifnum = 2,
1897                                 .type = QUIRK_IGNORE_INTERFACE
1898                         },
1899                         {
1900                                 .ifnum = 3,
1901                                 .type = QUIRK_IGNORE_INTERFACE
1902                         },
1903                         {
1904                                 .ifnum = 4,
1905                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1906                         },
1907                         {
1908                                 .ifnum = 5,
1909                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1910                         },
1911                         {
1912                                 .ifnum = 6,
1913                                 .type = QUIRK_IGNORE_INTERFACE
1914                         },
1915                         {
1916                                 .ifnum = 7,
1917                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1918                         },
1919                         {
1920                                 .ifnum = 8,
1921                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1922                         },
1923                         {
1924                                 .ifnum = 9,
1925                                 .type = QUIRK_MIDI_MIDIMAN,
1926                                 .data = & (const struct snd_usb_midi_endpoint_info) {
1927                                         .out_cables = 0x0001,
1928                                         .in_cables  = 0x0001
1929                                 }
1930                         },
1931                         {
1932                                 .ifnum = -1
1933                         }
1934                 }
1935         }
1936 },
1937 {
1938         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003),
1939         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1940                 .vendor_name = "M-Audio",
1941                 .product_name = "AudioPhile",
1942                 .ifnum = 6,
1943                 .type = QUIRK_MIDI_MIDIMAN,
1944                 .data = & (const struct snd_usb_midi_endpoint_info) {
1945                         .out_cables = 0x0001,
1946                         .in_cables  = 0x0001
1947                 }
1948         }
1949 },
1950 {
1951         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008),
1952         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1953                 .vendor_name = "M-Audio",
1954                 .product_name = "Ozone",
1955                 .ifnum = 3,
1956                 .type = QUIRK_MIDI_MIDIMAN,
1957                 .data = & (const struct snd_usb_midi_endpoint_info) {
1958                         .out_cables = 0x0001,
1959                         .in_cables  = 0x0001
1960                 }
1961         }
1962 },
1963 {
1964         USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d),
1965         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1966                 .vendor_name = "M-Audio",
1967                 .product_name = "OmniStudio",
1968                 .ifnum = QUIRK_ANY_INTERFACE,
1969                 .type = QUIRK_COMPOSITE,
1970                 .data = & (const struct snd_usb_audio_quirk[]) {
1971                         {
1972                                 .ifnum = 0,
1973                                 .type = QUIRK_IGNORE_INTERFACE
1974                         },
1975                         {
1976                                 .ifnum = 1,
1977                                 .type = QUIRK_IGNORE_INTERFACE
1978                         },
1979                         {
1980                                 .ifnum = 2,
1981                                 .type = QUIRK_IGNORE_INTERFACE
1982                         },
1983                         {
1984                                 .ifnum = 3,
1985                                 .type = QUIRK_IGNORE_INTERFACE
1986                         },
1987                         {
1988                                 .ifnum = 4,
1989                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1990                         },
1991                         {
1992                                 .ifnum = 5,
1993                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
1994                         },
1995                         {
1996                                 .ifnum = 6,
1997                                 .type = QUIRK_IGNORE_INTERFACE
1998                         },
1999                         {
2000                                 .ifnum = 7,
2001                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2002                         },
2003                         {
2004                                 .ifnum = 8,
2005                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2006                         },
2007                         {
2008                                 .ifnum = 9,
2009                                 .type = QUIRK_MIDI_MIDIMAN,
2010                                 .data = & (const struct snd_usb_midi_endpoint_info) {
2011                                         .out_cables = 0x0001,
2012                                         .in_cables  = 0x0001
2013                                 }
2014                         },
2015                         {
2016                                 .ifnum = -1
2017                         }
2018                 }
2019         }
2020 },
2021 {
2022         USB_DEVICE(0x0763, 0x2019),
2023         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2024                 /* .vendor_name = "M-Audio", */
2025                 /* .product_name = "Ozone Academic", */
2026                 .ifnum = QUIRK_ANY_INTERFACE,
2027                 .type = QUIRK_COMPOSITE,
2028                 .data = & (const struct snd_usb_audio_quirk[]) {
2029                         {
2030                                 .ifnum = 0,
2031                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2032                         },
2033                         {
2034                                 .ifnum = 1,
2035                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2036                         },
2037                         {
2038                                 .ifnum = 2,
2039                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2040                         },
2041                         {
2042                                 .ifnum = 3,
2043                                 .type = QUIRK_MIDI_MIDIMAN,
2044                                 .data = & (const struct snd_usb_midi_endpoint_info) {
2045                                         .out_cables = 0x0001,
2046                                         .in_cables  = 0x0001
2047                                 }
2048                         },
2049                         {
2050                                 .ifnum = -1
2051                         }
2052                 }
2053         }
2054 },
2055 {
2056         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2030),
2057         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2058                 /* .vendor_name = "M-Audio", */
2059                 /* .product_name = "Fast Track C400", */
2060                 .ifnum = QUIRK_ANY_INTERFACE,
2061                 .type = QUIRK_COMPOSITE,
2062                 .data = &(const struct snd_usb_audio_quirk[]) {
2063                         {
2064                                 .ifnum = 1,
2065                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2066                         },
2067                         /* Playback */
2068                         {
2069                                 .ifnum = 2,
2070                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2071                                 .data = &(const struct audioformat) {
2072                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2073                                         .channels = 6,
2074                                         .iface = 2,
2075                                         .altsetting = 1,
2076                                         .altset_idx = 1,
2077                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2078                                         .endpoint = 0x01,
2079                                         .ep_attr = 0x09,
2080                                         .rates = SNDRV_PCM_RATE_44100 |
2081                                                  SNDRV_PCM_RATE_48000 |
2082                                                  SNDRV_PCM_RATE_88200 |
2083                                                  SNDRV_PCM_RATE_96000,
2084                                         .rate_min = 44100,
2085                                         .rate_max = 96000,
2086                                         .nr_rates = 4,
2087                                         .rate_table = (unsigned int[]) {
2088                                                         44100, 48000, 88200, 96000
2089                                         },
2090                                         .clock = 0x80,
2091                                 }
2092                         },
2093                         /* Capture */
2094                         {
2095                                 .ifnum = 3,
2096                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2097                                 .data = &(const struct audioformat) {
2098                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2099                                         .channels = 4,
2100                                         .iface = 3,
2101                                         .altsetting = 1,
2102                                         .altset_idx = 1,
2103                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2104                                         .endpoint = 0x81,
2105                                         .ep_attr = 0x05,
2106                                         .rates = SNDRV_PCM_RATE_44100 |
2107                                                  SNDRV_PCM_RATE_48000 |
2108                                                  SNDRV_PCM_RATE_88200 |
2109                                                  SNDRV_PCM_RATE_96000,
2110                                         .rate_min = 44100,
2111                                         .rate_max = 96000,
2112                                         .nr_rates = 4,
2113                                         .rate_table = (unsigned int[]) {
2114                                                 44100, 48000, 88200, 96000
2115                                         },
2116                                         .clock = 0x80,
2117                                 }
2118                         },
2119                         /* MIDI */
2120                         {
2121                                 .ifnum = -1 /* Interface = 4 */
2122                         }
2123                 }
2124         }
2125 },
2126 {
2127         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2031),
2128         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2129                 /* .vendor_name = "M-Audio", */
2130                 /* .product_name = "Fast Track C600", */
2131                 .ifnum = QUIRK_ANY_INTERFACE,
2132                 .type = QUIRK_COMPOSITE,
2133                 .data = &(const struct snd_usb_audio_quirk[]) {
2134                         {
2135                                 .ifnum = 1,
2136                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2137                         },
2138                         /* Playback */
2139                         {
2140                                 .ifnum = 2,
2141                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2142                                 .data = &(const struct audioformat) {
2143                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2144                                         .channels = 8,
2145                                         .iface = 2,
2146                                         .altsetting = 1,
2147                                         .altset_idx = 1,
2148                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2149                                         .endpoint = 0x01,
2150                                         .ep_attr = 0x09,
2151                                         .rates = SNDRV_PCM_RATE_44100 |
2152                                                  SNDRV_PCM_RATE_48000 |
2153                                                  SNDRV_PCM_RATE_88200 |
2154                                                  SNDRV_PCM_RATE_96000,
2155                                         .rate_min = 44100,
2156                                         .rate_max = 96000,
2157                                         .nr_rates = 4,
2158                                         .rate_table = (unsigned int[]) {
2159                                                         44100, 48000, 88200, 96000
2160                                         },
2161                                         .clock = 0x80,
2162                                 }
2163                         },
2164                         /* Capture */
2165                         {
2166                                 .ifnum = 3,
2167                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2168                                 .data = &(const struct audioformat) {
2169                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2170                                         .channels = 6,
2171                                         .iface = 3,
2172                                         .altsetting = 1,
2173                                         .altset_idx = 1,
2174                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2175                                         .endpoint = 0x81,
2176                                         .ep_attr = 0x05,
2177                                         .rates = SNDRV_PCM_RATE_44100 |
2178                                                  SNDRV_PCM_RATE_48000 |
2179                                                  SNDRV_PCM_RATE_88200 |
2180                                                  SNDRV_PCM_RATE_96000,
2181                                         .rate_min = 44100,
2182                                         .rate_max = 96000,
2183                                         .nr_rates = 4,
2184                                         .rate_table = (unsigned int[]) {
2185                                                 44100, 48000, 88200, 96000
2186                                         },
2187                                         .clock = 0x80,
2188                                 }
2189                         },
2190                         /* MIDI */
2191                         {
2192                                 .ifnum = -1 /* Interface = 4 */
2193                         }
2194                 }
2195         }
2196 },
2197 {
2198         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2080),
2199         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2200                 /* .vendor_name = "M-Audio", */
2201                 /* .product_name = "Fast Track Ultra", */
2202                 .ifnum = QUIRK_ANY_INTERFACE,
2203                 .type = QUIRK_COMPOSITE,
2204                 .data = & (const struct snd_usb_audio_quirk[]) {
2205                         {
2206                                 .ifnum = 0,
2207                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2208                         },
2209                         {
2210                                 .ifnum = 1,
2211                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2212                                 .data = & (const struct audioformat) {
2213                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2214                                         .channels = 8,
2215                                         .iface = 1,
2216                                         .altsetting = 1,
2217                                         .altset_idx = 1,
2218                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2219                                         .endpoint = 0x01,
2220                                         .ep_attr = 0x09,
2221                                         .rates = SNDRV_PCM_RATE_44100 |
2222                                                  SNDRV_PCM_RATE_48000 |
2223                                                  SNDRV_PCM_RATE_88200 |
2224                                                  SNDRV_PCM_RATE_96000,
2225                                         .rate_min = 44100,
2226                                         .rate_max = 96000,
2227                                         .nr_rates = 4,
2228                                         .rate_table = (unsigned int[]) {
2229                                                 44100, 48000, 88200, 96000
2230                                         }
2231                                 }
2232                         },
2233                         {
2234                                 .ifnum = 2,
2235                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2236                                 .data = & (const struct audioformat) {
2237                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2238                                         .channels = 8,
2239                                         .iface = 2,
2240                                         .altsetting = 1,
2241                                         .altset_idx = 1,
2242                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2243                                         .endpoint = 0x81,
2244                                         .ep_attr = 0x05,
2245                                         .rates = SNDRV_PCM_RATE_44100 |
2246                                                  SNDRV_PCM_RATE_48000 |
2247                                                  SNDRV_PCM_RATE_88200 |
2248                                                  SNDRV_PCM_RATE_96000,
2249                                         .rate_min = 44100,
2250                                         .rate_max = 96000,
2251                                         .nr_rates = 4,
2252                                         .rate_table = (unsigned int[]) {
2253                                                 44100, 48000, 88200, 96000
2254                                         }
2255                                 }
2256                         },
2257                         /* interface 3 (MIDI) is standard compliant */
2258                         {
2259                                 .ifnum = -1
2260                         }
2261                 }
2262         }
2263 },
2264 {
2265         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2081),
2266         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2267                 /* .vendor_name = "M-Audio", */
2268                 /* .product_name = "Fast Track Ultra 8R", */
2269                 .ifnum = QUIRK_ANY_INTERFACE,
2270                 .type = QUIRK_COMPOSITE,
2271                 .data = & (const struct snd_usb_audio_quirk[]) {
2272                         {
2273                                 .ifnum = 0,
2274                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2275                         },
2276                         {
2277                                 .ifnum = 1,
2278                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2279                                 .data = & (const struct audioformat) {
2280                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2281                                         .channels = 8,
2282                                         .iface = 1,
2283                                         .altsetting = 1,
2284                                         .altset_idx = 1,
2285                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2286                                         .endpoint = 0x01,
2287                                         .ep_attr = 0x09,
2288                                         .rates = SNDRV_PCM_RATE_44100 |
2289                                                  SNDRV_PCM_RATE_48000 |
2290                                                  SNDRV_PCM_RATE_88200 |
2291                                                  SNDRV_PCM_RATE_96000,
2292                                         .rate_min = 44100,
2293                                         .rate_max = 96000,
2294                                         .nr_rates = 4,
2295                                         .rate_table = (unsigned int[]) {
2296                                                         44100, 48000, 88200, 96000
2297                                         }
2298                                 }
2299                         },
2300                         {
2301                                 .ifnum = 2,
2302                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2303                                 .data = & (const struct audioformat) {
2304                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2305                                         .channels = 8,
2306                                         .iface = 2,
2307                                         .altsetting = 1,
2308                                         .altset_idx = 1,
2309                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2310                                         .endpoint = 0x81,
2311                                         .ep_attr = 0x05,
2312                                         .rates = SNDRV_PCM_RATE_44100 |
2313                                                  SNDRV_PCM_RATE_48000 |
2314                                                  SNDRV_PCM_RATE_88200 |
2315                                                  SNDRV_PCM_RATE_96000,
2316                                         .rate_min = 44100,
2317                                         .rate_max = 96000,
2318                                         .nr_rates = 4,
2319                                         .rate_table = (unsigned int[]) {
2320                                                 44100, 48000, 88200, 96000
2321                                         }
2322                                 }
2323                         },
2324                         /* interface 3 (MIDI) is standard compliant */
2325                         {
2326                                 .ifnum = -1
2327                         }
2328                 }
2329         }
2330 },
2331
2332 /* Casio devices */
2333 {
2334         USB_DEVICE(0x07cf, 0x6801),
2335         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2336                 .vendor_name = "Casio",
2337                 .product_name = "PL-40R",
2338                 .ifnum = 0,
2339                 .type = QUIRK_MIDI_YAMAHA
2340         }
2341 },
2342 {
2343         /* this ID is used by several devices without a product ID */
2344         USB_DEVICE(0x07cf, 0x6802),
2345         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2346                 .vendor_name = "Casio",
2347                 .product_name = "Keyboard",
2348                 .ifnum = 0,
2349                 .type = QUIRK_MIDI_YAMAHA
2350         }
2351 },
2352
2353 /* Mark of the Unicorn devices */
2354 {
2355         /* thanks to Robert A. Lerche <ral 'at' msbit.com> */
2356         .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
2357                        USB_DEVICE_ID_MATCH_PRODUCT |
2358                        USB_DEVICE_ID_MATCH_DEV_SUBCLASS,
2359         .idVendor = 0x07fd,
2360         .idProduct = 0x0001,
2361         .bDeviceSubClass = 2,
2362         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2363                 .vendor_name = "MOTU",
2364                 .product_name = "Fastlane",
2365                 .ifnum = QUIRK_ANY_INTERFACE,
2366                 .type = QUIRK_COMPOSITE,
2367                 .data = & (const struct snd_usb_audio_quirk[]) {
2368                         {
2369                                 .ifnum = 0,
2370                                 .type = QUIRK_MIDI_RAW_BYTES
2371                         },
2372                         {
2373                                 .ifnum = 1,
2374                                 .type = QUIRK_IGNORE_INTERFACE
2375                         },
2376                         {
2377                                 .ifnum = -1
2378                         }
2379                 }
2380         }
2381 },
2382
2383 /* Emagic devices */
2384 {
2385         USB_DEVICE(0x086a, 0x0001),
2386         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2387                 .vendor_name = "Emagic",
2388                 .product_name = "Unitor8",
2389                 .ifnum = 2,
2390                 .type = QUIRK_MIDI_EMAGIC,
2391                 .data = & (const struct snd_usb_midi_endpoint_info) {
2392                         .out_cables = 0x80ff,
2393                         .in_cables  = 0x80ff
2394                 }
2395         }
2396 },
2397 {
2398         USB_DEVICE(0x086a, 0x0002),
2399         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2400                 .vendor_name = "Emagic",
2401                 /* .product_name = "AMT8", */
2402                 .ifnum = 2,
2403                 .type = QUIRK_MIDI_EMAGIC,
2404                 .data = & (const struct snd_usb_midi_endpoint_info) {
2405                         .out_cables = 0x80ff,
2406                         .in_cables  = 0x80ff
2407                 }
2408         }
2409 },
2410 {
2411         USB_DEVICE(0x086a, 0x0003),
2412         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2413                 .vendor_name = "Emagic",
2414                 /* .product_name = "MT4", */
2415                 .ifnum = 2,
2416                 .type = QUIRK_MIDI_EMAGIC,
2417                 .data = & (const struct snd_usb_midi_endpoint_info) {
2418                         .out_cables = 0x800f,
2419                         .in_cables  = 0x8003
2420                 }
2421         }
2422 },
2423
2424 /* KORG devices */
2425 {
2426         USB_DEVICE_VENDOR_SPEC(0x0944, 0x0200),
2427         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2428                 .vendor_name = "KORG, Inc.",
2429                 /* .product_name = "PANDORA PX5D", */
2430                 .ifnum = 3,
2431                 .type = QUIRK_MIDI_STANDARD_INTERFACE,
2432         }
2433 },
2434
2435 {
2436         USB_DEVICE_VENDOR_SPEC(0x0944, 0x0201),
2437         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2438                 .vendor_name = "KORG, Inc.",
2439                 /* .product_name = "ToneLab ST", */
2440                 .ifnum = 3,
2441                 .type = QUIRK_MIDI_STANDARD_INTERFACE,
2442         }
2443 },
2444
2445 /* AKAI devices */
2446 {
2447         USB_DEVICE(0x09e8, 0x0062),
2448         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2449                 .vendor_name = "AKAI",
2450                 .product_name = "MPD16",
2451                 .ifnum = 0,
2452                 .type = QUIRK_MIDI_AKAI,
2453         }
2454 },
2455
2456 {
2457         /* Akai MPC Element */
2458         USB_DEVICE(0x09e8, 0x0021),
2459         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2460                 .ifnum = QUIRK_ANY_INTERFACE,
2461                 .type = QUIRK_COMPOSITE,
2462                 .data = & (const struct snd_usb_audio_quirk[]) {
2463                         {
2464                                 .ifnum = 0,
2465                                 .type = QUIRK_IGNORE_INTERFACE
2466                         },
2467                         {
2468                                 .ifnum = 1,
2469                                 .type = QUIRK_MIDI_STANDARD_INTERFACE
2470                         },
2471                         {
2472                                 .ifnum = -1
2473                         }
2474                 }
2475         }
2476 },
2477
2478 /* Steinberg devices */
2479 {
2480         /* Steinberg MI2 */
2481         USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x2040),
2482         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2483                 .ifnum = QUIRK_ANY_INTERFACE,
2484                 .type = QUIRK_COMPOSITE,
2485                 .data = & (const struct snd_usb_audio_quirk[]) {
2486                         {
2487                                 .ifnum = 0,
2488                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2489                         },
2490                         {
2491                                 .ifnum = 1,
2492                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2493                         },
2494                         {
2495                                 .ifnum = 2,
2496                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2497                         },
2498                         {
2499                                 .ifnum = 3,
2500                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2501                                 .data = &(const struct snd_usb_midi_endpoint_info) {
2502                                         .out_cables = 0x0001,
2503                                         .in_cables  = 0x0001
2504                                 }
2505                         },
2506                         {
2507                                 .ifnum = -1
2508                         }
2509                 }
2510         }
2511 },
2512 {
2513         /* Steinberg MI4 */
2514         USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x4040),
2515         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2516                 .ifnum = QUIRK_ANY_INTERFACE,
2517                 .type = QUIRK_COMPOSITE,
2518                 .data = & (const struct snd_usb_audio_quirk[]) {
2519                         {
2520                                 .ifnum = 0,
2521                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2522                         },
2523                         {
2524                                 .ifnum = 1,
2525                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2526                         },
2527                         {
2528                                 .ifnum = 2,
2529                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2530                         },
2531                         {
2532                                 .ifnum = 3,
2533                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2534                                 .data = &(const struct snd_usb_midi_endpoint_info) {
2535                                         .out_cables = 0x0001,
2536                                         .in_cables  = 0x0001
2537                                 }
2538                         },
2539                         {
2540                                 .ifnum = -1
2541                         }
2542                 }
2543         }
2544 },
2545
2546 /* TerraTec devices */
2547 {
2548         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),
2549         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2550                 .vendor_name = "TerraTec",
2551                 .product_name = "PHASE 26",
2552                 .ifnum = 3,
2553                 .type = QUIRK_MIDI_STANDARD_INTERFACE
2554         }
2555 },
2556 {
2557         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013),
2558         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2559                 .vendor_name = "TerraTec",
2560                 .product_name = "PHASE 26",
2561                 .ifnum = 3,
2562                 .type = QUIRK_MIDI_STANDARD_INTERFACE
2563         }
2564 },
2565 {
2566         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0014),
2567         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2568                 .vendor_name = "TerraTec",
2569                 .product_name = "PHASE 26",
2570                 .ifnum = 3,
2571                 .type = QUIRK_MIDI_STANDARD_INTERFACE
2572         }
2573 },
2574 {
2575         USB_DEVICE(0x0ccd, 0x0035),
2576         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2577                 .vendor_name = "Miditech",
2578                 .product_name = "Play'n Roll",
2579                 .ifnum = 0,
2580                 .type = QUIRK_MIDI_CME
2581         }
2582 },
2583
2584 /* Novation EMS devices */
2585 {
2586         USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001),
2587         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2588                 .vendor_name = "Novation",
2589                 .product_name = "ReMOTE Audio/XStation",
2590                 .ifnum = 4,
2591                 .type = QUIRK_MIDI_NOVATION
2592         }
2593 },
2594 {
2595         USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002),
2596         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2597                 .vendor_name = "Novation",
2598                 .product_name = "Speedio",
2599                 .ifnum = 3,
2600                 .type = QUIRK_MIDI_NOVATION
2601         }
2602 },
2603 {
2604         USB_DEVICE(0x1235, 0x000a),
2605         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2606                 /* .vendor_name = "Novation", */
2607                 /* .product_name = "Nocturn", */
2608                 .ifnum = 0,
2609                 .type = QUIRK_MIDI_RAW_BYTES
2610         }
2611 },
2612 {
2613         USB_DEVICE(0x1235, 0x000e),
2614         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2615                 /* .vendor_name = "Novation", */
2616                 /* .product_name = "Launchpad", */
2617                 .ifnum = 0,
2618                 .type = QUIRK_MIDI_RAW_BYTES
2619         }
2620 },
2621 {
2622         USB_DEVICE(0x1235, 0x0010),
2623         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2624                 .vendor_name = "Focusrite",
2625                 .product_name = "Saffire 6 USB",
2626                 .ifnum = QUIRK_ANY_INTERFACE,
2627                 .type = QUIRK_COMPOSITE,
2628                 .data = (const struct snd_usb_audio_quirk[]) {
2629                         {
2630                                 .ifnum = 0,
2631                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2632                         },
2633                         {
2634                                 .ifnum = 0,
2635                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2636                                 .data = &(const struct audioformat) {
2637                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2638                                         .channels = 4,
2639                                         .iface = 0,
2640                                         .altsetting = 1,
2641                                         .altset_idx = 1,
2642                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2643                                         .endpoint = 0x01,
2644                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
2645                                         .datainterval = 1,
2646                                         .maxpacksize = 0x024c,
2647                                         .rates = SNDRV_PCM_RATE_44100 |
2648                                                  SNDRV_PCM_RATE_48000,
2649                                         .rate_min = 44100,
2650                                         .rate_max = 48000,
2651                                         .nr_rates = 2,
2652                                         .rate_table = (unsigned int[]) {
2653                                                 44100, 48000
2654                                         }
2655                                 }
2656                         },
2657                         {
2658                                 .ifnum = 0,
2659                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2660                                 .data = &(const struct audioformat) {
2661                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2662                                         .channels = 2,
2663                                         .iface = 0,
2664                                         .altsetting = 1,
2665                                         .altset_idx = 1,
2666                                         .attributes = 0,
2667                                         .endpoint = 0x82,
2668                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
2669                                         .datainterval = 1,
2670                                         .maxpacksize = 0x0126,
2671                                         .rates = SNDRV_PCM_RATE_44100 |
2672                                                  SNDRV_PCM_RATE_48000,
2673                                         .rate_min = 44100,
2674                                         .rate_max = 48000,
2675                                         .nr_rates = 2,
2676                                         .rate_table = (unsigned int[]) {
2677                                                 44100, 48000
2678                                         }
2679                                 }
2680                         },
2681                         {
2682                                 .ifnum = 1,
2683                                 .type = QUIRK_MIDI_RAW_BYTES
2684                         },
2685                         {
2686                                 .ifnum = -1
2687                         }
2688                 }
2689         }
2690 },
2691 {
2692         USB_DEVICE(0x1235, 0x0018),
2693         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2694                 .vendor_name = "Novation",
2695                 .product_name = "Twitch",
2696                 .ifnum = QUIRK_ANY_INTERFACE,
2697                 .type = QUIRK_COMPOSITE,
2698                 .data = (const struct snd_usb_audio_quirk[]) {
2699                         {
2700                                 .ifnum = 0,
2701                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2702                                 .data = & (const struct audioformat) {
2703                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2704                                         .channels = 4,
2705                                         .iface = 0,
2706                                         .altsetting = 1,
2707                                         .altset_idx = 1,
2708                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2709                                         .endpoint = 0x01,
2710                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
2711                                         .rates = SNDRV_PCM_RATE_44100 |
2712                                                  SNDRV_PCM_RATE_48000,
2713                                         .rate_min = 44100,
2714                                         .rate_max = 48000,
2715                                         .nr_rates = 2,
2716                                         .rate_table = (unsigned int[]) {
2717                                                 44100, 48000
2718                                         }
2719                                 }
2720                         },
2721                         {
2722                                 .ifnum = 1,
2723                                 .type = QUIRK_MIDI_RAW_BYTES
2724                         },
2725                         {
2726                                 .ifnum = -1
2727                         }
2728                 }
2729         }
2730 },
2731 {
2732         USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
2733         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2734                 .vendor_name = "Novation",
2735                 .product_name = "ReMOTE25",
2736                 .ifnum = 0,
2737                 .type = QUIRK_MIDI_NOVATION
2738         }
2739 },
2740
2741 /* Access Music devices */
2742 {
2743         /* VirusTI Desktop */
2744         USB_DEVICE_VENDOR_SPEC(0x133e, 0x0815),
2745         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2746                 .ifnum = QUIRK_ANY_INTERFACE,
2747                 .type = QUIRK_COMPOSITE,
2748                 .data = &(const struct snd_usb_audio_quirk[]) {
2749                         {
2750                                 .ifnum = 3,
2751                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2752                                 .data = &(const struct snd_usb_midi_endpoint_info) {
2753                                         .out_cables = 0x0003,
2754                                         .in_cables  = 0x0003
2755                                 }
2756                         },
2757                         {
2758                                 .ifnum = 4,
2759                                 .type = QUIRK_IGNORE_INTERFACE
2760                         },
2761                         {
2762                                 .ifnum = -1
2763                         }
2764                 }
2765         }
2766 },
2767
2768 /* Native Instruments MK2 series */
2769 {
2770         /* Komplete Audio 6 */
2771         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2772         .idVendor = 0x17cc,
2773         .idProduct = 0x1000,
2774 },
2775 {
2776         /* Traktor Audio 6 */
2777         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2778         .idVendor = 0x17cc,
2779         .idProduct = 0x1010,
2780 },
2781 {
2782         /* Traktor Audio 10 */
2783         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2784         .idVendor = 0x17cc,
2785         .idProduct = 0x1020,
2786 },
2787
2788 /* QinHeng devices */
2789 {
2790         USB_DEVICE(0x1a86, 0x752d),
2791         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2792                 .vendor_name = "QinHeng",
2793                 .product_name = "CH345",
2794                 .ifnum = 1,
2795                 .type = QUIRK_MIDI_CH345
2796         }
2797 },
2798
2799 /* KeithMcMillen Stringport */
2800 {
2801         USB_DEVICE(0x1f38, 0x0001),
2802         .bInterfaceClass = USB_CLASS_AUDIO,
2803 },
2804
2805 /* Miditech devices */
2806 {
2807         USB_DEVICE(0x4752, 0x0011),
2808         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2809                 .vendor_name = "Miditech",
2810                 .product_name = "Midistart-2",
2811                 .ifnum = 0,
2812                 .type = QUIRK_MIDI_CME
2813         }
2814 },
2815
2816 /* Central Music devices */
2817 {
2818         /* this ID used by both Miditech MidiStudio-2 and CME UF-x */
2819         USB_DEVICE(0x7104, 0x2202),
2820         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2821                 .ifnum = 0,
2822                 .type = QUIRK_MIDI_CME
2823         }
2824 },
2825
2826 /*
2827  * Auvitek au0828 devices with audio interface.
2828  * This should be kept in sync with drivers/media/usb/au0828/au0828-cards.c
2829  * Please notice that some drivers are DVB only, and don't need to be
2830  * here. That's the case, for example, of DVICO_FUSIONHDTV7.
2831  */
2832
2833 #define AU0828_DEVICE(vid, pid, vname, pname) { \
2834         .idVendor = vid, \
2835         .idProduct = pid, \
2836         .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
2837                        USB_DEVICE_ID_MATCH_INT_CLASS | \
2838                        USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
2839         .bInterfaceClass = USB_CLASS_AUDIO, \
2840         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, \
2841         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { \
2842                 .vendor_name = vname, \
2843                 .product_name = pname, \
2844                 .ifnum = QUIRK_ANY_INTERFACE, \
2845                 .type = QUIRK_AUDIO_ALIGN_TRANSFER, \
2846                 .shares_media_device = 1, \
2847         } \
2848 }
2849
2850 AU0828_DEVICE(0x2040, 0x7200, "Hauppauge", "HVR-950Q"),
2851 AU0828_DEVICE(0x2040, 0x7240, "Hauppauge", "HVR-850"),
2852 AU0828_DEVICE(0x2040, 0x7210, "Hauppauge", "HVR-950Q"),
2853 AU0828_DEVICE(0x2040, 0x7217, "Hauppauge", "HVR-950Q"),
2854 AU0828_DEVICE(0x2040, 0x721b, "Hauppauge", "HVR-950Q"),
2855 AU0828_DEVICE(0x2040, 0x721e, "Hauppauge", "HVR-950Q"),
2856 AU0828_DEVICE(0x2040, 0x721f, "Hauppauge", "HVR-950Q"),
2857 AU0828_DEVICE(0x2040, 0x7280, "Hauppauge", "HVR-950Q"),
2858 AU0828_DEVICE(0x0fd9, 0x0008, "Hauppauge", "HVR-950Q"),
2859 AU0828_DEVICE(0x2040, 0x7201, "Hauppauge", "HVR-950Q-MXL"),
2860 AU0828_DEVICE(0x2040, 0x7211, "Hauppauge", "HVR-950Q-MXL"),
2861 AU0828_DEVICE(0x2040, 0x7281, "Hauppauge", "HVR-950Q-MXL"),
2862 AU0828_DEVICE(0x05e1, 0x0480, "Hauppauge", "Woodbury"),
2863 AU0828_DEVICE(0x2040, 0x8200, "Hauppauge", "Woodbury"),
2864 AU0828_DEVICE(0x2040, 0x7260, "Hauppauge", "HVR-950Q"),
2865 AU0828_DEVICE(0x2040, 0x7213, "Hauppauge", "HVR-950Q"),
2866 AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
2867
2868 /* Syntek STK1160 */
2869 {
2870         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2871                        USB_DEVICE_ID_MATCH_INT_CLASS |
2872                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2873         .idVendor = 0x05e1,
2874         .idProduct = 0x0408,
2875         .bInterfaceClass = USB_CLASS_AUDIO,
2876         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2877         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2878                 .vendor_name = "Syntek",
2879                 .product_name = "STK1160",
2880                 .ifnum = QUIRK_ANY_INTERFACE,
2881                 .type = QUIRK_AUDIO_ALIGN_TRANSFER
2882         }
2883 },
2884
2885 /* Digidesign Mbox */
2886 {
2887         /* Thanks to Clemens Ladisch <clemens@ladisch.de> */
2888         USB_DEVICE(0x0dba, 0x1000),
2889         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2890                 .vendor_name = "Digidesign",
2891                 .product_name = "MBox",
2892                 .ifnum = QUIRK_ANY_INTERFACE,
2893                 .type = QUIRK_COMPOSITE,
2894                 .data = (const struct snd_usb_audio_quirk[]){
2895                         {
2896                                 .ifnum = 0,
2897                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2898                         },
2899                         {
2900                                 .ifnum = 1,
2901                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2902                                 .data = &(const struct audioformat) {
2903                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
2904                                         .channels = 2,
2905                                         .iface = 1,
2906                                         .altsetting = 1,
2907                                         .altset_idx = 1,
2908                                         .attributes = 0x4,
2909                                         .endpoint = 0x02,
2910                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
2911                                                 USB_ENDPOINT_SYNC_SYNC,
2912                                         .maxpacksize = 0x130,
2913                                         .rates = SNDRV_PCM_RATE_48000,
2914                                         .rate_min = 48000,
2915                                         .rate_max = 48000,
2916                                         .nr_rates = 1,
2917                                         .rate_table = (unsigned int[]) {
2918                                                 48000
2919                                         }
2920                                 }
2921                         },
2922                         {
2923                                 .ifnum = 1,
2924                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2925                                 .data = &(const struct audioformat) {
2926                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
2927                                         .channels = 2,
2928                                         .iface = 1,
2929                                         .altsetting = 1,
2930                                         .altset_idx = 1,
2931                                         .attributes = 0x4,
2932                                         .endpoint = 0x81,
2933                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
2934                                                 USB_ENDPOINT_SYNC_ASYNC,
2935                                         .maxpacksize = 0x130,
2936                                         .rates = SNDRV_PCM_RATE_48000,
2937                                         .rate_min = 48000,
2938                                         .rate_max = 48000,
2939                                         .nr_rates = 1,
2940                                         .rate_table = (unsigned int[]) {
2941                                                 48000
2942                                         }
2943                                 }
2944                         },
2945                         {
2946                                 .ifnum = -1
2947                         }
2948                 }
2949         }
2950 },
2951
2952 /* DIGIDESIGN MBOX 2 */
2953 {
2954         USB_DEVICE(0x0dba, 0x3000),
2955         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2956                 .vendor_name = "Digidesign",
2957                 .product_name = "Mbox 2",
2958                 .ifnum = QUIRK_ANY_INTERFACE,
2959                 .type = QUIRK_COMPOSITE,
2960                 .data = (const struct snd_usb_audio_quirk[]) {
2961                         {
2962                                 .ifnum = 0,
2963                                 .type = QUIRK_IGNORE_INTERFACE
2964                         },
2965                         {
2966                                 .ifnum = 1,
2967                                 .type = QUIRK_IGNORE_INTERFACE
2968                         },
2969                         {
2970                                 .ifnum = 2,
2971                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2972                                 .data = &(const struct audioformat) {
2973                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
2974                                         .channels = 2,
2975                                         .iface = 2,
2976                                         .altsetting = 2,
2977                                         .altset_idx = 1,
2978                                         .attributes = 0x00,
2979                                         .endpoint = 0x03,
2980                                         .ep_attr = USB_ENDPOINT_SYNC_ASYNC,
2981                                         .rates = SNDRV_PCM_RATE_48000,
2982                                         .rate_min = 48000,
2983                                         .rate_max = 48000,
2984                                         .nr_rates = 1,
2985                                         .rate_table = (unsigned int[]) {
2986                                                 48000
2987                                         }
2988                                 }
2989                         },
2990                         {
2991                                 .ifnum = 3,
2992                                 .type = QUIRK_IGNORE_INTERFACE
2993                         },
2994                         {
2995                                 .ifnum = 4,
2996                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2997                                 .data = &(const struct audioformat) {
2998                                 .formats = SNDRV_PCM_FMTBIT_S24_3BE,
2999                                         .channels = 2,
3000                                         .iface = 4,
3001                                         .altsetting = 2,
3002                                         .altset_idx = 1,
3003                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3004                                         .endpoint = 0x85,
3005                                         .ep_attr = USB_ENDPOINT_SYNC_SYNC,
3006                                         .rates = SNDRV_PCM_RATE_48000,
3007                                         .rate_min = 48000,
3008                                         .rate_max = 48000,
3009                                         .nr_rates = 1,
3010                                         .rate_table = (unsigned int[]) {
3011                                                 48000
3012                                         }
3013                                 }
3014                         },
3015                         {
3016                                 .ifnum = 5,
3017                                 .type = QUIRK_IGNORE_INTERFACE
3018                         },
3019                         {
3020                                 .ifnum = 6,
3021                                 .type = QUIRK_MIDI_MIDIMAN,
3022                                 .data = &(const struct snd_usb_midi_endpoint_info) {
3023                                         .out_ep =  0x02,
3024                                         .out_cables = 0x0001,
3025                                         .in_ep = 0x81,
3026                                         .in_interval = 0x01,
3027                                         .in_cables = 0x0001
3028                                 }
3029                         },
3030                         {
3031                                 .ifnum = -1
3032                         }
3033                 }
3034         }
3035 },
3036 {
3037         /* Tascam US122 MKII - playback-only support */
3038         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
3039         .idVendor = 0x0644,
3040         .idProduct = 0x8021,
3041         .bInterfaceClass = USB_CLASS_AUDIO,
3042         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3043                 .vendor_name = "TASCAM",
3044                 .product_name = "US122 MKII",
3045                 .ifnum = QUIRK_ANY_INTERFACE,
3046                 .type = QUIRK_COMPOSITE,
3047                 .data = (const struct snd_usb_audio_quirk[]) {
3048                         {
3049                                 .ifnum = 0,
3050                                 .type = QUIRK_IGNORE_INTERFACE
3051                         },
3052                         {
3053                                 .ifnum = 1,
3054                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3055                                 .data = &(const struct audioformat) {
3056                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3057                                         .channels = 2,
3058                                         .iface = 1,
3059                                         .altsetting = 1,
3060                                         .altset_idx = 1,
3061                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3062                                         .endpoint = 0x02,
3063                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
3064                                         .rates = SNDRV_PCM_RATE_44100 |
3065                                                  SNDRV_PCM_RATE_48000 |
3066                                                  SNDRV_PCM_RATE_88200 |
3067                                                  SNDRV_PCM_RATE_96000,
3068                                         .rate_min = 44100,
3069                                         .rate_max = 96000,
3070                                         .nr_rates = 4,
3071                                         .rate_table = (unsigned int[]) {
3072                                                 44100, 48000, 88200, 96000
3073                                         }
3074                                 }
3075                         },
3076                         {
3077                                 .ifnum = -1
3078                         }
3079                 }
3080         }
3081 },
3082
3083 /* Microsoft XboxLive Headset/Xbox Communicator */
3084 {
3085         USB_DEVICE(0x045e, 0x0283),
3086         .bInterfaceClass = USB_CLASS_PER_INTERFACE,
3087         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3088                 .vendor_name = "Microsoft",
3089                 .product_name = "XboxLive Headset/Xbox Communicator",
3090                 .ifnum = QUIRK_ANY_INTERFACE,
3091                 .type = QUIRK_COMPOSITE,
3092                 .data = &(const struct snd_usb_audio_quirk[]) {
3093                         {
3094                                 /* playback */
3095                                 .ifnum = 0,
3096                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3097                                 .data = &(const struct audioformat) {
3098                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3099                                         .channels = 1,
3100                                         .iface = 0,
3101                                         .altsetting = 0,
3102                                         .altset_idx = 0,
3103                                         .attributes = 0,
3104                                         .endpoint = 0x04,
3105                                         .ep_attr = 0x05,
3106                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
3107                                         .rate_min = 22050,
3108                                         .rate_max = 22050
3109                                 }
3110                         },
3111                         {
3112                                 /* capture */
3113                                 .ifnum = 1,
3114                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3115                                 .data = &(const struct audioformat) {
3116                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3117                                         .channels = 1,
3118                                         .iface = 1,
3119                                         .altsetting = 0,
3120                                         .altset_idx = 0,
3121                                         .attributes = 0,
3122                                         .endpoint = 0x85,
3123                                         .ep_attr = 0x05,
3124                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
3125                                         .rate_min = 16000,
3126                                         .rate_max = 16000
3127                                 }
3128                         },
3129                         {
3130                                 .ifnum = -1
3131                         }
3132                 }
3133         }
3134 },
3135
3136 /* Reloop Play */
3137 {
3138         USB_DEVICE(0x200c, 0x100b),
3139         .bInterfaceClass = USB_CLASS_PER_INTERFACE,
3140         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3141                 .ifnum = QUIRK_ANY_INTERFACE,
3142                 .type = QUIRK_COMPOSITE,
3143                 .data = &(const struct snd_usb_audio_quirk[]) {
3144                         {
3145                                 .ifnum = 0,
3146                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3147                         },
3148                         {
3149                                 .ifnum = 1,
3150                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3151                                 .data = &(const struct audioformat) {
3152                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3153                                         .channels = 4,
3154                                         .iface = 1,
3155                                         .altsetting = 1,
3156                                         .altset_idx = 1,
3157                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3158                                         .endpoint = 0x01,
3159                                         .ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE,
3160                                         .rates = SNDRV_PCM_RATE_44100 |
3161                                                  SNDRV_PCM_RATE_48000,
3162                                         .rate_min = 44100,
3163                                         .rate_max = 48000,
3164                                         .nr_rates = 2,
3165                                         .rate_table = (unsigned int[]) {
3166                                                 44100, 48000
3167                                         }
3168                                 }
3169                         },
3170                         {
3171                                 .ifnum = -1
3172                         }
3173                 }
3174         }
3175 },
3176
3177 {
3178         /*
3179          * ZOOM R16/24 in audio interface mode.
3180          * Playback requires an extra four byte LE length indicator
3181          * at the start of each isochronous packet. This quirk is
3182          * enabled in create_standard_audio_quirk().
3183          */
3184         USB_DEVICE(0x1686, 0x00dd),
3185         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3186                 .ifnum = QUIRK_ANY_INTERFACE,
3187                 .type = QUIRK_COMPOSITE,
3188                 .data = (const struct snd_usb_audio_quirk[]) {
3189                         {
3190                                 /* Playback  */
3191                                 .ifnum = 1,
3192                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE,
3193                         },
3194                         {
3195                                 /* Capture */
3196                                 .ifnum = 2,
3197                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE,
3198                         },
3199                         {
3200                                 /* Midi */
3201                                 .ifnum = 3,
3202                                 .type = QUIRK_MIDI_STANDARD_INTERFACE
3203                         },
3204                         {
3205                                 .ifnum = -1
3206                         },
3207                 }
3208         }
3209 },
3210
3211 {
3212         /*
3213          * Some USB MIDI devices don't have an audio control interface,
3214          * so we have to grab MIDI streaming interfaces here.
3215          */
3216         .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
3217                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3218         .bInterfaceClass = USB_CLASS_AUDIO,
3219         .bInterfaceSubClass = USB_SUBCLASS_MIDISTREAMING,
3220         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3221                 .ifnum = QUIRK_ANY_INTERFACE,
3222                 .type = QUIRK_MIDI_STANDARD_INTERFACE
3223         }
3224 },
3225
3226 /* disabled due to regression for other devices;
3227  * see https://bugzilla.kernel.org/show_bug.cgi?id=199905
3228  */
3229 #if 0
3230 {
3231         /*
3232          * Nura's first gen headphones use Cambridge Silicon Radio's vendor
3233          * ID, but it looks like the product ID actually is only for Nura.
3234          * The capture interface does not work at all (even on Windows),
3235          * and only the 48 kHz sample rate works for the playback interface.
3236          */
3237         USB_DEVICE(0x0a12, 0x1243),
3238         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3239                 .ifnum = QUIRK_ANY_INTERFACE,
3240                 .type = QUIRK_COMPOSITE,
3241                 .data = (const struct snd_usb_audio_quirk[]) {
3242                         {
3243                                 .ifnum = 0,
3244                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3245                         },
3246                         /* Capture */
3247                         {
3248                                 .ifnum = 1,
3249                                 .type = QUIRK_IGNORE_INTERFACE,
3250                         },
3251                         /* Playback */
3252                         {
3253                                 .ifnum = 2,
3254                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3255                                 .data = &(const struct audioformat) {
3256                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3257                                         .channels = 2,
3258                                         .iface = 2,
3259                                         .altsetting = 1,
3260                                         .altset_idx = 1,
3261                                         .attributes = UAC_EP_CS_ATTR_FILL_MAX |
3262                                                 UAC_EP_CS_ATTR_SAMPLE_RATE,
3263                                         .endpoint = 0x03,
3264                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
3265                                         .rates = SNDRV_PCM_RATE_48000,
3266                                         .rate_min = 48000,
3267                                         .rate_max = 48000,
3268                                         .nr_rates = 1,
3269                                         .rate_table = (unsigned int[]) {
3270                                                 48000
3271                                         }
3272                                 }
3273                         },
3274                         {
3275                                 .ifnum = -1
3276                         },
3277                 }
3278         }
3279 },
3280 #endif /* disabled */
3281
3282 {
3283         /*
3284          * Bower's & Wilkins PX headphones only support the 48 kHz sample rate
3285          * even though it advertises more. The capture interface doesn't work
3286          * even on windows.
3287          */
3288         USB_DEVICE(0x19b5, 0x0021),
3289         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3290                 .ifnum = QUIRK_ANY_INTERFACE,
3291                 .type = QUIRK_COMPOSITE,
3292                 .data = (const struct snd_usb_audio_quirk[]) {
3293                         {
3294                                 .ifnum = 0,
3295                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3296                         },
3297                         /* Playback */
3298                         {
3299                                 .ifnum = 1,
3300                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3301                                 .data = &(const struct audioformat) {
3302                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3303                                         .channels = 2,
3304                                         .iface = 1,
3305                                         .altsetting = 1,
3306                                         .altset_idx = 1,
3307                                         .attributes = UAC_EP_CS_ATTR_FILL_MAX |
3308                                                 UAC_EP_CS_ATTR_SAMPLE_RATE,
3309                                         .endpoint = 0x03,
3310                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
3311                                         .rates = SNDRV_PCM_RATE_48000,
3312                                         .rate_min = 48000,
3313                                         .rate_max = 48000,
3314                                         .nr_rates = 1,
3315                                         .rate_table = (unsigned int[]) {
3316                                                 48000
3317                                         }
3318                                 }
3319                         },
3320                         {
3321                                 .ifnum = -1
3322                         },
3323                 }
3324         }
3325 },
3326 /* Dell WD19 Dock */
3327 {
3328         USB_DEVICE(0x0bda, 0x402e),
3329         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3330                 .ifnum = QUIRK_ANY_INTERFACE,
3331                 .type = QUIRK_SETUP_FMT_AFTER_RESUME
3332         }
3333 },
3334 /* MOTU Microbook II */
3335 {
3336         USB_DEVICE_VENDOR_SPEC(0x07fd, 0x0004),
3337         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3338                 .vendor_name = "MOTU",
3339                 .product_name = "MicroBookII",
3340                 .ifnum = QUIRK_ANY_INTERFACE,
3341                 .type = QUIRK_COMPOSITE,
3342                 .data = (const struct snd_usb_audio_quirk[]) {
3343                         {
3344                                 .ifnum = 0,
3345                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3346                         },
3347                         {
3348                                 .ifnum = 0,
3349                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3350                                 .data = &(const struct audioformat) {
3351                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3352                                         .channels = 6,
3353                                         .iface = 0,
3354                                         .altsetting = 1,
3355                                         .altset_idx = 1,
3356                                         .attributes = 0,
3357                                         .endpoint = 0x84,
3358                                         .rates = SNDRV_PCM_RATE_96000,
3359                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
3360                                                    USB_ENDPOINT_SYNC_ASYNC,
3361                                         .rate_min = 96000,
3362                                         .rate_max = 96000,
3363                                         .nr_rates = 1,
3364                                         .maxpacksize = 0x00d8,
3365                                         .rate_table = (unsigned int[]) {
3366                                                 96000
3367                                         }
3368                                 }
3369                         },
3370                         {
3371                                 .ifnum = 0,
3372                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3373                                 .data = &(const struct audioformat) {
3374                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3375                                         .channels = 8,
3376                                         .iface = 0,
3377                                         .altsetting = 1,
3378                                         .altset_idx = 1,
3379                                         .attributes = 0,
3380                                         .endpoint = 0x03,
3381                                         .rates = SNDRV_PCM_RATE_96000,
3382                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
3383                                                    USB_ENDPOINT_SYNC_ASYNC,
3384                                         .rate_min = 96000,
3385                                         .rate_max = 96000,
3386                                         .nr_rates = 1,
3387                                         .maxpacksize = 0x0120,
3388                                         .rate_table = (unsigned int[]) {
3389                                                 96000
3390                                         }
3391                                 }
3392                         },
3393                         {
3394                                 .ifnum = -1
3395                         }
3396                 }
3397         }
3398 },
3399 {
3400         /*
3401          * PIONEER DJ DDJ-SX3
3402          * PCM is 12 channels out, 10 channels in @ 44.1 fixed
3403          * interface 0, vendor class alt setting 1 for endpoints 5 and 0x86
3404          * The feedback for the output is the input.
3405          */
3406         USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0023),
3407         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3408                 .ifnum = QUIRK_ANY_INTERFACE,
3409                 .type = QUIRK_COMPOSITE,
3410                 .data = (const struct snd_usb_audio_quirk[]) {
3411                         {
3412                                 .ifnum = 0,
3413                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3414                                 .data = &(const struct audioformat) {
3415                                         .formats = SNDRV_PCM_FMTBIT_S32_LE,
3416                                         .channels = 12,
3417                                         .iface = 0,
3418                                         .altsetting = 1,
3419                                         .altset_idx = 1,
3420                                         .endpoint = 0x05,
3421                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3422                                                    USB_ENDPOINT_SYNC_ASYNC,
3423                                         .rates = SNDRV_PCM_RATE_44100,
3424                                         .rate_min = 44100,
3425                                         .rate_max = 44100,
3426                                         .nr_rates = 1,
3427                                         .rate_table = (unsigned int[]) { 44100 }
3428                                 }
3429                         },
3430                         {
3431                                 .ifnum = 0,
3432                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3433                                 .data = &(const struct audioformat) {
3434                                         .formats = SNDRV_PCM_FMTBIT_S32_LE,
3435                                         .channels = 10,
3436                                         .iface = 0,
3437                                         .altsetting = 1,
3438                                         .altset_idx = 1,
3439                                         .endpoint = 0x86,
3440                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3441                                                  USB_ENDPOINT_SYNC_ASYNC|
3442                                                  USB_ENDPOINT_USAGE_IMPLICIT_FB,
3443                                         .rates = SNDRV_PCM_RATE_44100,
3444                                         .rate_min = 44100,
3445                                         .rate_max = 44100,
3446                                         .nr_rates = 1,
3447                                         .rate_table = (unsigned int[]) { 44100 }
3448                                 }
3449                         },
3450                         {
3451                                 .ifnum = -1
3452                         }
3453                 }
3454         }
3455 },
3456 {
3457         /*
3458          * Pioneer DJ DJM-250MK2
3459          * PCM is 8 channels out @ 48 fixed (endpoints 0x01).
3460          * The output from computer to the mixer is usable.
3461          *
3462          * The input (phono or line to computer) is not working.
3463          * It should be at endpoint 0x82 and probably also 8 channels,
3464          * but it seems that it works only with Pioneer proprietary software.
3465          * Even on officially supported OS, the Audacity was unable to record
3466          * and Mixxx to recognize the control vinyls.
3467          */
3468         USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0017),
3469         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3470                 .ifnum = QUIRK_ANY_INTERFACE,
3471                 .type = QUIRK_COMPOSITE,
3472                 .data = (const struct snd_usb_audio_quirk[]) {
3473                         {
3474                                 .ifnum = 0,
3475                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3476                                 .data = &(const struct audioformat) {
3477                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3478                                         .channels = 8, // outputs
3479                                         .iface = 0,
3480                                         .altsetting = 1,
3481                                         .altset_idx = 1,
3482                                         .endpoint = 0x01,
3483                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3484                                                 USB_ENDPOINT_SYNC_ASYNC,
3485                                         .rates = SNDRV_PCM_RATE_48000,
3486                                         .rate_min = 48000,
3487                                         .rate_max = 48000,
3488                                         .nr_rates = 1,
3489                                         .rate_table = (unsigned int[]) { 48000 }
3490                                 }
3491                         },
3492                         {
3493                                 .ifnum = -1
3494                         }
3495                 }
3496         }
3497 },
3498 {
3499         /*
3500          * PIONEER DJ DDJ-RB
3501          * PCM is 4 channels out, 2 dummy channels in @ 44.1 fixed
3502          * The feedback for the output is the dummy input.
3503          */
3504         USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000e),
3505         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3506                 .ifnum = QUIRK_ANY_INTERFACE,
3507                 .type = QUIRK_COMPOSITE,
3508                 .data = (const struct snd_usb_audio_quirk[]) {
3509                         {
3510                                 .ifnum = 0,
3511                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3512                                 .data = &(const struct audioformat) {
3513                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3514                                         .channels = 4,
3515                                         .iface = 0,
3516                                         .altsetting = 1,
3517                                         .altset_idx = 1,
3518                                         .endpoint = 0x01,
3519                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3520                                                    USB_ENDPOINT_SYNC_ASYNC,
3521                                         .rates = SNDRV_PCM_RATE_44100,
3522                                         .rate_min = 44100,
3523                                         .rate_max = 44100,
3524                                         .nr_rates = 1,
3525                                         .rate_table = (unsigned int[]) { 44100 }
3526                                 }
3527                         },
3528                         {
3529                                 .ifnum = 0,
3530                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3531                                 .data = &(const struct audioformat) {
3532                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3533                                         .channels = 2,
3534                                         .iface = 0,
3535                                         .altsetting = 1,
3536                                         .altset_idx = 1,
3537                                         .endpoint = 0x82,
3538                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3539                                                  USB_ENDPOINT_SYNC_ASYNC|
3540                                                  USB_ENDPOINT_USAGE_IMPLICIT_FB,
3541                                         .rates = SNDRV_PCM_RATE_44100,
3542                                         .rate_min = 44100,
3543                                         .rate_max = 44100,
3544                                         .nr_rates = 1,
3545                                         .rate_table = (unsigned int[]) { 44100 }
3546                                 }
3547                         },
3548                         {
3549                                 .ifnum = -1
3550                         }
3551                 }
3552         }
3553 },
3554
3555 {
3556         /*
3557          * Pioneer DJ DJM-900NXS2
3558          * 10 channels playback & 12 channels capture @ 44.1/48/96kHz S24LE
3559          */
3560         USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000a),
3561         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3562                 .ifnum = QUIRK_ANY_INTERFACE,
3563                 .type = QUIRK_COMPOSITE,
3564                 .data = (const struct snd_usb_audio_quirk[]) {
3565                         {
3566                                 .ifnum = 0,
3567                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3568                                 .data = &(const struct audioformat) {
3569                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3570                                         .channels = 10,
3571                                         .iface = 0,
3572                                         .altsetting = 1,
3573                                         .altset_idx = 1,
3574                                         .endpoint = 0x01,
3575                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3576                                             USB_ENDPOINT_SYNC_ASYNC,
3577                                         .rates = SNDRV_PCM_RATE_44100|
3578                                             SNDRV_PCM_RATE_48000|
3579                                             SNDRV_PCM_RATE_96000,
3580                                         .rate_min = 44100,
3581                                         .rate_max = 96000,
3582                                         .nr_rates = 3,
3583                                         .rate_table = (unsigned int[]) {
3584                                                 44100, 48000, 96000
3585                                         }
3586                                 }
3587                         },
3588                         {
3589                                 .ifnum = 0,
3590                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3591                                 .data = &(const struct audioformat) {
3592                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3593                                         .channels = 12,
3594                                         .iface = 0,
3595                                         .altsetting = 1,
3596                                         .altset_idx = 1,
3597                                         .endpoint = 0x82,
3598                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3599                                             USB_ENDPOINT_SYNC_ASYNC|
3600                                             USB_ENDPOINT_USAGE_IMPLICIT_FB,
3601                                         .rates = SNDRV_PCM_RATE_44100|
3602                                             SNDRV_PCM_RATE_48000|
3603                                             SNDRV_PCM_RATE_96000,
3604                                         .rate_min = 44100,
3605                                         .rate_max = 96000,
3606                                         .nr_rates = 3,
3607                                         .rate_table = (unsigned int[]) {
3608                                                 44100, 48000, 96000
3609                                         }
3610                                 }
3611                         },
3612                         {
3613                                 .ifnum = -1
3614                         }
3615                 }
3616         }
3617 },
3618
3619 /*
3620  * MacroSilicon MS2109 based HDMI capture cards
3621  *
3622  * These claim 96kHz 1ch in the descriptors, but are actually 48kHz 2ch.
3623  * They also need QUIRK_AUDIO_ALIGN_TRANSFER, which makes one wonder if
3624  * they pretend to be 96kHz mono as a workaround for stereo being broken
3625  * by that...
3626  *
3627  * They also have an issue with initial stream alignment that causes the
3628  * channels to be swapped and out of phase, which is dealt with in quirks.c.
3629  */
3630 {
3631         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
3632                        USB_DEVICE_ID_MATCH_INT_CLASS |
3633                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3634         .idVendor = 0x534d,
3635         .idProduct = 0x2109,
3636         .bInterfaceClass = USB_CLASS_AUDIO,
3637         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
3638         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3639                 .vendor_name = "MacroSilicon",
3640                 .product_name = "MS2109",
3641                 .ifnum = QUIRK_ANY_INTERFACE,
3642                 .type = QUIRK_COMPOSITE,
3643                 .data = &(const struct snd_usb_audio_quirk[]) {
3644                         {
3645                                 .ifnum = 2,
3646                                 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
3647                         },
3648                         {
3649                                 .ifnum = 2,
3650                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3651                         },
3652                         {
3653                                 .ifnum = 3,
3654                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3655                                 .data = &(const struct audioformat) {
3656                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3657                                         .channels = 2,
3658                                         .iface = 3,
3659                                         .altsetting = 1,
3660                                         .altset_idx = 1,
3661                                         .attributes = 0,
3662                                         .endpoint = 0x82,
3663                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
3664                                                 USB_ENDPOINT_SYNC_ASYNC,
3665                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
3666                                         .rate_min = 48000,
3667                                         .rate_max = 48000,
3668                                 }
3669                         },
3670                         {
3671                                 .ifnum = -1
3672                         }
3673                 }
3674         }
3675 },
3676
3677 #undef USB_DEVICE_VENDOR_SPEC