Skip to content

Commit

Permalink
ASoC: SOF: ipc4-topology: Preserve the DMA Link ID for ChainDMA on un…
Browse files Browse the repository at this point in the history
…prepare

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: stable@vger.kernel.org
Fixes: ca5ce0c ("ASoC: SOF: ipc4/intel: Add support for chained DMA")
Link: #5116
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
  • Loading branch information
ujfalusi committed Jul 23, 2024
1 parent 53647f6 commit 20e8ef5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sound/soc/sof/ipc4-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,13 @@ static void sof_ipc4_unprepare_copier_module(struct snd_sof_widget *swidget)
ipc4_copier = dai->private;

if (pipeline->use_chain_dma) {
pipeline->msg.primary = 0;
/*
* Preserve the DMA Link ID and clear other bits since
* the DMA Link ID is only configured once during
* dai_config, other fields are expected to be 0 for
* re-configuration
*/
pipeline->msg.primary &= SOF_IPC4_GLB_CHAIN_DMA_LINK_ID_MASK;
pipeline->msg.extension = 0;
}

Expand Down

0 comments on commit 20e8ef5

Please sign in to comment.