aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-05-15 09:46:21 +0900
committerMark Brown <broonie@kernel.org>2020-05-18 16:14:58 +0100
commitd9051d86ad30ca1ef1fc99e29854daeeb3944f8f (patch)
treed319de984d16ad47534e0ba614ae9d5c71841c17 /include/sound
parentMerge series "ASoC: fsl_esai: Add support for imx8qm" from Shengjiu Wang <shengjiu.wang@nxp.com>: (diff)
downloadlinux-dev-d9051d86ad30ca1ef1fc99e29854daeeb3944f8f.tar.xz
linux-dev-d9051d86ad30ca1ef1fc99e29854daeeb3944f8f.zip
ASoC: soc-pcm: replace snd_soc_runtime_activate()/deactivate() to macro
snd_soc_runtime_activate()/deactivate() are implemented by global function which are just calling snd_soc_runtime_action(). We can replace it to macro, and this patch do it. This patch 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/87blmq6n4y.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.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 69a82487fa9b..a7fa64260108 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -468,8 +468,19 @@ struct snd_soc_pcm_runtime *snd_soc_get_pcm_runtime(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link);
bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd);
-void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream);
-void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream);
+
+void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd,
+ int stream, int action);
+static inline void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd,
+ int stream)
+{
+ snd_soc_runtime_action(rtd, stream, 1);
+}
+static inline void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd,
+ int stream)
+{
+ snd_soc_runtime_action(rtd, stream, -1);
+}
int snd_soc_runtime_calc_hw(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hardware *hw, int stream);