ipc4: stop dma when dai is reset

Fix FW error when changing progress bar in windows auido player.
For this case, pipeline is paused and reset and then paused and
started.  FW reports a error that dma is still running when pipeline
is started.

Signed-off-by: Rander Wang <rander.wang@intel.com>
This commit is contained in:
Rander Wang 2022-03-08 14:46:05 +08:00 committed by Liam Girdwood
parent 06ee0fef11
commit 0f74422e32
1 changed files with 7 additions and 0 deletions

View File

@ -196,6 +196,13 @@ void dai_dma_release(struct comp_dev *dev)
mailbox_sw_regs_write(llp_reg_offset, &slot, sizeof(slot)); mailbox_sw_regs_write(llp_reg_offset, &slot, sizeof(slot));
} }
/* The stop sequnece of host driver is first pause and then reset
* dma is released for reset state and need to change dma state from
* pause to stop.
* TODO: refine power management when stream is paused
*/
dma_stop(dd->chan);
/* remove callback */ /* remove callback */
notifier_unregister(dev, dd->chan, NOTIFIER_ID_DMA_COPY); notifier_unregister(dev, dd->chan, NOTIFIER_ID_DMA_COPY);
dma_channel_put(dd->chan); dma_channel_put(dd->chan);