diff mbox series

[03/17] ASoC: soc-dai: add snd_soc_component_activity()

Message ID 871rnr9fq5.wl-kuninori.morimoto.gx@renesas.com
State New
Headers show
Series [01/17] ASoC: soc-dai: add snd_soc_dai_activity() | expand

Commit Message

Kuninori Morimoto May 11, 2020, 5:56 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/soc-component.h | 1 +
 sound/soc/soc-pcm.c           | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 864983b09846..29b0c2c1d2db 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -358,6 +358,7 @@  int snd_soc_component_stream_event(struct snd_soc_component *component,
 				   int event);
 int snd_soc_component_set_bias_level(struct snd_soc_component *component,
 				     enum snd_soc_bias_level level);
+#define snd_soc_component_activity(component)	((component)->active)
 
 #ifdef CONFIG_REGMAP
 void snd_soc_component_init_regmap(struct snd_soc_component *component,
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index e923e3746fec..420595356111 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -267,7 +267,7 @@  static void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
 	for_each_rtd_dais(rtd, i, dai) {
 		dai->stream_active[stream] += action;
 		dai->active += action;
-		dai->component->active += action;
+		snd_soc_component_activity(dai->component) += action;
 	}
 }