* [PATCH 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired
@ 2026-12-02 20:10 陳チェン
2026-12-02 20:20 ` Mario Limonciello
0 siblings, 1 reply; 4+ messages in thread
From: 陳チェン @ 2026-12-02 20:10 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel, Mario Limonciello, MuXian Chen
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5529
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 the
work item linked above, 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: the board list moves next to the
driver that owns the device, and the decision is evaluated once and
handed to the machine driver through platform data.
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.
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 | 958 +-------------------------------
sound/soc/amd/yc/acp6x-quirks.c | 842 ++++++++++++++++++++++++++++
sound/soc/amd/yc/acp6x.h | 1 +
sound/soc/amd/yc/pci-acp6x.c | 28 +
5 files changed, 882 insertions(+), 949 deletions(-)
create mode 100644 sound/soc/amd/yc/acp6x-quirks.c
--
2.56.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired
2026-12-02 20:10 [PATCH 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired 陳チェン
@ 2026-12-02 20:20 ` Mario Limonciello
2026-12-02 20:23 ` 陳チェン
0 siblings, 1 reply; 4+ messages in thread
From: Mario Limonciello @ 2026-12-02 20:20 UTC (permalink / raw)
To: 陳チェン, Vijendar Mukunda,
Venkata Prasad Potturu, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel
On 12/2/26 14:10, 陳チェン wrote:
> Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5529
>
> 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 the
> work item linked above, 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: the board list moves next to the
> driver that owns the device, and the decision is evaluated once and
> handed to the machine driver through platform data.
>
> 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.
>
> 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 | 958 +-------------------------------
> sound/soc/amd/yc/acp6x-quirks.c | 842 ++++++++++++++++++++++++++++
> sound/soc/amd/yc/acp6x.h | 1 +
> sound/soc/amd/yc/pci-acp6x.c | 28 +
> 5 files changed, 882 insertions(+), 949 deletions(-)
> create mode 100644 sound/soc/amd/yc/acp6x-quirks.c
>
Before going too far down this path, can you please see if
https://github.com/torvalds/linux/commit/f043083843cac1105206437d8c58e725b6412fad
helps? This helped a very simila rissue related to teh BAR handling.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired
2026-12-02 20:20 ` Mario Limonciello
@ 2026-12-02 20:23 ` 陳チェン
2026-12-02 20:27 ` Mario Limonciello
0 siblings, 1 reply; 4+ messages in thread
From: 陳チェン @ 2026-12-02 20:23 UTC (permalink / raw)
To: Mario Limonciello
Cc: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-kernel
Hi Mario,
Thanks for the pointer. I read f0430838 and checked it on this platform.
The fix is already in the kernel I tested (7.3.6-arch1-2 carries it via
stable: pci_pm_init() calls acpi_pci_set_power_state() and
pci_set_full_power_state() as in the patch). With it present, the ACP
function 0000:06:00.5 still behaves the same:
- 06:00.5 and 06:00.6 both report NoSoftRst+, so D3hot->D0 does not
reset them;
- BAR0 stays at 0xfc580000 across pci_enable_device();
- acp6x_init() completes without the PGFSM timeout that a lost BAR
would cause.
So the BAR-loss path does not look like what we are hitting here.
While checking this I also found that an earlier observation of mine was
wrong: the claim that the ACP block reads 0xffffffff when unused came
from /dev/mem reads. Those return 0xffffffff for these MMIO ranges
regardless of device state - a known-good HDA register reads the same -
so it should be dropped from the analysis.
The reason the function should not be initialized is not its power
state: nothing consumes it (no consumer in ACPI, _WOV is a template that
always returns 1 on this board, the machine list does not match).
Initializing it and then gating the shared audio clock in acp6x_deinit()
is when HDA reports CORB timeouts.
Note that this v1 thread was delivered split: the submission path
rewrote the cover's Message-ID, so the patches do not thread under it.
I reposted the series as v2:
https://lore.kernel.org/all/CA+gYdc1s0cfwMe2an5T9-LFHe99v+uGhQw=+ELYk95NvXA2+rQ@mail.gmail.com/
Please review v2 instead of this thread.
Thanks,
MuXian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired
2026-12-02 20:23 ` 陳チェン
@ 2026-12-02 20:27 ` Mario Limonciello
0 siblings, 0 replies; 4+ messages in thread
From: Mario Limonciello @ 2026-12-02 20:27 UTC (permalink / raw)
To: 陳チェン
Cc: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, linux-sound,
linux-kernel
On 12/2/26 14:23, 陳チェン wrote:
> Hi Mario,
>
> Thanks for the pointer. I read f0430838 and checked it on this platform.
>
> The fix is already in the kernel I tested (7.3.6-arch1-2 carries it via
> stable: pci_pm_init() calls acpi_pci_set_power_state() and
> pci_set_full_power_state() as in the patch). With it present, the ACP
> function 0000:06:00.5 still behaves the same:
>
> - 06:00.5 and 06:00.6 both report NoSoftRst+, so D3hot->D0 does not
> reset them;
> - BAR0 stays at 0xfc580000 across pci_enable_device();
> - acp6x_init() completes without the PGFSM timeout that a lost BAR
> would cause.
>
> So the BAR-loss path does not look like what we are hitting here.
>
> While checking this I also found that an earlier observation of mine was
> wrong: the claim that the ACP block reads 0xffffffff when unused came
> from /dev/mem reads. Those return 0xffffffff for these MMIO ranges
> regardless of device state - a known-good HDA register reads the same -
> so it should be dropped from the analysis.
>
> The reason the function should not be initialized is not its power
> state: nothing consumes it (no consumer in ACPI, _WOV is a template that
> always returns 1 on this board, the machine list does not match).
> Initializing it and then gating the shared audio clock in acp6x_deinit()
> is when HDA reports CORB timeouts.
>
> Note that this v1 thread was delivered split: the submission path
> rewrote the cover's Message-ID, so the patches do not thread under it.
> I reposted the series as v2:
>
> https://lore.kernel.org/all/CA+gYdc1s0cfwMe2an5T9-LFHe99v+uGhQw=+ELYk95NvXA2+rQ@mail.gmail.com/
>
> Please review v2 instead of this thread.
>
> Thanks,
> MuXian
OK, thanks for confirming.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-12-02 20:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 20:10 [PATCH 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired 陳チェン
2026-12-02 20:20 ` Mario Limonciello
2026-12-02 20:23 ` 陳チェン
2026-12-02 20:27 ` Mario Limonciello
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.