Merge "asoc: mbhc: change the logic of cross_conn checking"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
02975b1480
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
/* 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 <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@@ -340,7 +340,7 @@ static int wcd_check_cross_conn(struct wcd_mbhc *mbhc)
|
|||||||
if (mbhc->mbhc_cb->update_cross_conn_thr)
|
if (mbhc->mbhc_cb->update_cross_conn_thr)
|
||||||
mbhc->mbhc_cb->update_cross_conn_thr(mbhc);
|
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) {
|
hphr_adc_res > mbhc->hphr_cross_conn_thr) {
|
||||||
plug_type = MBHC_PLUG_TYPE_GND_MIC_SWAP;
|
plug_type = MBHC_PLUG_TYPE_GND_MIC_SWAP;
|
||||||
pr_debug("%s: Cross connection identified\n", __func__);
|
pr_debug("%s: Cross connection identified\n", __func__);
|
||||||
|
Reference in New Issue
Block a user