diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-05-15 02:46:27 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-05-18 17:14:59 +0200 |
commit | dc82910682ef06d5e5a81b4b359945b6f669ee3b (patch) | |
tree | c406d69172e41e0e08816debe86dbd36dafb0bb0 /include/sound | |
parent | ASoC: soc-pcm: replace snd_soc_runtime_activate()/deactivate() to macro (diff) | |
download | linux-dc82910682ef06d5e5a81b4b359945b6f669ee3b.tar.xz linux-dc82910682ef06d5e5a81b4b359945b6f669ee3b.zip |
ASoC: soc-dai: add snd_soc_dai_action()
snd_soc_runtime_action() updates DAI's xxx_active.
We should update these in the same time, and
it can be implemented at soc-dai.c.
This patch adds snd_soc_dai_action() for it.
This is prepare for xxx_active cleanup.
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/87a72a6n4s.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-dai.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 2a0a5af1c1ae..800d7aa8523e 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -161,6 +161,18 @@ void snd_soc_dai_resume(struct snd_soc_dai *dai); int snd_soc_dai_compress_new(struct snd_soc_dai *dai, struct snd_soc_pcm_runtime *rtd, int num); bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int stream); +void snd_soc_dai_action(struct snd_soc_dai *dai, + int stream, int action); +static inline void snd_soc_dai_activate(struct snd_soc_dai *dai, + int stream) +{ + snd_soc_dai_action(dai, stream, 1); +} +static inline void snd_soc_dai_deactivate(struct snd_soc_dai *dai, + int stream) +{ + snd_soc_dai_action(dai, stream, -1); +} 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); |