Skip to content

Commit ae67ed9

Browse files
ujfalusibroonie
authored andcommitted
ASoC: SOF: ipc4-topology: Only handle dai_config with HW_PARAMS for ChainDMA
The DMA Link ID is only valid in snd_sof_dai_config_data when the dai_config is called with HW_PARAMS. The commit that this patch fixes is actually moved a code section without changing it, the same bug exists in the original code, needing different patch to kernel prior to 6.9 kernels. Cc: [email protected] Fixes: 3858464 ("ASoC: SOF: ipc4-topology: change chain_dma handling in dai_config") Link: thesofproject/linux#5116 Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 92c7822 commit ae67ed9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

sound/soc/sof/ipc4-topology.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3095,8 +3095,14 @@ static int sof_ipc4_dai_config(struct snd_sof_dev *sdev, struct snd_sof_widget *
30953095
return 0;
30963096

30973097
if (pipeline->use_chain_dma) {
3098-
pipeline->msg.primary &= ~SOF_IPC4_GLB_CHAIN_DMA_LINK_ID_MASK;
3099-
pipeline->msg.primary |= SOF_IPC4_GLB_CHAIN_DMA_LINK_ID(data->dai_data);
3098+
/*
3099+
* Only configure the DMA Link ID for ChainDMA when this op is
3100+
* invoked with SOF_DAI_CONFIG_FLAGS_HW_PARAMS
3101+
*/
3102+
if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS) {
3103+
pipeline->msg.primary &= ~SOF_IPC4_GLB_CHAIN_DMA_LINK_ID_MASK;
3104+
pipeline->msg.primary |= SOF_IPC4_GLB_CHAIN_DMA_LINK_ID(data->dai_data);
3105+
}
31003106
return 0;
31013107
}
31023108

0 commit comments

Comments
 (0)