Skip to content

Commit 3858464

Browse files
plbossartbroonie
authored andcommitted
ASoC: SOF: ipc4-topology: change chain_dma handling in dai_config
The chain_dma mode is currently only handled for HDaudio, but can be used for orther DAIs starting with LunarLake. Move the chain_dma handling earlier. Error detection for the chain_dma case for older platforms is handled at a different level. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Rander Wang <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 00933c4 commit 3858464

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

sound/soc/sof/ipc4-topology.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2796,13 +2796,14 @@ static int sof_ipc4_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *
27962796
if (!data)
27972797
return 0;
27982798

2799+
if (pipeline->use_chain_dma) {
2800+
pipeline->msg.primary &= ~SOF_IPC4_GLB_CHAIN_DMA_LINK_ID_MASK;
2801+
pipeline->msg.primary |= SOF_IPC4_GLB_CHAIN_DMA_LINK_ID(data->dai_data);
2802+
return 0;
2803+
}
2804+
27992805
switch (ipc4_copier->dai_type) {
28002806
case SOF_DAI_INTEL_HDA:
2801-
if (pipeline->use_chain_dma) {
2802-
pipeline->msg.primary &= ~SOF_IPC4_GLB_CHAIN_DMA_LINK_ID_MASK;
2803-
pipeline->msg.primary |= SOF_IPC4_GLB_CHAIN_DMA_LINK_ID(data->dai_data);
2804-
break;
2805-
}
28062807
gtw_attr = ipc4_copier->gtw_attr;
28072808
gtw_attr->lp_buffer_alloc = pipeline->lp_mode;
28082809
fallthrough;

0 commit comments

Comments
 (0)