Commit 7f5ad9c9 authored by Takashi Iwai's avatar Takashi Iwai

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

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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200526082810.29506-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4020d1cc
......@@ -397,6 +397,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
*/
......@@ -526,6 +541,10 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
.id = USB_ID(0x1b1c, 0x0a42),
.map = corsair_virtuoso_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,
......
......@@ -3566,4 +3566,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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment