asoc: codecs: Add delay to eliminate playback pause post SSR on hs
Add delay in post ssr to eliminate playback pause on euro headset.On post ssr hs detected as hp due to where pa become on before the completion of wcd_correct_swch_plug workqueue which lead to detect plug_type as hp. Change-Id: Ie114fcd0458d9f5edebeee087c90600c3b0c3da2 Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
This commit is contained in:

zatwierdzone przez
Gerrit - the friendly Code Review server

rodzic
93afa626ed
commit
bd2c17661b
@@ -1567,6 +1567,17 @@ static int wcd937x_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, WCD937X_ANA_MBHC_MECH)
|
||||
& 0x20))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int wcd937x_event_notify(struct notifier_block *block,
|
||||
unsigned long val,
|
||||
void *data)
|
||||
@@ -1602,6 +1613,8 @@ static int wcd937x_event_notify(struct notifier_block *block,
|
||||
case BOLERO_WCD_EVT_SSR_DOWN:
|
||||
wcd937x->mbhc->wcd_mbhc.deinit_in_progress = true;
|
||||
mbhc = &wcd937x->mbhc->wcd_mbhc;
|
||||
wcd937x->usbc_hs_status = get_usbc_hs_status(component,
|
||||
mbhc->mbhc_cfg);
|
||||
wcd937x_mbhc_ssr_down(wcd937x->mbhc, component);
|
||||
wcd937x_reset_low(wcd937x->dev);
|
||||
break;
|
||||
@@ -1622,6 +1635,8 @@ static int wcd937x_event_notify(struct notifier_block *block,
|
||||
__func__);
|
||||
} else {
|
||||
wcd937x_mbhc_hs_detect(component, mbhc->mbhc_cfg);
|
||||
if (wcd937x->usbc_hs_status)
|
||||
mdelay(500);
|
||||
}
|
||||
wcd937x->mbhc->wcd_mbhc.deinit_in_progress = false;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user