hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/sound/usb/mixer_maps.c
....@@ -1,22 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Additional mixer mapping
34 *
45 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
- *
206 */
217
228 struct usbmix_dB_map {
....@@ -247,7 +233,7 @@
247233 };
248234
249235 /* Section "justlink_map" below added by James Courtier-Dutton <James@superbug.demon.co.uk>
250
- * sourced from Maplin Electronics (http://www.maplin.co.uk), part number A56AK
236
+ * sourced from Maplin Electronics (https://www.maplin.co.uk), part number A56AK
251237 * Part has 2 connectors that act as a single output. (TOSLINK Optical for digital out, and 3.5mm Jack for Analogue out.)
252238 * The USB Mixer publishes a Microphone and extra Volume controls for it, but none exist on the device,
253239 * so this map removes all unwanted sliders from alsamixer
....@@ -371,12 +357,42 @@
371357 { 0 }
372358 };
373359
374
-/* Some mobos shipped with a dummy HD-audio show the invalid GET_MIN/GET_MAX
375
- * response for Input Gain Pad (id=19, control=12) and the connector status
376
- * for SPDIF terminal (id=18). Skip them.
360
+/*
361
+ * Corsair Virtuoso calls everything "Headset" without this, leading to
362
+ * applications moving the sidetone control instead of the main one.
377363 */
378
-static const struct usbmix_name_map asus_rog_map[] = {
379
- { 18, NULL }, /* OT, connector control */
364
+static const struct usbmix_name_map corsair_virtuoso_map[] = {
365
+ { 3, "Mic Capture" },
366
+ { 6, "Sidetone Playback" },
367
+ { 0 }
368
+};
369
+
370
+/* ASUS ROG Zenith II with Realtek ALC1220-VB */
371
+static const struct usbmix_name_map asus_zenith_ii_map[] = {
372
+ { 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
373
+ { 16, "Speaker" }, /* OT */
374
+ { 22, "Speaker Playback" }, /* FU */
375
+ { 7, "Line" }, /* IT */
376
+ { 19, "Line Capture" }, /* FU */
377
+ { 8, "Mic" }, /* IT */
378
+ { 20, "Mic Capture" }, /* FU */
379
+ { 9, "Front Mic" }, /* IT */
380
+ { 21, "Front Mic Capture" }, /* FU */
381
+ { 17, "IEC958" }, /* OT */
382
+ { 23, "IEC958 Playback" }, /* FU */
383
+ {}
384
+};
385
+
386
+static const struct usbmix_connector_map asus_zenith_ii_connector_map[] = {
387
+ { 10, 16 }, /* (Back) Speaker */
388
+ { 11, 17 }, /* SPDIF */
389
+ { 13, 7 }, /* Line */
390
+ { 14, 8 }, /* Mic */
391
+ { 15, 9 }, /* Front Mic */
392
+ {}
393
+};
394
+
395
+static const struct usbmix_name_map lenovo_p620_rear_map[] = {
380396 { 19, NULL, 12 }, /* FU, Input Gain Pad */
381397 {}
382398 };
....@@ -528,6 +544,10 @@
528544 .map = maya44_map,
529545 },
530546 {
547
+ .id = USB_ID(0x2708, 0x0002), /* Audient iD14 */
548
+ .ignore_ctl_error = 1,
549
+ },
550
+ {
531551 /* KEF X300A */
532552 .id = USB_ID(0x27ac, 0x1000),
533553 .map = scms_usb3318_map,
....@@ -538,9 +558,43 @@
538558 .map = scms_usb3318_map,
539559 },
540560 {
561
+ /* Corsair Virtuoso SE Latest (wired mode) */
562
+ .id = USB_ID(0x1b1c, 0x0a3f),
563
+ .map = corsair_virtuoso_map,
564
+ },
565
+ {
566
+ /* Corsair Virtuoso SE Latest (wireless mode) */
567
+ .id = USB_ID(0x1b1c, 0x0a40),
568
+ .map = corsair_virtuoso_map,
569
+ },
570
+ {
571
+ .id = USB_ID(0x30be, 0x0101), /* Schiit Hel */
572
+ .ignore_ctl_error = 1,
573
+ },
574
+ {
541575 /* Bose Companion 5 */
542576 .id = USB_ID(0x05a7, 0x1020),
543577 .map = bose_companion5_map,
578
+ },
579
+ {
580
+ /* Corsair Virtuoso SE (wired mode) */
581
+ .id = USB_ID(0x1b1c, 0x0a3d),
582
+ .map = corsair_virtuoso_map,
583
+ },
584
+ {
585
+ /* Corsair Virtuoso SE (wireless mode) */
586
+ .id = USB_ID(0x1b1c, 0x0a3e),
587
+ .map = corsair_virtuoso_map,
588
+ },
589
+ {
590
+ /* Corsair Virtuoso (wired mode) */
591
+ .id = USB_ID(0x1b1c, 0x0a41),
592
+ .map = corsair_virtuoso_map,
593
+ },
594
+ {
595
+ /* Corsair Virtuoso (wireless mode) */
596
+ .id = USB_ID(0x1b1c, 0x0a42),
597
+ .map = corsair_virtuoso_map,
544598 },
545599 { /* Gigabyte TRX40 Aorus Master (rear panel + front mic) */
546600 .id = USB_ID(0x0414, 0xa001),
....@@ -551,13 +605,15 @@
551605 .map = trx40_mobo_map,
552606 .connector_map = trx40_mobo_connector_map,
553607 },
554
- { /* ASUS ROG Zenith II */
608
+ { /* ASUS ROG Zenith II (main audio) */
555609 .id = USB_ID(0x0b05, 0x1916),
556
- .map = asus_rog_map,
610
+ .map = asus_zenith_ii_map,
611
+ .connector_map = asus_zenith_ii_connector_map,
557612 },
558613 { /* ASUS ROG Strix */
559614 .id = USB_ID(0x0b05, 0x1917),
560
- .map = asus_rog_map,
615
+ .map = trx40_mobo_map,
616
+ .connector_map = trx40_mobo_connector_map,
561617 },
562618 { /* MSI TRX40 Creator */
563619 .id = USB_ID(0x0db0, 0x0d64),
....@@ -573,6 +629,15 @@
573629 .id = USB_ID(0x26ce, 0x0a01),
574630 .map = trx40_mobo_map,
575631 .connector_map = trx40_mobo_connector_map,
632
+ },
633
+ { /* Lenovo ThinkStation P620 Rear */
634
+ .id = USB_ID(0x17aa, 0x1046),
635
+ .map = lenovo_p620_rear_map,
636
+ },
637
+ {
638
+ /* Sennheiser Communications Headset [PC 8] */
639
+ .id = USB_ID(0x1395, 0x0025),
640
+ .map = sennheiser_pc8_map,
576641 },
577642 { 0 } /* terminator */
578643 };
....@@ -639,11 +704,6 @@
639704 {
640705 .id = UAC3_FUNCTION_SUBCLASS_SPEAKERPHONE,
641706 .map = uac3_badd_speakerphone_map,
642
- },
643
- {
644
- /* Sennheiser Communications Headset [PC 8] */
645
- .id = USB_ID(0x1395, 0x0025),
646
- .map = sennheiser_pc8_map,
647707 },
648708 { 0 } /* terminator */
649709 };