topology: Merge lookup for data reference into tplg_copy_data()

Code refactor to reduce function calls. Now tplg_copy_data() can look up
a referenced data element and merge its data.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Mengdong Lin 2016-07-15 20:18:11 +08:00 committed by Takashi Iwai
parent bb03d929e8
commit 2481ef315f
4 changed files with 34 additions and 31 deletions

View file

@ -228,7 +228,9 @@ int tplg_build_widgets(snd_tplg_t *tplg);
int tplg_build_routes(snd_tplg_t *tplg);
int tplg_build_pcm_dai(snd_tplg_t *tplg, unsigned int type);
int tplg_copy_data(struct tplg_elem *elem, struct tplg_elem *ref);
int tplg_copy_data(snd_tplg_t *tplg, struct tplg_elem *elem,
struct tplg_ref *ref);
int tplg_parse_data_refs(snd_config_t *cfg, struct tplg_elem *elem);
int tplg_ref_add(struct tplg_elem *elem, int type, const char* id);