From ef39318ee4b9480a6577029433f4c5cdbae491c8 Mon Sep 17 00:00:00 2001 From: Adrian Bonislawski Date: Wed, 29 Jun 2022 17:54:16 +0200 Subject: [PATCH] dai-zephyr: add a DAI COPY trigger Add a DAI COPY trigger to be called before dma_copy Signed-off-by: Adrian Bonislawski --- src/audio/dai-zephyr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/audio/dai-zephyr.c b/src/audio/dai-zephyr.c index 938391b93..6cdf9f48c 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -1215,6 +1215,11 @@ static int dai_copy(struct comp_dev *dev) return 0; } + /* trigger optional DAI_TRIGGER_COPY which prepares dai to copy */ + ret = dai_trigger(dd->dai->drv, dev->direction, DAI_TRIGGER_COPY); + if (ret < 0) + comp_warn(dev, "dai_copy(): dai trigger copy failed"); + struct dma_cb_data next = { .channel = dd->chan, .elem = { .size = copy_bytes },