[PATCH v3 5/5] ASoC: amd: yc: allow forcing the ACP DMIC decision
From: MuXian Chen
Date: Thu Dec 03 2026 - 07:15:50 EST
Board detection can be wrong in both directions: a board may wire the
DMIC without being listed, and a listed board may have it disabled in
firmware. Follow the snd-intel-dspcfg.dsp_driver convention and add a
read-only module parameter so the decision can be overridden from the
kernel command line or modprobe.d:
snd_pci_acp6x.dmic=0 auto (default)
snd_pci_acp6x.dmic=1 force the DMIC path on
snd_pci_acp6x.dmic=2 force it off
The override is applied inside snd_acp6x_platform_has_dmic(), so the
flag handed to the machine driver already reflects it. Forcing it on
initializes a block that shares its clock domain with HDA; that is the
caller's choice and may break HDA on boards that do not wire it.
Signed-off-by: MuXian Chen <a18165943161@xxxxxxxxx>
---
sound/soc/amd/yc/acp6x-quirks.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/yc/acp6x-quirks.c b/sound/soc/amd/yc/acp6x-quirks.c
index d6df3b8..6a07203 100644
--- a/sound/soc/amd/yc/acp6x-quirks.c
+++ b/sound/soc/amd/yc/acp6x-quirks.c
@@ -18,6 +18,17 @@
#include "acp6x.h"
+enum acp6x_dmic_mode {
+ ACP6X_DMIC_AUTO = 0,
+ ACP6X_DMIC_ON,
+ ACP6X_DMIC_OFF,
+ ACP6X_DMIC_LAST = ACP6X_DMIC_OFF,
+};
+
+static int dmic;
+module_param(dmic, int, 0444);
+MODULE_PARM_DESC(dmic, "Force the ACP DMIC path (0=auto, 1=on, 2=off)");
+
static const struct dmi_system_id yc_acp_quirk_table[] = {
{
.matches = {
@@ -857,6 +868,9 @@ bool snd_acp6x_platform_has_dmic(struct pci_dev *pci)
const union acpi_object *obj;
acpi_integer wov;
+ if (dmic > ACP6X_DMIC_AUTO && dmic <= ACP6X_DMIC_LAST)
+ return dmic == ACP6X_DMIC_ON;
+
if (!ACPI_HANDLE(&pci->dev) ||
acpi_evaluate_integer(ACPI_HANDLE(&pci->dev), "_WOV", NULL, &wov) ||
!wov)
--
2.56.1