[PATCH v3 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired
From: MuXian Chen
Date: Thu Dec 03 2026 - 07:14:47 EST
The 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 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
https://gitlab.freedesktop.org/drm/amd/-/work_items/5529, which contains
the amd-s2idle reports for df4148a5a3cf with and without the commit on
this exact platform.
This series makes the existing board list -- already maintained for the
machine driver -- the signal for "a consumer is wired", and declines the
device when neither the list nor the AcpDmicConnected property says so.
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. Boards in the list behave exactly as before.
Patch 1 is an independent use-after-free fix in the teardown path and
can be applied on its own.
Patches 2 and 3 are refactoring only. Patch 4 makes the probe decline
unlisted boards. Patch 5 adds a read-only module parameter for boards
the list gets wrong; it can be dropped if it is not wanted.
Tested on a MECHREVO JIAOLONG (rev 0x62), which has no DMIC consumer:
two s2idle cycles, no CORB errors, onboard HDA and playback unaffected.
Changes in v3:
- rebased onto current mainline; the board list carries the entries
added since, and the PCI driver uses the devm_kzalloc_obj() helpers
- followed the current machine driver behaviour where _WOV evaluating to
zero falls back to the board list instead of vetoing the device
- fixed a missing blank line in the teardown hunk of patch 4
MuXian Chen (5):
ASoC: amd: yc: stop the shared IRQ before tearing down platform
devices
ASoC: amd: yc: share the ACP6x DMIC board list
ASoC: amd: yc: ask the firmware once about the ACP DMIC path
ASoC: amd: yc: refuse the ACP function when no DMIC is wired
ASoC: amd: yc: allow forcing the ACP DMIC decision
sound/soc/amd/yc/Makefile | 2 +-
sound/soc/amd/yc/acp6x-mach.c | 1014 +------------------------------
sound/soc/amd/yc/acp6x-quirks.c | 885 +++++++++++++++++++++++++++
sound/soc/amd/yc/acp6x.h | 1 +
sound/soc/amd/yc/pci-acp6x.c | 30 +
5 files changed, 927 insertions(+), 1005 deletions(-)
create mode 100644 sound/soc/amd/yc/acp6x-quirks.c
--
2.56.1