ASoC: 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: Ie5bc4b5292e5f69066760cab44d78989a74f13f4
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
此提交包含在:
Vatsal Bucha
2019-10-14 23:14:12 +05:30
提交者 Gerrit - the friendly Code Review server
父節點 731807e0a2
當前提交 d06525fa68
共有 9 個檔案被更改,包括 68 行新增3 行删除

查看文件

@@ -803,6 +803,15 @@ static void wcd938x_mbhc_moisture_polling_ctrl(struct wcd_mbhc *mbhc,
0x04, (enable << 2));
}
static void wcd938x_mbhc_bcs_enable(struct wcd_mbhc *mbhc,
bool bcs_enable)
{
if (bcs_enable)
wcd938x_disable_bcs_before_slow_insert(mbhc->component, false);
else
wcd938x_disable_bcs_before_slow_insert(mbhc->component, true);
}
static const struct wcd_mbhc_cb mbhc_cb = {
.request_irq = wcd938x_mbhc_request_irq,
.irq_control = wcd938x_mbhc_irq_control,
@@ -827,6 +836,7 @@ static const struct wcd_mbhc_cb mbhc_cb = {
.mbhc_get_moisture_status = wcd938x_mbhc_get_moisture_status,
.mbhc_moisture_polling_ctrl = wcd938x_mbhc_moisture_polling_ctrl,
.mbhc_moisture_detect_en = wcd938x_mbhc_moisture_detect_en,
.bcs_enable = wcd938x_mbhc_bcs_enable,
};
static int wcd938x_get_hph_type(struct snd_kcontrol *kcontrol,