GNU Linux-libre 5.4.200-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         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2030),
2152         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2153                 /* .vendor_name = "M-Audio", */
2154                 /* .product_name = "Fast Track C400", */
2155                 .ifnum = QUIRK_ANY_INTERFACE,
2156                 .type = QUIRK_COMPOSITE,
2157                 .data = &(const struct snd_usb_audio_quirk[]) {
2158                         {
2159                                 .ifnum = 1,
2160                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2161                         },
2162                         /* Playback */
2163                         {
2164                                 .ifnum = 2,
2165                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2166                                 .data = &(const struct audioformat) {
2167                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2168                                         .channels = 6,
2169                                         .iface = 2,
2170                                         .altsetting = 1,
2171                                         .altset_idx = 1,
2172                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2173                                         .endpoint = 0x01,
2174                                         .ep_attr = 0x09,
2175                                         .rates = SNDRV_PCM_RATE_44100 |
2176                                                  SNDRV_PCM_RATE_48000 |
2177                                                  SNDRV_PCM_RATE_88200 |
2178                                                  SNDRV_PCM_RATE_96000,
2179                                         .rate_min = 44100,
2180                                         .rate_max = 96000,
2181                                         .nr_rates = 4,
2182                                         .rate_table = (unsigned int[]) {
2183                                                         44100, 48000, 88200, 96000
2184                                         },
2185                                         .clock = 0x80,
2186                                 }
2187                         },
2188                         /* Capture */
2189                         {
2190                                 .ifnum = 3,
2191                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2192                                 .data = &(const struct audioformat) {
2193                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2194                                         .channels = 4,
2195                                         .iface = 3,
2196                                         .altsetting = 1,
2197                                         .altset_idx = 1,
2198                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2199                                         .endpoint = 0x81,
2200                                         .ep_attr = 0x05,
2201                                         .rates = SNDRV_PCM_RATE_44100 |
2202                                                  SNDRV_PCM_RATE_48000 |
2203                                                  SNDRV_PCM_RATE_88200 |
2204                                                  SNDRV_PCM_RATE_96000,
2205                                         .rate_min = 44100,
2206                                         .rate_max = 96000,
2207                                         .nr_rates = 4,
2208                                         .rate_table = (unsigned int[]) {
2209                                                 44100, 48000, 88200, 96000
2210                                         },
2211                                         .clock = 0x80,
2212                                 }
2213                         },
2214                         /* MIDI */
2215                         {
2216                                 .ifnum = -1 /* Interface = 4 */
2217                         }
2218                 }
2219         }
2220 },
2221 {
2222         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2031),
2223         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2224                 /* .vendor_name = "M-Audio", */
2225                 /* .product_name = "Fast Track C600", */
2226                 .ifnum = QUIRK_ANY_INTERFACE,
2227                 .type = QUIRK_COMPOSITE,
2228                 .data = &(const struct snd_usb_audio_quirk[]) {
2229                         {
2230                                 .ifnum = 1,
2231                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2232                         },
2233                         /* Playback */
2234                         {
2235                                 .ifnum = 2,
2236                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2237                                 .data = &(const struct audioformat) {
2238                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2239                                         .channels = 8,
2240                                         .iface = 2,
2241                                         .altsetting = 1,
2242                                         .altset_idx = 1,
2243                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2244                                         .endpoint = 0x01,
2245                                         .ep_attr = 0x09,
2246                                         .rates = SNDRV_PCM_RATE_44100 |
2247                                                  SNDRV_PCM_RATE_48000 |
2248                                                  SNDRV_PCM_RATE_88200 |
2249                                                  SNDRV_PCM_RATE_96000,
2250                                         .rate_min = 44100,
2251                                         .rate_max = 96000,
2252                                         .nr_rates = 4,
2253                                         .rate_table = (unsigned int[]) {
2254                                                         44100, 48000, 88200, 96000
2255                                         },
2256                                         .clock = 0x80,
2257                                 }
2258                         },
2259                         /* Capture */
2260                         {
2261                                 .ifnum = 3,
2262                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2263                                 .data = &(const struct audioformat) {
2264                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2265                                         .channels = 6,
2266                                         .iface = 3,
2267                                         .altsetting = 1,
2268                                         .altset_idx = 1,
2269                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2270                                         .endpoint = 0x81,
2271                                         .ep_attr = 0x05,
2272                                         .rates = SNDRV_PCM_RATE_44100 |
2273                                                  SNDRV_PCM_RATE_48000 |
2274                                                  SNDRV_PCM_RATE_88200 |
2275                                                  SNDRV_PCM_RATE_96000,
2276                                         .rate_min = 44100,
2277                                         .rate_max = 96000,
2278                                         .nr_rates = 4,
2279                                         .rate_table = (unsigned int[]) {
2280                                                 44100, 48000, 88200, 96000
2281                                         },
2282                                         .clock = 0x80,
2283                                 }
2284                         },
2285                         /* MIDI */
2286                         {
2287                                 .ifnum = -1 /* Interface = 4 */
2288                         }
2289                 }
2290         }
2291 },
2292 {
2293         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2080),
2294         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2295                 /* .vendor_name = "M-Audio", */
2296                 /* .product_name = "Fast Track Ultra", */
2297                 .ifnum = QUIRK_ANY_INTERFACE,
2298                 .type = QUIRK_COMPOSITE,
2299                 .data = & (const struct snd_usb_audio_quirk[]) {
2300                         {
2301                                 .ifnum = 0,
2302                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2303                         },
2304                         {
2305                                 .ifnum = 1,
2306                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2307                                 .data = & (const struct audioformat) {
2308                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2309                                         .channels = 8,
2310                                         .iface = 1,
2311                                         .altsetting = 1,
2312                                         .altset_idx = 1,
2313                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2314                                         .endpoint = 0x01,
2315                                         .ep_attr = 0x09,
2316                                         .rates = SNDRV_PCM_RATE_44100 |
2317                                                  SNDRV_PCM_RATE_48000 |
2318                                                  SNDRV_PCM_RATE_88200 |
2319                                                  SNDRV_PCM_RATE_96000,
2320                                         .rate_min = 44100,
2321                                         .rate_max = 96000,
2322                                         .nr_rates = 4,
2323                                         .rate_table = (unsigned int[]) {
2324                                                 44100, 48000, 88200, 96000
2325                                         }
2326                                 }
2327                         },
2328                         {
2329                                 .ifnum = 2,
2330                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2331                                 .data = & (const struct audioformat) {
2332                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2333                                         .channels = 8,
2334                                         .iface = 2,
2335                                         .altsetting = 1,
2336                                         .altset_idx = 1,
2337                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2338                                         .endpoint = 0x81,
2339                                         .ep_attr = 0x05,
2340                                         .rates = SNDRV_PCM_RATE_44100 |
2341                                                  SNDRV_PCM_RATE_48000 |
2342                                                  SNDRV_PCM_RATE_88200 |
2343                                                  SNDRV_PCM_RATE_96000,
2344                                         .rate_min = 44100,
2345                                         .rate_max = 96000,
2346                                         .nr_rates = 4,
2347                                         .rate_table = (unsigned int[]) {
2348                                                 44100, 48000, 88200, 96000
2349                                         }
2350                                 }
2351                         },
2352                         /* interface 3 (MIDI) is standard compliant */
2353                         {
2354                                 .ifnum = -1
2355                         }
2356                 }
2357         }
2358 },
2359 {
2360         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2081),
2361         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2362                 /* .vendor_name = "M-Audio", */
2363                 /* .product_name = "Fast Track Ultra 8R", */
2364                 .ifnum = QUIRK_ANY_INTERFACE,
2365                 .type = QUIRK_COMPOSITE,
2366                 .data = & (const struct snd_usb_audio_quirk[]) {
2367                         {
2368                                 .ifnum = 0,
2369                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2370                         },
2371                         {
2372                                 .ifnum = 1,
2373                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2374                                 .data = & (const struct audioformat) {
2375                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2376                                         .channels = 8,
2377                                         .iface = 1,
2378                                         .altsetting = 1,
2379                                         .altset_idx = 1,
2380                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2381                                         .endpoint = 0x01,
2382                                         .ep_attr = 0x09,
2383                                         .rates = SNDRV_PCM_RATE_44100 |
2384                                                  SNDRV_PCM_RATE_48000 |
2385                                                  SNDRV_PCM_RATE_88200 |
2386                                                  SNDRV_PCM_RATE_96000,
2387                                         .rate_min = 44100,
2388                                         .rate_max = 96000,
2389                                         .nr_rates = 4,
2390                                         .rate_table = (unsigned int[]) {
2391                                                         44100, 48000, 88200, 96000
2392                                         }
2393                                 }
2394                         },
2395                         {
2396                                 .ifnum = 2,
2397                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2398                                 .data = & (const struct audioformat) {
2399                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2400                                         .channels = 8,
2401                                         .iface = 2,
2402                                         .altsetting = 1,
2403                                         .altset_idx = 1,
2404                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2405                                         .endpoint = 0x81,
2406                                         .ep_attr = 0x05,
2407                                         .rates = SNDRV_PCM_RATE_44100 |
2408                                                  SNDRV_PCM_RATE_48000 |
2409                                                  SNDRV_PCM_RATE_88200 |
2410                                                  SNDRV_PCM_RATE_96000,
2411                                         .rate_min = 44100,
2412                                         .rate_max = 96000,
2413                                         .nr_rates = 4,
2414                                         .rate_table = (unsigned int[]) {
2415                                                 44100, 48000, 88200, 96000
2416                                         }
2417                                 }
2418                         },
2419                         /* interface 3 (MIDI) is standard compliant */
2420                         {
2421                                 .ifnum = -1
2422                         }
2423                 }
2424         }
2425 },
2426
2427 /* Casio devices */
2428 {
2429         USB_DEVICE(0x07cf, 0x6801),
2430         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2431                 .vendor_name = "Casio",
2432                 .product_name = "PL-40R",
2433                 .ifnum = 0,
2434                 .type = QUIRK_MIDI_YAMAHA
2435         }
2436 },
2437 {
2438         /* this ID is used by several devices without a product ID */
2439         USB_DEVICE(0x07cf, 0x6802),
2440         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2441                 .vendor_name = "Casio",
2442                 .product_name = "Keyboard",
2443                 .ifnum = 0,
2444                 .type = QUIRK_MIDI_YAMAHA
2445         }
2446 },
2447
2448 /* Mark of the Unicorn devices */
2449 {
2450         /* thanks to Robert A. Lerche <ral 'at' msbit.com> */
2451         .match_flags = USB_DEVICE_ID_MATCH_VENDOR |
2452                        USB_DEVICE_ID_MATCH_PRODUCT |
2453                        USB_DEVICE_ID_MATCH_DEV_SUBCLASS,
2454         .idVendor = 0x07fd,
2455         .idProduct = 0x0001,
2456         .bDeviceSubClass = 2,
2457         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2458                 .vendor_name = "MOTU",
2459                 .product_name = "Fastlane",
2460                 .ifnum = QUIRK_ANY_INTERFACE,
2461                 .type = QUIRK_COMPOSITE,
2462                 .data = & (const struct snd_usb_audio_quirk[]) {
2463                         {
2464                                 .ifnum = 0,
2465                                 .type = QUIRK_MIDI_RAW_BYTES
2466                         },
2467                         {
2468                                 .ifnum = 1,
2469                                 .type = QUIRK_IGNORE_INTERFACE
2470                         },
2471                         {
2472                                 .ifnum = -1
2473                         }
2474                 }
2475         }
2476 },
2477
2478 /* Emagic devices */
2479 {
2480         USB_DEVICE(0x086a, 0x0001),
2481         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2482                 .vendor_name = "Emagic",
2483                 .product_name = "Unitor8",
2484                 .ifnum = 2,
2485                 .type = QUIRK_MIDI_EMAGIC,
2486                 .data = & (const struct snd_usb_midi_endpoint_info) {
2487                         .out_cables = 0x80ff,
2488                         .in_cables  = 0x80ff
2489                 }
2490         }
2491 },
2492 {
2493         USB_DEVICE(0x086a, 0x0002),
2494         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2495                 .vendor_name = "Emagic",
2496                 /* .product_name = "AMT8", */
2497                 .ifnum = 2,
2498                 .type = QUIRK_MIDI_EMAGIC,
2499                 .data = & (const struct snd_usb_midi_endpoint_info) {
2500                         .out_cables = 0x80ff,
2501                         .in_cables  = 0x80ff
2502                 }
2503         }
2504 },
2505 {
2506         USB_DEVICE(0x086a, 0x0003),
2507         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2508                 .vendor_name = "Emagic",
2509                 /* .product_name = "MT4", */
2510                 .ifnum = 2,
2511                 .type = QUIRK_MIDI_EMAGIC,
2512                 .data = & (const struct snd_usb_midi_endpoint_info) {
2513                         .out_cables = 0x800f,
2514                         .in_cables  = 0x8003
2515                 }
2516         }
2517 },
2518
2519 /* KORG devices */
2520 {
2521         USB_DEVICE_VENDOR_SPEC(0x0944, 0x0200),
2522         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2523                 .vendor_name = "KORG, Inc.",
2524                 /* .product_name = "PANDORA PX5D", */
2525                 .ifnum = 3,
2526                 .type = QUIRK_MIDI_STANDARD_INTERFACE,
2527         }
2528 },
2529
2530 {
2531         USB_DEVICE_VENDOR_SPEC(0x0944, 0x0201),
2532         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2533                 .vendor_name = "KORG, Inc.",
2534                 /* .product_name = "ToneLab ST", */
2535                 .ifnum = 3,
2536                 .type = QUIRK_MIDI_STANDARD_INTERFACE,
2537         }
2538 },
2539
2540 {
2541         USB_DEVICE_VENDOR_SPEC(0x0944, 0x0204),
2542         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2543                 .vendor_name = "KORG, Inc.",
2544                 /* .product_name = "ToneLab EX", */
2545                 .ifnum = 3,
2546                 .type = QUIRK_MIDI_STANDARD_INTERFACE,
2547         }
2548 },
2549
2550 /* AKAI devices */
2551 {
2552         USB_DEVICE(0x09e8, 0x0062),
2553         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2554                 .vendor_name = "AKAI",
2555                 .product_name = "MPD16",
2556                 .ifnum = 0,
2557                 .type = QUIRK_MIDI_AKAI,
2558         }
2559 },
2560
2561 {
2562         /* Akai MPC Element */
2563         USB_DEVICE(0x09e8, 0x0021),
2564         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2565                 .ifnum = QUIRK_ANY_INTERFACE,
2566                 .type = QUIRK_COMPOSITE,
2567                 .data = & (const struct snd_usb_audio_quirk[]) {
2568                         {
2569                                 .ifnum = 0,
2570                                 .type = QUIRK_IGNORE_INTERFACE
2571                         },
2572                         {
2573                                 .ifnum = 1,
2574                                 .type = QUIRK_MIDI_STANDARD_INTERFACE
2575                         },
2576                         {
2577                                 .ifnum = -1
2578                         }
2579                 }
2580         }
2581 },
2582
2583 /* Steinberg devices */
2584 {
2585         /* Steinberg MI2 */
2586         USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x2040),
2587         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2588                 .ifnum = QUIRK_ANY_INTERFACE,
2589                 .type = QUIRK_COMPOSITE,
2590                 .data = & (const struct snd_usb_audio_quirk[]) {
2591                         {
2592                                 .ifnum = 0,
2593                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2594                         },
2595                         {
2596                                 .ifnum = 1,
2597                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2598                         },
2599                         {
2600                                 .ifnum = 2,
2601                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2602                         },
2603                         {
2604                                 .ifnum = 3,
2605                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2606                                 .data = &(const struct snd_usb_midi_endpoint_info) {
2607                                         .out_cables = 0x0001,
2608                                         .in_cables  = 0x0001
2609                                 }
2610                         },
2611                         {
2612                                 .ifnum = -1
2613                         }
2614                 }
2615         }
2616 },
2617 {
2618         /* Steinberg MI4 */
2619         USB_DEVICE_VENDOR_SPEC(0x0a4e, 0x4040),
2620         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2621                 .ifnum = QUIRK_ANY_INTERFACE,
2622                 .type = QUIRK_COMPOSITE,
2623                 .data = & (const struct snd_usb_audio_quirk[]) {
2624                         {
2625                                 .ifnum = 0,
2626                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2627                         },
2628                         {
2629                                 .ifnum = 1,
2630                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2631                         },
2632                         {
2633                                 .ifnum = 2,
2634                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
2635                         },
2636                         {
2637                                 .ifnum = 3,
2638                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2639                                 .data = &(const struct snd_usb_midi_endpoint_info) {
2640                                         .out_cables = 0x0001,
2641                                         .in_cables  = 0x0001
2642                                 }
2643                         },
2644                         {
2645                                 .ifnum = -1
2646                         }
2647                 }
2648         }
2649 },
2650
2651 /* TerraTec devices */
2652 {
2653         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0012),
2654         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2655                 .vendor_name = "TerraTec",
2656                 .product_name = "PHASE 26",
2657                 .ifnum = 3,
2658                 .type = QUIRK_MIDI_STANDARD_INTERFACE
2659         }
2660 },
2661 {
2662         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013),
2663         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2664                 .vendor_name = "TerraTec",
2665                 .product_name = "PHASE 26",
2666                 .ifnum = 3,
2667                 .type = QUIRK_MIDI_STANDARD_INTERFACE
2668         }
2669 },
2670 {
2671         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0014),
2672         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2673                 .vendor_name = "TerraTec",
2674                 .product_name = "PHASE 26",
2675                 .ifnum = 3,
2676                 .type = QUIRK_MIDI_STANDARD_INTERFACE
2677         }
2678 },
2679 {
2680         USB_DEVICE(0x0ccd, 0x0028),
2681         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2682                 .vendor_name = "TerraTec",
2683                 .product_name = "Aureon5.1MkII",
2684                 .ifnum = QUIRK_NO_INTERFACE
2685         }
2686 },
2687 {
2688         USB_DEVICE(0x0ccd, 0x0035),
2689         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2690                 .vendor_name = "Miditech",
2691                 .product_name = "Play'n Roll",
2692                 .ifnum = 0,
2693                 .type = QUIRK_MIDI_CME
2694         }
2695 },
2696
2697 /* Stanton/N2IT Final Scratch v1 device ('Scratchamp') */
2698 {
2699         USB_DEVICE(0x103d, 0x0100),
2700                 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2701                 .vendor_name = "Stanton",
2702                 .product_name = "ScratchAmp",
2703                 .ifnum = QUIRK_NO_INTERFACE
2704         }
2705 },
2706 {
2707         USB_DEVICE(0x103d, 0x0101),
2708                 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2709                 .vendor_name = "Stanton",
2710                 .product_name = "ScratchAmp",
2711                 .ifnum = QUIRK_NO_INTERFACE
2712         }
2713 },
2714
2715 /* Novation EMS devices */
2716 {
2717         USB_DEVICE_VENDOR_SPEC(0x1235, 0x0001),
2718         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2719                 .vendor_name = "Novation",
2720                 .product_name = "ReMOTE Audio/XStation",
2721                 .ifnum = 4,
2722                 .type = QUIRK_MIDI_NOVATION
2723         }
2724 },
2725 {
2726         USB_DEVICE_VENDOR_SPEC(0x1235, 0x0002),
2727         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2728                 .vendor_name = "Novation",
2729                 .product_name = "Speedio",
2730                 .ifnum = 3,
2731                 .type = QUIRK_MIDI_NOVATION
2732         }
2733 },
2734 {
2735         USB_DEVICE(0x1235, 0x000a),
2736         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2737                 /* .vendor_name = "Novation", */
2738                 /* .product_name = "Nocturn", */
2739                 .ifnum = 0,
2740                 .type = QUIRK_MIDI_RAW_BYTES
2741         }
2742 },
2743 {
2744         USB_DEVICE(0x1235, 0x000e),
2745         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2746                 /* .vendor_name = "Novation", */
2747                 /* .product_name = "Launchpad", */
2748                 .ifnum = 0,
2749                 .type = QUIRK_MIDI_RAW_BYTES
2750         }
2751 },
2752 {
2753         USB_DEVICE(0x1235, 0x0010),
2754         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2755                 .vendor_name = "Focusrite",
2756                 .product_name = "Saffire 6 USB",
2757                 .ifnum = QUIRK_ANY_INTERFACE,
2758                 .type = QUIRK_COMPOSITE,
2759                 .data = (const struct snd_usb_audio_quirk[]) {
2760                         {
2761                                 .ifnum = 0,
2762                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
2763                         },
2764                         {
2765                                 .ifnum = 0,
2766                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2767                                 .data = &(const struct audioformat) {
2768                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2769                                         .channels = 4,
2770                                         .iface = 0,
2771                                         .altsetting = 1,
2772                                         .altset_idx = 1,
2773                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2774                                         .endpoint = 0x01,
2775                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
2776                                         .datainterval = 1,
2777                                         .maxpacksize = 0x024c,
2778                                         .rates = SNDRV_PCM_RATE_44100 |
2779                                                  SNDRV_PCM_RATE_48000,
2780                                         .rate_min = 44100,
2781                                         .rate_max = 48000,
2782                                         .nr_rates = 2,
2783                                         .rate_table = (unsigned int[]) {
2784                                                 44100, 48000
2785                                         }
2786                                 }
2787                         },
2788                         {
2789                                 .ifnum = 0,
2790                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2791                                 .data = &(const struct audioformat) {
2792                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2793                                         .channels = 2,
2794                                         .iface = 0,
2795                                         .altsetting = 1,
2796                                         .altset_idx = 1,
2797                                         .attributes = 0,
2798                                         .endpoint = 0x82,
2799                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
2800                                         .datainterval = 1,
2801                                         .maxpacksize = 0x0126,
2802                                         .rates = SNDRV_PCM_RATE_44100 |
2803                                                  SNDRV_PCM_RATE_48000,
2804                                         .rate_min = 44100,
2805                                         .rate_max = 48000,
2806                                         .nr_rates = 2,
2807                                         .rate_table = (unsigned int[]) {
2808                                                 44100, 48000
2809                                         }
2810                                 }
2811                         },
2812                         {
2813                                 .ifnum = 1,
2814                                 .type = QUIRK_MIDI_RAW_BYTES
2815                         },
2816                         {
2817                                 .ifnum = -1
2818                         }
2819                 }
2820         }
2821 },
2822 {
2823         USB_DEVICE(0x1235, 0x0018),
2824         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2825                 .vendor_name = "Novation",
2826                 .product_name = "Twitch",
2827                 .ifnum = QUIRK_ANY_INTERFACE,
2828                 .type = QUIRK_COMPOSITE,
2829                 .data = (const struct snd_usb_audio_quirk[]) {
2830                         {
2831                                 .ifnum = 0,
2832                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2833                                 .data = & (const struct audioformat) {
2834                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2835                                         .channels = 4,
2836                                         .iface = 0,
2837                                         .altsetting = 1,
2838                                         .altset_idx = 1,
2839                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
2840                                         .endpoint = 0x01,
2841                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
2842                                         .rates = SNDRV_PCM_RATE_44100 |
2843                                                  SNDRV_PCM_RATE_48000,
2844                                         .rate_min = 44100,
2845                                         .rate_max = 48000,
2846                                         .nr_rates = 2,
2847                                         .rate_table = (unsigned int[]) {
2848                                                 44100, 48000
2849                                         }
2850                                 }
2851                         },
2852                         {
2853                                 .ifnum = 1,
2854                                 .type = QUIRK_MIDI_RAW_BYTES
2855                         },
2856                         {
2857                                 .ifnum = -1
2858                         }
2859                 }
2860         }
2861 },
2862 {
2863         USB_DEVICE_VENDOR_SPEC(0x1235, 0x4661),
2864         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2865                 .vendor_name = "Novation",
2866                 .product_name = "ReMOTE25",
2867                 .ifnum = 0,
2868                 .type = QUIRK_MIDI_NOVATION
2869         }
2870 },
2871
2872 /* Access Music devices */
2873 {
2874         /* VirusTI Desktop */
2875         USB_DEVICE_VENDOR_SPEC(0x133e, 0x0815),
2876         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2877                 .ifnum = QUIRK_ANY_INTERFACE,
2878                 .type = QUIRK_COMPOSITE,
2879                 .data = &(const struct snd_usb_audio_quirk[]) {
2880                         {
2881                                 .ifnum = 3,
2882                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
2883                                 .data = &(const struct snd_usb_midi_endpoint_info) {
2884                                         .out_cables = 0x0003,
2885                                         .in_cables  = 0x0003
2886                                 }
2887                         },
2888                         {
2889                                 .ifnum = 4,
2890                                 .type = QUIRK_IGNORE_INTERFACE
2891                         },
2892                         {
2893                                 .ifnum = -1
2894                         }
2895                 }
2896         }
2897 },
2898
2899 /* */
2900 {
2901         /* aka. Serato Scratch Live DJ Box */
2902         USB_DEVICE(0x13e5, 0x0001),
2903         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2904                 .vendor_name = "Rane",
2905                 .product_name = "SL-1",
2906                 .ifnum = QUIRK_NO_INTERFACE
2907         }
2908 },
2909
2910 /* Native Instruments MK2 series */
2911 {
2912         /* Komplete Audio 6 */
2913         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2914         .idVendor = 0x17cc,
2915         .idProduct = 0x1000,
2916 },
2917 {
2918         /* Traktor Audio 6 */
2919         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2920         .idVendor = 0x17cc,
2921         .idProduct = 0x1010,
2922 },
2923 {
2924         /* Traktor Audio 10 */
2925         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
2926         .idVendor = 0x17cc,
2927         .idProduct = 0x1020,
2928 },
2929
2930 /* QinHeng devices */
2931 {
2932         USB_DEVICE(0x1a86, 0x752d),
2933         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
2934                 .vendor_name = "QinHeng",
2935                 .product_name = "CH345",
2936                 .ifnum = 1,
2937                 .type = QUIRK_MIDI_CH345
2938         }
2939 },
2940
2941 /* KeithMcMillen Stringport */
2942 {
2943         USB_DEVICE(0x1f38, 0x0001),
2944         .bInterfaceClass = USB_CLASS_AUDIO,
2945 },
2946
2947 /* Miditech devices */
2948 {
2949         USB_DEVICE(0x4752, 0x0011),
2950         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2951                 .vendor_name = "Miditech",
2952                 .product_name = "Midistart-2",
2953                 .ifnum = 0,
2954                 .type = QUIRK_MIDI_CME
2955         }
2956 },
2957
2958 /* Central Music devices */
2959 {
2960         /* this ID used by both Miditech MidiStudio-2 and CME UF-x */
2961         USB_DEVICE(0x7104, 0x2202),
2962         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2963                 .ifnum = 0,
2964                 .type = QUIRK_MIDI_CME
2965         }
2966 },
2967
2968 /*
2969  * Auvitek au0828 devices with audio interface.
2970  * This should be kept in sync with drivers/media/usb/au0828/au0828-cards.c
2971  * Please notice that some drivers are DVB only, and don't need to be
2972  * here. That's the case, for example, of DVICO_FUSIONHDTV7.
2973  */
2974
2975 #define AU0828_DEVICE(vid, pid, vname, pname) { \
2976         .idVendor = vid, \
2977         .idProduct = pid, \
2978         .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
2979                        USB_DEVICE_ID_MATCH_INT_CLASS | \
2980                        USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
2981         .bInterfaceClass = USB_CLASS_AUDIO, \
2982         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, \
2983         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { \
2984                 .vendor_name = vname, \
2985                 .product_name = pname, \
2986                 .ifnum = QUIRK_ANY_INTERFACE, \
2987                 .type = QUIRK_AUDIO_ALIGN_TRANSFER, \
2988                 .shares_media_device = 1, \
2989         } \
2990 }
2991
2992 AU0828_DEVICE(0x2040, 0x7200, "Hauppauge", "HVR-950Q"),
2993 AU0828_DEVICE(0x2040, 0x7240, "Hauppauge", "HVR-850"),
2994 AU0828_DEVICE(0x2040, 0x7210, "Hauppauge", "HVR-950Q"),
2995 AU0828_DEVICE(0x2040, 0x7217, "Hauppauge", "HVR-950Q"),
2996 AU0828_DEVICE(0x2040, 0x721b, "Hauppauge", "HVR-950Q"),
2997 AU0828_DEVICE(0x2040, 0x721e, "Hauppauge", "HVR-950Q"),
2998 AU0828_DEVICE(0x2040, 0x721f, "Hauppauge", "HVR-950Q"),
2999 AU0828_DEVICE(0x2040, 0x7280, "Hauppauge", "HVR-950Q"),
3000 AU0828_DEVICE(0x0fd9, 0x0008, "Hauppauge", "HVR-950Q"),
3001 AU0828_DEVICE(0x2040, 0x7201, "Hauppauge", "HVR-950Q-MXL"),
3002 AU0828_DEVICE(0x2040, 0x7211, "Hauppauge", "HVR-950Q-MXL"),
3003 AU0828_DEVICE(0x2040, 0x7281, "Hauppauge", "HVR-950Q-MXL"),
3004 AU0828_DEVICE(0x05e1, 0x0480, "Hauppauge", "Woodbury"),
3005 AU0828_DEVICE(0x2040, 0x8200, "Hauppauge", "Woodbury"),
3006 AU0828_DEVICE(0x2040, 0x7260, "Hauppauge", "HVR-950Q"),
3007 AU0828_DEVICE(0x2040, 0x7213, "Hauppauge", "HVR-950Q"),
3008 AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
3009
3010 /* Syntek STK1160 */
3011 {
3012         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
3013                        USB_DEVICE_ID_MATCH_INT_CLASS |
3014                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3015         .idVendor = 0x05e1,
3016         .idProduct = 0x0408,
3017         .bInterfaceClass = USB_CLASS_AUDIO,
3018         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
3019         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3020                 .vendor_name = "Syntek",
3021                 .product_name = "STK1160",
3022                 .ifnum = QUIRK_ANY_INTERFACE,
3023                 .type = QUIRK_AUDIO_ALIGN_TRANSFER
3024         }
3025 },
3026
3027 /* Digidesign Mbox */
3028 {
3029         /* Thanks to Clemens Ladisch <clemens@ladisch.de> */
3030         USB_DEVICE(0x0dba, 0x1000),
3031         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3032                 .vendor_name = "Digidesign",
3033                 .product_name = "MBox",
3034                 .ifnum = QUIRK_ANY_INTERFACE,
3035                 .type = QUIRK_COMPOSITE,
3036                 .data = (const struct snd_usb_audio_quirk[]){
3037                         {
3038                                 .ifnum = 0,
3039                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3040                         },
3041                         {
3042                                 .ifnum = 1,
3043                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3044                                 .data = &(const struct audioformat) {
3045                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3046                                         .channels = 2,
3047                                         .iface = 1,
3048                                         .altsetting = 1,
3049                                         .altset_idx = 1,
3050                                         .attributes = 0x4,
3051                                         .endpoint = 0x02,
3052                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
3053                                                 USB_ENDPOINT_SYNC_SYNC,
3054                                         .maxpacksize = 0x130,
3055                                         .rates = SNDRV_PCM_RATE_48000,
3056                                         .rate_min = 48000,
3057                                         .rate_max = 48000,
3058                                         .nr_rates = 1,
3059                                         .rate_table = (unsigned int[]) {
3060                                                 48000
3061                                         }
3062                                 }
3063                         },
3064                         {
3065                                 .ifnum = 1,
3066                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3067                                 .data = &(const struct audioformat) {
3068                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3069                                         .channels = 2,
3070                                         .iface = 1,
3071                                         .altsetting = 1,
3072                                         .altset_idx = 1,
3073                                         .attributes = 0x4,
3074                                         .endpoint = 0x81,
3075                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
3076                                                 USB_ENDPOINT_SYNC_ASYNC,
3077                                         .maxpacksize = 0x130,
3078                                         .rates = SNDRV_PCM_RATE_48000,
3079                                         .rate_min = 48000,
3080                                         .rate_max = 48000,
3081                                         .nr_rates = 1,
3082                                         .rate_table = (unsigned int[]) {
3083                                                 48000
3084                                         }
3085                                 }
3086                         },
3087                         {
3088                                 .ifnum = -1
3089                         }
3090                 }
3091         }
3092 },
3093
3094 /* DIGIDESIGN MBOX 2 */
3095 {
3096         USB_DEVICE(0x0dba, 0x3000),
3097         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3098                 .vendor_name = "Digidesign",
3099                 .product_name = "Mbox 2",
3100                 .ifnum = QUIRK_ANY_INTERFACE,
3101                 .type = QUIRK_COMPOSITE,
3102                 .data = (const struct snd_usb_audio_quirk[]) {
3103                         {
3104                                 .ifnum = 0,
3105                                 .type = QUIRK_IGNORE_INTERFACE
3106                         },
3107                         {
3108                                 .ifnum = 1,
3109                                 .type = QUIRK_IGNORE_INTERFACE
3110                         },
3111                         {
3112                                 .ifnum = 2,
3113                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3114                                 .data = &(const struct audioformat) {
3115                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3116                                         .channels = 2,
3117                                         .iface = 2,
3118                                         .altsetting = 2,
3119                                         .altset_idx = 1,
3120                                         .attributes = 0x00,
3121                                         .endpoint = 0x03,
3122                                         .ep_attr = USB_ENDPOINT_SYNC_ASYNC,
3123                                         .rates = SNDRV_PCM_RATE_48000,
3124                                         .rate_min = 48000,
3125                                         .rate_max = 48000,
3126                                         .nr_rates = 1,
3127                                         .rate_table = (unsigned int[]) {
3128                                                 48000
3129                                         }
3130                                 }
3131                         },
3132                         {
3133                                 .ifnum = 3,
3134                                 .type = QUIRK_IGNORE_INTERFACE
3135                         },
3136                         {
3137                                 .ifnum = 4,
3138                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3139                                 .data = &(const struct audioformat) {
3140                                 .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3141                                         .channels = 2,
3142                                         .iface = 4,
3143                                         .altsetting = 2,
3144                                         .altset_idx = 1,
3145                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3146                                         .endpoint = 0x85,
3147                                         .ep_attr = USB_ENDPOINT_SYNC_SYNC,
3148                                         .rates = SNDRV_PCM_RATE_48000,
3149                                         .rate_min = 48000,
3150                                         .rate_max = 48000,
3151                                         .nr_rates = 1,
3152                                         .rate_table = (unsigned int[]) {
3153                                                 48000
3154                                         }
3155                                 }
3156                         },
3157                         {
3158                                 .ifnum = 5,
3159                                 .type = QUIRK_IGNORE_INTERFACE
3160                         },
3161                         {
3162                                 .ifnum = 6,
3163                                 .type = QUIRK_MIDI_MIDIMAN,
3164                                 .data = &(const struct snd_usb_midi_endpoint_info) {
3165                                         .out_ep =  0x02,
3166                                         .out_cables = 0x0001,
3167                                         .in_ep = 0x81,
3168                                         .in_interval = 0x01,
3169                                         .in_cables = 0x0001
3170                                 }
3171                         },
3172                         {
3173                                 .ifnum = -1
3174                         }
3175                 }
3176         }
3177 },
3178 {
3179         /* Tascam US122 MKII - playback-only support */
3180         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
3181         .idVendor = 0x0644,
3182         .idProduct = 0x8021,
3183         .bInterfaceClass = USB_CLASS_AUDIO,
3184         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3185                 .vendor_name = "TASCAM",
3186                 .product_name = "US122 MKII",
3187                 .ifnum = QUIRK_ANY_INTERFACE,
3188                 .type = QUIRK_COMPOSITE,
3189                 .data = (const struct snd_usb_audio_quirk[]) {
3190                         {
3191                                 .ifnum = 0,
3192                                 .type = QUIRK_IGNORE_INTERFACE
3193                         },
3194                         {
3195                                 .ifnum = 1,
3196                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3197                                 .data = &(const struct audioformat) {
3198                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3199                                         .channels = 2,
3200                                         .iface = 1,
3201                                         .altsetting = 1,
3202                                         .altset_idx = 1,
3203                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3204                                         .endpoint = 0x02,
3205                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
3206                                         .rates = SNDRV_PCM_RATE_44100 |
3207                                                  SNDRV_PCM_RATE_48000 |
3208                                                  SNDRV_PCM_RATE_88200 |
3209                                                  SNDRV_PCM_RATE_96000,
3210                                         .rate_min = 44100,
3211                                         .rate_max = 96000,
3212                                         .nr_rates = 4,
3213                                         .rate_table = (unsigned int[]) {
3214                                                 44100, 48000, 88200, 96000
3215                                         }
3216                                 }
3217                         },
3218                         {
3219                                 .ifnum = -1
3220                         }
3221                 }
3222         }
3223 },
3224
3225 /* Microsoft XboxLive Headset/Xbox Communicator */
3226 {
3227         USB_DEVICE(0x045e, 0x0283),
3228         .bInterfaceClass = USB_CLASS_PER_INTERFACE,
3229         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3230                 .vendor_name = "Microsoft",
3231                 .product_name = "XboxLive Headset/Xbox Communicator",
3232                 .ifnum = QUIRK_ANY_INTERFACE,
3233                 .type = QUIRK_COMPOSITE,
3234                 .data = &(const struct snd_usb_audio_quirk[]) {
3235                         {
3236                                 /* playback */
3237                                 .ifnum = 0,
3238                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3239                                 .data = &(const struct audioformat) {
3240                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3241                                         .channels = 1,
3242                                         .iface = 0,
3243                                         .altsetting = 0,
3244                                         .altset_idx = 0,
3245                                         .attributes = 0,
3246                                         .endpoint = 0x04,
3247                                         .ep_attr = 0x05,
3248                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
3249                                         .rate_min = 22050,
3250                                         .rate_max = 22050
3251                                 }
3252                         },
3253                         {
3254                                 /* capture */
3255                                 .ifnum = 1,
3256                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3257                                 .data = &(const struct audioformat) {
3258                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3259                                         .channels = 1,
3260                                         .iface = 1,
3261                                         .altsetting = 0,
3262                                         .altset_idx = 0,
3263                                         .attributes = 0,
3264                                         .endpoint = 0x85,
3265                                         .ep_attr = 0x05,
3266                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
3267                                         .rate_min = 16000,
3268                                         .rate_max = 16000
3269                                 }
3270                         },
3271                         {
3272                                 .ifnum = -1
3273                         }
3274                 }
3275         }
3276 },
3277
3278 /* Reloop Play */
3279 {
3280         USB_DEVICE(0x200c, 0x100b),
3281         .bInterfaceClass = USB_CLASS_PER_INTERFACE,
3282         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3283                 .ifnum = QUIRK_ANY_INTERFACE,
3284                 .type = QUIRK_COMPOSITE,
3285                 .data = &(const struct snd_usb_audio_quirk[]) {
3286                         {
3287                                 .ifnum = 0,
3288                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3289                         },
3290                         {
3291                                 .ifnum = 1,
3292                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3293                                 .data = &(const struct audioformat) {
3294                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3295                                         .channels = 4,
3296                                         .iface = 1,
3297                                         .altsetting = 1,
3298                                         .altset_idx = 1,
3299                                         .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
3300                                         .endpoint = 0x01,
3301                                         .ep_attr = USB_ENDPOINT_SYNC_ADAPTIVE,
3302                                         .rates = SNDRV_PCM_RATE_44100 |
3303                                                  SNDRV_PCM_RATE_48000,
3304                                         .rate_min = 44100,
3305                                         .rate_max = 48000,
3306                                         .nr_rates = 2,
3307                                         .rate_table = (unsigned int[]) {
3308                                                 44100, 48000
3309                                         }
3310                                 }
3311                         },
3312                         {
3313                                 .ifnum = -1
3314                         }
3315                 }
3316         }
3317 },
3318
3319 {
3320         /*
3321          * ZOOM R16/24 in audio interface mode.
3322          * Playback requires an extra four byte LE length indicator
3323          * at the start of each isochronous packet. This quirk is
3324          * enabled in create_standard_audio_quirk().
3325          */
3326         USB_DEVICE(0x1686, 0x00dd),
3327         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3328                 .ifnum = QUIRK_ANY_INTERFACE,
3329                 .type = QUIRK_COMPOSITE,
3330                 .data = (const struct snd_usb_audio_quirk[]) {
3331                         {
3332                                 /* Playback  */
3333                                 .ifnum = 1,
3334                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE,
3335                         },
3336                         {
3337                                 /* Capture */
3338                                 .ifnum = 2,
3339                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE,
3340                         },
3341                         {
3342                                 /* Midi */
3343                                 .ifnum = 3,
3344                                 .type = QUIRK_MIDI_STANDARD_INTERFACE
3345                         },
3346                         {
3347                                 .ifnum = -1
3348                         },
3349                 }
3350         }
3351 },
3352
3353 {
3354         /*
3355          * Some USB MIDI devices don't have an audio control interface,
3356          * so we have to grab MIDI streaming interfaces here.
3357          */
3358         .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
3359                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3360         .bInterfaceClass = USB_CLASS_AUDIO,
3361         .bInterfaceSubClass = USB_SUBCLASS_MIDISTREAMING,
3362         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3363                 .ifnum = QUIRK_ANY_INTERFACE,
3364                 .type = QUIRK_MIDI_STANDARD_INTERFACE
3365         }
3366 },
3367
3368 {
3369         /*
3370          * The original product_name is "USB Sound Device", however this name
3371          * is also used by the CM106 based cards, so make it unique.
3372          */
3373         USB_DEVICE(0x0d8c, 0x0103),
3374         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3375                 .product_name = "Audio Advantage MicroII",
3376                 .ifnum = QUIRK_NO_INTERFACE
3377         }
3378 },
3379
3380 /* disabled due to regression for other devices;
3381  * see https://bugzilla.kernel.org/show_bug.cgi?id=199905
3382  */
3383 #if 0
3384 {
3385         /*
3386          * Nura's first gen headphones use Cambridge Silicon Radio's vendor
3387          * ID, but it looks like the product ID actually is only for Nura.
3388          * The capture interface does not work at all (even on Windows),
3389          * and only the 48 kHz sample rate works for the playback interface.
3390          */
3391         USB_DEVICE(0x0a12, 0x1243),
3392         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3393                 .ifnum = QUIRK_ANY_INTERFACE,
3394                 .type = QUIRK_COMPOSITE,
3395                 .data = (const struct snd_usb_audio_quirk[]) {
3396                         {
3397                                 .ifnum = 0,
3398                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3399                         },
3400                         /* Capture */
3401                         {
3402                                 .ifnum = 1,
3403                                 .type = QUIRK_IGNORE_INTERFACE,
3404                         },
3405                         /* Playback */
3406                         {
3407                                 .ifnum = 2,
3408                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3409                                 .data = &(const struct audioformat) {
3410                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3411                                         .channels = 2,
3412                                         .iface = 2,
3413                                         .altsetting = 1,
3414                                         .altset_idx = 1,
3415                                         .attributes = UAC_EP_CS_ATTR_FILL_MAX |
3416                                                 UAC_EP_CS_ATTR_SAMPLE_RATE,
3417                                         .endpoint = 0x03,
3418                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
3419                                         .rates = SNDRV_PCM_RATE_48000,
3420                                         .rate_min = 48000,
3421                                         .rate_max = 48000,
3422                                         .nr_rates = 1,
3423                                         .rate_table = (unsigned int[]) {
3424                                                 48000
3425                                         }
3426                                 }
3427                         },
3428                         {
3429                                 .ifnum = -1
3430                         },
3431                 }
3432         }
3433 },
3434 #endif /* disabled */
3435
3436 {
3437         /*
3438          * Bower's & Wilkins PX headphones only support the 48 kHz sample rate
3439          * even though it advertises more. The capture interface doesn't work
3440          * even on windows.
3441          */
3442         USB_DEVICE(0x19b5, 0x0021),
3443         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3444                 .ifnum = QUIRK_ANY_INTERFACE,
3445                 .type = QUIRK_COMPOSITE,
3446                 .data = (const struct snd_usb_audio_quirk[]) {
3447                         {
3448                                 .ifnum = 0,
3449                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3450                         },
3451                         /* Playback */
3452                         {
3453                                 .ifnum = 1,
3454                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3455                                 .data = &(const struct audioformat) {
3456                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3457                                         .channels = 2,
3458                                         .iface = 1,
3459                                         .altsetting = 1,
3460                                         .altset_idx = 1,
3461                                         .attributes = UAC_EP_CS_ATTR_FILL_MAX |
3462                                                 UAC_EP_CS_ATTR_SAMPLE_RATE,
3463                                         .endpoint = 0x03,
3464                                         .ep_attr = USB_ENDPOINT_XFER_ISOC,
3465                                         .rates = SNDRV_PCM_RATE_48000,
3466                                         .rate_min = 48000,
3467                                         .rate_max = 48000,
3468                                         .nr_rates = 1,
3469                                         .rate_table = (unsigned int[]) {
3470                                                 48000
3471                                         }
3472                                 }
3473                         },
3474                         {
3475                                 .ifnum = -1
3476                         },
3477                 }
3478         }
3479 },
3480 /* Dell WD15 Dock */
3481 {
3482         USB_DEVICE(0x0bda, 0x4014),
3483         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3484                 .vendor_name = "Dell",
3485                 .product_name = "WD15 Dock",
3486                 .profile_name = "Dell-WD15-Dock",
3487                 .ifnum = QUIRK_NO_INTERFACE
3488         }
3489 },
3490 /* Dell WD19 Dock */
3491 {
3492         USB_DEVICE(0x0bda, 0x402e),
3493         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3494                 .vendor_name = "Dell",
3495                 .product_name = "WD19 Dock",
3496                 .profile_name = "Dell-WD15-Dock",
3497                 .ifnum = QUIRK_ANY_INTERFACE,
3498                 .type = QUIRK_SETUP_FMT_AFTER_RESUME
3499         }
3500 },
3501 /* MOTU Microbook II */
3502 {
3503         USB_DEVICE_VENDOR_SPEC(0x07fd, 0x0004),
3504         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3505                 .vendor_name = "MOTU",
3506                 .product_name = "MicroBookII",
3507                 .ifnum = QUIRK_ANY_INTERFACE,
3508                 .type = QUIRK_COMPOSITE,
3509                 .data = (const struct snd_usb_audio_quirk[]) {
3510                         {
3511                                 .ifnum = 0,
3512                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3513                         },
3514                         {
3515                                 .ifnum = 0,
3516                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3517                                 .data = &(const struct audioformat) {
3518                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3519                                         .channels = 6,
3520                                         .iface = 0,
3521                                         .altsetting = 1,
3522                                         .altset_idx = 1,
3523                                         .attributes = 0,
3524                                         .endpoint = 0x84,
3525                                         .rates = SNDRV_PCM_RATE_96000,
3526                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
3527                                                    USB_ENDPOINT_SYNC_ASYNC,
3528                                         .rate_min = 96000,
3529                                         .rate_max = 96000,
3530                                         .nr_rates = 1,
3531                                         .maxpacksize = 0x00d8,
3532                                         .rate_table = (unsigned int[]) {
3533                                                 96000
3534                                         }
3535                                 }
3536                         },
3537                         {
3538                                 .ifnum = 0,
3539                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3540                                 .data = &(const struct audioformat) {
3541                                         .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3542                                         .channels = 8,
3543                                         .iface = 0,
3544                                         .altsetting = 1,
3545                                         .altset_idx = 1,
3546                                         .attributes = 0,
3547                                         .endpoint = 0x03,
3548                                         .rates = SNDRV_PCM_RATE_96000,
3549                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
3550                                                    USB_ENDPOINT_SYNC_ASYNC,
3551                                         .rate_min = 96000,
3552                                         .rate_max = 96000,
3553                                         .nr_rates = 1,
3554                                         .maxpacksize = 0x0120,
3555                                         .rate_table = (unsigned int[]) {
3556                                                 96000
3557                                         }
3558                                 }
3559                         },
3560                         {
3561                                 .ifnum = -1
3562                         }
3563                 }
3564         }
3565 },
3566 {
3567         /*
3568          * PIONEER DJ DDJ-SX3
3569          * PCM is 12 channels out, 10 channels in @ 44.1 fixed
3570          * interface 0, vendor class alt setting 1 for endpoints 5 and 0x86
3571          * The feedback for the output is the input.
3572          */
3573         USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0023),
3574         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3575                 .ifnum = QUIRK_ANY_INTERFACE,
3576                 .type = QUIRK_COMPOSITE,
3577                 .data = (const struct snd_usb_audio_quirk[]) {
3578                         {
3579                                 .ifnum = 0,
3580                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3581                                 .data = &(const struct audioformat) {
3582                                         .formats = SNDRV_PCM_FMTBIT_S32_LE,
3583                                         .channels = 12,
3584                                         .iface = 0,
3585                                         .altsetting = 1,
3586                                         .altset_idx = 1,
3587                                         .endpoint = 0x05,
3588                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3589                                                    USB_ENDPOINT_SYNC_ASYNC,
3590                                         .rates = SNDRV_PCM_RATE_44100,
3591                                         .rate_min = 44100,
3592                                         .rate_max = 44100,
3593                                         .nr_rates = 1,
3594                                         .rate_table = (unsigned int[]) { 44100 }
3595                                 }
3596                         },
3597                         {
3598                                 .ifnum = 0,
3599                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3600                                 .data = &(const struct audioformat) {
3601                                         .formats = SNDRV_PCM_FMTBIT_S32_LE,
3602                                         .channels = 10,
3603                                         .iface = 0,
3604                                         .altsetting = 1,
3605                                         .altset_idx = 1,
3606                                         .endpoint = 0x86,
3607                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3608                                                  USB_ENDPOINT_SYNC_ASYNC|
3609                                                  USB_ENDPOINT_USAGE_IMPLICIT_FB,
3610                                         .rates = SNDRV_PCM_RATE_44100,
3611                                         .rate_min = 44100,
3612                                         .rate_max = 44100,
3613                                         .nr_rates = 1,
3614                                         .rate_table = (unsigned int[]) { 44100 }
3615                                 }
3616                         },
3617                         {
3618                                 .ifnum = -1
3619                         }
3620                 }
3621         }
3622 },
3623 {
3624         /*
3625          * Pioneer DJ DJM-250MK2
3626          * PCM is 8 channels out @ 48 fixed (endpoints 0x01).
3627          * The output from computer to the mixer is usable.
3628          *
3629          * The input (phono or line to computer) is not working.
3630          * It should be at endpoint 0x82 and probably also 8 channels,
3631          * but it seems that it works only with Pioneer proprietary software.
3632          * Even on officially supported OS, the Audacity was unable to record
3633          * and Mixxx to recognize the control vinyls.
3634          */
3635         USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0017),
3636         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3637                 .ifnum = QUIRK_ANY_INTERFACE,
3638                 .type = QUIRK_COMPOSITE,
3639                 .data = (const struct snd_usb_audio_quirk[]) {
3640                         {
3641                                 .ifnum = 0,
3642                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3643                                 .data = &(const struct audioformat) {
3644                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3645                                         .channels = 8, // outputs
3646                                         .iface = 0,
3647                                         .altsetting = 1,
3648                                         .altset_idx = 1,
3649                                         .endpoint = 0x01,
3650                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3651                                                 USB_ENDPOINT_SYNC_ASYNC,
3652                                         .rates = SNDRV_PCM_RATE_48000,
3653                                         .rate_min = 48000,
3654                                         .rate_max = 48000,
3655                                         .nr_rates = 1,
3656                                         .rate_table = (unsigned int[]) { 48000 }
3657                                 }
3658                         },
3659                         {
3660                                 .ifnum = -1
3661                         }
3662                 }
3663         }
3664 },
3665 {
3666         /*
3667          * PIONEER DJ DDJ-RB
3668          * PCM is 4 channels out, 2 dummy channels in @ 44.1 fixed
3669          * The feedback for the output is the dummy input.
3670          */
3671         USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000e),
3672         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3673                 .ifnum = QUIRK_ANY_INTERFACE,
3674                 .type = QUIRK_COMPOSITE,
3675                 .data = (const struct snd_usb_audio_quirk[]) {
3676                         {
3677                                 .ifnum = 0,
3678                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3679                                 .data = &(const struct audioformat) {
3680                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3681                                         .channels = 4,
3682                                         .iface = 0,
3683                                         .altsetting = 1,
3684                                         .altset_idx = 1,
3685                                         .endpoint = 0x01,
3686                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3687                                                    USB_ENDPOINT_SYNC_ASYNC,
3688                                         .rates = SNDRV_PCM_RATE_44100,
3689                                         .rate_min = 44100,
3690                                         .rate_max = 44100,
3691                                         .nr_rates = 1,
3692                                         .rate_table = (unsigned int[]) { 44100 }
3693                                 }
3694                         },
3695                         {
3696                                 .ifnum = 0,
3697                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3698                                 .data = &(const struct audioformat) {
3699                                         .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3700                                         .channels = 2,
3701                                         .iface = 0,
3702                                         .altsetting = 1,
3703                                         .altset_idx = 1,
3704                                         .endpoint = 0x82,
3705                                         .ep_attr = USB_ENDPOINT_XFER_ISOC|
3706                                                  USB_ENDPOINT_SYNC_ASYNC|
3707                                                  USB_ENDPOINT_USAGE_IMPLICIT_FB,
3708                                         .rates = SNDRV_PCM_RATE_44100,
3709                                         .rate_min = 44100,
3710                                         .rate_max = 44100,
3711                                         .nr_rates = 1,
3712                                         .rate_table = (unsigned int[]) { 44100 }
3713                                 }
3714                         },
3715                         {
3716                                 .ifnum = -1
3717                         }
3718                 }
3719         }
3720 },
3721
3722 #define ALC1220_VB_DESKTOP(vend, prod) { \
3723         USB_DEVICE(vend, prod), \
3724         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
3725                 .vendor_name = "Realtek", \
3726                 .product_name = "ALC1220-VB-DT", \
3727                 .profile_name = "Realtek-ALC1220-VB-Desktop", \
3728                 .ifnum = QUIRK_NO_INTERFACE \
3729         } \
3730 }
3731 ALC1220_VB_DESKTOP(0x0414, 0xa002), /* Gigabyte TRX40 Aorus Pro WiFi */
3732 ALC1220_VB_DESKTOP(0x0db0, 0x0d64), /* MSI TRX40 Creator */
3733 ALC1220_VB_DESKTOP(0x0db0, 0x543d), /* MSI TRX40 */
3734 ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */
3735 #undef ALC1220_VB_DESKTOP
3736
3737 /* Two entries for Gigabyte TRX40 Aorus Master:
3738  * TRX40 Aorus Master has two USB-audio devices, one for the front headphone
3739  * with ESS SABRE9218 DAC chip, while another for the rest I/O (the rear
3740  * panel and the front mic) with Realtek ALC1220-VB.
3741  * Here we provide two distinct names for making UCM profiles easier.
3742  */
3743 {
3744         USB_DEVICE(0x0414, 0xa000),
3745         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3746                 .vendor_name = "Gigabyte",
3747                 .product_name = "Aorus Master Front Headphone",
3748                 .profile_name = "Gigabyte-Aorus-Master-Front-Headphone",
3749                 .ifnum = QUIRK_NO_INTERFACE
3750         }
3751 },
3752 {
3753         USB_DEVICE(0x0414, 0xa001),
3754         .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3755                 .vendor_name = "Gigabyte",
3756                 .product_name = "Aorus Master Main Audio",
3757                 .profile_name = "Gigabyte-Aorus-Master-Main-Audio",
3758                 .ifnum = QUIRK_NO_INTERFACE
3759         }
3760 },
3761
3762 /*
3763  * MacroSilicon MS2109 based HDMI capture cards
3764  *
3765  * These claim 96kHz 1ch in the descriptors, but are actually 48kHz 2ch.
3766  * They also need QUIRK_AUDIO_ALIGN_TRANSFER, which makes one wonder if
3767  * they pretend to be 96kHz mono as a workaround for stereo being broken
3768  * by that...
3769  *
3770  * They also have an issue with initial stream alignment that causes the
3771  * channels to be swapped and out of phase, which is dealt with in quirks.c.
3772  */
3773 {
3774         .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
3775                        USB_DEVICE_ID_MATCH_INT_CLASS |
3776                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3777         .idVendor = 0x534d,
3778         .idProduct = 0x2109,
3779         .bInterfaceClass = USB_CLASS_AUDIO,
3780         .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
3781         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3782                 .vendor_name = "MacroSilicon",
3783                 .product_name = "MS2109",
3784                 .ifnum = QUIRK_ANY_INTERFACE,
3785                 .type = QUIRK_COMPOSITE,
3786                 .data = &(const struct snd_usb_audio_quirk[]) {
3787                         {
3788                                 .ifnum = 2,
3789                                 .type = QUIRK_AUDIO_ALIGN_TRANSFER,
3790                         },
3791                         {
3792                                 .ifnum = 2,
3793                                 .type = QUIRK_AUDIO_STANDARD_MIXER,
3794                         },
3795                         {
3796                                 .ifnum = 3,
3797                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3798                                 .data = &(const struct audioformat) {
3799                                         .formats = SNDRV_PCM_FMTBIT_S16_LE,
3800                                         .channels = 2,
3801                                         .iface = 3,
3802                                         .altsetting = 1,
3803                                         .altset_idx = 1,
3804                                         .attributes = 0,
3805                                         .endpoint = 0x82,
3806                                         .ep_attr = USB_ENDPOINT_XFER_ISOC |
3807                                                 USB_ENDPOINT_SYNC_ASYNC,
3808                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
3809                                         .rate_min = 48000,
3810                                         .rate_max = 48000,
3811                                 }
3812                         },
3813                         {
3814                                 .ifnum = -1
3815                         }
3816                 }
3817         }
3818 },
3819 {
3820         /*
3821          * Sennheiser GSP670
3822          * Change order of interfaces loaded
3823          */
3824         USB_DEVICE(0x1395, 0x0300),
3825         .bInterfaceClass = USB_CLASS_PER_INTERFACE,
3826         .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3827                 .ifnum = QUIRK_ANY_INTERFACE,
3828                 .type = QUIRK_COMPOSITE,
3829                 .data = &(const struct snd_usb_audio_quirk[]) {
3830                         // Communication
3831                         {
3832                                 .ifnum = 3,
3833                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
3834                         },
3835                         // Recording
3836                         {
3837                                 .ifnum = 4,
3838                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
3839                         },
3840                         // Main
3841                         {
3842                                 .ifnum = 1,
3843                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
3844                         },
3845                         {
3846                                 .ifnum = -1
3847                         }
3848                 }
3849         }
3850 },
3851
3852 #undef USB_DEVICE_VENDOR_SPEC