topology: Define a function to build a single physical DAI link

Code refactoring. Rename the function to build all physical links from
tplg_build_link_config() to tplg_build_links(). And define a new function
build_link() to build a single physical DAI link element.

The function build_link() will be extended to handle more properties
of a physical DAI link (e.g. backend or codec-codec link).

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-11-06 13:12:40 +08:00 committed by Takashi Iwai
parent 18652f4629
commit 53f7711769
3 changed files with 25 additions and 8 deletions

View file

@ -284,6 +284,6 @@ int tplg_add_bytes(snd_tplg_t *tplg, struct snd_tplg_bytes_template *bytes_ctl,
struct tplg_elem **e);
int tplg_build_pcms(snd_tplg_t *tplg, unsigned int type);
int tplg_build_link_cfg(snd_tplg_t *tplg, unsigned int type);
int tplg_build_links(snd_tplg_t *tplg, unsigned int type);
int tplg_add_link_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);
int tplg_add_pcm_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t);