Skip to content

Commit

Permalink
audio: dai-zephyr: Do not reset the DMA buffer cursor for HD-DMA on T…
Browse files Browse the repository at this point in the history
…RIGGER_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>
  • Loading branch information
ujfalusi committed Mar 28, 2024
1 parent 41bdc0c commit dc9316d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/audio/dai-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dc9316d

Please sign in to comment.