Skip to content

acp: add TDM DAI and DMA support for ACP 7.0#10761

Open
Sivasubramanian678 wants to merge 2 commits into
thesofproject:mainfrom
Sivasubramanian678:main
Open

acp: add TDM DAI and DMA support for ACP 7.0#10761
Sivasubramanian678 wants to merge 2 commits into
thesofproject:mainfrom
Sivasubramanian678:main

Conversation

@Sivasubramanian678

Copy link
Copy Markdown
Contributor

Add TDM DAI and DMA support for the AMD ACP
7.0 platform with three instances: HS, SP, and BT.

@sofci

sofci commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

reply test this please to run this test once

@Sivasubramanian678

Copy link
Copy Markdown
Contributor Author

Dependency: This PR depends on zephyrproject-rtos/zephyr#108314 for native Zephyr ACP 7.0 TDM driver enablement.

Comment thread src/ipc/ipc3/dai.c Outdated
} else {
tdm_ctx = (struct tdm_context *)tdm_data->dai_index_ptr;
}
tdm_ctx->index = dd->dai->index;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation too deep

Comment thread src/ipc/ipc3/dai.c Outdated
struct tdm_context *tdm_ctx;
if (!tdm_data->dai_index_ptr) {
tdm_ctx = rzalloc(SOF_MEM_FLAG_USER | SOF_MEM_FLAG_COHERENT,
sizeof(*tdm_ctx));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it have to be uncached because it's accessed from different contexts? Maybe you need a comment for that

@lgirdwood

Copy link
Copy Markdown
Member

Will run CI.

@lgirdwood

Copy link
Copy Markdown
Member

test this please

Comment thread src/ipc/ipc3/dai.c

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check now added for memory alloc. @lyakh fyi.

@bhiregoudar bhiregoudar self-requested a review May 12, 2026 14:27
@lgirdwood

Copy link
Copy Markdown
Member

@Sivasubramanian678 pls see CI, lots of build failures showing

/__w/sof/sof/sof/src/audio/dai-zephyr.c: In function 'dai_set_config':
/__w/sof/sof/sof/src/audio/dai-zephyr.c:204:28: error: 'DAI_AMD_TDM' undeclared (first use in this function); did you mean 'DAI_AMD_SDW'?
  204 |                 cfg.type = DAI_AMD_TDM;
      |                            ^~~~~~~~~~~
      |                            DAI_AMD_SDW
/__w/sof/sof/sof/src/audio/dai-zephyr.c:204:28: note: each undeclared identifier is reported only once for each function it appears in
[364/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/notification_pool.c.obj
[365/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/ipc-common.c.obj
[366/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/ipc4/handler-user.c.obj
[367/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/ipc-helper.c.obj
[368/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/ipc4/helper.c.obj

@Sivasubramanian678

Copy link
Copy Markdown
Contributor Author

@Sivasubramanian678 pls see CI, lots of build failures showing

/__w/sof/sof/sof/src/audio/dai-zephyr.c: In function 'dai_set_config':
/__w/sof/sof/sof/src/audio/dai-zephyr.c:204:28: error: 'DAI_AMD_TDM' undeclared (first use in this function); did you mean 'DAI_AMD_SDW'?
  204 |                 cfg.type = DAI_AMD_TDM;
      |                            ^~~~~~~~~~~
      |                            DAI_AMD_SDW
/__w/sof/sof/sof/src/audio/dai-zephyr.c:204:28: note: each undeclared identifier is reported only once for each function it appears in
[364/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/notification_pool.c.obj
[365/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/ipc-common.c.obj
[366/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/ipc4/handler-user.c.obj
[367/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/ipc-helper.c.obj
[368/465] Building C object modules/sof/CMakeFiles/modules_sof.dir/__w/sof/sof/sof/src/ipc/ipc4/helper.c.obj

Dependency: This PR depends on zephyrproject-rtos/zephyr#108314 for native Zephyr ACP 7.0 TDM driver enablement. So we have to wait till zephyr PR's merge.

@lyakh

lyakh commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Check now added for memory alloc. @lyakh fyi.

oh, ouch... how have I missed it?? Sorry! Shouldn't happen actually...

@kv2019i

kv2019i commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

This now hits same failure on NXP IMX95 as hits previous attempt to upgrade Zephyr (see latest status in #10765 (comment) ).

@Sivasubramanian678

Copy link
Copy Markdown
Contributor Author

This now hits same failure on NXP IMX95 as hits previous attempt to upgrade Zephyr (see latest status in #10765 (comment) ).

Thanks for the update, @kv2019i . Could you please let me know what I should do from my side to proceed?

@kv2019i

kv2019i commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the update, @kv2019i . Could you please let me know what I should do from my side to proceed?

We are depending on zephyrproject-rtos/zephyr#109474 and updating the PR to include that in the Zephyr update. @dbaluta @LaurentiuM1234 any takes on this, can we help to expedite this? Or if this take more time, ok to proceed and break imx95 for a moment...?

Add TDM DAI and DMA support for the AMD ACP
7.0 platform with three instances: HS, SP, and BT.

Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
@Sivasubramanian678

Copy link
Copy Markdown
Contributor Author

Thanks for the update, @kv2019i . Could you please let me know what I should do from my side to proceed?

We are depending on zephyrproject-rtos/zephyr#109474 and updating the PR to include that in the Zephyr update. @dbaluta @LaurentiuM1234 any takes on this, can we help to expedite this? Or if this take more time, ok to proceed and break imx95 for a moment...?

Hi @kv2019i, the mentioned commit has now been merged. Could you please let me know if any updates are required from my side to ensure that the i.MX95 CI does not fail?

@kv2019i

kv2019i commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

@Sivasubramanian678 Can you update your PR and take a newer commit from Zephyr main (that includes the now merged fix to imx95) and resubmit. CI should pass now and we can proceed to merge.

Signed-off-by: Siva Subramanian Ravi Saravanan <sravisar@amd.com>
@Sivasubramanian678

Copy link
Copy Markdown
Contributor Author

@Sivasubramanian678 Can you update your PR and take a newer commit from Zephyr main (that includes the now merged fix to imx95) and resubmit. CI should pass now and we can proceed to merge.

Hi @kv2019i, I have updated my PR with the latest commit from Zephyr main that includes the i.MX95 fix, as suggested. However, I’m still seeing the i.MX95 CI failure. Could you please help check if anything else might be missing from my side.

@kv2019i

kv2019i commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

@thesofproject/nxp can you check? imx95 build seems to still fail. The error is now different than previously:

https://github.com/thesofproject/sof/actions/runs/27205719796/job/80320892865?pr=10761

zephyr/drivers/dma/CMakeFiles/drivers__dma.dir/dma_mcux_edma.c.obj -c /__w/sof/sof/zephyr/drivers/dma/dma_mcux_edma.c
/__w/sof/sof/zephyr/drivers/dma/dma_mcux_edma.c:1225:2: error: #error Unexpected or disallowed cache situation for dma descriptors
 1225 | #error Unexpected or disallowed cache situation for dma descriptors

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.

6 participants