From 2da0638db471bd9e92f2e82839fb7e0207247402 Mon Sep 17 00:00:00 2001 From: Keyon Jie Date: Thu, 28 May 2020 16:37:20 +0800 Subject: [PATCH] topology: detect: add uuid token support Add the uuid token to detect widget for the future use. Signed-off-by: Keyon Jie --- tools/topology/m4/detect.m4 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/topology/m4/detect.m4 b/tools/topology/m4/detect.m4 index 30fcfff2f..19c284989 100644 --- a/tools/topology/m4/detect.m4 +++ b/tools/topology/m4/detect.m4 @@ -1,12 +1,23 @@ divert(-1) dnl Define macro for generic detection widget +DECLARE_SOF_RT_UUID("kd-test", keyword_uuid, 0xeba8d51f, 0x7827, 0x47b5, + 0x82, 0xee, 0xde, 0x6e, 0x77, 0x43, 0xaf, 0x67) dnl N_DETECT(name) define(`N_DETECT', `DETECT'PIPELINE_ID`.'$1) dnl W_DETECT(name, format, periods_sink, periods_source, detect_type, stream_name, core, kcontrols_list) define(`W_DETECT', +`SectionVendorTuples."'N_DETECT($1)`_tuples_uuid" {' +` tokens "sof_comp_tokens"' +` tuples."uuid" {' +` SOF_TKN_COMP_UUID' STR(keyword_uuid) +` }' +`}' +`SectionData."'N_DETECT($1)`_data_uuid" {' +` tuples "'N_DETECT($1)`_tuples_uuid"' +`}' `SectionVendorTuples."'N_DETECT($1)`_tuples_w" {' ` tokens "sof_comp_tokens"' ` tuples."word" {' @@ -42,6 +53,7 @@ define(`W_DETECT', ` event_flags "15"' # trapping PRE/POST_PMU/PMD events ` event_type "1"' # 1 for DAPM event for detect component ` data [' +` "'N_DETECT($1)`_data_uuid"' ` "'N_DETECT($1)`_data_w"' ` "'N_DETECT($1)`_data_str"' ` ]'