Re: [PATCH v4 2/5] ASoC: amd: yc: share the ACP6x DMIC board list

From: MuXian Chen

Date: Sat Dec 05 2026 - 08:37:01 EST


Hi Vijendar,

Thanks for the careful review. Let me explain why the check has to happen
before the PCI driver binds, because that is the part that makes the
placement look wrong.

acp6x_init() is not a passive step: it powers the block up, takes it out
of reset and selects the audio clock (ACP_CLKMUX_SEL = 3). The damage to
HDA happens on the other end, when acp6x_deinit() runs from the runtime
suspend path and gates that same clock (ACP_CLKMUX_SEL = 0). That is the
CORB timeout described in the cover letter.

The machine driver probes only after snd_acp6x_probe() has created the
platform devices, which is after acp6x_init(). A check placed in
acp6x_probe() would therefore run after the hardware has already been
touched, and returning -ENODEV there cannot undo it: the block stays
initialized and the next runtime suspend gates the shared clock anyway.
The bind decision is the only point where not touching the hardware at
all is still an option.

That is also why the table lives next to the device rather than next to
the card registration: it answers "does this board wire the DMIC path",
which is a platform property of the PCI function, not a decision about
which card to build.

Note that the final state of the series does not export anything: patch 3
evaluates the predicate once in snd_acp6x_probe() and passes a bool to the
machine device through platform data, so there is no cross-module export
left and the machine driver does not query the PCI driver at all.

If you would still prefer the policy to live in the machine driver, the
alternative is to keep the PCI driver from initializing until the machine
driver asks for it - a small power-up callback invoked from acp6x_probe()
once the board list matches. That is a larger change (init timing, error
paths, PDM DMA dependency) and I would rather not fold it into this series
unless you think it is required.

Thanks,
MuXian