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