From 032d1250c7225ec2723f598b1d61d37dba0527ee Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Mon, 26 Apr 2021 12:45:01 -0700 Subject: [PATCH] topology: pre-process-dapm: Add support for DAPM Widget objects Add support for pre-processing DAPM widget opbects. For ex: Object.Widget.pga."0" { pipeline_id 1 no_pm true type pga } will be converted to: SectionWidget.'pga.0' { index 1 type pga no_pm 1 } Signed-off-by: Ranjani Sridharan Signed-off-by: Jaroslav Kysela --- topology/pre-process-object.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/topology/pre-process-object.c b/topology/pre-process-object.c index 6988f8e..22f4d48 100644 --- a/topology/pre-process-object.c +++ b/topology/pre-process-object.c @@ -846,6 +846,12 @@ static int tplg_build_generic_object(struct tplg_pre_processor *tplg_pp, snd_con return ret; } +const struct config_template_items widget_config = { + .int_config_ids = {"index", "no_pm", "shift", "invert", "subseq", "event_type", + "event_flags"}, + .string_config_ids = {"type", "stream_name"}, +}; + const struct config_template_items data_config = { .string_config_ids = {"bytes"} }; @@ -854,6 +860,7 @@ const struct build_function_map object_build_map[] = { {"Base", "manifest", "SectionManifest", &tplg_build_generic_object, NULL}, {"Base", "data", "SectionData", &tplg_build_data_object, &data_config}, {"Base", "VendorToken", "SectionVendorTokens", &tplg_build_vendor_token_object, NULL}, + {"Widget", "", "SectionWidget", &tplg_build_generic_object, &widget_config}, }; static const struct build_function_map *tplg_object_get_map(struct tplg_pre_processor *tplg_pp, -- 2.47.1