[PATCH v3 4/5] ASoC: amd: yc: refuse the ACP function when no DMIC is wired

From: MuXian Chen

Date: Thu Dec 03 2026 - 07:15:43 EST


An ACP6x function is present on every Yellow Carp platform, including
boards where nothing is wired behind it: no DMIC array, no I2S codec
and no SoundWire peripheral. Firmware does not say so. The ACPI node
carries no consumer description, and the _WOV method on some boards is
a template that unconditionally returns 1, so the driver cannot tell
"present" from "used".

Binding the function on such a board has no upside and a real cost: the
probe path runs acp6x_init() and the runtime suspend path then gates the
audio clock (ACP_CLKMUX_SEL = 0) in acp6x_deinit(). The ACP block
shares that clock domain with the HDA controller on the same PCI
segment, and HDA can end up with

snd_hda_intel 0000:06:00.6: CORB reset timeout#2, CORBRP = 65535

sometimes without recovering. This is the regression analysed in the
work item below.

Refuse the device instead, so that nothing is enabled, mapped or
initialized and no register in the shared clock domain is written. The
PCI core suspends the function after the failed probe, which leaves it
in the state firmware configured. Boards in the list keep binding and
registering the DMIC card as before.

Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5529
Tested on a MECHREVO JIAOLONG (rev 0x62): two s2idle cycles, no CORB
errors, onboard HDA and playback unaffected.

Signed-off-by: MuXian Chen <a18165943161@xxxxxxxxx>
---
sound/soc/amd/yc/pci-acp6x.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/sound/soc/amd/yc/pci-acp6x.c b/sound/soc/amd/yc/pci-acp6x.c
index c987f6c..5566b86 100644
--- a/sound/soc/amd/yc/pci-acp6x.c
+++ b/sound/soc/amd/yc/pci-acp6x.c
@@ -175,6 +175,17 @@ static int snd_acp6x_probe(struct pci_dev *pci,
}
has_dmic = snd_acp6x_platform_has_dmic(pci);

+ if (!has_dmic) {
+ /*
+ * Nothing consumes the ACP on this board: no DMIC array, no
+ * I2S codec, no SoundWire peripheral. Binding the function
+ * would only invite acp6x_init() and the shared clock gating
+ * in acp6x_deinit(), so decline the device instead.
+ */
+ dev_info(&pci->dev, "no ACP consumer, not binding\n");
+ return -ENODEV;
+ }
+
if (pci_enable_device(pci)) {
dev_err(&pci->dev, "pci_enable_device failed\n");
return -ENODEV;
--
2.56.1