| From d5044dfb08414bdef5dc67da7f36a538097e1905 Mon Sep 17 00:00:00 2001 |
| From: Takashi Iwai <tiwai@suse.de> |
| Date: Wed, 8 Apr 2020 16:04:48 +0200 |
| Subject: [PATCH] ALSA: usb-audio: Add mixer workaround for TRX40 and co |
| |
| commit 2a48218f8e23d47bd3e23cfdfb8aa9066f7dc3e6 upstream. |
| |
| Some recent boards (supposedly with a new AMD platform) contain the |
| USB audio class 2 device that is often tied with HD-audio. The device |
| exposes an Input Gain Pad control (id=19, control=12) but this node |
| doesn't behave correctly, returning an error for each inquiry of |
| GET_MIN and GET_MAX that should have been mandatory. |
| |
| As a workaround, simply ignore this node by adding a usbmix_name_map |
| table entry. The currently known devices are: |
| * 0414:a002 - Gigabyte TRX40 Aorus Pro WiFi |
| * 0b05:1916 - ASUS ROG Zenith II |
| * 0b05:1917 - ASUS ROG Strix |
| * 0db0:0d64 - MSI TRX40 Creator |
| * 0db0:543d - MSI TRX40 |
| |
| BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206543 |
| Cc: <stable@vger.kernel.org> |
| Link: https://lore.kernel.org/r/20200408140449.22319-1-tiwai@suse.de |
| Signed-off-by: Takashi Iwai <tiwai@suse.de> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c |
| index 73baf398c84a..f6a67eecb063 100644 |
| --- a/sound/usb/mixer_maps.c |
| +++ b/sound/usb/mixer_maps.c |
| @@ -349,6 +349,14 @@ static const struct usbmix_name_map dell_alc4020_map[] = { |
| { 0 } |
| }; |
| |
| +/* Some mobos shipped with a dummy HD-audio show the invalid GET_MIN/GET_MAX |
| + * response for Input Gain Pad (id=19, control=12). Skip it. |
| + */ |
| +static const struct usbmix_name_map asus_rog_map[] = { |
| + { 19, NULL, 12 }, /* FU, Input Gain Pad */ |
| + {} |
| +}; |
| + |
| /* |
| * Control map entries |
| */ |
| @@ -468,6 +476,26 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { |
| .id = USB_ID(0x05a7, 0x1020), |
| .map = bose_companion5_map, |
| }, |
| + { /* Gigabyte TRX40 Aorus Pro WiFi */ |
| + .id = USB_ID(0x0414, 0xa002), |
| + .map = asus_rog_map, |
| + }, |
| + { /* ASUS ROG Zenith II */ |
| + .id = USB_ID(0x0b05, 0x1916), |
| + .map = asus_rog_map, |
| + }, |
| + { /* ASUS ROG Strix */ |
| + .id = USB_ID(0x0b05, 0x1917), |
| + .map = asus_rog_map, |
| + }, |
| + { /* MSI TRX40 Creator */ |
| + .id = USB_ID(0x0db0, 0x0d64), |
| + .map = asus_rog_map, |
| + }, |
| + { /* MSI TRX40 */ |
| + .id = USB_ID(0x0db0, 0x543d), |
| + .map = asus_rog_map, |
| + }, |
| { 0 } /* terminator */ |
| }; |
| |
| -- |
| 2.7.4 |
| |