diff --git a/src/audio/pipeline/pipeline-graph.c b/src/audio/pipeline/pipeline-graph.c index d013fd2a59fd..dbb560ade044 100644 --- a/src/audio/pipeline/pipeline-graph.c +++ b/src/audio/pipeline/pipeline-graph.c @@ -392,7 +392,7 @@ int pipeline_for_each_comp(struct comp_dev *current, buffer_lock(buffer, &flags); buffer->walking = false; buffer_unlock(buffer, flags); - if (err < 0) + if (err < 0 || err == PPL_STATUS_PATH_STOP) return err; } } diff --git a/src/audio/pipeline/pipeline-params.c b/src/audio/pipeline/pipeline-params.c index 86ed235a8c01..44406474a225 100644 --- a/src/audio/pipeline/pipeline-params.c +++ b/src/audio/pipeline/pipeline-params.c @@ -154,14 +154,18 @@ static int pipeline_comp_hw_params(struct comp_dev *current, pipe_dbg(current->pipeline, "pipeline_comp_hw_params(), current->comp.id = %u, dir = %u", dev_comp_id(current), dir); - pipeline_for_each_comp(current, ctx, dir); + ret = pipeline_for_each_comp(current, ctx, dir); + if (ret < 0) + return ret; /* Fetch hardware stream parameters from DAI component */ if (dev_comp_type(current) == SOF_COMP_DAI) { ret = comp_dai_get_hw_params(current, &ppl_data->params->params, dir); if (ret < 0) { - pipe_err(current->pipeline, "pipeline_find_dai_comp(): comp_dai_get_hw_params() error."); + pipe_err(current->pipeline, + "pipeline_comp_hw_params(): failed getting DAI parameters: %d", + ret); return ret; } } @@ -169,12 +173,15 @@ static int pipeline_comp_hw_params(struct comp_dev *current, /* set buffer parameters */ if (calling_buf) { buffer_lock(calling_buf, &flags); - buffer_set_params(calling_buf, &ppl_data->params->params, - BUFFER_UPDATE_IF_UNSET); + ret = buffer_set_params(calling_buf, &ppl_data->params->params, + BUFFER_UPDATE_IF_UNSET); buffer_unlock(calling_buf, flags); + if (ret < 0) + pipe_err(current->pipeline, + "pipeline_comp_hw_params(): buffer_set_params(): %d", ret); } - return 0; + return ret; } /* Send pipeline component params from host to endpoints. diff --git a/src/audio/pipeline/pipeline-stream.c b/src/audio/pipeline/pipeline-stream.c index 974fb0578a19..23ddfd112295 100644 --- a/src/audio/pipeline/pipeline-stream.c +++ b/src/audio/pipeline/pipeline-stream.c @@ -383,7 +383,7 @@ int pipeline_trigger_run(struct pipeline *p, struct comp_dev *host, int cmd) p->trigger.delay = (data.delay_ms * 1000 + p->period - 1) / p->period; p->trigger.cmd = data.cmd; - return ret; + return 0; } list_init(&walk_ctx.pipelines); @@ -396,6 +396,8 @@ int pipeline_trigger_run(struct pipeline *p, struct comp_dev *host, int cmd) if (ret < 0) pipe_err(p, "pipeline_trigger(): ret = %d, host->comp.id = %u, cmd = %d", ret, dev_comp_id(host), cmd); + else if (ret == PPL_STATUS_PATH_STOP) + ret = 0; if (pipeline_is_timer_driven(p)) return ret;