alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: mengdong.lin@linux.intel.com
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: Mengdong Lin <mengdong.lin@linux.intel.com>,
	vinod.koul@intel.com, hardik.t.shah@intel.com,
	guneshwor.o.singh@intel.com, liam.r.girdwood@linux.intel.com,
	rakesh.a.ughreja@intel.com, mengdong.lin@intel.com
Subject: [PATCH 1/4] ASoC: Export snd_soc_find_dai()
Date: Tue, 19 Apr 2016 13:12:25 +0800	[thread overview]
Message-ID: <5e7147f76b2c54d2d23eb1f6a1146a3716bd5172.1461042239.git.mengdong.lin@linux.intel.com> (raw)
In-Reply-To: <cover.1461042239.git.mengdong.lin@linux.intel.com>

From: Mengdong Lin <mengdong.lin@linux.intel.com>

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>

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 02b4a21..7687e2d 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,
 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
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index d2e62b15..07663de 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(
 	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;
@@ -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)
-- 
2.5.0

  reply	other threads:[~2016-04-19  5:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19  5:12 [PATCH 0/4] ASoC: topology: configure more on DAI & DAI links mengdong.lin
2016-04-19  5:12 ` mengdong.lin [this message]
2016-04-20 16:12   ` [PATCH 1/4] ASoC: Export snd_soc_find_dai() Mark Brown
2016-04-21  6:55     ` Mengdong Lin
2016-04-20 16:19   ` Applied "ASoC: Export snd_soc_find_dai()" to the asoc tree Mark Brown
2016-04-19  5:12 ` [PATCH 2/4] ASoC: Change DAI link's be_id to a generic id mengdong.lin
2016-04-20 16:19   ` Applied "ASoC: Change DAI link's be_id to a generic id" to the asoc tree Mark Brown
2016-04-19  5:12 ` [PATCH 3/4] ASoC: topology: Set the link ID when creating a FE DAI link mengdong.lin
2016-04-20 16:19   ` Applied "ASoC: topology: Set the link ID when creating a FE DAI link" to the asoc tree Mark Brown
2016-04-19  5:12 ` [PATCH 4/4] ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link mengdong.lin
2016-04-20 16:21   ` Applied "ASoC: topology: Set CPU DAI name and enable DPCM by default for FE link" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e7147f76b2c54d2d23eb1f6a1146a3716bd5172.1461042239.git.mengdong.lin@linux.intel.com \
    --to=mengdong.lin@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=guneshwor.o.singh@intel.com \
    --cc=hardik.t.shah@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=mengdong.lin@intel.com \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).