From 46cb48d1dca64daca199f964d517cb22bb550549 Mon Sep 17 00:00:00 2001 From: Xing Zheng Date: Wed, 25 Apr 2018 08:56:00 +0800 Subject: [PATCH] ASoC: rk3308_codec: add a bit of delay during enable DAC The suggestion is from verndor, we should add a bit of delay in key steps until the reference voltages are stable, otherwise, the output of voltage maybe too low. @HPMIX -6dB + LINEOUT -6dB: normal Vpp: ~450mV abnormal Vpp: ~100mV Change-Id: I463d308b809b2c5e74e3bd37573bcbbd624df72e Signed-off-by: Xing Zheng --- sound/soc/codecs/rk3308_codec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c index f9b465a9bb0d..fd9b1934b02c 100644 --- a/sound/soc/codecs/rk3308_codec.c +++ b/sound/soc/codecs/rk3308_codec.c @@ -761,6 +761,9 @@ static int rk3308_codec_dac_enable(struct rk3308_codec_priv *rk3308) RK3308_DAC_BUF_REF_L_EN | RK3308_DAC_BUF_REF_R_EN); + /* Waiting the stable reference voltage */ + udelay(10); + if (rk3308->dac_output == DAC_HPOUT || rk3308->dac_output == DAC_LINEOUT_HPOUT) { /* Step 03 */ @@ -778,6 +781,9 @@ static int rk3308_codec_dac_enable(struct rk3308_codec_priv *rk3308) RK3308_DAC_L_HPMIX_EN | RK3308_DAC_R_HPMIX_EN); + /* Waiting the stable HPMIX */ + udelay(10); + /* Step 05 */ regmap_update_bits(rk3308->regmap, RK3308_DAC_ANA_CON13, RK3308_DAC_L_HPMIX_WORK |