dai-zephyr: add dma config after stop

In pause/release triggering, if dma is stopped it needs to do set_config
before start. Otherwise the dma state prohibits the start.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
This commit is contained in:
Jaska Uimonen 2022-11-02 12:13:53 +02:00 committed by Kai Vehmanen
parent e2656958a3
commit b738c5e8f2
1 changed files with 5 additions and 0 deletions

View File

@ -1010,6 +1010,11 @@ static int dai_comp_trigger_internal(struct comp_dev *dev, int cmd)
if (ret < 0) if (ret < 0)
return ret; return ret;
/* dma_config needed after stop */
ret = dma_config(dd->chan->dma->z_dev, dd->chan->index, dd->z_config);
if (ret < 0)
return ret;
/* start the DAI */ /* start the DAI */
dai_trigger_op(dd->dai, cmd, dev->direction); dai_trigger_op(dd->dai, cmd, dev->direction);
ret = dma_start(dd->chan->dma->z_dev, dd->chan->index); ret = dma_start(dd->chan->dma->z_dev, dd->chan->index);