mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
input: qcom-hv-haptics: Update "get_fifo_length_us" with T_LRA_X
Update "get_fifo_length_us" function to support the T_LRA_X_2/4/8 periods. So that the FIFO mode can work for all T_LRA periods. Change-Id: I5d6b2c95eff66cddcec9388082c4d540493f2c86 Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
This commit is contained in:
parent
15d558c6d7
commit
3cb186f032
1 changed files with 9 additions and 0 deletions
|
|
@ -825,6 +825,15 @@ static int get_fifo_play_length_us(struct fifo_cfg *fifo, u32 t_lra_us)
|
|||
case T_LRA_DIV_8:
|
||||
length_us /= 8;
|
||||
break;
|
||||
case T_LRA_X_2:
|
||||
length_us *= 2;
|
||||
break;
|
||||
case T_LRA_X_4:
|
||||
length_us *= 4;
|
||||
break;
|
||||
case T_LRA_X_8:
|
||||
length_us *= 8;
|
||||
break;
|
||||
case F_8KHZ:
|
||||
length_us = 1000 * fifo->num_s / 8;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue