forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/usb/quirks-table.h
....@@ -1,23 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * ALSA USB Audio Driver
34 *
45 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>,
56 * 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
217 */
228
239 /*
....@@ -39,26 +25,16 @@
3925 .idProduct = prod, \
4026 .bInterfaceClass = USB_CLASS_VENDOR_SPEC
4127
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
-},
28
+/* A standard entry matching with vid/pid and the audio class/subclass */
29
+#define USB_AUDIO_DEVICE(vend, prod) \
30
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
31
+ USB_DEVICE_ID_MATCH_INT_CLASS | \
32
+ USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
33
+ .idVendor = vend, \
34
+ .idProduct = prod, \
35
+ .bInterfaceClass = USB_CLASS_AUDIO, \
36
+ .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL
37
+
6238 /* FTDI devices */
6339 {
6440 USB_DEVICE(0x0403, 0xb8d8),
....@@ -92,57 +68,61 @@
9268 }
9369 },
9470
95
-/* Creative/E-Mu devices */
71
+/* E-Mu 0202 USB */
72
+{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f02) },
73
+/* E-Mu 0404 USB */
74
+{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f04) },
75
+/* E-Mu Tracker Pre */
76
+{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f0a) },
77
+/* E-Mu 0204 USB */
78
+{ USB_DEVICE_VENDOR_SPEC(0x041e, 0x3f19) },
79
+
80
+/*
81
+ * Creative Technology, Ltd Live! Cam Sync HD [VF0770]
82
+ * The device advertises 8 formats, but only a rate of 48kHz is honored by the
83
+ * hardware and 24 bits give chopped audio, so only report the one working
84
+ * combination.
85
+ */
9686 {
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,
87
+ USB_AUDIO_DEVICE(0x041e, 0x4095),
88
+ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
89
+ .ifnum = QUIRK_ANY_INTERFACE,
90
+ .type = QUIRK_COMPOSITE,
91
+ .data = &(const struct snd_usb_audio_quirk[]) {
92
+ {
93
+ .ifnum = 2,
94
+ .type = QUIRK_AUDIO_STANDARD_MIXER,
95
+ },
96
+ {
97
+ .ifnum = 3,
98
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
99
+ .data = &(const struct audioformat) {
100
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
101
+ .channels = 2,
102
+ .fmt_bits = 16,
103
+ .iface = 3,
104
+ .altsetting = 4,
105
+ .altset_idx = 4,
106
+ .endpoint = 0x82,
107
+ .ep_attr = 0x05,
108
+ .rates = SNDRV_PCM_RATE_48000,
109
+ .rate_min = 48000,
110
+ .rate_max = 48000,
111
+ .nr_rates = 1,
112
+ .rate_table = (unsigned int[]) { 48000 },
113
+ },
114
+ },
115
+ {
116
+ .ifnum = -1
117
+ },
118
+ },
119
+ },
140120 },
141121
142122 /*
143123 * HP Wireless Audio
144124 * When not ignored, causes instability issues for some users, forcing them to
145
- * blacklist the entire module.
125
+ * skip the entire module.
146126 */
147127 {
148128 USB_DEVICE(0x0424, 0xb832),
....@@ -179,74 +159,13 @@
179159 * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
180160 * class matches do not take effect without an explicit ID match.
181161 */
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
-},
162
+{ USB_AUDIO_DEVICE(0x046d, 0x0850) },
163
+{ USB_AUDIO_DEVICE(0x046d, 0x08ae) },
164
+{ USB_AUDIO_DEVICE(0x046d, 0x08c6) },
165
+{ USB_AUDIO_DEVICE(0x046d, 0x08f0) },
166
+{ USB_AUDIO_DEVICE(0x046d, 0x08f5) },
167
+{ USB_AUDIO_DEVICE(0x046d, 0x08f6) },
168
+{ USB_AUDIO_DEVICE(0x046d, 0x0990) },
250169
251170 /*
252171 * Yamaha devices
....@@ -2110,6 +2029,10 @@
21102029 }
21112030 },
21122031 {
2032
+ /* M-Audio Micro */
2033
+ USB_DEVICE_VENDOR_SPEC(0x0763, 0x201a),
2034
+},
2035
+{
21132036 USB_DEVICE_VENDOR_SPEC(0x0763, 0x2030),
21142037 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
21152038 /* .vendor_name = "M-Audio", */
....@@ -2442,7 +2365,7 @@
24422365 USB_DEVICE(0x086a, 0x0001),
24432366 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
24442367 .vendor_name = "Emagic",
2445
- /* .product_name = "Unitor8", */
2368
+ .product_name = "Unitor8",
24462369 .ifnum = 2,
24472370 .type = QUIRK_MIDI_EMAGIC,
24482371 .data = & (const struct snd_usb_midi_endpoint_info) {
....@@ -2639,38 +2562,12 @@
26392562 }
26402563 },
26412564 {
2642
- USB_DEVICE(0x0ccd, 0x0028),
2643
- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2644
- .vendor_name = "TerraTec",
2645
- .product_name = "Aureon5.1MkII",
2646
- .ifnum = QUIRK_NO_INTERFACE
2647
- }
2648
-},
2649
-{
26502565 USB_DEVICE(0x0ccd, 0x0035),
26512566 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
26522567 .vendor_name = "Miditech",
26532568 .product_name = "Play'n Roll",
26542569 .ifnum = 0,
26552570 .type = QUIRK_MIDI_CME
2656
- }
2657
-},
2658
-
2659
-/* Stanton/N2IT Final Scratch v1 device ('Scratchamp') */
2660
-{
2661
- USB_DEVICE(0x103d, 0x0100),
2662
- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2663
- .vendor_name = "Stanton",
2664
- .product_name = "ScratchAmp",
2665
- .ifnum = QUIRK_NO_INTERFACE
2666
- }
2667
-},
2668
-{
2669
- USB_DEVICE(0x103d, 0x0101),
2670
- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2671
- .vendor_name = "Stanton",
2672
- .product_name = "ScratchAmp",
2673
- .ifnum = QUIRK_NO_INTERFACE
26742571 }
26752572 },
26762573
....@@ -2721,6 +2618,10 @@
27212618 .data = (const struct snd_usb_audio_quirk[]) {
27222619 {
27232620 .ifnum = 0,
2621
+ .type = QUIRK_AUDIO_STANDARD_MIXER,
2622
+ },
2623
+ {
2624
+ .ifnum = 0,
27242625 .type = QUIRK_AUDIO_FIXED_ENDPOINT,
27252626 .data = &(const struct audioformat) {
27262627 .formats = SNDRV_PCM_FMTBIT_S24_3LE,
....@@ -2731,6 +2632,32 @@
27312632 .attributes = UAC_EP_CS_ATTR_SAMPLE_RATE,
27322633 .endpoint = 0x01,
27332634 .ep_attr = USB_ENDPOINT_XFER_ISOC,
2635
+ .datainterval = 1,
2636
+ .maxpacksize = 0x024c,
2637
+ .rates = SNDRV_PCM_RATE_44100 |
2638
+ SNDRV_PCM_RATE_48000,
2639
+ .rate_min = 44100,
2640
+ .rate_max = 48000,
2641
+ .nr_rates = 2,
2642
+ .rate_table = (unsigned int[]) {
2643
+ 44100, 48000
2644
+ }
2645
+ }
2646
+ },
2647
+ {
2648
+ .ifnum = 0,
2649
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
2650
+ .data = &(const struct audioformat) {
2651
+ .formats = SNDRV_PCM_FMTBIT_S24_3LE,
2652
+ .channels = 2,
2653
+ .iface = 0,
2654
+ .altsetting = 1,
2655
+ .altset_idx = 1,
2656
+ .attributes = 0,
2657
+ .endpoint = 0x82,
2658
+ .ep_attr = USB_ENDPOINT_XFER_ISOC,
2659
+ .datainterval = 1,
2660
+ .maxpacksize = 0x0126,
27342661 .rates = SNDRV_PCM_RATE_44100 |
27352662 SNDRV_PCM_RATE_48000,
27362663 .rate_min = 44100,
....@@ -2828,14 +2755,20 @@
28282755 }
28292756 },
28302757
2831
-/* */
2758
+/* Lenovo ThinkStation P620 Rear Line-in, Line-out and Microphone */
28322759 {
2833
- /* aka. Serato Scratch Live DJ Box */
2834
- USB_DEVICE(0x13e5, 0x0001),
2760
+ USB_DEVICE(0x17aa, 0x1046),
28352761 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2836
- .vendor_name = "Rane",
2837
- .product_name = "SL-1",
2838
- .ifnum = QUIRK_NO_INTERFACE
2762
+ .ifnum = QUIRK_ANY_INTERFACE,
2763
+ .type = QUIRK_SETUP_DISABLE_AUTOSUSPEND
2764
+ }
2765
+},
2766
+/* Lenovo ThinkStation P620 Internal Speaker + Front Headset */
2767
+{
2768
+ USB_DEVICE(0x17aa, 0x104d),
2769
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
2770
+ .ifnum = QUIRK_ANY_INTERFACE,
2771
+ .type = QUIRK_SETUP_DISABLE_AUTOSUSPEND
28392772 }
28402773 },
28412774
....@@ -2871,10 +2804,7 @@
28712804 },
28722805
28732806 /* KeithMcMillen Stringport */
2874
-{
2875
- USB_DEVICE(0x1f38, 0x0001),
2876
- .bInterfaceClass = USB_CLASS_AUDIO,
2877
-},
2807
+{ USB_DEVICE(0x1f38, 0x0001) }, /* FIXME: should be more restrictive matching */
28782808
28792809 /* Miditech devices */
28802810 {
....@@ -2905,18 +2835,13 @@
29052835 */
29062836
29072837 #define AU0828_DEVICE(vid, pid, vname, pname) { \
2908
- .idVendor = vid, \
2909
- .idProduct = pid, \
2910
- .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
2911
- USB_DEVICE_ID_MATCH_INT_CLASS | \
2912
- USB_DEVICE_ID_MATCH_INT_SUBCLASS, \
2913
- .bInterfaceClass = USB_CLASS_AUDIO, \
2914
- .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL, \
2838
+ USB_AUDIO_DEVICE(vid, pid), \
29152839 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { \
29162840 .vendor_name = vname, \
29172841 .product_name = pname, \
29182842 .ifnum = QUIRK_ANY_INTERFACE, \
29192843 .type = QUIRK_AUDIO_ALIGN_TRANSFER, \
2844
+ .shares_media_device = 1, \
29202845 } \
29212846 }
29222847
....@@ -2940,13 +2865,7 @@
29402865
29412866 /* Syntek STK1160 */
29422867 {
2943
- .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
2944
- USB_DEVICE_ID_MATCH_INT_CLASS |
2945
- USB_DEVICE_ID_MATCH_INT_SUBCLASS,
2946
- .idVendor = 0x05e1,
2947
- .idProduct = 0x0408,
2948
- .bInterfaceClass = USB_CLASS_AUDIO,
2949
- .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
2868
+ USB_AUDIO_DEVICE(0x05e1, 0x0408),
29502869 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
29512870 .vendor_name = "Syntek",
29522871 .product_name = "STK1160",
....@@ -3108,10 +3027,7 @@
31083027 },
31093028 {
31103029 /* Tascam US122 MKII - playback-only support */
3111
- .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
3112
- .idVendor = 0x0644,
3113
- .idProduct = 0x8021,
3114
- .bInterfaceClass = USB_CLASS_AUDIO,
3030
+ USB_DEVICE_VENDOR_SPEC(0x0644, 0x8021),
31153031 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
31163032 .vendor_name = "TASCAM",
31173033 .product_name = "US122 MKII",
....@@ -3296,16 +3212,13 @@
32963212 }
32973213 },
32983214
3215
+/* Rane SL-1 */
32993216 {
3300
- /*
3301
- * The original product_name is "USB Sound Device", however this name
3302
- * is also used by the CM106 based cards, so make it unique.
3303
- */
3304
- USB_DEVICE(0x0d8c, 0x0103),
3305
- .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3306
- .product_name = "Audio Advantage MicroII",
3307
- .ifnum = QUIRK_NO_INTERFACE
3308
- }
3217
+ USB_DEVICE(0x13e5, 0x0001),
3218
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3219
+ .ifnum = QUIRK_ANY_INTERFACE,
3220
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE
3221
+ }
33093222 },
33103223
33113224 /* disabled due to regression for other devices;
....@@ -3408,25 +3321,222 @@
34083321 }
34093322 }
34103323 },
3411
-/* Dell WD15 Dock */
3412
-{
3413
- USB_DEVICE(0x0bda, 0x4014),
3414
- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3415
- .vendor_name = "Dell",
3416
- .product_name = "WD15 Dock",
3417
- .profile_name = "Dell-WD15-Dock",
3418
- .ifnum = QUIRK_NO_INTERFACE
3419
- }
3420
-},
34213324 /* Dell WD19 Dock */
34223325 {
34233326 USB_DEVICE(0x0bda, 0x402e),
34243327 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3425
- .vendor_name = "Dell",
3426
- .product_name = "WD19 Dock",
3427
- .profile_name = "Dell-WD15-Dock",
34283328 .ifnum = QUIRK_ANY_INTERFACE,
34293329 .type = QUIRK_SETUP_FMT_AFTER_RESUME
3330
+ }
3331
+},
3332
+/* MOTU Microbook II */
3333
+{
3334
+ USB_DEVICE_VENDOR_SPEC(0x07fd, 0x0004),
3335
+ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3336
+ .vendor_name = "MOTU",
3337
+ .product_name = "MicroBookII",
3338
+ .ifnum = QUIRK_ANY_INTERFACE,
3339
+ .type = QUIRK_COMPOSITE,
3340
+ .data = (const struct snd_usb_audio_quirk[]) {
3341
+ {
3342
+ .ifnum = 0,
3343
+ .type = QUIRK_AUDIO_STANDARD_MIXER,
3344
+ },
3345
+ {
3346
+ .ifnum = 0,
3347
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3348
+ .data = &(const struct audioformat) {
3349
+ .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3350
+ .channels = 6,
3351
+ .iface = 0,
3352
+ .altsetting = 1,
3353
+ .altset_idx = 1,
3354
+ .attributes = 0,
3355
+ .endpoint = 0x84,
3356
+ .rates = SNDRV_PCM_RATE_96000,
3357
+ .ep_attr = USB_ENDPOINT_XFER_ISOC |
3358
+ USB_ENDPOINT_SYNC_ASYNC,
3359
+ .rate_min = 96000,
3360
+ .rate_max = 96000,
3361
+ .nr_rates = 1,
3362
+ .maxpacksize = 0x00d8,
3363
+ .rate_table = (unsigned int[]) {
3364
+ 96000
3365
+ }
3366
+ }
3367
+ },
3368
+ {
3369
+ .ifnum = 0,
3370
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3371
+ .data = &(const struct audioformat) {
3372
+ .formats = SNDRV_PCM_FMTBIT_S24_3BE,
3373
+ .channels = 8,
3374
+ .iface = 0,
3375
+ .altsetting = 1,
3376
+ .altset_idx = 1,
3377
+ .attributes = 0,
3378
+ .endpoint = 0x03,
3379
+ .rates = SNDRV_PCM_RATE_96000,
3380
+ .ep_attr = USB_ENDPOINT_XFER_ISOC |
3381
+ USB_ENDPOINT_SYNC_ASYNC,
3382
+ .rate_min = 96000,
3383
+ .rate_max = 96000,
3384
+ .nr_rates = 1,
3385
+ .maxpacksize = 0x0120,
3386
+ .rate_table = (unsigned int[]) {
3387
+ 96000
3388
+ }
3389
+ }
3390
+ },
3391
+ {
3392
+ .ifnum = -1
3393
+ }
3394
+ }
3395
+ }
3396
+},
3397
+{
3398
+ /*
3399
+ * PIONEER DJ DDJ-SX3
3400
+ * PCM is 12 channels out, 10 channels in @ 44.1 fixed
3401
+ * interface 0, vendor class alt setting 1 for endpoints 5 and 0x86
3402
+ * The feedback for the output is the input.
3403
+ */
3404
+ USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0023),
3405
+ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3406
+ .ifnum = QUIRK_ANY_INTERFACE,
3407
+ .type = QUIRK_COMPOSITE,
3408
+ .data = (const struct snd_usb_audio_quirk[]) {
3409
+ {
3410
+ .ifnum = 0,
3411
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3412
+ .data = &(const struct audioformat) {
3413
+ .formats = SNDRV_PCM_FMTBIT_S32_LE,
3414
+ .channels = 12,
3415
+ .iface = 0,
3416
+ .altsetting = 1,
3417
+ .altset_idx = 1,
3418
+ .endpoint = 0x05,
3419
+ .ep_attr = USB_ENDPOINT_XFER_ISOC|
3420
+ USB_ENDPOINT_SYNC_ASYNC,
3421
+ .rates = SNDRV_PCM_RATE_44100,
3422
+ .rate_min = 44100,
3423
+ .rate_max = 44100,
3424
+ .nr_rates = 1,
3425
+ .rate_table = (unsigned int[]) { 44100 }
3426
+ }
3427
+ },
3428
+ {
3429
+ .ifnum = 0,
3430
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3431
+ .data = &(const struct audioformat) {
3432
+ .formats = SNDRV_PCM_FMTBIT_S32_LE,
3433
+ .channels = 10,
3434
+ .iface = 0,
3435
+ .altsetting = 1,
3436
+ .altset_idx = 1,
3437
+ .endpoint = 0x86,
3438
+ .ep_attr = USB_ENDPOINT_XFER_ISOC|
3439
+ USB_ENDPOINT_SYNC_ASYNC|
3440
+ USB_ENDPOINT_USAGE_IMPLICIT_FB,
3441
+ .rates = SNDRV_PCM_RATE_44100,
3442
+ .rate_min = 44100,
3443
+ .rate_max = 44100,
3444
+ .nr_rates = 1,
3445
+ .rate_table = (unsigned int[]) { 44100 }
3446
+ }
3447
+ },
3448
+ {
3449
+ .ifnum = -1
3450
+ }
3451
+ }
3452
+ }
3453
+},
3454
+{
3455
+ /*
3456
+ * Pioneer DJ DJM-250MK2
3457
+ * PCM is 8 channels out @ 48 fixed (endpoint 0x01)
3458
+ * and 8 channels in @ 48 fixed (endpoint 0x82).
3459
+ *
3460
+ * Both playback and recording is working, even simultaneously.
3461
+ *
3462
+ * Playback channels could be mapped to:
3463
+ * - CH1
3464
+ * - CH2
3465
+ * - AUX
3466
+ *
3467
+ * Recording channels could be mapped to:
3468
+ * - Post CH1 Fader
3469
+ * - Post CH2 Fader
3470
+ * - Cross Fader A
3471
+ * - Cross Fader B
3472
+ * - MIC
3473
+ * - AUX
3474
+ * - REC OUT
3475
+ *
3476
+ * There is remaining problem with recording directly from PHONO/LINE.
3477
+ * If we map a channel to:
3478
+ * - CH1 Control Tone PHONO
3479
+ * - CH1 Control Tone LINE
3480
+ * - CH2 Control Tone PHONO
3481
+ * - CH2 Control Tone LINE
3482
+ * it is silent.
3483
+ * There is no signal even on other operating systems with official drivers.
3484
+ * The signal appears only when a supported application is started.
3485
+ * This needs to be investigated yet...
3486
+ * (there is quite a lot communication on the USB in both directions)
3487
+ *
3488
+ * In current version this mixer could be used for playback
3489
+ * and for recording from vinyls (through Post CH* Fader)
3490
+ * but not for DVS (Digital Vinyl Systems) like in Mixxx.
3491
+ */
3492
+ USB_DEVICE_VENDOR_SPEC(0x2b73, 0x0017),
3493
+ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3494
+ .ifnum = QUIRK_ANY_INTERFACE,
3495
+ .type = QUIRK_COMPOSITE,
3496
+ .data = (const struct snd_usb_audio_quirk[]) {
3497
+ {
3498
+ .ifnum = 0,
3499
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3500
+ .data = &(const struct audioformat) {
3501
+ .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3502
+ .channels = 8, // outputs
3503
+ .iface = 0,
3504
+ .altsetting = 1,
3505
+ .altset_idx = 1,
3506
+ .endpoint = 0x01,
3507
+ .ep_attr = USB_ENDPOINT_XFER_ISOC|
3508
+ USB_ENDPOINT_SYNC_ASYNC,
3509
+ .rates = SNDRV_PCM_RATE_48000,
3510
+ .rate_min = 48000,
3511
+ .rate_max = 48000,
3512
+ .nr_rates = 1,
3513
+ .rate_table = (unsigned int[]) { 48000 }
3514
+ }
3515
+ },
3516
+ {
3517
+ .ifnum = 0,
3518
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3519
+ .data = &(const struct audioformat) {
3520
+ .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3521
+ .channels = 8, // inputs
3522
+ .iface = 0,
3523
+ .altsetting = 1,
3524
+ .altset_idx = 1,
3525
+ .endpoint = 0x82,
3526
+ .ep_attr = USB_ENDPOINT_XFER_ISOC|
3527
+ USB_ENDPOINT_SYNC_ASYNC|
3528
+ USB_ENDPOINT_USAGE_IMPLICIT_FB,
3529
+ .rates = SNDRV_PCM_RATE_48000,
3530
+ .rate_min = 48000,
3531
+ .rate_max = 48000,
3532
+ .nr_rates = 1,
3533
+ .rate_table = (unsigned int[]) { 48000 }
3534
+ }
3535
+ },
3536
+ {
3537
+ .ifnum = -1
3538
+ }
3539
+ }
34303540 }
34313541 },
34323542 {
....@@ -3486,43 +3596,119 @@
34863596 }
34873597 },
34883598
3489
-#define ALC1220_VB_DESKTOP(vend, prod) { \
3490
- USB_DEVICE(vend, prod), \
3491
- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { \
3492
- .vendor_name = "Realtek", \
3493
- .product_name = "ALC1220-VB-DT", \
3494
- .profile_name = "Realtek-ALC1220-VB-Desktop", \
3495
- .ifnum = QUIRK_NO_INTERFACE \
3496
- } \
3497
-}
3498
-ALC1220_VB_DESKTOP(0x0414, 0xa002), /* Gigabyte TRX40 Aorus Pro WiFi */
3499
-ALC1220_VB_DESKTOP(0x0db0, 0x0d64), /* MSI TRX40 Creator */
3500
-ALC1220_VB_DESKTOP(0x0db0, 0x543d), /* MSI TRX40 */
3501
-ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */
3502
-#undef ALC1220_VB_DESKTOP
3503
-
3504
-/* Two entries for Gigabyte TRX40 Aorus Master:
3505
- * TRX40 Aorus Master has two USB-audio devices, one for the front headphone
3506
- * with ESS SABRE9218 DAC chip, while another for the rest I/O (the rear
3507
- * panel and the front mic) with Realtek ALC1220-VB.
3508
- * Here we provide two distinct names for making UCM profiles easier.
3509
- */
35103599 {
3511
- USB_DEVICE(0x0414, 0xa000),
3512
- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3513
- .vendor_name = "Gigabyte",
3514
- .product_name = "Aorus Master Front Headphone",
3515
- .profile_name = "Gigabyte-Aorus-Master-Front-Headphone",
3516
- .ifnum = QUIRK_NO_INTERFACE
3600
+ /*
3601
+ * Pioneer DJ DJM-900NXS2
3602
+ * 10 channels playback & 12 channels capture @ 44.1/48/96kHz S24LE
3603
+ */
3604
+ USB_DEVICE_VENDOR_SPEC(0x2b73, 0x000a),
3605
+ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3606
+ .ifnum = QUIRK_ANY_INTERFACE,
3607
+ .type = QUIRK_COMPOSITE,
3608
+ .data = (const struct snd_usb_audio_quirk[]) {
3609
+ {
3610
+ .ifnum = 0,
3611
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3612
+ .data = &(const struct audioformat) {
3613
+ .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3614
+ .channels = 10,
3615
+ .iface = 0,
3616
+ .altsetting = 1,
3617
+ .altset_idx = 1,
3618
+ .endpoint = 0x01,
3619
+ .ep_attr = USB_ENDPOINT_XFER_ISOC|
3620
+ USB_ENDPOINT_SYNC_ASYNC,
3621
+ .rates = SNDRV_PCM_RATE_44100|
3622
+ SNDRV_PCM_RATE_48000|
3623
+ SNDRV_PCM_RATE_96000,
3624
+ .rate_min = 44100,
3625
+ .rate_max = 96000,
3626
+ .nr_rates = 3,
3627
+ .rate_table = (unsigned int[]) {
3628
+ 44100, 48000, 96000
3629
+ }
3630
+ }
3631
+ },
3632
+ {
3633
+ .ifnum = 0,
3634
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3635
+ .data = &(const struct audioformat) {
3636
+ .formats = SNDRV_PCM_FMTBIT_S24_3LE,
3637
+ .channels = 12,
3638
+ .iface = 0,
3639
+ .altsetting = 1,
3640
+ .altset_idx = 1,
3641
+ .endpoint = 0x82,
3642
+ .ep_attr = USB_ENDPOINT_XFER_ISOC|
3643
+ USB_ENDPOINT_SYNC_ASYNC|
3644
+ USB_ENDPOINT_USAGE_IMPLICIT_FB,
3645
+ .rates = SNDRV_PCM_RATE_44100|
3646
+ SNDRV_PCM_RATE_48000|
3647
+ SNDRV_PCM_RATE_96000,
3648
+ .rate_min = 44100,
3649
+ .rate_max = 96000,
3650
+ .nr_rates = 3,
3651
+ .rate_table = (unsigned int[]) {
3652
+ 44100, 48000, 96000
3653
+ }
3654
+ }
3655
+ },
3656
+ {
3657
+ .ifnum = -1
3658
+ }
3659
+ }
35173660 }
35183661 },
3662
+
3663
+/*
3664
+ * MacroSilicon MS2100/MS2106 based AV capture cards
3665
+ *
3666
+ * These claim 96kHz 1ch in the descriptors, but are actually 48kHz 2ch.
3667
+ * They also need QUIRK_AUDIO_ALIGN_TRANSFER, which makes one wonder if
3668
+ * they pretend to be 96kHz mono as a workaround for stereo being broken
3669
+ * by that...
3670
+ *
3671
+ * They also have an issue with initial stream alignment that causes the
3672
+ * channels to be swapped and out of phase, which is dealt with in quirks.c.
3673
+ */
35193674 {
3520
- USB_DEVICE(0x0414, 0xa001),
3521
- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
3522
- .vendor_name = "Gigabyte",
3523
- .product_name = "Aorus Master Main Audio",
3524
- .profile_name = "Gigabyte-Aorus-Master-Main-Audio",
3525
- .ifnum = QUIRK_NO_INTERFACE
3675
+ USB_AUDIO_DEVICE(0x534d, 0x0021),
3676
+ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
3677
+ .vendor_name = "MacroSilicon",
3678
+ .product_name = "MS210x",
3679
+ .ifnum = QUIRK_ANY_INTERFACE,
3680
+ .type = QUIRK_COMPOSITE,
3681
+ .data = &(const struct snd_usb_audio_quirk[]) {
3682
+ {
3683
+ .ifnum = 2,
3684
+ .type = QUIRK_AUDIO_ALIGN_TRANSFER,
3685
+ },
3686
+ {
3687
+ .ifnum = 2,
3688
+ .type = QUIRK_AUDIO_STANDARD_MIXER,
3689
+ },
3690
+ {
3691
+ .ifnum = 3,
3692
+ .type = QUIRK_AUDIO_FIXED_ENDPOINT,
3693
+ .data = &(const struct audioformat) {
3694
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
3695
+ .channels = 2,
3696
+ .iface = 3,
3697
+ .altsetting = 1,
3698
+ .altset_idx = 1,
3699
+ .attributes = 0,
3700
+ .endpoint = 0x82,
3701
+ .ep_attr = USB_ENDPOINT_XFER_ISOC |
3702
+ USB_ENDPOINT_SYNC_ASYNC,
3703
+ .rates = SNDRV_PCM_RATE_CONTINUOUS,
3704
+ .rate_min = 48000,
3705
+ .rate_max = 48000,
3706
+ }
3707
+ },
3708
+ {
3709
+ .ifnum = -1
3710
+ }
3711
+ }
35263712 }
35273713 },
35283714
....@@ -3538,13 +3724,7 @@
35383724 * channels to be swapped and out of phase, which is dealt with in quirks.c.
35393725 */
35403726 {
3541
- .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
3542
- USB_DEVICE_ID_MATCH_INT_CLASS |
3543
- USB_DEVICE_ID_MATCH_INT_SUBCLASS,
3544
- .idVendor = 0x534d,
3545
- .idProduct = 0x2109,
3546
- .bInterfaceClass = USB_CLASS_AUDIO,
3547
- .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
3727
+ USB_AUDIO_DEVICE(0x534d, 0x2109),
35483728 .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
35493729 .vendor_name = "MacroSilicon",
35503730 .product_name = "MS2109",
....@@ -3617,3 +3797,4 @@
36173797 },
36183798
36193799 #undef USB_DEVICE_VENDOR_SPEC
3800
+#undef USB_AUDIO_DEVICE