From 1ecad24bc2cc85b3f44643e6d5ccd6fda5c3e721 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 4cb83e164fd5..2348532e4e52 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -1056,6 +1056,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");