Skip to content

Commit 21873f0

Browse files
committed
pipeline: print warning if 0 KCPS received
This will clear cps error logs and print warning only if 0 KCPS received Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
1 parent 9d3701c commit 21873f0

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/audio/pipeline/pipeline-stream.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,15 @@ static int add_pipeline_cps_consumption(struct comp_dev *current,
298298
}
299299

300300
int kcps = cd->cpc * 1000 / ppl_data->p->period;
301-
core_kcps_adjust(0, kcps);
302-
tr_err(pipe, "Registering KCPS consumption: %d, core: %d", kcps, ppl_data->p->core);
301+
if (kcps == 0) {
302+
tr_warn(pipe, "0 KCPS for module: %#x, core: %d", current->ipc_config.id, ppl_data->p->core);
303+
} else {
304+
core_kcps_adjust(0, kcps);
305+
tr_info(pipe, "Registering KCPS consumption: %d, core: %d", kcps, ppl_data->p->core);
306+
}
307+
303308
int summary_cps = core_kcps_get(0);
304-
tr_err(pipe, "Sum of KCPS consumption: %d, core: %d", summary_cps, ppl_data->p->core);
309+
tr_info(pipe, "Sum of KCPS consumption: %d, core: %d", summary_cps, ppl_data->p->core);
305310
return pipeline_for_each_comp(current, ctx, dir);
306311
}
307312

@@ -334,9 +339,9 @@ static int remove_pipeline_cps_consumption(struct comp_dev *current,
334339

335340
int kcps = cd->cpc * 1000/ppl_data->p->period;
336341
core_kcps_adjust(0, -kcps); /* 1000 chunks per second, so cpc value matches kcps? */
337-
tr_err(pipe, "Unregistering KCPS consumption: %d, core: %d", kcps, ppl_data->p->core);
342+
tr_info(pipe, "Unregistering KCPS consumption: %d, core: %d", kcps, ppl_data->p->core);
338343
int summary_cps = core_kcps_get(0);
339-
tr_err(pipe, "Sum of KCPS consumption: %d, core: %d", summary_cps, ppl_data->p->core);
344+
tr_info(pipe, "Sum of KCPS consumption: %d, core: %d", summary_cps, ppl_data->p->core);
340345
return pipeline_for_each_comp(current, ctx, dir);
341346
}
342347

0 commit comments

Comments
 (0)