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:
Kiran Gunda 2021-09-15 11:53:39 +05:30 • committed by Gerrit - the friendly Code Review server
commit 3cb186f032

View file

@ -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;