From 5964dabefc8b79ae1879cab85c4f63dbf4b6d768 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 16 Jul 2024 15:37:50 +0200 Subject: [PATCH] pipeline: limit the effect of a recent CPC work-around Limit the scope of a recent dynamic KCPS change to only cases with 0 module CPC. Signed-off-by: Guennadi Liakhovetski --- src/audio/pipeline/pipeline-stream.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/audio/pipeline/pipeline-stream.c b/src/audio/pipeline/pipeline-stream.c index add2dbd787b6..58a838464537 100644 --- a/src/audio/pipeline/pipeline-stream.c +++ b/src/audio/pipeline/pipeline-stream.c @@ -443,14 +443,17 @@ int pipeline_trigger(struct pipeline *p, struct comp_dev *host, int cmd) for (int i = 0; i < arch_num_cpus(); i++) { if (data.kcps[i] > 0) { uint32_t core_kcps = core_kcps_get(i); - - /* Tests showed, that we cannot go below 40000kcps on MTL */ - if (data.kcps[i] > core_kcps - DSP_MIN_KCPS) + /* + * When the 0-CPC work-around is used, + * going below 40000 kcps doesn't work on MTL + */ + if (ret == PPL_STATUS_PATH_STOP && + data.kcps[i] > core_kcps - DSP_MIN_KCPS) data.kcps[i] = core_kcps - DSP_MIN_KCPS; core_kcps_adjust(i, -data.kcps[i]); tr_info(pipe, "Sum of KCPS consumption: %d, core: %d", - core_kcps, i); + core_kcps_get(i), i); } } }