From 62cbd21506f95ef398b5fc0a7bbfc358b802016f Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Mon, 28 Sep 2020 16:01:09 +0800 Subject: [PATCH] asoc: wcd938x: move 500ms after dev_up sets to true Trigger SSR during headset recording may cause recording mute after SSR. Before dev_up is set to true, micbias enablement for headset detection will return error and micbias enabled for recording return true. After headset is done, micbias is disabled. Move 500ms after dev_up to the end to resolve this issue. Change-Id: I7b9e094321997d64c96cf0e86a4f447d97b5fdb6 Signed-off-by: Meng Wang --- asoc/codecs/wcd938x/wcd938x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asoc/codecs/wcd938x/wcd938x.c b/asoc/codecs/wcd938x/wcd938x.c index ef162bacf2..50f9f9e9e7 100644 --- a/asoc/codecs/wcd938x/wcd938x.c +++ b/asoc/codecs/wcd938x/wcd938x.c @@ -2184,8 +2184,6 @@ static int wcd938x_event_notify(struct notifier_block *block, __func__); } else { wcd938x_mbhc_hs_detect(component, mbhc->mbhc_cfg); - if (wcd938x->usbc_hs_status) - mdelay(500); } wcd938x->mbhc->wcd_mbhc.deinit_in_progress = false; wcd938x->dev_up = true; @@ -2193,6 +2191,8 @@ static int wcd938x_event_notify(struct notifier_block *block, blocking_notifier_call_chain(&wcd938x->notifier, WCD938X_EVT_SSR_UP, NULL); + if (wcd938x->usbc_hs_status) + mdelay(500); break; case BOLERO_SLV_EVT_CLK_NOTIFY: snd_soc_component_update_bits(component,