From 868629567e27d340abfe763bc1c4c6b9c3f7f1c5 Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Fri, 24 Nov 2023 11:17:48 +0200 Subject: [PATCH] audio: dai-zephyr: Add state change on DAI trigger Currently, the DAI component's state is not updated on dai_trigger() operation, which leads to pipeline_comp_copy() skipping the dai_copy() operation (since the DAI component never transitions to the ACTIVE state). To fix this, add a state transition in dai_comp_trigger_internal(). Signed-off-by: Laurentiu Mihalcea --- 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 380c8600d363..249d05da8ea2 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -1055,6 +1055,11 @@ static int dai_comp_trigger_internal(struct dai_data *dd, struct comp_dev *dev, comp_dbg(dev, "dai_comp_trigger_internal(), command = %u", cmd); + ret = comp_set_state(dev, cmd); + if (ret < 0) { + return ret; + } + switch (cmd) { case COMP_TRIGGER_START: comp_dbg(dev, "dai_comp_trigger_internal(), START");