summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rk3328_codec.c
diff options
context:
space:
mode:
authorKatsuhiro Suzuki <katsuhiro@katsuster.net>2018-12-20 18:36:36 +0300
committerMark Brown <broonie@kernel.org>2019-01-03 19:34:36 +0300
commitf5758544d98c8bec7793aeea28928f5e8bd45d47 (patch)
treeb09eaefb7ae8c32a06eed5a4a09dbd5f3fcdd116 /sound/soc/codecs/rk3328_codec.c
parentc32759035ad246d3e4c65d23a07f9e6ba32caeaf (diff)
downloadlinux-f5758544d98c8bec7793aeea28928f5e8bd45d47.tar.xz
ASoC: rockchip: add workaround for silence of rk3288 ACODEC
This patch adds reset and precharge in shutdown of PCM device. ACODEC goes to silence if we change Fs to 44.1kHz from 48kHz. This workaround seems to work but I don't know this workaround is correct sequence or not for ACODEC. Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rk3328_codec.c')
-rw-r--r--sound/soc/codecs/rk3328_codec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/codecs/rk3328_codec.c b/sound/soc/codecs/rk3328_codec.c
index 71f3fc2d970c..f3442a2283ea 100644
--- a/sound/soc/codecs/rk3328_codec.c
+++ b/sound/soc/codecs/rk3328_codec.c
@@ -261,9 +261,12 @@ static int rk3328_codec_close_playback(struct rk3328_codec_priv *rk3328)
mdelay(1);
}
+ /* Workaround for silence when changed Fs 48 -> 44.1kHz */
+ rk3328_codec_reset(rk3328);
+
regmap_update_bits(rk3328->regmap, DAC_PRECHARGE_CTRL,
DAC_CHARGE_CURRENT_ALL_MASK,
- DAC_CHARGE_CURRENT_I);
+ DAC_CHARGE_CURRENT_ALL_ON);
return 0;
}