ASoC: stm32: sai: fix sysclk management on shutdown
authorOlivier Moysan <olivier.moysan@st.com>
Fri, 18 Oct 2019 08:20:40 +0000 (10:20 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 18 Oct 2019 17:09:03 +0000 (18:09 +0100)
commit9b7a7f921689d6c254e5acd670be631ebd82d54d
treea32882e28bfdbcdf78ba325c7cb2956a860be251
parente5f0d490fb718254a884453e47fcd48493cd67ea
ASoC: stm32: sai: fix sysclk management on shutdown

The commit below, adds a call to sysclk callback on shutdown.
This introduces a regression in stm32 SAI driver, as some clock
services are called twice, leading to unbalanced calls.
Move processing related to mclk from shutdown to sysclk callback.
When requested frequency is 0, assume shutdown and release mclk.

Fixes: 2458adb8f92a ("SoC: simple-card-utils: set 0Hz to sysclk when shutdown")

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Link: https://lore.kernel.org/r/20191018082040.31022-1-olivier.moysan@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/stm/stm32_sai_sub.c