浏览代码

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>
Mengdong Lin 9 年之前
父节点
当前提交
305e9020f0
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 3 0
      include/sound/soc.h
  2. 2 1
      sound/soc/soc-core.c

+ 3 - 0
include/sound/soc.h

@@ -1683,6 +1683,9 @@ void snd_soc_remove_dai_link(struct snd_soc_card *card,
 int snd_soc_register_dai(struct snd_soc_component *component,
 int snd_soc_register_dai(struct snd_soc_component *component,
 	struct snd_soc_dai_driver *dai_drv);
 	struct snd_soc_dai_driver *dai_drv);
 
 
+struct snd_soc_dai *snd_soc_find_dai(
+	const struct snd_soc_dai_link_component *dlc);
+
 #include <sound/soc-dai.h>
 #include <sound/soc-dai.h>
 
 
 #ifdef CONFIG_DEBUG_FS
 #ifdef CONFIG_DEBUG_FS

+ 2 - 1
sound/soc/soc-core.c

@@ -930,7 +930,7 @@ static struct snd_soc_component *soc_find_component(
 	return NULL;
 	return NULL;
 }
 }
 
 
-static struct snd_soc_dai *snd_soc_find_dai(
+struct snd_soc_dai *snd_soc_find_dai(
 	const struct snd_soc_dai_link_component *dlc)
 	const struct snd_soc_dai_link_component *dlc)
 {
 {
 	struct snd_soc_component *component;
 	struct snd_soc_component *component;
@@ -959,6 +959,7 @@ static struct snd_soc_dai *snd_soc_find_dai(
 
 
 	return NULL;
 	return NULL;
 }
 }
+EXPORT_SYMBOL_GPL(snd_soc_find_dai);
 
 
 static bool soc_is_dai_link_bound(struct snd_soc_card *card,
 static bool soc_is_dai_link_bound(struct snd_soc_card *card,
 		struct snd_soc_dai_link *dai_link)
 		struct snd_soc_dai_link *dai_link)