OSDN Git Service

ASoC: soc-pcm: add snd_soc_runtime_action()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 10 Feb 2020 03:14:12 +0000 (12:14 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 11 Feb 2020 15:40:36 +0000 (15:40 +0000)
commit7a5aaba4a4f45acc8192beb8a4b1bd4a58b67ce3
tree5773704ef8a4ba9cf5a09a0e4cc00f54b18c1d42
parentfa1f875c120fa44572c561d86022af2f6b0774c7
ASoC: soc-pcm: add snd_soc_runtime_action()

ALSA SoC has snd_soc_runtime_activate() / snd_soc_runtime_deactivate().
These increment or decrement DAI/Component activity, but the code
difference is only +1 or -1.
This patch adds common snd_soc_runtime_action() which can get +1 or -1 as
parameter, and use it from snd_soc_runtime_activate/deactivate() to
avoid duplicate implementation.

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/87blq7ceyq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c