Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/boards/intel_adsp_ace15_mtpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
CONFIG_CLOCK_CONTROL=y
CONFIG_OVERRIDE_CPC_AS_HZ_DIVIDED_BY=1000
8 changes: 8 additions & 0 deletions src/audio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion src/audio/pipeline/pipeline-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down