ASoC: wcd937x: Fix audio distortion issue during headset record

Audio is distorted during first 3 secs on headset record
while doing device switch from dmic to headset mic.
Disable BCS before slow insertion detection and enable it
afterwards to resolve the issue.

Change-Id: Icb18a0b5decb0c0bd9959bce7cced70a27566d41
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Cette révision appartient à :
Vatsal Bucha
2019-10-23 12:32:29 +05:30
révisé par Gerrit - the friendly Code Review server
Parent 2e421b5771
révision a9675d1a5d
3 fichiers modifiés avec 29 ajouts et 0 suppressions

Voir le fichier

@@ -1517,6 +1517,21 @@ int wcd937x_micbias_control(struct snd_soc_component *component,
}
EXPORT_SYMBOL(wcd937x_micbias_control);
void wcd937x_disable_bcs_before_slow_insert(struct snd_soc_component *component,
bool bcs_disable)
{
struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component);
if (wcd937x->update_wcd_event) {
if (bcs_disable)
wcd937x->update_wcd_event(wcd937x->handle,
WCD_BOLERO_EVT_BCS_CLK_OFF, 0);
else
wcd937x->update_wcd_event(wcd937x->handle,
WCD_BOLERO_EVT_BCS_CLK_OFF, 1);
}
}
static int wcd937x_get_logical_addr(struct swr_device *swr_dev)
{
int ret = 0;