ASoC: msm: Migrate audio drivers to new clock apis.
Use the split clock APIs to do low latency actions (enable/disable)
frequently. Use the high latency functions (prepare/unprepare)
sparingly to help performance.
Using these split apis instead of the 2 current APIs, allows the
clock driver to perform the slow steps with a mutex lock held and
removes the need to busy wait for the slow steps to finish.
Change-Id: Ic5b89183e86e788397be50d7b6f1d798c13ff417
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
diff --git a/sound/soc/msm/mdm9615.c b/sound/soc/msm/mdm9615.c
index 760f13d..f02a7ef 100644
--- a/sound/soc/msm/mdm9615.c
+++ b/sound/soc/msm/mdm9615.c
@@ -321,7 +321,7 @@
if (codec_clk) {
clk_set_rate(codec_clk, TABLA_EXT_CLK_RATE);
- clk_enable(codec_clk);
+ clk_prepare_enable(codec_clk);
tabla_mclk_enable(codec, 1, dapm);
} else {
pr_err("%s: Error setting Tabla MCLK\n", __func__);
@@ -337,7 +337,7 @@
pr_debug("%s: disabling MCLK. clk_users = %d\n",
__func__, clk_users);
tabla_mclk_enable(codec, 0, dapm);
- clk_disable(codec_clk);
+ clk_disable_unprepare(codec_clk);
}
}
return 0;