Commit 0c048004 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-core: rename snd_soc_add_dai_link() to snd_soc_add_pcm_runtime()

Now soc-core and soc-topology is using snd_soc_add_dai_link().
The abstract of this function is "create pcm_runtime from
dai_link information and connect it to card".
Thus, "add dai_link" is wrong/confusable naming.
This patch renames function name.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/877e35yq5w.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d6f31e0e
...@@ -1323,8 +1323,8 @@ int snd_soc_of_get_dai_link_codecs(struct device *dev, ...@@ -1323,8 +1323,8 @@ int snd_soc_of_get_dai_link_codecs(struct device *dev,
struct snd_soc_dai_link *dai_link); struct snd_soc_dai_link *dai_link);
void snd_soc_of_put_dai_link_codecs(struct snd_soc_dai_link *dai_link); void snd_soc_of_put_dai_link_codecs(struct snd_soc_dai_link *dai_link);
int snd_soc_add_dai_link(struct snd_soc_card *card, int snd_soc_add_pcm_runtime(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link); struct snd_soc_dai_link *dai_link);
void snd_soc_remove_dai_link(struct snd_soc_card *card, void snd_soc_remove_dai_link(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link); struct snd_soc_dai_link *dai_link);
......
...@@ -1027,18 +1027,18 @@ void snd_soc_remove_dai_link(struct snd_soc_card *card, ...@@ -1027,18 +1027,18 @@ void snd_soc_remove_dai_link(struct snd_soc_card *card,
EXPORT_SYMBOL_GPL(snd_soc_remove_dai_link); EXPORT_SYMBOL_GPL(snd_soc_remove_dai_link);
/** /**
* snd_soc_add_dai_link - Add a DAI link dynamically * snd_soc_add_pcm_runtime - Add a pcm_runtime dynamically via dai_link
* @card: The ASoC card to which the DAI link is added * @card: The ASoC card to which the pcm_runtime is added
* @dai_link: The new DAI link to add * @dai_link: The DAI link to find pcm_runtime
* *
* This function adds a DAI link to the ASoC card's link list. * This function adds a pcm_runtime ASoC card by using dai_link.
* *
* Note: Topology can use this API to add DAI links when probing the * Note: Topology can use this API to add pcm_runtime when probing the
* topology component. And machine drivers can still define static * topology component. And machine drivers can still define static
* DAI links in dai_link array. * DAI links in dai_link array.
*/ */
int snd_soc_add_dai_link(struct snd_soc_card *card, int snd_soc_add_pcm_runtime(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link) struct snd_soc_dai_link *dai_link)
{ {
struct snd_soc_pcm_runtime *rtd; struct snd_soc_pcm_runtime *rtd;
struct snd_soc_dai_link_component *codec, *platform; struct snd_soc_dai_link_component *codec, *platform;
...@@ -1107,7 +1107,7 @@ int snd_soc_add_dai_link(struct snd_soc_card *card, ...@@ -1107,7 +1107,7 @@ int snd_soc_add_dai_link(struct snd_soc_card *card,
soc_free_pcm_runtime(rtd); soc_free_pcm_runtime(rtd);
return -EPROBE_DEFER; return -EPROBE_DEFER;
} }
EXPORT_SYMBOL_GPL(snd_soc_add_dai_link); EXPORT_SYMBOL_GPL(snd_soc_add_pcm_runtime);
static void soc_set_of_name_prefix(struct snd_soc_component *component) static void soc_set_of_name_prefix(struct snd_soc_component *component)
{ {
...@@ -1929,7 +1929,7 @@ static int snd_soc_bind_card(struct snd_soc_card *card) ...@@ -1929,7 +1929,7 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
/* add predefined DAI links to the list */ /* add predefined DAI links to the list */
card->num_rtd = 0; card->num_rtd = 0;
for_each_card_prelinks(card, i, dai_link) { for_each_card_prelinks(card, i, dai_link) {
ret = snd_soc_add_dai_link(card, dai_link); ret = snd_soc_add_pcm_runtime(card, dai_link);
if (ret < 0) if (ret < 0)
goto probe_end; goto probe_end;
} }
......
...@@ -1945,7 +1945,7 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, ...@@ -1945,7 +1945,7 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
link->dobj.type = SND_SOC_DOBJ_DAI_LINK; link->dobj.type = SND_SOC_DOBJ_DAI_LINK;
list_add(&link->dobj.list, &tplg->comp->dobj_list); list_add(&link->dobj.list, &tplg->comp->dobj_list);
snd_soc_add_dai_link(tplg->comp->card, link); snd_soc_add_pcm_runtime(tplg->comp->card, link);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment