ASoC: rk3308_codec: Fix the incorrect ADC state during shutdown stream

Dues to the broken ADC state, it may miss reset ADC digital
register and bring long time (~80ms) unstable and invalid
data at next recording.

Change-Id: Ibf516c054cab99536a4fa3b5fd82f52810352420
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
This commit is contained in:
Xing Zheng
2018-08-28 21:56:06 +08:00
committed by Tao Huang
parent c1601b790d
commit 8db32cdbc4

View File

@@ -1973,10 +1973,12 @@ static bool has_en_always_grps(struct rk3308_codec_priv *rk3308)
{
int idx;
for (idx = 0; idx < ADC_LR_GROUP_MAX; idx++) {
if (rk3308->en_always_grps[idx] >= 0 &&
rk3308->en_always_grps[idx] <= ADC_LR_GROUP_MAX - 1)
return true;
if (rk3308->en_always_grps_num) {
for (idx = 0; idx < ADC_LR_GROUP_MAX; idx++) {
if (rk3308->en_always_grps[idx] >= 0 &&
rk3308->en_always_grps[idx] <= ADC_LR_GROUP_MAX - 1)
return true;
}
}
return false;