From 3bbf75c4ed8adfe55c9d2066d7ef8fc43aa606a3 Mon Sep 17 00:00:00 2001 From: Xing Zheng Date: Tue, 24 Jul 2018 16:47:07 +0800 Subject: [PATCH] ASoC: rk3308_codec: increase de-pop loop delay There is a bit of headphone pop during power on, we need to increase delay time (200us per loop step). It looks fine that it may take 200us*128=25.6ms here. Change-Id: Idbc5b235fd55c26cd71f4693cce98fccce60368f Signed-off-by: Xing Zheng --- sound/soc/codecs/rk3308_codec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c index 25afb4e0c95d..fb92c353599e 100644 --- a/sound/soc/codecs/rk3308_codec.c +++ b/sound/soc/codecs/rk3308_codec.c @@ -1651,13 +1651,13 @@ static int rk3308_codec_power_on(struct rk3308_codec_priv *rk3308) /* * 6. Change the register ACODEC_ADC_ANA_CON10[6:0] from the 0x1 to * 0x7f step by step or configure the ACODEC_ADC_ANA_CON10[6:0] to - * 0x7f directly. The suggestion slot time of the step is 20ms. + * 0x7f directly. Here the slot time of the step is 200us. */ for (v = 0x1; v <= 0x7f; v++) { regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON10(0), RK3308_ADC_CURRENT_CHARGE_MSK, v); - udelay(50); + udelay(200); } /* 7. Wait until the voltage of VCM keeps stable at the AVDD/2 */ @@ -1697,13 +1697,13 @@ static int rk3308_codec_power_off(struct rk3308_codec_priv *rk3308) /* * 4.Change the register ACODEC_ADC_ANA_CON10[6:0] from the 0x1 to 0x7f * step by step or configure the ACODEC_ADC_ANA_CON10[6:0] to 0x7f - * directly. The suggestion slot time of the step is 20ms + * directly. Here the slot time of the step is 200us. */ for (v = 0x1; v <= 0x7f; v++) { regmap_update_bits(rk3308->regmap, RK3308_ADC_ANA_CON10(0), RK3308_ADC_CURRENT_CHARGE_MSK, v); - udelay(50); + udelay(200); } /* 5. Wait until the voltage of VCM keeps stable at the AGND */