diff options
author | Vatsal Bucha <vbucha@codeaurora.org> | 2019-12-16 15:03:41 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-12-16 22:18:32 -0800 |
commit | 4dcb7b2d162e206b774221e3ab3ff71948ecfee6 (patch) | |
tree | 90d2958ec54f7684c92556e2c405989588108d62 /asoc/codecs/wcd938x | |
parent | 02c598e26c142c4d65c1a3ab3e81dba38b7ab245 (diff) | |
download | msm-extra-4dcb7b2d162e206b774221e3ab3ff71948ecfee6.tar.gz |
ASoC: wcd938x: Fix headset detection during SSR/PDR
Headset is corrected as lineout during SSR/PDR. This is
because adc voltage is not measured correctly due to SSR state.
Enable flag deinit_in_progress during SSR down to check if
device is not reported and disable it after device up.
Change-Id: I6fc4fff4149c36ba16aa668a960505504a5d811f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Diffstat (limited to 'asoc/codecs/wcd938x')
-rw-r--r-- | asoc/codecs/wcd938x/wcd938x.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/asoc/codecs/wcd938x/wcd938x.c b/asoc/codecs/wcd938x/wcd938x.c index 3db8fc5a..aa62a469 100644 --- a/asoc/codecs/wcd938x/wcd938x.c +++ b/asoc/codecs/wcd938x/wcd938x.c @@ -1903,6 +1903,7 @@ static int wcd938x_event_notify(struct notifier_block *block, break; case BOLERO_WCD_EVT_SSR_DOWN: wcd938x->dev_up = false; + wcd938x->mbhc->wcd_mbhc.deinit_in_progress = true; mbhc = &wcd938x->mbhc->wcd_mbhc; wcd938x_mbhc_ssr_down(wcd938x->mbhc, component); wcd938x_reset_low(wcd938x->dev); @@ -1927,6 +1928,7 @@ static int wcd938x_event_notify(struct notifier_block *block, } else { wcd938x_mbhc_hs_detect(component, mbhc->mbhc_cfg); } + wcd938x->mbhc->wcd_mbhc.deinit_in_progress = false; wcd938x->dev_up = true; break; case BOLERO_WCD_EVT_CLK_NOTIFY: |