topology: Add support for parsing vendor tuples

Vendor can define several tuple arrays in 'SectionVendorTuples', as
well as the reference to a vendor token list object.

A later patche will copy vendor tuples in ABI format to the private
buffer of its parent data object in the building phase.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Mengdong Lin 2016-04-07 15:29:43 +08:00 committed by Takashi Iwai
parent 9b751b38cb
commit fdb9a6d19f
5 changed files with 283 additions and 1 deletions

View file

@ -181,6 +181,14 @@ static int tplg_parse_config(snd_tplg_t *tplg, snd_config_t *cfg)
continue;
}
if (strcmp(id, "SectionVendorTuples") == 0) {
err = tplg_parse_compound(tplg, n, tplg_parse_tuples,
NULL);
if (err < 0)
return err;
continue;
}
SNDERR("error: unknown section %s\n", id);
}
return 0;
@ -416,6 +424,7 @@ snd_tplg_t *snd_tplg_new(void)
INIT_LIST_HEAD(&tplg->enum_list);
INIT_LIST_HEAD(&tplg->bytes_ext_list);
INIT_LIST_HEAD(&tplg->token_list);
INIT_LIST_HEAD(&tplg->tuple_list);
return tplg;
}
@ -436,6 +445,7 @@ void snd_tplg_free(snd_tplg_t *tplg)
tplg_elem_free_list(&tplg->enum_list);
tplg_elem_free_list(&tplg->bytes_ext_list);
tplg_elem_free_list(&tplg->token_list);
tplg_elem_free_list(&tplg->tuple_list);
free(tplg);
}