[PATCH 16/17] ASoC: cleanup dai / component active code

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon May 11 07:57:51 CEST 2020


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

No one is using dai->active, snd_soc_component_is_active().
Let's remove these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 include/sound/soc-component.h | 6 ------
 include/sound/soc-dai.h       | 2 --
 sound/soc/soc-pcm.c           | 1 -
 3 files changed, 9 deletions(-)

diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 29b0c2c1d2db..cbb7255c8e27 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -390,12 +390,6 @@ static inline void *snd_soc_component_get_drvdata(struct snd_soc_component *c)
 	return dev_get_drvdata(c->dev);
 }
 
-static inline bool snd_soc_component_is_active(
-	struct snd_soc_component *component)
-{
-	return component->active != 0;
-}
-
 /* component pin */
 int snd_soc_component_enable_pin(struct snd_soc_component *component,
 				 const char *pin);
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 887575d59e31..502aaeb561a0 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -351,8 +351,6 @@ struct snd_soc_dai {
 	/* DAI runtime info */
 	unsigned int stream_active[SNDRV_PCM_STREAM_LAST + 1]; /* usage count */
 
-	unsigned int active;
-
 	struct snd_soc_dapm_widget *playback_widget;
 	struct snd_soc_dapm_widget *capture_widget;
 
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 420595356111..0eae9ab2a2ea 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -266,7 +266,6 @@ 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;
 		snd_soc_component_activity(dai->component) += action;
 	}
 }
-- 
2.17.1



More information about the Alsa-devel mailing list