vserver 1.9.5.x5
[linux-2.6.git] / sound / usb / usbquirks.h
1 /*
2  * ALSA USB Audio Driver
3  *
4  * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>,
5  *                       Clemens Ladisch <clemens@ladisch.de>
6  *
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21  */
22
23 /*
24  * The contents of this file are part of the driver's id_table.
25  *
26  * In a perfect world, this file would be empty.
27  */
28
29 /*
30  * Use this for devices where other interfaces are standard compliant,
31  * to prevent the quirk being applied to those interfaces. (To work with
32  * hotplugging, bDeviceClass must be set to USB_CLASS_PER_INTERFACE.)
33  */
34 #define USB_DEVICE_VENDOR_SPEC(vend, prod) \
35         .match_flags = USB_DEVICE_ID_MATCH_VENDOR | \
36                        USB_DEVICE_ID_MATCH_PRODUCT | \
37                        USB_DEVICE_ID_MATCH_INT_CLASS, \
38         .idVendor = vend, \
39         .idProduct = prod, \
40         .bInterfaceClass = USB_CLASS_VENDOR_SPEC
41
42 /*
43  * Yamaha devices
44  */
45
46 #define YAMAHA_DEVICE(id, name) { \
47         USB_DEVICE(0x0499, id), \
48         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { \
49                 .vendor_name = "Yamaha", \
50                 .product_name = name, \
51                 .ifnum = QUIRK_ANY_INTERFACE, \
52                 .type = QUIRK_MIDI_YAMAHA \
53         } \
54 }
55 #define YAMAHA_INTERFACE(id, intf, name) { \
56         USB_DEVICE_VENDOR_SPEC(0x0499, id), \
57         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) { \
58                 .vendor_name = "Yamaha", \
59                 .product_name = name, \
60                 .ifnum = intf, \
61                 .type = QUIRK_MIDI_YAMAHA \
62         } \
63 }
64 YAMAHA_DEVICE(0x1000, "UX256"),
65 YAMAHA_DEVICE(0x1001, "MU1000"),
66 YAMAHA_DEVICE(0x1002, "MU2000"),
67 YAMAHA_DEVICE(0x1003, "MU500"),
68 YAMAHA_INTERFACE(0x1004, 3, "UW500"),
69 YAMAHA_DEVICE(0x1005, "MOTIF6"),
70 YAMAHA_DEVICE(0x1006, "MOTIF7"),
71 YAMAHA_DEVICE(0x1007, "MOTIF8"),
72 YAMAHA_DEVICE(0x1008, "UX96"),
73 YAMAHA_DEVICE(0x1009, "UX16"),
74 YAMAHA_INTERFACE(0x100a, 3, "EOS BX"),
75 YAMAHA_DEVICE(0x100e, "S08"),
76 YAMAHA_DEVICE(0x100f, "CLP-150"),
77 YAMAHA_DEVICE(0x1010, "CLP-170"),
78 YAMAHA_DEVICE(0x1011, "P-250"),
79 YAMAHA_DEVICE(0x1012, "TYROS"),
80 YAMAHA_DEVICE(0x1013, "PF-500"),
81 YAMAHA_DEVICE(0x1014, "S90"),
82 YAMAHA_DEVICE(0x1015, "MOTIF-R"),
83 YAMAHA_DEVICE(0x1017, "CVP-204"),
84 YAMAHA_DEVICE(0x1018, "CVP-206"),
85 YAMAHA_DEVICE(0x1019, "CVP-208"),
86 YAMAHA_DEVICE(0x101a, "CVP-210"),
87 YAMAHA_DEVICE(0x101b, "PSR-1100"),
88 YAMAHA_DEVICE(0x101c, "PSR-2100"),
89 YAMAHA_DEVICE(0x101e, "PSR-K1"),
90 YAMAHA_DEVICE(0x1020, "EZ-250i"),
91 YAMAHA_DEVICE(0x1021, "MOTIF ES 6"),
92 YAMAHA_DEVICE(0x1022, "MOTIF ES 7"),
93 YAMAHA_DEVICE(0x1023, "MOTIF ES 8"),
94 YAMAHA_DEVICE(0x1024, "CVP-301"),
95 YAMAHA_DEVICE(0x1025, "CVP-303"),
96 YAMAHA_DEVICE(0x1026, "CVP-305"),
97 YAMAHA_DEVICE(0x1027, "CVP-307"),
98 YAMAHA_DEVICE(0x1028, "CVP-309"),
99 YAMAHA_DEVICE(0x1029, "CVP-309GP"),
100 YAMAHA_DEVICE(0x102a, "PSR-1500"),
101 YAMAHA_DEVICE(0x102b, "PSR-3000"),
102 YAMAHA_DEVICE(0x102e, "ELS-01/01C"),
103 YAMAHA_DEVICE(0x1030, "PSR-295/293"),
104 YAMAHA_DEVICE(0x1031, "DGX-205/203"),
105 YAMAHA_DEVICE(0x1032, "DGX-305"),
106 YAMAHA_DEVICE(0x1033, "DGX-505"),
107 YAMAHA_DEVICE(0x1034, NULL),
108 YAMAHA_DEVICE(0x1035, NULL),
109 YAMAHA_DEVICE(0x1036, NULL),
110 YAMAHA_DEVICE(0x1037, NULL),
111 YAMAHA_DEVICE(0x1038, NULL),
112 YAMAHA_DEVICE(0x1039, NULL),
113 YAMAHA_DEVICE(0x103a, NULL),
114 YAMAHA_DEVICE(0x103b, NULL),
115 YAMAHA_DEVICE(0x103c, NULL),
116 YAMAHA_DEVICE(0x2000, "DGP-7"),
117 YAMAHA_DEVICE(0x2001, "DGP-5"),
118 YAMAHA_DEVICE(0x2002, NULL),
119 YAMAHA_DEVICE(0x5000, "CS1D"),
120 YAMAHA_DEVICE(0x5001, "DSP1D"),
121 YAMAHA_DEVICE(0x5002, "DME32"),
122 YAMAHA_DEVICE(0x5003, "DM2000"),
123 YAMAHA_DEVICE(0x5004, "02R96"),
124 YAMAHA_DEVICE(0x5005, "ACU16-C"),
125 YAMAHA_DEVICE(0x5006, "NHB32-C"),
126 YAMAHA_DEVICE(0x5007, "DM1000"),
127 YAMAHA_DEVICE(0x5008, "01V96"),
128 YAMAHA_DEVICE(0x500a, "PM5D"),
129 YAMAHA_DEVICE(0x500b, "DME64N"),
130 YAMAHA_DEVICE(0x500c, "DME24N"),
131 YAMAHA_DEVICE(0x7000, "DTX"),
132 YAMAHA_DEVICE(0x7010, "UB99"),
133 #undef YAMAHA_DEVICE
134 #undef YAMAHA_INTERFACE
135
136 /*
137  * Roland/RolandED/Edirol/BOSS devices
138  */
139 {
140         USB_DEVICE(0x0582, 0x0000),
141         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
142                 .vendor_name = "Roland",
143                 .product_name = "UA-100",
144                 .ifnum = QUIRK_ANY_INTERFACE,
145                 .type = QUIRK_COMPOSITE,
146                 .data = (const snd_usb_audio_quirk_t[]) {
147                         {
148                                 .ifnum = 0,
149                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
150                                 .data = & (const struct audioformat) {
151                                         .format = SNDRV_PCM_FORMAT_S16_LE,
152                                         .channels = 4,
153                                         .iface = 0,
154                                         .altsetting = 1,
155                                         .altset_idx = 1,
156                                         .attributes = 0,
157                                         .endpoint = 0x01,
158                                         .ep_attr = 0x09,
159                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
160                                         .rate_min = 44100,
161                                         .rate_max = 44100,
162                                 }
163                         },
164                         {
165                                 .ifnum = 1,
166                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
167                                 .data = & (const struct audioformat) {
168                                         .format = SNDRV_PCM_FORMAT_S16_LE,
169                                         .channels = 2,
170                                         .iface = 1,
171                                         .altsetting = 1,
172                                         .altset_idx = 1,
173                                         .attributes = EP_CS_ATTR_FILL_MAX,
174                                         .endpoint = 0x81,
175                                         .ep_attr = 0x05,
176                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
177                                         .rate_min = 44100,
178                                         .rate_max = 44100,
179                                 }
180                         },
181                         {
182                                 .ifnum = 2,
183                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
184                                 .data = & (const snd_usb_midi_endpoint_info_t) {
185                                         .out_cables = 0x0007,
186                                         .in_cables  = 0x0007
187                                 }
188                         },
189                         {
190                                 .ifnum = -1
191                         }
192                 }
193         }
194 },
195 {
196         USB_DEVICE(0x0582, 0x0002),
197         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
198                 .vendor_name = "EDIROL",
199                 .product_name = "UM-4",
200                 .ifnum = 2,
201                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
202                 .data = & (const snd_usb_midi_endpoint_info_t) {
203                         .out_cables = 0x000f,
204                         .in_cables  = 0x000f
205                 }
206         }
207 },
208 {
209         USB_DEVICE(0x0582, 0x0003),
210         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
211                 .vendor_name = "Roland",
212                 .product_name = "SC-8850",
213                 .ifnum = 2,
214                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
215                 .data = & (const snd_usb_midi_endpoint_info_t) {
216                         .out_cables = 0x003f,
217                         .in_cables  = 0x003f
218                 }
219         }
220 },
221 {
222         USB_DEVICE(0x0582, 0x0004),
223         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
224                 .vendor_name = "Roland",
225                 .product_name = "U-8",
226                 .ifnum = 2,
227                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
228                 .data = & (const snd_usb_midi_endpoint_info_t) {
229                         .out_cables = 0x0005,
230                         .in_cables  = 0x0005
231                 }
232         }
233 },
234 {
235         USB_DEVICE(0x0582, 0x0005),
236         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
237                 .vendor_name = "EDIROL",
238                 .product_name = "UM-2",
239                 .ifnum = 2,
240                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
241                 .data = & (const snd_usb_midi_endpoint_info_t) {
242                         .out_cables = 0x0003,
243                         .in_cables  = 0x0003
244                 }
245         }
246 },
247 {
248         USB_DEVICE(0x0582, 0x0007),
249         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
250                 .vendor_name = "Roland",
251                 .product_name = "SC-8820",
252                 .ifnum = 2,
253                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
254                 .data = & (const snd_usb_midi_endpoint_info_t) {
255                         .out_cables = 0x0013,
256                         .in_cables  = 0x0013
257                 }
258         }
259 },
260 {
261         USB_DEVICE(0x0582, 0x0008),
262         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
263                 .vendor_name = "Roland",
264                 .product_name = "PC-300",
265                 .ifnum = 2,
266                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
267                 .data = & (const snd_usb_midi_endpoint_info_t) {
268                         .out_cables = 0x0001,
269                         .in_cables  = 0x0001
270                 }
271         }
272 },
273 {
274         USB_DEVICE(0x0582, 0x0009),
275         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
276                 .vendor_name = "EDIROL",
277                 .product_name = "UM-1",
278                 .ifnum = 2,
279                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
280                 .data = & (const snd_usb_midi_endpoint_info_t) {
281                         .out_cables = 0x0001,
282                         .in_cables  = 0x0001
283                 }
284         }
285 },
286 {
287         USB_DEVICE(0x0582, 0x000b),
288         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
289                 .vendor_name = "Roland",
290                 .product_name = "SK-500",
291                 .ifnum = 2,
292                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
293                 .data = & (const snd_usb_midi_endpoint_info_t) {
294                         .out_cables = 0x0013,
295                         .in_cables  = 0x0013
296                 }
297         }
298 },
299 {
300         /* thanks to Emiliano Grilli <emillo@libero.it>
301          * for helping researching this data */
302         USB_DEVICE(0x0582, 0x000c),
303         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
304                 .vendor_name = "Roland",
305                 .product_name = "SC-D70",
306                 .ifnum = QUIRK_ANY_INTERFACE,
307                 .type = QUIRK_COMPOSITE,
308                 .data = (const snd_usb_audio_quirk_t[]) {
309                         {
310                                 .ifnum = 0,
311                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
312                                 .data = & (const struct audioformat) {
313                                         .format = SNDRV_PCM_FORMAT_S24_3LE,
314                                         .channels = 2,
315                                         .iface = 0,
316                                         .altsetting = 1,
317                                         .altset_idx = 1,
318                                         .attributes = 0,
319                                         .endpoint = 0x01,
320                                         .ep_attr = 0x01,
321                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
322                                         .rate_min = 44100,
323                                         .rate_max = 44100,
324                                 }
325                         },
326                         {
327                                 .ifnum = 1,
328                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
329                                 .data = & (const struct audioformat) {
330                                         .format = SNDRV_PCM_FORMAT_S24_3LE,
331                                         .channels = 2,
332                                         .iface = 1,
333                                         .altsetting = 1,
334                                         .altset_idx = 1,
335                                         .attributes = 0,
336                                         .endpoint = 0x81,
337                                         .ep_attr = 0x01,
338                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
339                                         .rate_min = 44100,
340                                         .rate_max = 44100,
341                                 }
342                         },
343                         {
344                                 .ifnum = 2,
345                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
346                                 .data = & (const snd_usb_midi_endpoint_info_t) {
347                                         .out_cables = 0x0007,
348                                         .in_cables  = 0x0007
349                                 }
350                         },
351                         {
352                                 .ifnum = -1
353                         }
354                 }
355         }
356 },
357 {       /*
358          * This quirk is for the "Advanced Driver" mode of the Edirol UA-5.
359          * If the advanced mode switch at the back of the unit is off, the
360          * UA-5 has ID 0x0582/0x0011 and is standard compliant (no quirks),
361          * but offers only 16-bit PCM.
362          * In advanced mode, the UA-5 will output S24_3LE samples (two
363          * channels) at the rate indicated on the front switch, including
364          * the 96kHz sample rate.
365          */
366         USB_DEVICE(0x0582, 0x0010),
367         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
368                 .vendor_name = "EDIROL",
369                 .product_name = "UA-5",
370                 .ifnum = QUIRK_ANY_INTERFACE,
371                 .type = QUIRK_COMPOSITE,
372                 .data = (const snd_usb_audio_quirk_t[]) {
373                         {
374                                 .ifnum = 1,
375                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
376                         },
377                         {
378                                 .ifnum = 2,
379                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
380                         },
381                         {
382                                 .ifnum = -1
383                         }
384                 }
385         }
386 },
387 {
388         USB_DEVICE(0x0582, 0x0012),
389         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
390                 .vendor_name = "Roland",
391                 .product_name = "XV-5050",
392                 .ifnum = 0,
393                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
394                 .data = & (const snd_usb_midi_endpoint_info_t) {
395                         .out_cables = 0x0001,
396                         .in_cables  = 0x0001
397                 }
398         }
399 },
400 {
401         USB_DEVICE(0x0582, 0x0014),
402         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
403                 .vendor_name = "EDIROL",
404                 .product_name = "UM-880",
405                 .ifnum = 0,
406                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
407                 .data = & (const snd_usb_midi_endpoint_info_t) {
408                         .out_cables = 0x01ff,
409                         .in_cables  = 0x01ff
410                 }
411         }
412 },
413 {
414         USB_DEVICE(0x0582, 0x0016),
415         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
416                 .vendor_name = "EDIROL",
417                 .product_name = "SD-90",
418                 .ifnum = 2,
419                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
420                 .data = & (const snd_usb_midi_endpoint_info_t) {
421                         .out_cables = 0x000f,
422                         .in_cables  = 0x000f
423                 }
424         }
425 },
426 {
427         USB_DEVICE(0x0582, 0x001b),
428         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
429                 .vendor_name = "Roland",
430                 .product_name = "MMP-2",
431                 .ifnum = 2,
432                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
433                 .data = & (const snd_usb_midi_endpoint_info_t) {
434                         .out_cables = 0x0001,
435                         .in_cables  = 0x0001
436                 }
437         }
438 },
439 {
440         USB_DEVICE(0x0582, 0x001d),
441         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
442                 .vendor_name = "Roland",
443                 .product_name = "V-SYNTH",
444                 .ifnum = 0,
445                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
446                 .data = & (const snd_usb_midi_endpoint_info_t) {
447                         .out_cables = 0x0001,
448                         .in_cables  = 0x0001
449                 }
450         }
451 },
452 {
453         USB_DEVICE(0x0582, 0x0023),
454         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
455                 .vendor_name = "EDIROL",
456                 .product_name = "UM-550",
457                 .ifnum = 0,
458                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
459                 .data = & (const snd_usb_midi_endpoint_info_t) {
460                         .out_cables = 0x003f,
461                         .in_cables  = 0x003f
462                 }
463         }
464 },
465 {
466         /*
467          * This quirk is for the "Advanced Driver" mode. If off, the UA-20
468          * has ID 0x0026 and is standard compliant, but has only 16-bit PCM
469          * and no MIDI.
470          */
471         USB_DEVICE(0x0582, 0x0025),
472         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
473                 .vendor_name = "EDIROL",
474                 .product_name = "UA-20",
475                 .ifnum = QUIRK_ANY_INTERFACE,
476                 .type = QUIRK_COMPOSITE,
477                 .data = (const snd_usb_audio_quirk_t[]) {
478                         {
479                                 .ifnum = 1,
480                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
481                         },
482                         {
483                                 .ifnum = 2,
484                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
485                         },
486                         {
487                                 .ifnum = 3,
488                                 .type = QUIRK_MIDI_STANDARD_INTERFACE
489                         },
490                         {
491                                 .ifnum = -1
492                         }
493                 }
494         }
495 },
496 {
497         USB_DEVICE(0x0582, 0x0027),
498         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
499                 .vendor_name = "EDIROL",
500                 .product_name = "SD-20",
501                 .ifnum = 0,
502                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
503                 .data = & (const snd_usb_midi_endpoint_info_t) {
504                         .out_cables = 0x0003,
505                         .in_cables  = 0x0007
506                 }
507         }
508 },
509 {
510         USB_DEVICE(0x0582, 0x0029),
511         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
512                 .vendor_name = "EDIROL",
513                 .product_name = "SD-80",
514                 .ifnum = 0,
515                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
516                 .data = & (const snd_usb_midi_endpoint_info_t) {
517                         .out_cables = 0x000f,
518                         .in_cables  = 0x000f
519                 }
520         }
521 },
522 {       /*
523          * This quirk is for the "Advanced" modes of the Edirol UA-700.
524          * If the sample format switch is not in an advanced setting, the
525          * UA-700 has ID 0x0582/0x002c and is standard compliant (no quirks),
526          * but offers only 16-bit PCM and no MIDI.
527          */
528         USB_DEVICE_VENDOR_SPEC(0x0582, 0x002b),
529         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
530                 .vendor_name = "EDIROL",
531                 .product_name = "UA-700",
532                 .ifnum = QUIRK_ANY_INTERFACE,
533                 .type = QUIRK_COMPOSITE,
534                 .data = (const snd_usb_audio_quirk_t[]) {
535                         {
536                                 .ifnum = 1,
537                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
538                         },
539                         {
540                                 .ifnum = 2,
541                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
542                         },
543                         {
544                                 .ifnum = 3,
545                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
546                         },
547                         {
548                                 .ifnum = -1
549                         }
550                 }
551         }
552 },
553 {
554         USB_DEVICE(0x0582, 0x002d),
555         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
556                 .vendor_name = "Roland",
557                 .product_name = "XV-2020",
558                 .ifnum = 0,
559                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
560                 .data = & (const snd_usb_midi_endpoint_info_t) {
561                         .out_cables = 0x0001,
562                         .in_cables  = 0x0001
563                 }
564         }
565 },
566 {
567         USB_DEVICE(0x0582, 0x002f),
568         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
569                 .vendor_name = "Roland",
570                 .product_name = "VariOS",
571                 .ifnum = 0,
572                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
573                 .data = & (const snd_usb_midi_endpoint_info_t) {
574                         .out_cables = 0x0007,
575                         .in_cables  = 0x0007
576                 }
577         }
578 },
579 {
580         USB_DEVICE(0x0582, 0x0033),
581         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
582                 .vendor_name = "EDIROL",
583                 .product_name = "PCR",
584                 .ifnum = 0,
585                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
586                 .data = & (const snd_usb_midi_endpoint_info_t) {
587                         .out_cables = 0x0003,
588                         .in_cables  = 0x0007
589                 }
590         }
591 },
592 {
593         USB_DEVICE(0x0582, 0x0037),
594         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
595                 .vendor_name = "Roland",
596                 .product_name = "Digital Piano",
597                 .ifnum = 0,
598                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
599                 .data = & (const snd_usb_midi_endpoint_info_t) {
600                         .out_cables = 0x0001,
601                         .in_cables  = 0x0001
602                 }
603         }
604 },
605 {
606         USB_DEVICE_VENDOR_SPEC(0x0582, 0x003b),
607         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
608                 .vendor_name = "BOSS",
609                 .product_name = "GS-10",
610                 .ifnum = 3,
611                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
612                 .data = & (const snd_usb_midi_endpoint_info_t) {
613                         .out_cables = 0x0003,
614                         .in_cables  = 0x0003
615                 }
616         }
617 },
618 {
619         USB_DEVICE(0x0582, 0x0040),
620         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
621                 .vendor_name = "Roland",
622                 .product_name = "GI-20",
623                 .ifnum = 0,
624                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
625                 .data = & (const snd_usb_midi_endpoint_info_t) {
626                         .out_cables = 0x0001,
627                         .in_cables  = 0x0001
628                 }
629         }
630 },
631 {
632         USB_DEVICE(0x0582, 0x0044),
633         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
634                 .vendor_name = "Roland",
635                 .product_name = "UA-1000",
636                 .ifnum = QUIRK_ANY_INTERFACE,
637                 .type = QUIRK_COMPOSITE,
638                 .data = (const snd_usb_audio_quirk_t[]) {
639                         {
640                                 .ifnum = 1,
641                                 .type = QUIRK_AUDIO_EDIROL_UA1000
642                         },
643                         {
644                                 .ifnum = 2,
645                                 .type = QUIRK_AUDIO_EDIROL_UA1000
646                         },
647                         {
648                                 .ifnum = 3,
649                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
650                                 .data = & (const snd_usb_midi_endpoint_info_t) {
651                                         .out_cables = 0x0003,
652                                         .in_cables  = 0x0003
653                                 }
654                         },
655                         {
656                                 .ifnum = -1
657                         }
658                 }
659         }
660 },
661 {
662         USB_DEVICE(0x0582, 0x0048),
663         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
664                 .vendor_name = "EDIROL",
665                 .product_name = "UR-80",
666                 .ifnum = 0,
667                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
668                 .data = & (const snd_usb_midi_endpoint_info_t) {
669                         .out_cables = 0x0003,
670                         .in_cables  = 0x0007
671                 }
672         }
673 },
674 {
675         USB_DEVICE(0x0582, 0x004d),
676         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
677                 .vendor_name = "EDIROL",
678                 .product_name = "PCR-A",
679                 .ifnum = 0,
680                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
681                 .data = & (const snd_usb_midi_endpoint_info_t) {
682                         .out_cables = 0x0003,
683                         .in_cables  = 0x0007
684                 }
685         }
686 },
687 {
688         USB_DEVICE(0x0582, 0x0065),
689         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
690                 .vendor_name = "EDIROL",
691                 .product_name = "PCR-1",
692                 .ifnum = 0,
693                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
694                 .data = & (const snd_usb_midi_endpoint_info_t) {
695                         .out_cables = 0x0001,
696                         .in_cables  = 0x0003
697                 }
698         }
699 },
700 {
701         /*
702          * This quirk is for the "Advanced Driver" mode. If off, the UA-3FX
703          * is standard compliant, but has only 16-bit PCM.
704          */
705         USB_DEVICE(0x0582, 0x0050),
706         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
707                 .vendor_name = "EDIROL",
708                 .product_name = "UA-3FX",
709                 .ifnum = QUIRK_ANY_INTERFACE,
710                 .type = QUIRK_COMPOSITE,
711                 .data = (const snd_usb_audio_quirk_t[]) {
712                         {
713                                 .ifnum = 1,
714                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
715                         },
716                         {
717                                 .ifnum = 2,
718                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
719                         },
720                         {
721                                 .ifnum = -1
722                         }
723                 }
724         }
725 },
726 {
727         USB_DEVICE(0x0582, 0x0052),
728         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
729                 .vendor_name = "EDIROL",
730                 .product_name = "UM-1SX",
731                 .ifnum = 0,
732                 .type = QUIRK_MIDI_STANDARD_INTERFACE
733         }
734 },
735 {       /*
736          * This quirk is for the "Advanced" modes of the Edirol UA-25.
737          * If the switch is not in an advanced setting, the UA-25 has
738          * ID 0x0582/0x0073 and is standard compliant (no quirks), but
739          * offers only 16-bit PCM at 44.1 kHz and no MIDI.
740          */
741         USB_DEVICE_VENDOR_SPEC(0x0582, 0x0074),
742         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
743                 .vendor_name = "EDIROL",
744                 .product_name = "UA-25",
745                 .ifnum = QUIRK_ANY_INTERFACE,
746                 .type = QUIRK_COMPOSITE,
747                 .data = (const snd_usb_audio_quirk_t[]) {
748                         {
749                                 .ifnum = 0,
750                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
751                         },
752                         {
753                                 .ifnum = 1,
754                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
755                         },
756                         {
757                                 .ifnum = 2,
758                                 .type = QUIRK_AUDIO_EDIROL_UA700_UA25
759                         },
760                         {
761                                 .ifnum = -1
762                         }
763                 }
764         }
765 },
766
767 /* Midiman/M-Audio devices */
768 {
769         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002),
770         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
771                 .vendor_name = "M-Audio",
772                 .product_name = "MidiSport 2x2",
773                 .ifnum = QUIRK_ANY_INTERFACE,
774                 .type = QUIRK_MIDI_MIDIMAN,
775                 .data = & (const snd_usb_midi_endpoint_info_t) {
776                         .out_cables = 0x0003,
777                         .in_cables  = 0x0003
778                 }
779         }
780 },
781 {
782         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011),
783         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
784                 .vendor_name = "M-Audio",
785                 .product_name = "MidiSport 1x1",
786                 .ifnum = QUIRK_ANY_INTERFACE,
787                 .type = QUIRK_MIDI_MIDIMAN,
788                 .data = & (const snd_usb_midi_endpoint_info_t) {
789                         .out_cables = 0x0001,
790                         .in_cables  = 0x0001
791                 }
792         }
793 },
794 {
795         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015),
796         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
797                 .vendor_name = "M-Audio",
798                 .product_name = "Keystation",
799                 .ifnum = QUIRK_ANY_INTERFACE,
800                 .type = QUIRK_MIDI_MIDIMAN,
801                 .data = & (const snd_usb_midi_endpoint_info_t) {
802                         .out_cables = 0x0001,
803                         .in_cables  = 0x0001
804                 }
805         }
806 },
807 {
808         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021),
809         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
810                 .vendor_name = "M-Audio",
811                 .product_name = "MidiSport 4x4",
812                 .ifnum = QUIRK_ANY_INTERFACE,
813                 .type = QUIRK_MIDI_MIDIMAN,
814                 .data = & (const snd_usb_midi_endpoint_info_t) {
815                         .out_cables = 0x000f,
816                         .in_cables  = 0x000f
817                 }
818         }
819 },
820 {
821         /*
822          * For hardware revision 1.05; in the later revisions (1.10 and
823          * 1.21), 0x1031 is the ID for the device without firmware.
824          * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de>
825          */
826         USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109),
827         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
828                 .vendor_name = "M-Audio",
829                 .product_name = "MidiSport 8x8",
830                 .ifnum = QUIRK_ANY_INTERFACE,
831                 .type = QUIRK_MIDI_MIDIMAN,
832                 .data = & (const snd_usb_midi_endpoint_info_t) {
833                         .out_cables = 0x01ff,
834                         .in_cables  = 0x01ff
835                 }
836         }
837 },
838 {
839         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033),
840         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
841                 .vendor_name = "M-Audio",
842                 .product_name = "MidiSport 8x8",
843                 .ifnum = QUIRK_ANY_INTERFACE,
844                 .type = QUIRK_MIDI_MIDIMAN,
845                 .data = & (const snd_usb_midi_endpoint_info_t) {
846                         .out_cables = 0x01ff,
847                         .in_cables  = 0x01ff
848                 }
849         }
850 },
851 {
852         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041),
853         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
854                 .vendor_name = "M-Audio",
855                 .product_name = "MidiSport 2x4",
856                 .ifnum = QUIRK_ANY_INTERFACE,
857                 .type = QUIRK_MIDI_MIDIMAN,
858                 .data = & (const snd_usb_midi_endpoint_info_t) {
859                         .out_cables = 0x000f,
860                         .in_cables  = 0x0003
861                 }
862         }
863 },
864 {
865         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001),
866         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
867                 .vendor_name = "M-Audio",
868                 .product_name = "Quattro",
869                 .ifnum = QUIRK_ANY_INTERFACE,
870                 .type = QUIRK_COMPOSITE,
871                 .data = & (const snd_usb_audio_quirk_t[]) {
872                         /*
873                          * Interfaces 0-2 are "Windows-compatible", 16-bit only,
874                          * and share endpoints with the other interfaces.
875                          * Ignore them.  The other interfaces can do 24 bits,
876                          * but captured samples are big-endian (see usbaudio.c).
877                          */
878                         {
879                                 .ifnum = 4,
880                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
881                         },
882                         {
883                                 .ifnum = 5,
884                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
885                         },
886                         {
887                                 .ifnum = 7,
888                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
889                         },
890                         {
891                                 .ifnum = 8,
892                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
893                         },
894                         {
895                                 .ifnum = 9,
896                                 .type = QUIRK_MIDI_MIDIMAN,
897                                 .data = & (const snd_usb_midi_endpoint_info_t) {
898                                         .out_cables = 0x0001,
899                                         .in_cables  = 0x0001
900                                 }
901                         },
902                         {
903                                 .ifnum = -1
904                         }
905                 }
906         }
907 },
908 {
909         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003),
910         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
911                 .vendor_name = "M-Audio",
912                 .product_name = "AudioPhile",
913                 .ifnum = 6,
914                 .type = QUIRK_MIDI_MIDIMAN,
915                 .data = & (const snd_usb_midi_endpoint_info_t) {
916                         .out_cables = 0x0001,
917                         .in_cables  = 0x0001
918                 }
919         }
920 },
921 {
922         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008),
923         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
924                 .vendor_name = "M-Audio",
925                 .product_name = "Ozone",
926                 .ifnum = 3,
927                 .type = QUIRK_MIDI_MIDIMAN,
928                 .data = & (const snd_usb_midi_endpoint_info_t) {
929                         .out_cables = 0x0001,
930                         .in_cables  = 0x0001
931                 }
932         }
933 },
934 {
935         USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d),
936         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
937                 .vendor_name = "M-Audio",
938                 .product_name = "OmniStudio",
939                 .ifnum = 9,
940                 .type = QUIRK_MIDI_MIDIMAN,
941                 .data = & (const snd_usb_midi_endpoint_info_t) {
942                         .out_cables = 0x0001,
943                         .in_cables  = 0x0001
944                 }
945         }
946 },
947
948 /* Mark of the Unicorn devices */
949 {
950         /* thanks to Woodley Packard <sweaglesw@thibs.menloschool.org> */
951         USB_DEVICE(0x07fd, 0x0001),
952         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
953                 .vendor_name = "MOTU",
954                 .product_name = "Fastlane",
955                 .ifnum = 1,
956                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
957                 .data = & (const snd_usb_midi_endpoint_info_t) {
958                         .out_cables = 0x0003,
959                         .in_cables  = 0x0003
960                 }
961         }
962 },
963
964 {
965         /* Creative Sound Blaster MP3+ */
966         USB_DEVICE(0x041e, 0x3010),
967         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
968                 .vendor_name = "Creative Labs",
969                 .product_name = "Sound Blaster MP3+",
970                 .ifnum = QUIRK_NO_INTERFACE
971         }
972         
973 },
974
975 {
976         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013),
977         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
978                 .vendor_name = "Terratec",
979                 .product_name = "PHASE 26",
980                 .ifnum = 3,
981                 .type = QUIRK_MIDI_STANDARD_INTERFACE
982         }
983 },
984
985 {
986         /*
987          * Some USB MIDI devices don't have an audio control interface,
988          * so we have to grab MIDI streaming interfaces here.
989          */
990         .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
991                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
992         .bInterfaceClass = USB_CLASS_AUDIO,
993         .bInterfaceSubClass = USB_SUBCLASS_MIDI_STREAMING,
994         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
995                 .ifnum = QUIRK_ANY_INTERFACE,
996                 .type = QUIRK_MIDI_STANDARD_INTERFACE
997         }
998 },
999
1000 #undef USB_DEVICE_VENDOR_SPEC