From e0a9548066ac1ae99ead534b6f121bbe20a79cff Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Tue, 15 Mar 2022 15:00:26 +0800 Subject: [PATCH] ipc4: revert "ipc4: fix pipeline reset" This reverts commit 819c023d236ada6adbb8bc1610466e754c15f2ff. Fix a regression issue on windows. Component is set to reset status in pipeline_reset, so no need to propagate reset status to each component. Pipe_reset may return PATH_STOP of value 1 and this is not a error status, so we don't return error for this case. Signed-off-by: Rander Wang --- src/ipc/ipc4/handler.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/ipc/ipc4/handler.c b/src/ipc/ipc4/handler.c index e68e1fcbeaff..0c83a97eafa2 100644 --- a/src/ipc/ipc4/handler.c +++ b/src/ipc/ipc4/handler.c @@ -153,30 +153,6 @@ static int ipc4_pcm_params(struct ipc_comp_dev *pcm_dev) return err; } -static int propagate_state_to_ppl_comp(struct ipc *ipc, uint32_t ppl_id, int cmd) -{ - int ret = IPC4_INVALID_RESOURCE_ID; - struct ipc_comp_dev *icd; - struct list_item *clist; - - list_for_item(clist, &ipc->comp_list) { - icd = container_of(clist, struct ipc_comp_dev, list); - if (icd->type != COMP_TYPE_COMPONENT) - continue; - - if (!cpu_is_me(icd->core)) - continue; - - if (ipc_comp_pipe_id(icd) == ppl_id) { - ret = comp_set_state(icd->cd, cmd); - if (ret != 0) - return IPC4_INVALID_REQUEST; - } - } - - return ret; -} - static bool is_any_ppl_active(void) { struct ipc_comp_dev *icd; @@ -303,13 +279,9 @@ static int set_pipeline_state(uint32_t id, uint32_t cmd, bool *delayed) } } - ret = propagate_state_to_ppl_comp(ipc, id, COMP_TRIGGER_RESET); - if (ret != 0) - return ret; - /* resource is not released by triggering reset which is used by current FW */ ret = pipeline_reset(host->cd->pipeline, host->cd); - if (ret != 0) + if (ret < 0) ret = IPC4_INVALID_REQUEST; return ret;