Skip to content

Commit

Permalink
ASoC: Export snd_soc_find_dai()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mengdong Lin authored and Mark Brown committed Apr 20, 2016
1 parent f55532a commit 305e902
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
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>

#ifdef CONFIG_DEBUG_FS
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ static struct snd_soc_component *soc_find_component(
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)
{
struct snd_soc_component *component;
Expand Down Expand Up @@ -959,6 +959,7 @@ static struct snd_soc_dai *snd_soc_find_dai(

return NULL;
}
EXPORT_SYMBOL_GPL(snd_soc_find_dai);

static bool soc_is_dai_link_bound(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link)
Expand Down

0 comments on commit 305e902

Please sign in to comment.