Browse Source

asoc: wcd937x: Reset mbhc detection type after ssr

If headset is connected during SSR, after recovery mbhc
driver expects a new detection event as the driver is reinitialized.
Reset detection type to insertion to retrigger a hw interrupt
for mbhc driver.

Change-Id: I55705eb6b6a289deb5dc16a4b9ef6252082a3d9a
Signed-off-by: Ramprasad Katkam <[email protected]>
Ramprasad Katkam 6 years ago
parent
commit
c49a9d541d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      asoc/codecs/wcd937x/wcd937x-mbhc.c

+ 2 - 0
asoc/codecs/wcd937x/wcd937x-mbhc.c

@@ -976,6 +976,8 @@ int wcd937x_mbhc_post_ssr_init(struct wcd937x_mbhc *mbhc,
 
 	wcd937x_mbhc_hs_detect_exit(codec);
 	wcd_mbhc_deinit(wcd_mbhc);
+	snd_soc_update_bits(codec, WCD937X_ANA_MBHC_MECH,
+				0x20, 0x20);
 	ret = wcd_mbhc_init(wcd_mbhc, codec, &mbhc_cb, &intr_ids,
 			    wcd_mbhc_registers, WCD937X_ZDET_SUPPORTED);
 	if (ret) {