From 5711211e0de8c31de7112c561ec425efe812c073 Mon Sep 17 00:00:00 2001 From: Keyon Jie Date: Wed, 20 Feb 2019 16:19:10 +0800 Subject: [PATCH] topology: add support for channel selector component in topology Signed-off-by: Keyon Jie --- tools/topology/m4/ch_sel.m4 | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tools/topology/m4/ch_sel.m4 diff --git a/tools/topology/m4/ch_sel.m4 b/tools/topology/m4/ch_sel.m4 new file mode 100644 index 000000000..2f2267d43 --- /dev/null +++ b/tools/topology/m4/ch_sel.m4 @@ -0,0 +1,46 @@ +divert(-1) + +dnl Define macro for channel selector widget + +dnl Selector name) +define(`N_SELECTOR', `SELECTOR'PIPELINE_ID`.'$1) + +dnl W_SELECTOR(name, format, periods_sink, periods_source, in_chan_cnt, out_chan_cnt, sel_chan_index) +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) +` }' +`}' +`SectionData."'N_SELECTOR($1)`_data_w" {' +` tuples "'N_SELECTOR($1)`_tuples_w"' +`}' +`SectionVendorTuples."'N_SELECTOR($1)`_tuples_str" {' +` tokens "sof_comp_tokens"' +` tuples."string" {' +` SOF_TKN_COMP_FORMAT' STR($2) +` }' +`}' +`SectionVendorTuples."'N_SELECTOR($1)`_process_tuples_str" {' +` tokens "sof_process_tokens"' +` tuples."string" {' +` SOF_TKN_PROCESS_TYPE' "CHAN_SELECTOR" +` }' +`}' +`SectionData."'N_SELECTOR($1)`_data_str" {' +` tuples "'N_SELECTOR($1)`_tuples_str"' +` tuples "'N_SELECTOR($1)`_process_tuples_str"' +`}' +`SectionWidget."'N_SELECTOR($1)`" {' +` index "'PIPELINE_ID`"' +` type "effect"' +` no_pm "true"' +` data [' +` "'N_SELECTOR($1)`_data_w"' +` "'N_SELECTOR($1)`_data_str"' +` ]' +`}') + +divert(0)dnl