ipc4: don't propagate commands across pipelines

With IPC4 commands are sent to each pipeline individually, therefore
there is no need to propagate them to connected pipelines in the
firmware. We use IPC4_MOD_ID() to detect the IPC4 mode: it returns a
non-zero module ID under IPC4 and 0 under IPC3.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2022-09-28 15:05:28 +02:00 committed by Liam Girdwood
parent 89ca17b0f0
commit de129609ab
3 changed files with 17 additions and 3 deletions

View File

@ -19,6 +19,7 @@
#include <ipc/header.h>
#include <ipc/stream.h>
#include <ipc/topology.h>
#include <ipc4/module.h>
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
@ -345,9 +346,14 @@ static int pipeline_comp_reset(struct comp_dev *current,
pipe_dbg(current->pipeline, "pipeline_comp_reset(), current->comp.id = %u, dir = %u",
dev_comp_id(current), dir);
/* reset should propagate to the connected pipelines,
* which need to be scheduled together
/*
* Reset should propagate to the connected pipelines, which need to be
* scheduled together, except for IPC4, where each pipeline receives
* commands from the host separately
*/
if (!is_single_ppl && IPC4_MOD_ID(current->ipc_config.id))
return 0;
if (!is_single_ppl && !is_same_sched) {
/* If pipeline connected to the starting one is in improper
* direction (CAPTURE towards DAI, PLAYBACK towards HOST),

View File

@ -15,6 +15,7 @@
#include <rtos/string.h>
#include <ipc/stream.h>
#include <ipc/topology.h>
#include <ipc4/module.h>
#include <rtos/kernel.h>
#include <errno.h>
@ -154,7 +155,12 @@ static int pipeline_comp_list(struct comp_dev *current,
bool is_same_sched = pipeline_is_same_sched_comp(current->pipeline,
ppl_data->start->pipeline);
if (!is_single_ppl && !is_same_sched) {
/*
* We walk connected pipelines only if they have the same scheduling
* component and we aren't using IPC4. With IPC4 each pipeline receives
* commands separately so we don't need to trigger them together
*/
if (!is_single_ppl && (!is_same_sched || IPC4_MOD_ID(current->ipc_config.id))) {
pipe_dbg(current->pipeline,
"pipeline_comp_list(), current is from another pipeline");
return 0;

View File

@ -24,6 +24,8 @@
#ifndef __IPC4_MODULE_H__
#define __IPC4_MODULE_H__
#include <ipc4/error_status.h>
#include <stdint.h>
/* TODO: revisit it. Now it aligns with audio sdk