1
0
Fork 0

ALSA: usb-audio: Quirks for Gigabyte TRX40 Aorus Master onboard audio

[ Upstream commit 7f5ad9c900 ]

Gigabyte TRX40 Aorus Master is equipped with two USB-audio devices,
a Realtek ALC1220-VB codec (USB ID 0414:a001) and an ESS SABRE9218 DAC
(USB ID 0414:a000).  The latter serves solely for the headphone output
on the front panel while the former serves for the rest I/Os (mostly
for the I/Os in the rear panel but also including the front mic).

Both chips do work more or less with the unmodified USB-audio driver,
but there are a few glitches.  The ALC1220-VB returns an error for an
inquiry to some jacks, as already seen on other TRX40-based mobos.
However this machine has a slightly incompatible configuration, hence
the existing mapping cannot be used as is.

Meanwhile the ESS chip seems working without any quirk.  But since
both audio devices don't provide any specific names, both cards appear
as "USB-Audio", and it's quite confusing for users.

This patch is an attempt to overcome those issues:

- The specific mapping table for ALC1220-VB is provided, reducing the
  non-working nodes and renaming the badly chosen controls.
  The connector map isn't needed here unlike other TRX40 quirks.

- For both USB IDs (0414:a000 and 0414:a001), provide specific card
  name strings, so that user-space can identify more easily; and more
  importantly, UCM profile can be applied to each.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200526082810.29506-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Takashi Iwai 2020-05-26 10:28:10 +02:00 committed by Greg Kroah-Hartman
parent 8fc8674092
commit c33bf209de
2 changed files with 44 additions and 0 deletions

View File

@ -387,6 +387,21 @@ static const struct usbmix_connector_map trx40_mobo_connector_map[] = {
{}
};
/* Rear panel + front mic on Gigabyte TRX40 Aorus Master with ALC1220-VB */
static const struct usbmix_name_map aorus_master_alc1220vb_map[] = {
{ 17, NULL }, /* OT, IEC958?, disabled */
{ 19, NULL, 12 }, /* FU, Input Gain Pad - broken response, disabled */
{ 16, "Line Out" }, /* OT */
{ 22, "Line Out Playback" }, /* FU */
{ 7, "Line" }, /* IT */
{ 19, "Line Capture" }, /* FU */
{ 8, "Mic" }, /* IT */
{ 20, "Mic Capture" }, /* FU */
{ 9, "Front Mic" }, /* IT */
{ 21, "Front Mic Capture" }, /* FU */
{}
};
/*
* Control map entries
*/
@ -506,6 +521,10 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
.id = USB_ID(0x05a7, 0x1020),
.map = bose_companion5_map,
},
{ /* Gigabyte TRX40 Aorus Master (rear panel + front mic) */
.id = USB_ID(0x0414, 0xa001),
.map = aorus_master_alc1220vb_map,
},
{ /* Gigabyte TRX40 Aorus Pro WiFi */
.id = USB_ID(0x0414, 0xa002),
.map = trx40_mobo_map,

View File

@ -3650,4 +3650,29 @@ ALC1220_VB_DESKTOP(0x0db0, 0x543d), /* MSI TRX40 */
ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */
#undef ALC1220_VB_DESKTOP
/* Two entries for Gigabyte TRX40 Aorus Master:
* TRX40 Aorus Master has two USB-audio devices, one for the front headphone
* with ESS SABRE9218 DAC chip, while another for the rest I/O (the rear
* panel and the front mic) with Realtek ALC1220-VB.
* Here we provide two distinct names for making UCM profiles easier.
*/
{
USB_DEVICE(0x0414, 0xa000),
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
.vendor_name = "Gigabyte",
.product_name = "Aorus Master Front Headphone",
.profile_name = "Gigabyte-Aorus-Master-Front-Headphone",
.ifnum = QUIRK_NO_INTERFACE
}
},
{
USB_DEVICE(0x0414, 0xa001),
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
.vendor_name = "Gigabyte",
.product_name = "Aorus Master Main Audio",
.profile_name = "Gigabyte-Aorus-Master-Main-Audio",
.ifnum = QUIRK_NO_INTERFACE
}
},
#undef USB_DEVICE_VENDOR_SPEC