From 312d94f693682b4087f3dce54c9e183c497543ed Mon Sep 17 00:00:00 2001 From: Prasad Kumpatla Date: Fri, 14 Apr 2023 16:04:26 +0530 Subject: [PATCH] asoc: mbhc: change special HS pr_debug change the debug print from wcd_mbhc_adc_check_for_spl_headset func to caller wcd_correct_swch_plug function. Change-Id: Iabca7351a1abb1ad7b3de15812b4a6014a0463ad Signed-off-by: Prasad Kumpatla --- 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 0b26bf3622..dbe82ff688 100644 --- a/asoc/codecs/wcd-mbhc-adc.c +++ b/asoc/codecs/wcd-mbhc-adc.c @@ -469,9 +469,6 @@ static bool wcd_mbhc_adc_check_for_spl_headset(struct wcd_mbhc *mbhc, usleep_range(10000, 10100); } - if (spl_hs) - pr_debug("%s: Detected special HS (%d)\n", __func__, spl_hs); - exit: pr_debug("%s: leave\n", __func__); return spl_hs; @@ -762,6 +759,9 @@ correct_plug_type: (spl_hs_count < WCD_MBHC_SPL_HS_CNT)) { spl_hs = wcd_mbhc_adc_check_for_spl_headset(mbhc, &spl_hs_count); + if (spl_hs) + pr_debug("%s: Detected special HS (%d)\n", + __func__, spl_hs); output_mv = wcd_measure_adc_once(mbhc, MUX_CTL_IN2P); if (spl_hs_count == WCD_MBHC_SPL_HS_CNT) {