Skip to content

acp: add native Zephyr drivers for AMD ACP 7.X #10777

Open
sneha-voona wants to merge 10 commits into
thesofproject:mainfrom
sneha-voona:acp_7_x_upstream
Open

acp: add native Zephyr drivers for AMD ACP 7.X #10777
sneha-voona wants to merge 10 commits into
thesofproject:mainfrom
sneha-voona:acp_7_x_upstream

Conversation

@sneha-voona
Copy link
Copy Markdown

This PR adds native Zephyr support for AMD Audio Co-Processor (ACP) version 7.X for handling Sound Wire IO.

sneha-voona and others added 10 commits May 14, 2026 16:12
Add ACP_7_X platform support to xtensa-build-zephyr.py build script.

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
Co-authored-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Add the Xtensa HiFi5 defconfig for the AMD ACP 7.X audio DSP.

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
Co-authored-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Add the SoundWire topology M4 source file for AMD ACP 7.X
(sof-acp_7_x_sdw.m4). The topology defines the SoundWire pipeline
for native Zephyr, covering playback and capture paths for the
SoundWire SW0 instance on ACP 7.X hardware.

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
Add the rimage toml configuration file for AMD ACP 7.X to enable
signing and packaging of the sof-acp_7_x.ri firmware binary. The
file specifies the adsp name and memory layout required by rimage
to produce a correctly formatted image for the ACP 7.X audio DSP.

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
Co-authored-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Add CMakeLists.txt files to integrate the ACP 7.X platform and
driver sources into the SOF CMake build system. This covers the
platform-level build (platform.c, lib/clk.c) and the driver-level
build (ipc.c) under src/drivers/amd/acp_7_x/, enabling the ACP_7_X
platform to be compiled when CONFIG_ACP_7_X is selected.

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
Co-authored-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Add ACP_7_X platform support for native Zephyr drivers.

Changes include:
- Add platform-specific files for ACP_7_X native Zephyr support
- Add ACP_7_X in zephyr/CMakeLists.txt with platform sources,
  include directories and PLATFORM variable
- Add app/boards/acp_7_x_adsp.conf with ACP_7_X Kconfig options
  for native Zephyr drivers (DMA, DAI, interrupts)

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
Co-authored-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Add ACP_7_X SDW DMA channel support in zephyr/lib/dma.c for native
Zephyr DMA operations.

Update dai.c to set dai_index from dd->dai->index for AMD SDW DAI,
add ACP_7_X SDW instance handling with per-instance pin index array,
and free DAI-specific data on DMA release for AMD.

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
On AMD platforms, the scale_vol function pointer is not reset after
volume reaches its maximum value (32). This causes decreasing volume
after reaching max to have no effect, because is_passthrough remains
set and scale_vol is never updated to the gain function.

Fix by resetting is_passthrough to false and re-selecting scale_vol
via set_volume_process() on every SOF_CTRL_CMD_VOLUME command under
CONFIG_AMD, ensuring correct volume scaling in both directions.

Changes:
- src/arch/xtensa/configs/acp_7_x_defconfig: enable CONFIG_COMP_VOLUME
  for ACP_7_X platform
- src/audio/volume/volume_ipc3.c: reset is_passthrough and call
  set_volume_process() after volume changes so scale_vol is re-selected
  correctly after max volume is reached
- tools/topology/topology1/sof-acp_7_x_sdw_volume_comp.m4: add ACP_7_X
  SDW topology with volume pipelines for HS playback/capture, Speaker
  playback and DMIC capture paths

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
Changes include:
- Add sample topology sof-acp_7_x_sdw_24bit.m4 for ACP_7_X SDW 24-bit
  pipelines supporting playback and capture paths
- Select PCM conversion functions for S24_4LE<->S32_LE as per AMD
  hardware requirements under CONFIG_AMD, preserving existing behaviour
  for all other platforms

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
As per AMD internal hardware design requirement, the ACP DSP
scheduler tick must run at 500 microseconds (2kHz) instead of the
default 1ms (1kHz).

Guard the 500us value with CONFIG_AMD so non-AMD platforms retain
the existing 1ms default period unchanged.

Signed-off-by: Sneha Voona <sneha.voona@amd.com>
@sofci
Copy link
Copy Markdown
Collaborator

sofci commented May 14, 2026

Can one of the admins verify this patch?

reply test this please to run this test once

@sneha-voona
Copy link
Copy Markdown
Author

Dependency: This PR depends on zephyrproject-rtos/zephyr#108859 for native Zephyr ACP 7.X driver enablement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants