소스 검색

ASoC: mbhc: Fix left channel getting disabled in hs_rem_irq

In wcd_mbhc_adc_hs_rem_irq when hph_on bit is set
both left and right channel should get enabled. But we
enable left channel first, disable left ch and enable right channel.
Fix this to enable both left and right channel.

Change-Id: Ia50c55a0ed68e01359ef0a9c76eba6901a04e17c
Signed-off-by: Vatsal Bucha <[email protected]>
Vatsal Bucha 6 년 전
부모
커밋
a8f9dc90d8
2개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 4
      asoc/codecs/wcd-mbhc-adc.c
  2. 2 2
      asoc/codecs/wcd-mbhc-legacy.c

+ 1 - 4
asoc/codecs/wcd-mbhc-adc.c

@@ -987,8 +987,6 @@ static irqreturn_t wcd_mbhc_adc_hs_rem_irq(int irq, void *data)
 		if (mbhc->mbhc_cb->hph_pa_on_status)
 			if (mbhc->mbhc_cb->hph_pa_on_status(mbhc->component)) {
 				hphpa_on = true;
-				WCD_MBHC_REG_UPDATE_BITS(
-					WCD_MBHC_HPHL_PA_EN, 0);
 				WCD_MBHC_REG_UPDATE_BITS(
 					WCD_MBHC_HPH_PA_EN, 0);
 			}
@@ -1033,8 +1031,7 @@ static irqreturn_t wcd_mbhc_adc_hs_rem_irq(int irq, void *data)
 
 		if (hphpa_on) {
 			hphpa_on = false;
-			WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HPHL_PA_EN, 1);
-			WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HPH_PA_EN, 1);
+			WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HPH_PA_EN, 3);
 		}
 	}
 exit:

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

@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
-/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2018, 2019, The Linux Foundation. All rights reserved.
  */
 #include <linux/module.h>
 #include <linux/init.h>
@@ -916,7 +916,7 @@ report_unplug:
 	if (hphpa_on) {
 		hphpa_on = false;
 		WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HPHL_PA_EN, 1);
-		WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HPH_PA_EN, 1);
+		WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HPHR_PA_EN, 1);
 	}
 	hphl_trigerred = 0;
 	mic_trigerred = 0;