[PATCH 00/11] ASoC: SOF: amd: SoundWire and PDM support and fixes for ACP7.B/7.F

Vijendar Mukunda posted 11 patches 2 weeks, 1 day ago
sound/soc/amd/acp/soc_amd_sdw_common.h |  13 +
sound/soc/sof/amd/Kconfig              |   1 +
sound/soc/sof/amd/acp-common.c         |  17 ++
sound/soc/sof/amd/acp-dsp-offset.h     |  17 ++
sound/soc/sof/amd/acp.c                | 389 +++++++++++++++++++++++--
sound/soc/sof/amd/acp.h                |  16 +
sound/soc/sof/amd/acp7x.h              |  37 +++
sound/soc/sof/amd/pci-acp7x.c          |   2 +
8 files changed, 460 insertions(+), 32 deletions(-)
create mode 100644 sound/soc/sof/amd/acp7x.h
[PATCH 00/11] ASoC: SOF: amd: SoundWire and PDM support and fixes for ACP7.B/7.F
Posted by Vijendar Mukunda 2 weeks, 1 day ago
This series contains bug fixes for the existing AMD SOF SoundWire stack
that affect all ACP platforms, followed by new SoundWire support
specifically for ACP7.B and ACP7.F.

The existing stack has three bugs that are fixed here. First,
amd_sof_acp7x_suspend() silently falls through on an unrecognised PCI
revision instead of returning an error, leaving ACP_CONTROL with a stale
value; it now returns -EINVAL. Second, amd_sof_acp_remove() calls
amd_sof_sdw_exit() before free_irq(), so an IRQ that fires in that window
can dereference the freed SoundWire context; the teardown order is
corrected. Third, the same use-after-free hazard exists in the error
unwind of amd_sof_acp_probe() and is fixed in the same way.

On top of those fixes, the series brings SoundWire support to ACP7.B/7.F.
These platforms expose four SoundWire manager instances (SDW0-SDW3) rather
than the two found on ACP63/ACP70/ACP71/ACP72. The work covers ACPI DSDT
scanning for SoundWire endpoints, chip descriptor population so the SOF
core can enumerate all four managers, per-manager IRQ dispatch for data,
host-wake, PME and error events, selective host-wake interrupt arming based
on SW_WAKE_EN, and SoundWire-aware PM callbacks that take a clock-stop fast
path through suspend/resume to preserve SoundWire bus state across power
transitions.

ACP7.B/7.F also supports two PDM controllers (PDM0 and PDM1), but only
one is active at a time. The active controller is determined at probe time
by scanning the acp-audio-ep-port ACPI _DSD property of the PDM child
device in the DSDT. The selected controller is then propagated to the
machine driver via mach->pdata so that the correct SOF DMIC DAI link is
registered.

Vijendar Mukunda (11):
  ASoC: SOF: amd: return -EINVAL for unknown PCI revision in acp7x
    suspend
  ASoC: SOF: amd: fix amd_sof_acp_remove() teardown ordering
  ASoC: SOF: amd: fix amd_sof_acp_probe() error unwind ordering
  ASoC: SOF: amd: add ACP7.B/7.F PDM controller scan and pdata
    propagation
  ASoC: SOF: amd: update SoundWire specific acp descriptor fields for
    ACP7.B/7.F
  ASoC: SOF: amd: enable SoundWire build for ACP7.B/7.F
  ASoC: SOF: amd: wire SoundWire probe and remove into ACP7.B/7.F paths
  ASoC: SOF: amd: add ACP7.B/7.F clock-stop detection in
    check_acp_sdw_enable_status
  ASoC: SOF: amd: add ACP7.B/7.F SoundWire IO IRQ handling
  ASoC: SOF: amd: enable SoundWire host wake interrupt in acp_init
  ASoC: SOF: amd: add SoundWire PM ops for ACP7.B/7.F

 sound/soc/amd/acp/soc_amd_sdw_common.h |  13 +
 sound/soc/sof/amd/Kconfig              |   1 +
 sound/soc/sof/amd/acp-common.c         |  17 ++
 sound/soc/sof/amd/acp-dsp-offset.h     |  17 ++
 sound/soc/sof/amd/acp.c                | 389 +++++++++++++++++++++++--
 sound/soc/sof/amd/acp.h                |  16 +
 sound/soc/sof/amd/acp7x.h              |  37 +++
 sound/soc/sof/amd/pci-acp7x.c          |   2 +
 8 files changed, 460 insertions(+), 32 deletions(-)
 create mode 100644 sound/soc/sof/amd/acp7x.h

-- 
2.48.1
Re: [PATCH 00/11] ASoC: SOF: amd: SoundWire and PDM support and fixes for ACP7.B/7.F
Posted by Mark Brown 1 week, 1 day ago
On Thu, 10 Sep 2026 18:50:00 +0530, Vijendar Mukunda wrote:
> ASoC: SOF: amd: SoundWire and PDM support and fixes for ACP7.B/7.F
> 
> This series contains bug fixes for the existing AMD SOF SoundWire stack
> that affect all ACP platforms, followed by new SoundWire support
> specifically for ACP7.B and ACP7.F.
> 
> The existing stack has three bugs that are fixed here. First,
> amd_sof_acp7x_suspend() silently falls through on an unrecognised PCI
> revision instead of returning an error, leaving ACP_CONTROL with a stale
> value; it now returns -EINVAL. Second, amd_sof_acp_remove() calls
> amd_sof_sdw_exit() before free_irq(), so an IRQ that fires in that window
> can dereference the freed SoundWire context; the teardown order is
> corrected. Third, the same use-after-free hazard exists in the error
> unwind of amd_sof_acp_probe() and is fixed in the same way.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4

Thanks!

[01/11] ASoC: SOF: amd: return -EINVAL for unknown PCI revision in acp7x suspend
        https://git.kernel.org/broonie/sound/c/e419e9a6cbfe
[02/11] ASoC: SOF: amd: fix amd_sof_acp_remove() teardown ordering
        https://git.kernel.org/broonie/sound/c/db2167f2e3f7
[03/11] ASoC: SOF: amd: fix amd_sof_acp_probe() error unwind ordering
        https://git.kernel.org/broonie/sound/c/b6aaef8ca8c3
[04/11] ASoC: SOF: amd: add ACP7.B/7.F PDM controller scan and pdata propagation
        https://git.kernel.org/broonie/sound/c/203ea76c4b0a
[05/11] ASoC: SOF: amd: update SoundWire specific acp descriptor fields for ACP7.B/7.F
        https://git.kernel.org/broonie/sound/c/59c03f40a53e
[06/11] ASoC: SOF: amd: enable SoundWire build for ACP7.B/7.F
        https://git.kernel.org/broonie/sound/c/612684a9d2af
[07/11] ASoC: SOF: amd: wire SoundWire probe and remove into ACP7.B/7.F paths
        https://git.kernel.org/broonie/sound/c/750176135630
[08/11] ASoC: SOF: amd: add ACP7.B/7.F clock-stop detection in check_acp_sdw_enable_status
        https://git.kernel.org/broonie/sound/c/db294afbd61a
[09/11] ASoC: SOF: amd: add ACP7.B/7.F SoundWire IO IRQ handling
        https://git.kernel.org/broonie/sound/c/c9b000c02879
[10/11] ASoC: SOF: amd: enable SoundWire host wake interrupt in acp_init
        https://git.kernel.org/broonie/sound/c/b99242b8d4b3
[11/11] ASoC: SOF: amd: add SoundWire PM ops for ACP7.B/7.F
        https://git.kernel.org/broonie/sound/c/be2823854e00

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark