audio: dai-zephyr: Do not reset the DMA buffer cursor for HD-DMA on TRIGGER_RELEASE

During DMA stop/config/start the read/write pointer of HD-DMA is not
reset unlike other DMAs (GPDMA, DMAC).

Only call the audio_stream_reset() if the link is not serviced by HD-DMA.

Link: https://github.com/thesofproject/sof/issues/8986
Fixes: 9831a9ded7 ("audio: dai-zephyr: reset DMA buffer cursors on TRIGGER_RELEASE")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This commit is contained in:
Peter Ujfalusi 2024-03-28 15:29:02 +02:00 committed by Kai Vehmanen
parent 9d7c33adc3
commit baca261531
1 changed files with 5 additions and 1 deletions

View File

@ -1141,8 +1141,12 @@ static int dai_comp_trigger_internal(struct dai_data *dd, struct comp_dev *dev,
* leading to the DMA copying stale data due to
* dma_status() stopping dai_common_copy() from
* updating the data.
*
* Only applies to non HD-DMA links as HD-DMA read/write pointer
* is not reset during stop/config/start
*/
audio_stream_reset(&dd->dma_buffer->stream);
if (!(dd->dai->dma_caps & DMA_CAP_HDA))
audio_stream_reset(&dd->dma_buffer->stream);
/* only start the DAI if we are not XRUN handling */
if (dd->xrun == 0) {