mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
aw8697: A fix of rtp playing from Awinic
When frequently making a phone call and declining it, the waveform playing sometimes would fail to work due to the limitation of i2c's transmission speed. Awinic provides this solution and it not only works fine but also has been integrated to all their new software releases, even for aw8697. NO_PROP_NEEDED: This propagation is only needed when the change of framework for this new feature is integrated, being done by engineers in charge of that product. Change-Id: Id7f1a01c4fcb13b082ca48d105654803eb84e8f4 Signed-off-by: yangjq <yangjq@lenovo.com> Reviewed-on: https://gerrit.mot.com/1616585 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
4ba3ddd1dc
commit
8db7df380c
1 changed files with 10 additions and 1 deletions
|
|
@ -1416,7 +1416,15 @@ static int aw8697_haptic_rtp_init(struct aw8697 *aw8697)
|
|||
mutex_unlock(&aw8697->rtp_lock);
|
||||
break;
|
||||
}
|
||||
if ((aw8697_rtp->len - aw8697->rtp_cnt) <
|
||||
|
||||
if ((aw8697->rtp_cnt < aw8697->ram.base_addr)) {
|
||||
if((aw8697_rtp->len-aw8697->rtp_cnt) < (aw8697->ram.base_addr)){
|
||||
buf_len = aw8697_rtp->len-aw8697->rtp_cnt;
|
||||
} else {
|
||||
buf_len = (aw8697->ram.base_addr);
|
||||
}
|
||||
}
|
||||
else if ((aw8697_rtp->len - aw8697->rtp_cnt) <
|
||||
(aw8697->ram.base_addr >> 2)) {
|
||||
buf_len = aw8697_rtp->len - aw8697->rtp_cnt;
|
||||
} else {
|
||||
|
|
@ -1428,6 +1436,7 @@ static int aw8697_haptic_rtp_init(struct aw8697 *aw8697)
|
|||
if (aw8697->rtp_cnt == aw8697_rtp->len) {
|
||||
pr_info("%s: rtp update complete\n", __func__);
|
||||
aw8697->rtp_cnt = 0;
|
||||
pm_qos_remove_request(&pm_qos_req_vb);
|
||||
mutex_unlock(&aw8697->rtp_lock);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue