@@ -165,6 +165,7 @@ void snd_soc_dai_action(struct snd_soc_dai *dai,
int stream, int action);
#define snd_soc_dai_activate(dai, stream) snd_soc_dai_action(dai, stream, 1)
#define snd_soc_dai_deactivate(dai, stream) snd_soc_dai_action(dai, stream, -1)
+int snd_soc_dai_active(struct snd_soc_dai *dai);
int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order);
int snd_soc_pcm_dai_remove(struct snd_soc_pcm_runtime *rtd, int order);
@@ -397,6 +397,18 @@ void snd_soc_dai_action(struct snd_soc_dai *dai,
}
EXPORT_SYMBOL_GPL(snd_soc_dai_action);
+int snd_soc_dai_active(struct snd_soc_dai *dai)
+{
+ int stream, active;
+
+ active = 0;
+ for_each_pcm_streams(stream)
+ active += dai->stream_active[stream];
+
+ return active;
+}
+EXPORT_SYMBOL_GPL(snd_soc_dai_active);
+
int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order)
{
struct snd_soc_dai *dai;