Skip to content

Commit e6fc5fc

Browse files
ujfalusibroonie
authored andcommitted
ASoC: SOF: ipc4-topology: Preserve the DMA Link ID for ChainDMA on unprepare
The DMA Link ID is set to the IPC message's primary during dai_config, which is only during hw_params. During xrun handling the hw_params is not called and the DMA Link ID information will be lost. All other fields in the message expected to be 0 for re-configuration, only the DMA Link ID needs to be preserved and the in case of repeated dai_config, it is correctly updated (masked and then set). Cc: [email protected] Fixes: ca5ce0c ("ASoC: SOF: ipc4/intel: Add support for chained DMA") 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 ae67ed9 commit e6fc5fc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sound/soc/sof/ipc4-topology.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,13 @@ static void sof_ipc4_unprepare_copier_module(struct snd_sof_widget *swidget)
13581358
ipc4_copier = dai->private;
13591359

13601360
if (pipeline->use_chain_dma) {
1361-
pipeline->msg.primary = 0;
1361+
/*
1362+
* Preserve the DMA Link ID and clear other bits since
1363+
* the DMA Link ID is only configured once during
1364+
* dai_config, other fields are expected to be 0 for
1365+
* re-configuration
1366+
*/
1367+
pipeline->msg.primary &= SOF_IPC4_GLB_CHAIN_DMA_LINK_ID_MASK;
13621368
pipeline->msg.extension = 0;
13631369
}
13641370

0 commit comments

Comments
 (0)