aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@linux.intel.com>2016-04-19 01:12:25 -0400
committerMark Brown <broonie@kernel.org>2016-04-20 12:19:24 -0400
commit305e9020f09d28560373c0112682e6fd11e909f6 (patch)
tree05654e60ae3982c3655c179356899ccf7e5e83fc
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
ASoC: Export snd_soc_find_dai()
This API can be used by topology to find an existing BE dai by name and further configure it. Topology will also check DAI ID to avoid wrong match. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--include/sound/soc.h3
-rw-r--r--sound/soc/soc-core.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 02b4a215fd75..7687e2d4b0e4 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1683,6 +1683,9 @@ void snd_soc_remove_dai_link(struct snd_soc_card *card,
1683int snd_soc_register_dai(struct snd_soc_component *component, 1683int snd_soc_register_dai(struct snd_soc_component *component,
1684 struct snd_soc_dai_driver *dai_drv); 1684 struct snd_soc_dai_driver *dai_drv);
1685 1685
1686struct snd_soc_dai *snd_soc_find_dai(
1687 const struct snd_soc_dai_link_component *dlc);
1688
1686#include <sound/soc-dai.h> 1689#include <sound/soc-dai.h>
1687 1690
1688#ifdef CONFIG_DEBUG_FS 1691#ifdef CONFIG_DEBUG_FS
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d2e62b159610..07663def2db6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -930,7 +930,7 @@ static struct snd_soc_component *soc_find_component(
930 return NULL; 930 return NULL;
931} 931}
932 932
933static struct snd_soc_dai *snd_soc_find_dai( 933struct snd_soc_dai *snd_soc_find_dai(
934 const struct snd_soc_dai_link_component *dlc) 934 const struct snd_soc_dai_link_component *dlc)
935{ 935{
936 struct snd_soc_component *component; 936 struct snd_soc_component *component;
@@ -959,6 +959,7 @@ static struct snd_soc_dai *snd_soc_find_dai(
959 959
960 return NULL; 960 return NULL;
961} 961}
962EXPORT_SYMBOL_GPL(snd_soc_find_dai);
962 963
963static bool soc_is_dai_link_bound(struct snd_soc_card *card, 964static bool soc_is_dai_link_bound(struct snd_soc_card *card,
964 struct snd_soc_dai_link *dai_link) 965 struct snd_soc_dai_link *dai_link)