Skip to content

Commit b1c762a

Browse files
committed
ASoC: SOF: core: debug: force all processing on primary core
The topology file currently provides information on which pipeline/processing is to be scheduled on which DSP core. To help diagnose potential issues, this patch provides an override of the 'core' tokens to use the primary core (typically core0). Of course this may result in a Core0 activity that exceeds hardware capabilities, so this should only be used when the total processing fits on DSP - possibly using firmware mockup processing and stubs. No new dmesg log was added to avoid adding noise during topology parsing, but the existing logs will show the primary core being used. This is strictly for validation/debug, products should NEVER use this override, the topology is assumed to be the description of the firmware graph. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
1 parent 3697971 commit b1c762a

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

sound/soc/sof/sof-priv.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
#define SOF_DBG_DYNAMIC_PIPELINES_ENABLE BIT(4) /* 0: use static pipelines
3131
* 1: use dynamic pipelines
3232
*/
33+
#define SOF_DBG_DISABLE_MULTICORE BIT(5) /* schedule all pipelines/widgets
34+
* on primary core
35+
*/
3336

3437
#define SOF_DBG_DUMP_REGS BIT(0)
3538
#define SOF_DBG_DUMP_MBOX BIT(1)

sound/soc/sof/topology.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,9 @@ static int sof_widget_load_pipeline(struct snd_soc_component *scomp, int index,
17591759
goto err;
17601760
}
17611761

1762+
if (sof_core_debug & SOF_DBG_DISABLE_MULTICORE)
1763+
pipeline->core = SOF_DSP_PRIMARY_CORE;
1764+
17621765
if (sof_core_debug & SOF_DBG_DYNAMIC_PIPELINES_OVERRIDE)
17631766
swidget->dynamic_pipeline_widget = sof_core_debug &
17641767
SOF_DBG_DYNAMIC_PIPELINES_ENABLE;
@@ -2356,6 +2359,9 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
23562359
return ret;
23572360
}
23582361

2362+
if (sof_core_debug & SOF_DBG_DISABLE_MULTICORE)
2363+
comp.core = SOF_DSP_PRIMARY_CORE;
2364+
23592365
swidget->core = comp.core;
23602366

23612367
ret = sof_parse_tokens(scomp, &swidget->comp_ext, comp_ext_tokens,

0 commit comments

Comments
 (0)