瀏覽代碼

asoc: codecs: mbhc: Detect cross connection for mono headsets

Mono headsets have only one channel connected. Hence make cross
connection decision based on the voltage result of alteast one
channel showing cross connection.

Change-Id: I22a4ea7e25d09e785e7141f4a74c2830fdff555e
Signed-off-by: Ramprasad Katkam <[email protected]>
Ramprasad Katkam 6 年之前
父節點
當前提交
ebcfca4e9a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      asoc/codecs/wcd-mbhc-adc.c

+ 2 - 2
asoc/codecs/wcd-mbhc-adc.c

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
  */
 #include <linux/module.h>
 #include <linux/init.h>
@@ -313,7 +313,7 @@ static int wcd_check_cross_conn(struct wcd_mbhc *mbhc)
 		goto done;
 	}
 
-	if (hphl_adc_res > 100 && hphr_adc_res > 100) {
+	if (hphl_adc_res > 100 || hphr_adc_res > 100) {
 		plug_type = MBHC_PLUG_TYPE_GND_MIC_SWAP;
 		pr_debug("%s: Cross connection identified\n", __func__);
 	} else {