ASoC: utils: Add internal call to determine if DAI is dummy.
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>
Wed, 8 Jan 2014 10:40:18 +0000 (10:40 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 8 Jan 2014 12:07:13 +0000 (12:07 +0000)
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 determine whether to
insert a DAI link connection into the DAPM graph.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
include/sound/soc-dai.h
sound/soc/soc-utils.c

index 800c101bb096fd6f5c1170ebbdce1ab06cead062..c42864b345817454a17ddb66c0c59de5db488a4e 100644 (file)
@@ -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.
index 5e633659c1b38154ebd1a75aa0e4f005b4f089a0..d14bdb3c52df04fdf9d97ac4384281909ebb7199 100644 (file)
@@ -123,6 +123,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;