From a0fdf9ce3e27d910ca18f9c49c8ebdbc5d081d14 Mon Sep 17 00:00:00 2001 From: Xing Zheng Date: Fri, 31 Aug 2018 15:27:31 +0800 Subject: [PATCH] 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 --- sound/soc/codecs/rk3308_codec.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sound/soc/codecs/rk3308_codec.c b/sound/soc/codecs/rk3308_codec.c index 7a0c96a11eae..d700ebe03c7f 100644 --- a/sound/soc/codecs/rk3308_codec.c +++ b/sound/soc/codecs/rk3308_codec.c @@ -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,