diff --git a/app/boards/intel_adsp_ace15_mtpm.conf b/app/boards/intel_adsp_ace15_mtpm.conf index 8f190af50a40..c05877b8084b 100644 --- a/app/boards/intel_adsp_ace15_mtpm.conf +++ b/app/boards/intel_adsp_ace15_mtpm.conf @@ -80,4 +80,5 @@ CONFIG_HOST_DMA_RELOAD_DELAY_ENABLE=n CONFIG_COMP_KPB=y CONFIG_COMP_ARIA=y CONFIG_CLOCK_CONTROL_ADSP=y -CONFIG_CLOCK_CONTROL=y \ No newline at end of file +CONFIG_CLOCK_CONTROL=y +CONFIG_OVERRIDE_CPC_AS_HZ_DIVIDED_BY=1000 diff --git a/src/audio/Kconfig b/src/audio/Kconfig index 1d81acf04f12..22cd222850ec 100644 --- a/src/audio/Kconfig +++ b/src/audio/Kconfig @@ -108,6 +108,14 @@ config COMP_BLOB multiple IPC messages. Not all components or modules need this. If unsure, say yes. +config OVERRIDE_CPC_AS_HZ_DIVIDED_BY + int "Ignore supplied CPC value and use MAX_CPU_HZ / DIVIDED_BY" + default 0 + help + If OVERRIDE_CPC_AS_HZ_DIVIDED_BY is not 0, ignore the provided CPC + value and use CPC = CLK_MAX_CPU_HZ / OVERRIDE_CPC_AS_HZ_DIVIDED_BY + instead + config COMP_SRC bool "SRC component" default y diff --git a/src/audio/pipeline/pipeline-stream.c b/src/audio/pipeline/pipeline-stream.c index 3203d53df675..d27df44a0dba 100644 --- a/src/audio/pipeline/pipeline-stream.c +++ b/src/audio/pipeline/pipeline-stream.c @@ -297,7 +297,20 @@ static int add_pipeline_cps_consumption(struct comp_dev *current, cd = &md->cfg.base_cfg; } - if (cd->cpc == 0) { + if (CONFIG_OVERRIDE_CPC_AS_HZ_DIVIDED_BY) { + uint32_t new_cpc = CLK_MAX_CPU_HZ / CONFIG_OVERRIDE_CPC_AS_HZ_DIVIDED_BY; + + if (!cd->cpc) + tr_warn(pipe, + "CPC for module: %#x, core: %d: 0, overriding to %u", + current->ipc_config.id, ppl_data->p->core, new_cpc); + else + tr_info(pipe, + "CPC for module: %#x, core: %d: %u, overriding to %u", + current->ipc_config.id, ppl_data->p->core, cd->cpc, new_cpc); + + cd->cpc = new_cpc; + } else if (cd->cpc == 0) { /* Use maximum clock budget, assume 1ms chunk size */ cd->cpc = CLK_MAX_CPU_HZ / 1000; tr_warn(pipe,