All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: utils: Add internal call to determine if DAI is dummy.
@ 2014-01-08 10:40 Liam Girdwood
  2014-01-08 10:40 ` [PATCH 2/2] ASoC: DAPM: Automatically connect DAI link widgets in DAPM graph Liam Girdwood
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Liam Girdwood @ 2014-01-08 10:40 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, alsa-devel

Provide a quick way to tell if a DAI is a dummy DAI or a regular DAI.
This is for internal DAPM usage only and is used to determe whether to
insert a DAI link connection into the DAPM graph.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 include/sound/soc-dai.h | 2 ++
 sound/soc/soc-utils.c   | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 243d3b6..71f27c4 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -123,6 +123,8 @@ int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
 int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute,
 			     int direction);
 
+int snd_soc_dai_is_dummy(struct snd_soc_dai *dai);
+
 struct snd_soc_dai_ops {
 	/*
 	 * DAI clocking configuration, all optional.
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index 6ebdfd9..7f22ca3 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -119,6 +119,13 @@ static struct snd_soc_dai_driver dummy_dai = {
 	 },
 };
 
+int snd_soc_dai_is_dummy(struct snd_soc_dai *dai)
+{
+	if (dai->driver == &dummy_dai)
+		return 1;
+	return 0;
+}
+
 static int snd_soc_dummy_probe(struct platform_device *pdev)
 {
 	int ret;
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-08 12:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-08 10:40 [PATCH 1/2] ASoC: utils: Add internal call to determine if DAI is dummy Liam Girdwood
2014-01-08 10:40 ` [PATCH 2/2] ASoC: DAPM: Automatically connect DAI link widgets in DAPM graph Liam Girdwood
2014-01-08 10:55 ` [PATCH 1/2] ASoC: utils: Add internal call to determine if DAI is dummy Takashi Iwai
2014-01-08 11:49   ` Liam Girdwood
2014-01-08 12:08 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.