Merge "asoc: codecs: Add delay to eliminate playback pause post SSR on hs"

Dieser Commit ist enthalten in:
qctecmdr
2020-05-10 05:35:13 -07:00
committet von Gerrit - the friendly Code Review server
Commit 51075bb60c
4 geänderte Dateien mit 32 neuen und 0 gelöschten Zeilen

Datei anzeigen

@@ -1998,6 +1998,17 @@ static int wcd938x_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, WCD938X_ANA_MBHC_MECH)
& 0x20))
return true;
}
return false;
}
static int wcd938x_event_notify(struct notifier_block *block,
unsigned long val,
void *data)
@@ -2043,6 +2054,8 @@ static int wcd938x_event_notify(struct notifier_block *block,
wcd938x->dev_up = false;
wcd938x->mbhc->wcd_mbhc.deinit_in_progress = true;
mbhc = &wcd938x->mbhc->wcd_mbhc;
wcd938x->usbc_hs_status = get_usbc_hs_status(component,
mbhc->mbhc_cfg);
wcd938x_mbhc_ssr_down(wcd938x->mbhc, component);
wcd938x_reset_low(wcd938x->dev);
break;
@@ -2065,6 +2078,8 @@ 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;