Skip to contentSkip to conversation

ASoC: amd: yc: Add DMI quirk for GIGABYTE EAGLE 9MJ

PATCH In review Adolfo Morales Tena 4 participants 4 messages Nov 15 – Nov 17

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: amd: yc: Add DMI quirk for GIGABYTE EAGLE 9MJ

The GIGABYTE EAGLE 9MJ has a digital microphone connected to the ACP6x PDM controller, but it is not listed in the quirk table. As a result the machine driver does not register the sound card and the internal microphone is unusable.

Add a DMI entry to enable the DMIC. With it, the acp6x card is registered and the internal microphone records correctly. The kernel log shows:

acp_yc_mach acp_yc_mach.0: Enabling ACP DMIC support via DMI

---
 sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
 1 file changed, 7 insertions(+)
sound/soc/amd/yc/acp6x-mach.c +7 -0
index e14c73e7e..f636b5ba5 100644
@@ -969,6 +969,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "TUF Gaming A16 FA607NUQ"),
 		}
 	},
+	{
+		.driver_data = &acp6x_card,
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "GIGABYTE"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "GIGABYTE EAGLE 9MJ"),
+		}
+	},
 	{}
 };
 
Signature · 1 line
2.56.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [High] ASoC: amd: yc: bypassed…

Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce:
- [High] ASoC: amd: yc: bypassed AcpDmicConnected check in acp6x_probe()
[1]
--

commit e897ced0b25eb47667a9260d248834825a1643ca
Author: Adolfo Morales Tena <[email protected]>

ASoC: amd: yc: Add DMI quirk for GIGABYTE EAGLE 9MJ

This commit adds a DMI quirk entry for the GIGABYTE EAGLE 9MJ to yc_acp_quirk_table to enable internal DMIC support.

Quoted 7 lines
sound/soc/amd/yc/acp6x-mach.c +0 -0
index e14c73e7e988a..f636b5ba5b072 100644
@@ -969,6 +969,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
 			DMI_MATCH(DMI_PRODUCT_NAME, "TUF Gaming A16 FA607NUQ"),
 		}

sound/soc/amd/yc/acp6x-mach.c static const struct dmi_system_id yc_acp_quirk_table[] = { · line 980

Quoted 10 lines
sound/soc/amd/yc/acp6x-mach.c +7 -0
 	},
+	{
+		.driver_data = &acp6x_card,
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "GIGABYTE"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "GIGABYTE EAGLE 9MJ"),
+		}
+	},
 	{}
 };

[Severity: High]
This problem wasn't introduced by this patch, but does acp6x_probe() bypass the is_dmic_enable check when the _WOV ACPI method is missing [1]?

sound/soc/amd/yc/acp6x-mach.c:acp6x_probe() {
	...
	ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
	if (!ACPI_FAILURE(ret)) {
		wov_en = dmic_status;
		if (!wov_en)
			goto check_dmi_entry;
	} else {
		/* Incase of ACPI method read failure then jump to check_dmi_entry */
		goto check_dmi_entry;
	}

	if (is_dmic_enable)
		platform_set_drvdata(pdev, &acp6x_card);

check_dmi_entry:

	/* check for any DMI overrides */
	dmi_id = dmi_first_match(yc_acp_quirk_table);
	...
}

When a BIOS sets the AcpDmicConnected _DSD property to 1 (setting is_dmic_enable = true) but omits the _WOV method, acpi_evaluate_integer() fails and the else branch jumps directly to check_dmi_entry. That skips binding acp6x_card from is_dmic_enable, so unless the machine is also listed in yc_acp_quirk_table, platform_get_drvdata() returns NULL and acp6x_probe() fails with -ENODEV.

[1] https://sashiko.dev/#/bug/linux-9da65c71-a54c-4d66-b1a8-325c916b74d6

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Adolfo Morales Tena
Quoted 7 lines · Adolfo Morales Tena

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

The GIGABYTE EAGLE 9MJ has a digital microphone connected to the ACP6x PDM controller, but it is not listed in the quirk table. As a result the machine driver does not register the sound card and the internal microphone is unusable.

Quoted 7 lines

Add a DMI entry to enable the DMIC. With it, the acp6x card is registered and the internal microphone records correctly. The kernel log shows:

acp_yc_mach acp_yc_mach.0: Enabling ACP DMIC support via DMI

Quoted 24 lines
---
  sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
  1 file changed, 7 insertions(+)
sound/soc/amd/yc/acp6x-mach.c +7 -1
index e14c73e7e..f636b5ba5 100644
@@ -969,6 +969,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
                         DMI_MATCH(DMI_PRODUCT_NAME, "TUF Gaming A16 FA607NUQ"),
                 }
         },
+       {
+               .driver_data = &acp6x_card,
+               .matches = {
+                       DMI_MATCH(DMI_BOARD_VENDOR, "GIGABYTE"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "GIGABYTE EAGLE 9MJ"),
+               }
+       },
         {}
  };
 
--

2.56.0

maintainer
#3 lore raw
In reply to Adolfo Morales Tena
Quoted 1 line · Adolfo Morales Tena

ASoC: amd: yc: Add DMI quirk for GIGABYTE EAGLE 9MJ

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4

Thanks!

[1/1] ASoC: amd: yc: Add DMI quirk for GIGABYTE EAGLE 9MJ

      https://git.kernel.org/broonie/sound/c/f32a26faf4ce

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark