mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
ASoC: rk3308_codec: Fix the broken loopback sometimes
We need to insert some delay after enabling ADC current and waiting ADCs are stable for BIST mode mainly. Change-Id: Ib3cdc6aa36f8674ba8d8defadb47baac72f4745e Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
This commit is contained in:
@@ -2366,6 +2366,14 @@ static int rk3308_codec_adc_ana_enable(struct rk3308_codec_priv *rk3308,
|
||||
RK3308_ADC_CURRENT_EN);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is mainly used for BIST mode that wait ADCs are stable.
|
||||
*
|
||||
* By tested results, the type delay is >40us, but we need to leave
|
||||
* enough delay margin.
|
||||
*/
|
||||
usleep_range(400, 500);
|
||||
|
||||
/* vendor step 4*/
|
||||
for (idx = 0; adc_for_each_grp(rk3308, type, idx, &grp); idx++) {
|
||||
if (grp < 0 || grp > ADC_LR_GROUP_MAX - 1)
|
||||
|
||||
Reference in New Issue
Block a user