ASoC: rk3308_codec: remove the limit of the ADC digital reset

It looks like that we still keep the resetting ADC digital
and avoid the broken noise for loopback at starting.

And, remove adc_path_state which is not used now.

Change-Id: I514692b1bbb4bad1f0ce5413ca5891fd41083549
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
This commit is contained in:
Xing Zheng
2018-08-31 15:27:31 +08:00
committed by Tao Huang
parent 4fa7f41dfe
commit a0fdf9ce3e

View File

@@ -158,7 +158,6 @@ struct rk3308_codec_priv {
int adc_zerocross;
/* 0: line out, 1: hp out, 11: lineout and hpout */
int dac_output;
int adc_path_state;
int dac_path_state;
int pm_state;
@@ -730,17 +729,6 @@ static bool adc_for_each_grp(struct rk3308_codec_priv *rk3308,
return true;
}
static int rk3308_codec_get_adc_path_state(struct rk3308_codec_priv *rk3308)
{
return rk3308->adc_path_state;
}
static void rk3308_codec_set_adc_path_state(struct rk3308_codec_priv *rk3308,
int state)
{
rk3308->adc_path_state = state;
}
static int rk3308_codec_get_dac_path_state(struct rk3308_codec_priv *rk3308)
{
return rk3308->dac_path_state;
@@ -799,9 +787,6 @@ static int rk3308_codec_reset(struct snd_soc_codec *codec)
static int rk3308_codec_adc_dig_reset(struct rk3308_codec_priv *rk3308)
{
if (rk3308_codec_get_adc_path_state(rk3308) == PATH_BUSY)
goto out;
regmap_update_bits(rk3308->regmap, RK3308_GLB_CON,
RK3308_ADC_DIG_WORK,
RK3308_ADC_DIG_RESET);
@@ -810,7 +795,6 @@ static int rk3308_codec_adc_dig_reset(struct rk3308_codec_priv *rk3308)
RK3308_ADC_DIG_WORK,
RK3308_ADC_DIG_WORK);
out:
return 0;
}
@@ -2938,8 +2922,6 @@ static void rk3308_codec_update_adcs_status(struct rk3308_codec_priv *rk3308,
rk3308->skip_grps[en_always_grp] = 1;
}
}
rk3308_codec_set_adc_path_state(rk3308, state);
}
static int rk3308_hw_params(struct snd_pcm_substream *substream,