瀏覽代碼

ASoC: wcd-mbhc: Disable moisture detect threshold if duty cycle disabled

Moisture detection is not disabled properly if threshold
remains set as 24k even if duty cycle is disabled.
This is leading into headset not getting detected
sometimes. Disable threshold as well if duty cycle disabled.

Change-Id: Ic90c65d8bbaa965cf147f95edf5add8980889e1f
Signed-off-by: Vatsal Bucha <[email protected]>
Vatsal Bucha 5 年之前
父節點
當前提交
7544634ca6
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      asoc/codecs/wcd-mbhc-v2.c

+ 1 - 2
asoc/codecs/wcd-mbhc-v2.c

@@ -1419,8 +1419,7 @@ static int wcd_mbhc_initialise(struct wcd_mbhc *mbhc)
 	if (mbhc->mbhc_cfg->moisture_en && mbhc->mbhc_cb->mbhc_moisture_config
 		&& !mbhc->mbhc_cfg->moisture_duty_cycle_en)
 		mbhc->mbhc_cb->mbhc_moisture_config(mbhc);
-	else if (mbhc->mbhc_cfg->moisture_duty_cycle_en &&
-		 mbhc->mbhc_cb->mbhc_moisture_detect_en)
+	else if (mbhc->mbhc_cb->mbhc_moisture_detect_en)
 		mbhc->mbhc_cb->mbhc_moisture_detect_en(mbhc, false);
 
 	/*