asoc: codecs: Add delay to eliminate playback pause post SSR on hs
Add delay in post ssr to eliminate playback pause on euro usbc headset. Post ssr, headset is detected as headphone as HPH PA gets turned ON before the completion of wcd_correct_swch_plug workqueue in MBHC. Change-Id: Ib0334b37aa12b7e7371146b26eb3a1f4484656a3 Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
This commit is contained in:
@@ -1341,6 +1341,17 @@ static int rouleur_get_logical_addr(struct swr_device *swr_dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool get_usbc_hs_status(struct snd_soc_component *component,
|
||||
struct wcd_mbhc_config *mbhc_cfg)
|
||||
{
|
||||
if (mbhc_cfg->enable_usbc_analog) {
|
||||
if (!(snd_soc_component_read32(component, ROULEUR_ANA_MBHC_MECH)
|
||||
& 0x20))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int rouleur_event_notify(struct notifier_block *block,
|
||||
unsigned long val,
|
||||
void *data)
|
||||
@@ -1373,6 +1384,8 @@ static int rouleur_event_notify(struct notifier_block *block,
|
||||
rouleur->dev_up = false;
|
||||
rouleur->mbhc->wcd_mbhc.deinit_in_progress = true;
|
||||
mbhc = &rouleur->mbhc->wcd_mbhc;
|
||||
rouleur->usbc_hs_status = get_usbc_hs_status(component,
|
||||
mbhc->mbhc_cfg);
|
||||
rouleur_mbhc_ssr_down(rouleur->mbhc, component);
|
||||
rouleur_reset(rouleur->dev, 0x01);
|
||||
break;
|
||||
@@ -1394,6 +1407,8 @@ static int rouleur_event_notify(struct notifier_block *block,
|
||||
__func__);
|
||||
} else {
|
||||
rouleur_mbhc_hs_detect(component, mbhc->mbhc_cfg);
|
||||
if (rouleur->usbc_hs_status)
|
||||
mdelay(500);
|
||||
}
|
||||
rouleur->mbhc->wcd_mbhc.deinit_in_progress = false;
|
||||
rouleur->dev_up = true;
|
||||
|
Reference in New Issue
Block a user