Revert "asoc: mbhc: disable pa while measuring the adc values"

This reverts commit 05a1b9bd4d.

Change-Id: I6121659f31affc6210b1fa0bd2f2d34fa8d17c9f
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
このコミットが含まれているのは:
Prasad Kumpatla
2022-09-21 12:45:44 +05:30
コミット 961a510ecb
3個のファイルの変更0行の追加31行の削除

ファイルの表示

@@ -128,21 +128,9 @@ static int wcd_measure_adc_once(struct wcd_mbhc *mbhc, int mux_ctl)
int ret = 0;
int output_mv = 0;
u8 adc_en = 0;
bool is_pa_on = false;
pr_debug("%s: enter\n", __func__);
if (mbhc->mbhc_cb->hph_pa_on_status) {
if (mbhc->mbhc_cb->hph_pa_on_status(mbhc->component)) {
if (mbhc->mbhc_cb->hph_pa_enable) {
mbhc->mbhc_cb->hph_pa_enable(mbhc->component, 0);
is_pa_on = true;
pr_debug("%s: pa is on before detection,so disable pa and read adc \n",
__func__);
}
}
}
WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ADC_MODE, 0);
/* Read ADC Enable bit to restore after adc measurement */
WCD_MBHC_REG_READ(WCD_MBHC_ADC_EN, adc_en);
@@ -191,13 +179,6 @@ static int wcd_measure_adc_once(struct wcd_mbhc *mbhc, int mux_ctl)
ret = output_mv;
}
if (is_pa_on) {
if (mbhc->mbhc_cb->hph_pa_enable) {
mbhc->mbhc_cb->hph_pa_enable(mbhc->component, 1);
pr_debug("%s: restore pa \n", __func__);
}
}
pr_debug("%s: leave\n", __func__);
return ret;