Skip to content

Commit

Permalink
topology: add a "core" parameter to the W_SELECTOR() macro
Browse files Browse the repository at this point in the history
This places all SectionWidget.SELECTOR* topology widgets, created by
the W_SELECTOR() 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 fac1c79 commit ce22914
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/ch_sel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ divert(-1)

dnl Define macro for channel selector widget

dnl Selector name)
dnl N_SELECTOR(name)
define(`N_SELECTOR', `SELECTOR'PIPELINE_ID`.'$1)

dnl W_SELECTOR(name, format, periods_sink, periods_source, kcontrols_list)
dnl W_SELECTOR(name, format, periods_sink, periods_source, core, kcontrols_list)
define(`W_SELECTOR',
`SectionVendorTuples."'N_SELECTOR($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($5)
` }'
`}'
`SectionData."'N_SELECTOR($1)`_data_w" {'
Expand Down Expand Up @@ -42,7 +43,7 @@ define(`W_SELECTOR',
` "'N_SELECTOR($1)`_data_str"'
` ]'
` bytes ['
$5
$6
` ]'
`}')

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 @@ -77,7 +77,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_SELECTOR(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "SELECTOR"))
W_SELECTOR(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE,
LIST(` ', "SELECTOR"))

# Capture Buffers
W_BUFFER(1, COMP_BUFFER_SIZE(2,
Expand Down

0 comments on commit ce22914

Please sign in to comment.