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>
Cette révision appartient à :

révisé par
Gerrit - the friendly Code Review server

Parent
731807e0a2
révision
d06525fa68
@@ -689,6 +689,13 @@ static void wcd_correct_swch_plug(struct work_struct *work)
|
||||
}
|
||||
|
||||
correct_plug_type:
|
||||
/*
|
||||
* Callback to disable BCS slow insertion detection
|
||||
*/
|
||||
if (plug_type == MBHC_PLUG_TYPE_HEADSET ||
|
||||
plug_type == MBHC_PLUG_TYPE_HEADPHONE)
|
||||
mbhc->mbhc_cb->bcs_enable(mbhc, false);
|
||||
|
||||
timeout = jiffies + msecs_to_jiffies(HS_DETECT_PLUG_TIME_MS);
|
||||
while (!time_after(jiffies, timeout)) {
|
||||
if (mbhc->hs_detect_work_stop) {
|
||||
@@ -833,6 +840,10 @@ correct_plug_type:
|
||||
wrk_complete = false;
|
||||
}
|
||||
}
|
||||
if ((plug_type == MBHC_PLUG_TYPE_HEADSET ||
|
||||
plug_type == MBHC_PLUG_TYPE_HEADPHONE))
|
||||
mbhc->mbhc_cb->bcs_enable(mbhc, true);
|
||||
|
||||
if (!wrk_complete) {
|
||||
/*
|
||||
* If plug_tye is headset, we might have already reported either
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur