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 <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Ranjani Sridharan 2021-04-26 12:45:01 -07:00 committed by Jaroslav Kysela
parent d271972177
commit 032d1250c7

View file

@ -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,