Browse Source

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 <[email protected]>
Meng Wang 4 years ago
parent
commit
62cbd21506
1 changed files with 2 additions and 2 deletions
  1. 2 2
      asoc/codecs/wcd938x/wcd938x.c

+ 2 - 2
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,