Skip to content

Commit

Permalink
topology: add a "core" parameter to the W_DETECT() macro
Browse files Browse the repository at this point in the history
This places all SectionWidget.DETECT* topology widgets, created by
the W_DETECT() macro on the same core, on which the respective
pipeline is scheduled.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh authored and lgirdwood committed Apr 8, 2020
1 parent 6fe1f34 commit b735047
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions tools/topology/m4/detect.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ divert(-1)

dnl Define macro for generic detection widget

dnl Detect name)
dnl N_DETECT(name)
define(`N_DETECT', `DETECT'PIPELINE_ID`.'$1)

dnl W_DETECT(name, format, periods_sink, periods_source, detect_type, stream_name, kcontrols_list)
dnl W_DETECT(name, format, periods_sink, periods_source, detect_type, stream_name, core, kcontrols_list)
define(`W_DETECT',
`SectionVendorTuples."'N_DETECT($1)`_tuples_w" {'
` tokens "sof_comp_tokens"'
` tuples."word" {'
` SOF_TKN_COMP_PERIOD_SINK_COUNT' STR($3)
` SOF_TKN_COMP_PERIOD_SOURCE_COUNT' STR($4)
` SOF_TKN_COMP_CORE_ID' STR($7)
` }'
`}'
`SectionVendorTuples."'N_DETECT($1)`_detect_process_tuples_str" {'
Expand Down Expand Up @@ -45,7 +46,7 @@ define(`W_DETECT',
` "'N_DETECT($1)`_data_str"'
` ]'
` bytes ['
$7
$8
` ]'
`}')

Expand Down
3 changes: 2 additions & 1 deletion tools/topology/sof/pipe-detect.m4
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ C_CONTROLBYTES(Hotword Model, PIPELINE_ID,
#

# "Detect 0" has 2 sink period and 0 source periods
W_DETECT(0, PIPELINE_FORMAT, 0, 2, KEYWORD, N_STS(PCM_ID), LIST(` ', "Detector Config", "Hotword Model"))
W_DETECT(0, PIPELINE_FORMAT, 0, 2, KEYWORD, N_STS(PCM_ID), SCHEDULE_CORE,
LIST(` ', "Detector Config", "Hotword Model"))

W_SELECTOR(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE,
LIST(` ', "SELECTOR"))
Expand Down

0 comments on commit b735047

Please sign in to comment.