diff mbox series

[v3,05/21] ASoC: soc-component: add snd_soc_component_active()

Message ID 875zcy6n4d.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State Accepted
Commit 488b2ca599f96d46d4a4d730845a247328cb6a28
Headers show
Series ASoC: cleanup DAI/Component activity | expand

Commit Message

Kuninori Morimoto May 15, 2020, 12:46 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 include/sound/soc-component.h | 6 ++++++
 sound/soc/soc-dai.c           | 1 +
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 864983b09846..f39e1084850e 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -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);
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index de2981fa5372..bb771302fd6f 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -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);