From 5ba541577701943e21ba79e4511feb85b7ec7e98 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 28 Sep 2021 13:57:28 +0200 Subject: [PATCH] ipc: ipc3: ignore PCM_PARAMS for active pipelines With IPC3 it is an error to send a PCM_PARAMS IPC on an active pipeline, but it is a valid use-case with IPC4, ignore such IPCs. Signed-off-by: Guennadi Liakhovetski --- src/ipc/ipc3/handler.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ipc/ipc3/handler.c b/src/ipc/ipc3/handler.c index 18f2a4b25..352dc403e 100644 --- a/src/ipc/ipc3/handler.c +++ b/src/ipc/ipc3/handler.c @@ -223,6 +223,18 @@ static int ipc_stream_pcm_params(uint32_t stream) return -EINVAL; } + switch (pcm_dev->cd->pipeline->status) { + case COMP_STATE_ACTIVE: + case COMP_STATE_PRE_ACTIVE: + /* + * IPC4 has a use-case when a PCM parameter change request can + * be sent on an active pipeline, ignore it + */ + pipe_dbg(pcm_dev->cd->pipeline, + "ipc: ignore PCM param change request on an active pipeline"); + return 0; + } + #if CONFIG_HOST_PTABLE cd = pcm_dev->cd;