ipc4: handler: skip setting state when pipeline is already active

No need to proceed if the pipeline is already active.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
Ranjani Sridharan 2022-10-17 21:11:08 -07:00 committed by Kai Vehmanen
parent 251ee59b2e
commit 51501bfcef
1 changed files with 4 additions and 0 deletions

View File

@ -250,6 +250,10 @@ static int set_pipeline_state(uint32_t id, uint32_t cmd, bool *delayed, uint32_t
switch (cmd) {
case SOF_IPC4_PIPELINE_STATE_RUNNING:
/* nothing to do if the pipeline is already running */
if (status == COMP_STATE_ACTIVE)
return 0;
if (status != COMP_STATE_PAUSED && status != COMP_STATE_READY) {
tr_err(&ipc_tr, "ipc: current status %d", status);
return IPC4_INVALID_REQUEST;