Skip to content

Commit baca261

Browse files
ujfalusikv2019i
authored andcommitted
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: #8986 Fixes: 9831a9d ("audio: dai-zephyr: reset DMA buffer cursors on TRIGGER_RELEASE") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 9d7c33a commit baca261

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/audio/dai-zephyr.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,8 +1141,12 @@ static int dai_comp_trigger_internal(struct dai_data *dd, struct comp_dev *dev,
11411141
* leading to the DMA copying stale data due to
11421142
* dma_status() stopping dai_common_copy() from
11431143
* updating the data.
1144+
*
1145+
* Only applies to non HD-DMA links as HD-DMA read/write pointer
1146+
* is not reset during stop/config/start
11441147
*/
1145-
audio_stream_reset(&dd->dma_buffer->stream);
1148+
if (!(dd->dai->dma_caps & DMA_CAP_HDA))
1149+
audio_stream_reset(&dd->dma_buffer->stream);
11461150

11471151
/* only start the DAI if we are not XRUN handling */
11481152
if (dd->xrun == 0) {

0 commit comments

Comments
 (0)