summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dai.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-05-15 02:46:27 +0200
committerMark Brown <broonie@kernel.org>2020-05-18 17:14:59 +0200
commitdc82910682ef06d5e5a81b4b359945b6f669ee3b (patch)
treec406d69172e41e0e08816debe86dbd36dafb0bb0 /sound/soc/soc-dai.c
parentASoC: soc-pcm: replace snd_soc_runtime_activate()/deactivate() to macro (diff)
downloadlinux-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 'sound/soc/soc-dai.c')
-rw-r--r--sound/soc/soc-dai.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 8e5fe012aa1d..3208f244c1b8 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -388,6 +388,15 @@ bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int dir)
return stream->channels_min;
}
+void snd_soc_dai_action(struct snd_soc_dai *dai,
+ int stream, int action)
+{
+ dai->stream_active[stream] += action;
+ dai->active += action;
+ dai->component->active += action;
+}
+EXPORT_SYMBOL_GPL(snd_soc_dai_action);
+
int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order)
{
struct snd_soc_dai *dai;