From 51da9567aa254c0c2ac9986197c2fd249d860500 Mon Sep 17 00:00:00 2001 From: Binyuan Lan Date: Mon, 21 Aug 2023 09:27:26 +0000 Subject: [PATCH] ASoC: rockchip: rk817-codec: always enable mclk Change-Id: Id2a87aaf665c8f1030b425e7e7fa4727401ac70b Signed-off-by: Binyuan Lan --- sound/soc/codecs/rk817_codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/rk817_codec.c b/sound/soc/codecs/rk817_codec.c index c178da3e52a2..ef065580c2af 100644 --- a/sound/soc/codecs/rk817_codec.c +++ b/sound/soc/codecs/rk817_codec.c @@ -1238,9 +1238,9 @@ static int rk817_probe(struct snd_soc_component *component) rk817->chip_ver = (chip_ver & 0x0f); dev_info(component->dev, "%s: chip_name:0x%x, chip_ver:0x%x\n", __func__, chip_name, chip_ver); + /* always enable mclk, and will disable mclk in rk817_remove */ clk_prepare_enable(rk817->mclk); rk817_reset(component); - clk_disable_unprepare(rk817->mclk); mutex_init(&rk817->clk_lock); rk817->clk_capture = 0; rk817->clk_playback = 0; @@ -1265,6 +1265,7 @@ static void rk817_remove(struct snd_soc_component *component) rk817_codec_power_down(component, RK817_CODEC_ALL); snd_soc_component_exit_regmap(component); mutex_destroy(&rk817->clk_lock); + clk_disable_unprepare(rk817->mclk); mdelay(10); }