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>
This commit is contained in:
Prasad Kumpatla
2022-09-21 12:45:44 +05:30
parent 8280a19ab8
commit 961a510ecb
3 changed files with 0 additions and 31 deletions

View File

@@ -128,21 +128,9 @@ static int wcd_measure_adc_once(struct wcd_mbhc *mbhc, int mux_ctl)
int ret = 0; int ret = 0;
int output_mv = 0; int output_mv = 0;
u8 adc_en = 0; u8 adc_en = 0;
bool is_pa_on = false;
pr_debug("%s: enter\n", __func__); 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); WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_ADC_MODE, 0);
/* Read ADC Enable bit to restore after adc measurement */ /* Read ADC Enable bit to restore after adc measurement */
WCD_MBHC_REG_READ(WCD_MBHC_ADC_EN, adc_en); 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; 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__); pr_debug("%s: leave\n", __func__);
return ret; return ret;

View File

@@ -804,15 +804,6 @@ static void wcd938x_mbhc_moisture_polling_ctrl(struct wcd_mbhc *mbhc,
0x04, (enable << 2)); 0x04, (enable << 2));
} }
static void wcd938x_mbhc_hph_pa_enable(struct snd_soc_component *component,
bool enable)
{
if (enable)
snd_soc_component_update_bits(component, WCD938X_ANA_HPH, 0xC0, 0xC0);
else
snd_soc_component_update_bits(component, WCD938X_ANA_HPH,0xC0, 00);
}
static void wcd938x_mbhc_bcs_enable(struct wcd_mbhc *mbhc, static void wcd938x_mbhc_bcs_enable(struct wcd_mbhc *mbhc,
bool bcs_enable) bool bcs_enable)
{ {
@@ -847,7 +838,6 @@ static const struct wcd_mbhc_cb mbhc_cb = {
.mbhc_moisture_polling_ctrl = wcd938x_mbhc_moisture_polling_ctrl, .mbhc_moisture_polling_ctrl = wcd938x_mbhc_moisture_polling_ctrl,
.mbhc_moisture_detect_en = wcd938x_mbhc_moisture_detect_en, .mbhc_moisture_detect_en = wcd938x_mbhc_moisture_detect_en,
.bcs_enable = wcd938x_mbhc_bcs_enable, .bcs_enable = wcd938x_mbhc_bcs_enable,
.hph_pa_enable = wcd938x_mbhc_hph_pa_enable,
}; };
static int wcd938x_get_hph_type(struct snd_kcontrol *kcontrol, static int wcd938x_get_hph_type(struct snd_kcontrol *kcontrol,

View File

@@ -529,8 +529,6 @@ struct wcd_mbhc_cb {
bool (*mbhc_get_moisture_status)(struct wcd_mbhc *mbhc); bool (*mbhc_get_moisture_status)(struct wcd_mbhc *mbhc);
void (*mbhc_moisture_polling_ctrl)(struct wcd_mbhc *mbhc, bool enable); void (*mbhc_moisture_polling_ctrl)(struct wcd_mbhc *mbhc, bool enable);
void (*mbhc_moisture_detect_en)(struct wcd_mbhc *mbhc, bool enable); void (*mbhc_moisture_detect_en)(struct wcd_mbhc *mbhc, bool enable);
void (*hph_pa_enable)(struct snd_soc_component *component, bool enable);
}; };
struct wcd_mbhc_fn { struct wcd_mbhc_fn {