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