From b9ca5f9eea5ede59e177c3d2884faa2f0599312e Mon Sep 17 00:00:00 2001 From: Yuhui Zhao Date: Thu, 23 Mar 2023 14:57:31 +0800 Subject: [PATCH] asoc: mbhc: change the logic of cross_conn checking Change the logic of cross_conn checking from or to and Change-Id: Ic91ab177d6e6997dc0c5cb496c611a6cccd027e1 --- asoc/codecs/wcd-mbhc-adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asoc/codecs/wcd-mbhc-adc.c b/asoc/codecs/wcd-mbhc-adc.c index 0ec5b157ea..a3a428c833 100644 --- a/asoc/codecs/wcd-mbhc-adc.c +++ b/asoc/codecs/wcd-mbhc-adc.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved. */ #include #include @@ -340,7 +340,7 @@ static int wcd_check_cross_conn(struct wcd_mbhc *mbhc) if (mbhc->mbhc_cb->update_cross_conn_thr) mbhc->mbhc_cb->update_cross_conn_thr(mbhc); - if (hphl_adc_res > mbhc->hphl_cross_conn_thr || + if (hphl_adc_res > mbhc->hphl_cross_conn_thr && hphr_adc_res > mbhc->hphr_cross_conn_thr) { plug_type = MBHC_PLUG_TYPE_GND_MIC_SWAP; pr_debug("%s: Cross connection identified\n", __func__);