Skip to contentSkip to conversation

ASoC: amd: fix DMIC detection on Lenovo ThinkPad P14s Gen 6 AMD

PATCH In review Nikita Koval 1 participant 2 messages Sep 11 – Sep 12

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

PATCH 1/1 ASoC: amd: fix DMIC detection on Lenovo ThinkPad P14s Gen 6 AMD

The Lenovo ThinkPad P14s Gen 6 AMD with BIOS R2XET41W (1.21) reports acp-audio-config-flag as FLAG_AMD_LEGACY_ONLY_DMIC.

This causes the legacy ACP driver path to be selected and results in:

No matching ASoC machine driver found

The firmware otherwise exposes a valid PDM microphone device through ACPI, with _ADR 0x02 and acp-audio-device-type 0x02.

After selecting the snd_pci_ps path, the firmware _WOV method returns
0. The driver currently treats this as disabling the PDM/DMIC path, which prevents the internal microphone from being registered.

Add DMI quirks for the ThinkPad P14s Gen 6 AMD to ignore the firmware ACP config flag and the _WOV value.

With these quirks applied, the internal microphone is registered as:

acp63: DMIC capture dmic-hifi-0

and capture works correctly.

DMI:
System Vendor: LENOVO
Product Name: 21RV000NUS
Product Version: ThinkPad P14s Gen 6 AMD

Tested with BIOS R2XET41W (1.21) and Linux 7.2.4.

---
 sound/soc/amd/acp-config.c |  7 +++++++
 sound/soc/amd/ps/pci-ps.c  | 14 +++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)
sound/soc/amd/acp-config.c +7 -0
index 2d50be819..0372906f9 100644
@@ -77,6 +77,13 @@ static const struct dmi_system_id acp70_acpi_flag_override_table[] = {
 			DMI_MATCH(DMI_BOARD_NAME, "8EA2"),
 		},
 	},
+	{
+		/* Lenovo ThinkPad P14s Gen 6 AMD */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad P14s Gen 6 AMD")
+		},
+	},
 	{}
 };
 
sound/soc/amd/ps/pci-ps.c +13 -1
index 729f9aaba..afb8c78d3 100644
@@ -10,6 +10,7 @@
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/delay.h>
+#include <linux/dmi.h>
 #include <linux/platform_device.h>
 #include <linux/acpi.h>
 #include <linux/interrupt.h>
@@ -401,6 +402,17 @@ static int acp63_machine_register(struct device *dev)
 	return 0;
 }
 
+static const struct dmi_system_id acp_ignore_wov_table[] = {
+	{
+		/* Lenovo ThinkPad P14s Gen 6 AMD */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad P14s Gen 6 AMD"),
+		},
+	},
+	{}
+};
+
 static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *acp_data)
 {
 	struct acpi_device *pdm_dev;
@@ -430,7 +442,7 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
 
 		handle = ACPI_HANDLE(&pci->dev);
 		ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
-		if (!ACPI_FAILURE(ret))
+		if (!ACPI_FAILURE(ret) && !dmi_check_system(acp_ignore_wov_table))
 			wov_en = dmic_status;
 	}
 
Signature · 1 line
2.55.0
#1 lore raw

Please disregard this patch for now.

After removing the out-of-tree test modules and performing a full power cycle, the issue is no longer reproducible with the stock Fedora 7.2.4 kernel and the same BIOS version (R2XET41W 1.21).

I had also performed an emergency reset on the ThinkPad during the debugging process. This may have cleared some persistent EC/firmware state, so it is possible that the original failure was not caused solely by the ACPI values addressed by this patch.

The stock snd_acp_pci driver now successfully registers the PDM microphone as acp-pdm-mach, and capture works correctly.

Since I can no longer reproduce the original failure on the unmodified kernel, the proposed DMI quirks are not sufficiently justified.

Sorry for the noise.

пт, 11 сент. 2026 г. в 18:21, Nikita Koval <[email protected]>:

Quoted 97 lines

The Lenovo ThinkPad P14s Gen 6 AMD with BIOS R2XET41W (1.21) reports acp-audio-config-flag as FLAG_AMD_LEGACY_ONLY_DMIC.

This causes the legacy ACP driver path to be selected and results in:

No matching ASoC machine driver found

The firmware otherwise exposes a valid PDM microphone device through ACPI, with _ADR 0x02 and acp-audio-device-type 0x02.

After selecting the snd_pci_ps path, the firmware _WOV method returns
0. The driver currently treats this as disabling the PDM/DMIC path, which prevents the internal microphone from being registered.

Add DMI quirks for the ThinkPad P14s Gen 6 AMD to ignore the firmware ACP config flag and the _WOV value.

With these quirks applied, the internal microphone is registered as:

acp63: DMIC capture dmic-hifi-0

and capture works correctly.

DMI:
System Vendor: LENOVO
Product Name: 21RV000NUS
Product Version: ThinkPad P14s Gen 6 AMD

Tested with BIOS R2XET41W (1.21) and Linux 7.2.4.

---
 sound/soc/amd/acp-config.c |  7 +++++++
 sound/soc/amd/ps/pci-ps.c  | 14 +++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)
sound/soc/amd/acp-config.c +7 -0
index 2d50be819..0372906f9 100644
@@ -77,6 +77,13 @@ static const struct dmi_system_id acp70_acpi_flag_override_table[] = {
                        DMI_MATCH(DMI_BOARD_NAME, "8EA2"),
                },
        },
+       {
+               /* Lenovo ThinkPad P14s Gen 6 AMD */
+               .matches = {
+                       DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad P14s Gen 6 AMD")
+               },
+       },
        {}
 };
 
sound/soc/amd/ps/pci-ps.c +13 -2
index 729f9aaba..afb8c78d3 100644
@@ -10,6 +10,7 @@
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/delay.h>
+#include <linux/dmi.h>
 #include <linux/platform_device.h>
 #include <linux/acpi.h>
 #include <linux/interrupt.h>
@@ -401,6 +402,17 @@ static int acp63_machine_register(struct device *dev)
        return 0;
 }
 
+static const struct dmi_system_id acp_ignore_wov_table[] = {
+       {
+               /* Lenovo ThinkPad P14s Gen 6 AMD */
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+                       DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad P14s Gen 6 AMD"),
+               },
+       },
+       {}
+};
+
 static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *acp_data)
 {
        struct acpi_device *pdm_dev;
@@ -430,7 +442,7 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
 
                handle = ACPI_HANDLE(&pci->dev);
                ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
-               if (!ACPI_FAILURE(ret))
+               if (!ACPI_FAILURE(ret) && !dmi_check_system(acp_ignore_wov_table))
                        wov_en = dmic_status;
        }
 
--

2.55.0