ASoC: soc-component: add snd_soc_component_active()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 15 May 2020 00:46:42 +0000 (09:46 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 18 May 2020 15:15:02 +0000 (16:15 +0100)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/875zcy6n4d.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-component.h
sound/soc/soc-dai.c

index 864983b..f39e108 100644 (file)
@@ -395,6 +395,12 @@ static inline bool snd_soc_component_is_active(
        return component->active != 0;
 }
 
+static inline unsigned int
+snd_soc_component_active(struct snd_soc_component *component)
+{
+       return component->active;
+}
+
 /* component pin */
 int snd_soc_component_enable_pin(struct snd_soc_component *component,
                                 const char *pin);
index de2981f..bb77130 100644 (file)
@@ -393,6 +393,7 @@ void snd_soc_dai_action(struct snd_soc_dai *dai,
 {
        dai->stream_active[stream]      += action;
        dai->active                     += action;
+       /* see snd_soc_component_active() */
        dai->component->active          += action;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dai_action);