vserver 1.9.3
[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
538                         },
539                         {
540                                 .ifnum = 2,
541                                 .type = QUIRK_AUDIO_EDIROL_UA700
542                         },
543                         {
544                                 .ifnum = 3,
545                                 .type = QUIRK_AUDIO_EDIROL_UA700
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_FIXED_ENDPOINT,
642                                 .data = & (const struct audioformat) {
643                                         .format = SNDRV_PCM_FORMAT_S24,
644                                         .channels = 12,
645                                         .iface = 1,
646                                         .altsetting = 1,
647                                         .altset_idx = 1,
648                                         .attributes = 0,
649                                         .endpoint = 0x81,
650                                         .ep_attr = 0x01,
651                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
652                                         .rate_min = 48000,
653                                         .rate_max = 48000,
654                                 }
655                         },
656                         {
657                                 .ifnum = 2,
658                                 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
659                                 .data = & (const struct audioformat) {
660                                         .format = SNDRV_PCM_FORMAT_S24,
661                                         .channels = 10,
662                                         .iface = 2,
663                                         .altsetting = 1,
664                                         .altset_idx = 1,
665                                         .attributes = 0,
666                                         .endpoint = 0x02,
667                                         .ep_attr = 0x01,
668                                         .rates = SNDRV_PCM_RATE_CONTINUOUS,
669                                         .rate_min = 48000,
670                                         .rate_max = 48000,
671                                 }
672                         },
673                         {
674                                 .ifnum = 3,
675                                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
676                                 .data = & (const snd_usb_midi_endpoint_info_t) {
677                                         .out_cables = 0x0003,
678                                         .in_cables  = 0x0003
679                                 }
680                         },
681                         {
682                                 .ifnum = -1
683                         }
684                 }
685         }
686 },
687 {
688         USB_DEVICE(0x0582, 0x0048),
689         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
690                 .vendor_name = "EDIROL",
691                 .product_name = "UR-80",
692                 .ifnum = 0,
693                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
694                 .data = & (const snd_usb_midi_endpoint_info_t) {
695                         .out_cables = 0x0003,
696                         .in_cables  = 0x0007
697                 }
698         }
699 },
700 {
701         USB_DEVICE(0x0582, 0x004d),
702         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
703                 .vendor_name = "EDIROL",
704                 .product_name = "PCR-A",
705                 .ifnum = 0,
706                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
707                 .data = & (const snd_usb_midi_endpoint_info_t) {
708                         .out_cables = 0x0003,
709                         .in_cables  = 0x0007
710                 }
711         }
712 },
713 {
714         USB_DEVICE(0x0582, 0x0065),
715         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
716                 .vendor_name = "EDIROL",
717                 .product_name = "PCR-1",
718                 .ifnum = 0,
719                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
720                 .data = & (const snd_usb_midi_endpoint_info_t) {
721                         .out_cables = 0x0001,
722                         .in_cables  = 0x0003
723                 }
724         }
725 },
726 {
727         /*
728          * This quirk is for the "Advanced Driver" mode. If off, the UA-3FX
729          * is standard compliant, but has only 16-bit PCM.
730          */
731         USB_DEVICE(0x0582, 0x0050),
732         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
733                 .vendor_name = "EDIROL",
734                 .product_name = "UA-3FX",
735                 .ifnum = QUIRK_ANY_INTERFACE,
736                 .type = QUIRK_COMPOSITE,
737                 .data = (const snd_usb_audio_quirk_t[]) {
738                         {
739                                 .ifnum = 1,
740                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
741                         },
742                         {
743                                 .ifnum = 2,
744                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
745                         },
746                         {
747                                 .ifnum = -1
748                         }
749                 }
750         }
751 },
752 {
753         USB_DEVICE(0x0582, 0x0052),
754         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
755                 .vendor_name = "EDIROL",
756                 .product_name = "UM-1SX",
757                 .ifnum = 0,
758                 .type = QUIRK_MIDI_STANDARD_INTERFACE
759         }
760 },
761
762 /* Midiman/M-Audio devices */
763 {
764         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1002),
765         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
766                 .vendor_name = "M-Audio",
767                 .product_name = "MidiSport 2x2",
768                 .ifnum = QUIRK_ANY_INTERFACE,
769                 .type = QUIRK_MIDI_MIDIMAN,
770                 .data = & (const snd_usb_midi_endpoint_info_t) {
771                         .out_cables = 0x0003,
772                         .in_cables  = 0x0003
773                 }
774         }
775 },
776 {
777         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1011),
778         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
779                 .vendor_name = "M-Audio",
780                 .product_name = "MidiSport 1x1",
781                 .ifnum = QUIRK_ANY_INTERFACE,
782                 .type = QUIRK_MIDI_MIDIMAN,
783                 .data = & (const snd_usb_midi_endpoint_info_t) {
784                         .out_cables = 0x0001,
785                         .in_cables  = 0x0001
786                 }
787         }
788 },
789 {
790         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1015),
791         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
792                 .vendor_name = "M-Audio",
793                 .product_name = "Keystation",
794                 .ifnum = QUIRK_ANY_INTERFACE,
795                 .type = QUIRK_MIDI_MIDIMAN,
796                 .data = & (const snd_usb_midi_endpoint_info_t) {
797                         .out_cables = 0x0001,
798                         .in_cables  = 0x0001
799                 }
800         }
801 },
802 {
803         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1021),
804         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
805                 .vendor_name = "M-Audio",
806                 .product_name = "MidiSport 4x4",
807                 .ifnum = QUIRK_ANY_INTERFACE,
808                 .type = QUIRK_MIDI_MIDIMAN,
809                 .data = & (const snd_usb_midi_endpoint_info_t) {
810                         .out_cables = 0x000f,
811                         .in_cables  = 0x000f
812                 }
813         }
814 },
815 {
816         /*
817          * For hardware revision 1.05; in the later revisions (1.10 and
818          * 1.21), 0x1031 is the ID for the device without firmware.
819          * Thanks to Olaf Giesbrecht <Olaf_Giesbrecht@yahoo.de>
820          */
821         USB_DEVICE_VER(0x0763, 0x1031, 0x0100, 0x0109),
822         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
823                 .vendor_name = "M-Audio",
824                 .product_name = "MidiSport 8x8",
825                 .ifnum = QUIRK_ANY_INTERFACE,
826                 .type = QUIRK_MIDI_MIDIMAN,
827                 .data = & (const snd_usb_midi_endpoint_info_t) {
828                         .out_cables = 0x01ff,
829                         .in_cables  = 0x01ff
830                 }
831         }
832 },
833 {
834         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1033),
835         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
836                 .vendor_name = "M-Audio",
837                 .product_name = "MidiSport 8x8",
838                 .ifnum = QUIRK_ANY_INTERFACE,
839                 .type = QUIRK_MIDI_MIDIMAN,
840                 .data = & (const snd_usb_midi_endpoint_info_t) {
841                         .out_cables = 0x01ff,
842                         .in_cables  = 0x01ff
843                 }
844         }
845 },
846 {
847         USB_DEVICE_VENDOR_SPEC(0x0763, 0x1041),
848         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
849                 .vendor_name = "M-Audio",
850                 .product_name = "MidiSport 2x4",
851                 .ifnum = QUIRK_ANY_INTERFACE,
852                 .type = QUIRK_MIDI_MIDIMAN,
853                 .data = & (const snd_usb_midi_endpoint_info_t) {
854                         .out_cables = 0x000f,
855                         .in_cables  = 0x0003
856                 }
857         }
858 },
859 {
860         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2001),
861         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
862                 .vendor_name = "M-Audio",
863                 .product_name = "Quattro",
864                 .ifnum = QUIRK_ANY_INTERFACE,
865                 .type = QUIRK_COMPOSITE,
866                 .data = & (const snd_usb_audio_quirk_t[]) {
867                         /*
868                          * Interfaces 0-2 are "Windows-compatible", 16-bit only,
869                          * and share endpoints with the other interfaces.
870                          * Ignore them.  The other interfaces can do 24 bits,
871                          * but captured samples are big-endian (see usbaudio.c).
872                          */
873                         {
874                                 .ifnum = 4,
875                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
876                         },
877                         {
878                                 .ifnum = 5,
879                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
880                         },
881                         {
882                                 .ifnum = 7,
883                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
884                         },
885                         {
886                                 .ifnum = 8,
887                                 .type = QUIRK_AUDIO_STANDARD_INTERFACE
888                         },
889                         {
890                                 .ifnum = 9,
891                                 .type = QUIRK_MIDI_MIDIMAN,
892                                 .data = & (const snd_usb_midi_endpoint_info_t) {
893                                         .out_cables = 0x0001,
894                                         .in_cables  = 0x0001
895                                 }
896                         },
897                         {
898                                 .ifnum = -1
899                         }
900                 }
901         }
902 },
903 {
904         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2003),
905         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
906                 .vendor_name = "M-Audio",
907                 .product_name = "AudioPhile",
908                 .ifnum = 6,
909                 .type = QUIRK_MIDI_MIDIMAN,
910                 .data = & (const snd_usb_midi_endpoint_info_t) {
911                         .out_cables = 0x0001,
912                         .in_cables  = 0x0001
913                 }
914         }
915 },
916 {
917         USB_DEVICE_VENDOR_SPEC(0x0763, 0x2008),
918         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
919                 .vendor_name = "M-Audio",
920                 .product_name = "Ozone",
921                 .ifnum = 3,
922                 .type = QUIRK_MIDI_MIDIMAN,
923                 .data = & (const snd_usb_midi_endpoint_info_t) {
924                         .out_cables = 0x0001,
925                         .in_cables  = 0x0001
926                 }
927         }
928 },
929 {
930         USB_DEVICE_VENDOR_SPEC(0x0763, 0x200d),
931         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
932                 .vendor_name = "M-Audio",
933                 .product_name = "OmniStudio",
934                 .ifnum = 9,
935                 .type = QUIRK_MIDI_MIDIMAN,
936                 .data = & (const snd_usb_midi_endpoint_info_t) {
937                         .out_cables = 0x0001,
938                         .in_cables  = 0x0001
939                 }
940         }
941 },
942
943 /* Mark of the Unicorn devices */
944 {
945         /* thanks to Woodley Packard <sweaglesw@thibs.menloschool.org> */
946         USB_DEVICE(0x07fd, 0x0001),
947         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
948                 .vendor_name = "MOTU",
949                 .product_name = "Fastlane",
950                 .ifnum = 1,
951                 .type = QUIRK_MIDI_FIXED_ENDPOINT,
952                 .data = & (const snd_usb_midi_endpoint_info_t) {
953                         .out_cables = 0x0003,
954                         .in_cables  = 0x0003
955                 }
956         }
957 },
958
959 {
960         /* Creative Sound Blaster MP3+ */
961         USB_DEVICE(0x041e, 0x3010),
962         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
963                 .vendor_name = "Creative Labs",
964                 .product_name = "Sound Blaster MP3+",
965                 .ifnum = QUIRK_NO_INTERFACE
966         }
967         
968 },
969
970 {
971         USB_DEVICE_VENDOR_SPEC(0x0ccd, 0x0013),
972         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
973                 .vendor_name = "Terratec",
974                 .product_name = "PHASE 26",
975                 .ifnum = 3,
976                 .type = QUIRK_MIDI_STANDARD_INTERFACE
977         }
978 },
979
980 {
981         /*
982          * Some USB MIDI devices don't have an audio control interface,
983          * so we have to grab MIDI streaming interfaces here.
984          */
985         .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
986                        USB_DEVICE_ID_MATCH_INT_SUBCLASS,
987         .bInterfaceClass = USB_CLASS_AUDIO,
988         .bInterfaceSubClass = USB_SUBCLASS_MIDI_STREAMING,
989         .driver_info = (unsigned long) & (const snd_usb_audio_quirk_t) {
990                 .ifnum = QUIRK_ANY_INTERFACE,
991                 .type = QUIRK_MIDI_STANDARD_INTERFACE
992         }
993 },
994
995 #undef USB_DEVICE_VENDOR_SPEC