mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
topology: add parser to the tplg_table
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
4f076f5b69
commit
4a0efdc873
3 changed files with 47 additions and 81 deletions
|
|
@ -23,112 +23,139 @@
|
|||
struct tplg_table tplg_table[] = {
|
||||
{
|
||||
.name = "manifest",
|
||||
.id = "SectionManifest",
|
||||
.loff = offsetof(snd_tplg_t, manifest_list),
|
||||
.type = SND_TPLG_TYPE_MANIFEST,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_MANIFEST,
|
||||
.size = sizeof(struct snd_soc_tplg_manifest),
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_manifest_data,
|
||||
},
|
||||
{
|
||||
.name = "control mixer",
|
||||
.id = "SectionControlMixer",
|
||||
.loff = offsetof(snd_tplg_t, mixer_list),
|
||||
.type = SND_TPLG_TYPE_MIXER,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_MIXER,
|
||||
.size = sizeof(struct snd_soc_tplg_mixer_control),
|
||||
.build = 1,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_control_mixer,
|
||||
},
|
||||
{
|
||||
.name = "control enum",
|
||||
.id = "SectionControlEnum",
|
||||
.loff = offsetof(snd_tplg_t, enum_list),
|
||||
.type = SND_TPLG_TYPE_ENUM,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_ENUM,
|
||||
.size = sizeof(struct snd_soc_tplg_enum_control),
|
||||
.build = 1,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_control_enum,
|
||||
},
|
||||
{
|
||||
.name = "control extended (bytes)",
|
||||
.id = "SectionControlBytes",
|
||||
.loff = offsetof(snd_tplg_t, bytes_ext_list),
|
||||
.type = SND_TPLG_TYPE_BYTES,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_BYTES,
|
||||
.size = sizeof(struct snd_soc_tplg_bytes_control),
|
||||
.build = 1,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_control_bytes,
|
||||
},
|
||||
{
|
||||
.name = "dapm widget",
|
||||
.id = "SectionWidget",
|
||||
.loff = offsetof(snd_tplg_t, widget_list),
|
||||
.type = SND_TPLG_TYPE_DAPM_WIDGET,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_DAPM_WIDGET,
|
||||
.size = sizeof(struct snd_soc_tplg_dapm_widget),
|
||||
.build = 1,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_dapm_widget,
|
||||
},
|
||||
{
|
||||
.name = "pcm",
|
||||
.id = "SectionPCM",
|
||||
.loff = offsetof(snd_tplg_t, pcm_list),
|
||||
.type = SND_TPLG_TYPE_PCM,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_PCM,
|
||||
.size = sizeof(struct snd_soc_tplg_pcm),
|
||||
.build = 1,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_pcm,
|
||||
},
|
||||
{
|
||||
.name = "physical dai",
|
||||
.id = "SectionDAI",
|
||||
.loff = offsetof(snd_tplg_t, dai_list),
|
||||
.type = SND_TPLG_TYPE_DAI,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_DAI,
|
||||
.size = sizeof(struct snd_soc_tplg_dai),
|
||||
.build = 1,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_dai,
|
||||
},
|
||||
{
|
||||
.name = "be",
|
||||
.id = "SectionBE",
|
||||
.id2 = "SectionLink",
|
||||
.loff = offsetof(snd_tplg_t, be_list),
|
||||
.type = SND_TPLG_TYPE_BE,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_BACKEND_LINK,
|
||||
.size = sizeof(struct snd_soc_tplg_link_config),
|
||||
.build = 1,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_link,
|
||||
},
|
||||
{
|
||||
.name = "cc",
|
||||
.id = "SectionCC",
|
||||
.loff = offsetof(snd_tplg_t, cc_list),
|
||||
.type = SND_TPLG_TYPE_CC,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_CODEC_LINK,
|
||||
.size = sizeof(struct snd_soc_tplg_link_config),
|
||||
.build = 1,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_cc,
|
||||
},
|
||||
{
|
||||
.name = "route (dapm graph)",
|
||||
.id = "SectionGraph",
|
||||
.loff = offsetof(snd_tplg_t, route_list),
|
||||
.type = SND_TPLG_TYPE_DAPM_GRAPH,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_DAPM_GRAPH,
|
||||
.build = 1,
|
||||
.parse = tplg_parse_dapm_graph,
|
||||
},
|
||||
{
|
||||
.name = "private data",
|
||||
.id = "SectionData",
|
||||
.loff = offsetof(snd_tplg_t, pdata_list),
|
||||
.type = SND_TPLG_TYPE_DATA,
|
||||
.tsoc = SND_SOC_TPLG_TYPE_PDATA,
|
||||
.build = 1,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_data,
|
||||
},
|
||||
{
|
||||
.name = "text",
|
||||
.id = "SectionText",
|
||||
.loff = offsetof(snd_tplg_t, text_list),
|
||||
.type = SND_TPLG_TYPE_TEXT,
|
||||
.size = sizeof(struct tplg_texts),
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_text,
|
||||
},
|
||||
{
|
||||
.name = "tlv",
|
||||
.id = "SectionTLV",
|
||||
.loff = offsetof(snd_tplg_t, tlv_list),
|
||||
.type = SND_TPLG_TYPE_TLV,
|
||||
.size = sizeof(struct snd_soc_tplg_ctl_tlv),
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_tlv,
|
||||
},
|
||||
{
|
||||
.name = "stream config",
|
||||
|
|
@ -139,30 +166,38 @@ struct tplg_table tplg_table[] = {
|
|||
},
|
||||
{
|
||||
.name = "stream capabilities",
|
||||
.id = "SectionPCMCapabilities",
|
||||
.loff = offsetof(snd_tplg_t, pcm_caps_list),
|
||||
.type = SND_TPLG_TYPE_STREAM_CAPS,
|
||||
.size = sizeof(struct snd_soc_tplg_stream_caps),
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_stream_caps,
|
||||
},
|
||||
{
|
||||
.name = "token",
|
||||
.id = "SectionVendorTokens",
|
||||
.loff = offsetof(snd_tplg_t, token_list),
|
||||
.type = SND_TPLG_TYPE_TOKEN,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_tokens,
|
||||
},
|
||||
{
|
||||
.name = "tuple",
|
||||
.id = "SectionVendorTuples",
|
||||
.loff = offsetof(snd_tplg_t, tuple_list),
|
||||
.type = SND_TPLG_TYPE_TUPLE,
|
||||
.free = tplg_free_tuples,
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_tuples,
|
||||
},
|
||||
{
|
||||
.name = "hw config",
|
||||
.id = "SectionHWConfig",
|
||||
.loff = offsetof(snd_tplg_t, hw_cfg_list),
|
||||
.type = SND_TPLG_TYPE_HW_CONFIG,
|
||||
.size = sizeof(struct snd_soc_tplg_hw_config),
|
||||
.enew = 1,
|
||||
.parse = tplg_parse_hw_config,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue