NXP patch to fix earpiece no sound issue

NXP patch to fix (CR)

Issue description:
No sound issue has been found in handheld mode
in one of Moto Projects, SurfNa project(tfa9871,
driver code Ver6.5.0). About 1/600 chance

root cause:
If set SBSL=1, the AMPE usually can be AMPE=1 automatically.
But sometimes can’t be set AMPE=1 by itself.
So AMPE must be set to 1 manually in code.
Dependency on automatic AMPE setting is not a wise way.
In driver 6.5.0, there’s no code to set AMPE during profile switch,
but boot up sequence has already been added.

Solution:
Add AMPE=1 operation in profile switching


Change-Id: I3de27e826d39c93f2d011d0f9d8fe9877e8efc89
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1358094
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
guoyf2 2019-05-21 17:17:27 +08:00 • committed by Yunfei Guo
commit 35ff849a25

View file

@ -1832,7 +1832,10 @@ enum Tfa98xx_Error tfaContWriteProfile(struct tfa_device *tfa, int prof_idx, int
}
if ((prof->group != previous_prof->group || prof->group == 0) && (tfa->tfa_family == 2)) {
if (TFA_GET_BF(tfa, REFCKSEL) == 0) {
if (tfa->is_probus_device) {
pr_debug("%s: probus device set AMPE=1", __func__);
TFA_SET_BF_VOLATILE(tfa, AMPE, 1);
} else if(TFA_GET_BF(tfa, REFCKSEL) == 0) {
/* set SBSL to go to operation mode */
TFA_SET_BF_VOLATILE(tfa, SBSL, 1);
}