Selaa lähdekoodia

ASoC: utils: Add internal call to determine if DAI is dummy.

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>
Liam Girdwood 11 vuotta sitten
vanhempi
commit
bece9e957c
2 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. 2 0
      include/sound/soc-dai.h
  2. 7 0
      sound/soc/soc-utils.c

+ 2 - 0
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.

+ 7 - 0
sound/soc/soc-utils.c

@@ -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;