From 397c1a0d94eb8dc75b0467cc2642a0a3b4dc0f40 Mon Sep 17 00:00:00 2001 From: Tomasz Lauda Date: Thu, 1 Aug 2019 12:48:36 +0200 Subject: [PATCH] pipeline: move check for xrun Moves xrun check in pipeline_trigger after checking if this pipeline is running on current core. Only owner of the pipeline should access its data. Signed-off-by: Tomasz Lauda --- src/audio/pipeline.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c index 632e00ff3..ebc7e4aa5 100644 --- a/src/audio/pipeline.c +++ b/src/audio/pipeline.c @@ -607,6 +607,10 @@ int pipeline_trigger(struct pipeline *p, struct comp_dev *host, int cmd) trace_pipe_with_ids(p, "pipeline_trigger()"); + /* if current core is different than requested */ + if (p->ipc_pipe.core != cpu_get_id()) + return pipeline_trigger_on_core(p, host, cmd); + /* handle pipeline global checks before going into each components */ if (p->xrun_bytes) { ret = pipeline_xrun_handle_trigger(p, cmd); @@ -619,10 +623,6 @@ int pipeline_trigger(struct pipeline *p, struct comp_dev *host, int cmd) return 0; } - /* if current core is different than requested */ - if (p->ipc_pipe.core != cpu_get_id()) - return pipeline_trigger_on_core(p, host, cmd); - data.start = host; data.cmd = cmd;