mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
input: qcom-hv-haptics: set auto resonance when loading effects
Set auto resonance when loading effect according to the effect settings. Change-Id: I8dc9ac99a57e396d67da28ae7b1eb31813ab3362 Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This commit is contained in:
parent
a7b2b418ea
commit
ec870b7d84
1 changed files with 8 additions and 0 deletions
|
|
@ -1082,6 +1082,10 @@ static int haptics_load_predefined_effect(struct haptics_chip *chip,
|
|||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
rc = haptics_enable_autores(chip, !play->effect->auto_res_disable);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
play->pattern_src = play->effect->src;
|
||||
if (play->pattern_src != PATTERN1 &&
|
||||
play->pattern_src != PATTERN2 &&
|
||||
|
|
@ -1246,6 +1250,10 @@ static int haptics_load_custom_effect(struct haptics_chip *chip,
|
|||
if (rc < 0)
|
||||
goto cleanup;
|
||||
|
||||
rc = haptics_enable_autores(chip, !play->effect->auto_res_disable);
|
||||
if (rc < 0)
|
||||
goto cleanup;
|
||||
|
||||
play->pattern_src = FIFO;
|
||||
rc = haptics_set_fifo(chip, play->effect->fifo);
|
||||
if (rc < 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue