From 6527fdb4e6ffdb1898f0fe47d05f9323978158cd Mon Sep 17 00:00:00 2001 From: Vatsal Bucha Date: Wed, 11 Aug 2021 13:12:39 +0530 Subject: [PATCH] ASoC: mbhc-adc: Enable BCS if plug type already reported BCS is not enabled sometimes after inserting headset if plug is already reported and we dont report it again. Enable BCS if plug type already reported. Change-Id: I8c9f15ced66a21bda169d3479da96168ebec26a7 Signed-off-by: Vatsal Bucha --- asoc/codecs/wcd-mbhc-adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/asoc/codecs/wcd-mbhc-adc.c b/asoc/codecs/wcd-mbhc-adc.c index 53248a63f6..714f37b151 100644 --- a/asoc/codecs/wcd-mbhc-adc.c +++ b/asoc/codecs/wcd-mbhc-adc.c @@ -903,9 +903,6 @@ report: goto exit; } - if (mbhc->mbhc_cb->bcs_enable) - mbhc->mbhc_cb->bcs_enable(mbhc, true); - pr_debug("%s: Valid plug found, plug type %d wrk_cmpt %d btn_intr %d\n", __func__, plug_type, wrk_complete, mbhc->btn_press_intr); @@ -928,6 +925,9 @@ enable_supply: else WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_DETECTION_DONE, 0); + if (mbhc->mbhc_cb->bcs_enable) + mbhc->mbhc_cb->bcs_enable(mbhc, true); + if (mbhc->mbhc_cb->mbhc_micbias_control) wcd_mbhc_adc_update_fsm_source(mbhc, plug_type); exit: