Commit graph

10 commits

Author SHA1 Message Date
leonardian
0dcee74707 vibrator: cs40l26: Implement braking duration for haptic effects
1. Add sysfs nodes for querying braking duration
   - braking_time_bank
   - braking_time_index
   - braking_time_ms
2. Set delay time between effects to include the whole braking duration
3. Add braking effect durations in HAL dumpsys logs

Bug: 325121485
Test: Plotted acceleration
Test: Checked HAL dumpsys
Test: atest VibratorHalCs40l26TestSuite
Flag: EXEMPT bugfix
Change-Id: Ifacc94db4224adbab971e8d2c01c54422838760c
Signed-off-by: leonardian <leonardian@google.com>
2024-08-02 12:48:19 +08:00
Ravi Jain
75d87040c7 cs40l26: Align Felix Hal with common HAL
Pull ag/22589260 to replace new/delete by using vector from the common
HAL.

Bug: 322648133
Test: idlcli compose commands
Test: adb shell cmd vibrator_manager synced prebaked 1
Test: adb shell idlcli vibrator compose 0 8 1.0; \
      sleep 1; adb shell idlcli vibrator compose 0 7 1.0;
Test: atest PtsVibratorHalTestSuite \
  PtsHapticsTestCases \
  VibratorHalCs40l26TestSuitePrivate \
  VtsHalVibratorManagerTargetTest \
  VtsHalVibratorTargetTest \
  android.os.cts.VibratorTest \
  android.os.cts.VibratorManagerTest \
  android.os.cts.VibrationEffectTest \
  android.os.cts.VibrationAttributesTest \
  android.os.cts.CombinedVibrationTest
Change-Id: Ia6e9111c47f27089521f05a68b538bbefb235d6b
2024-03-22 00:42:07 +00:00
Ravi Jain
85299be2ad cs40l26: Align Felix Hal with common HAL
Pull DSPMemChunk related CLs from common HAL.
ag/22087481, ag/22093662

Bug: 322648133
Test: idlcli compose commands
Test: adb shell cmd vibrator_manager synced prebaked 1
Test: adb shell idlcli vibrator composePwle -b \
  a 0.1 300.0 0.1 30.0 1000 \
  a 0.1 30.0 0.1 300.0 500
Test: atest PtsVibratorHalTestSuite \
  PtsHapticsTestCases \
  VibratorHalCs40l26TestSuite \
  VtsHalVibratorManagerTargetTest \
  VtsHalVibratorTargetTest \
  android.os.cts.VibratorTest \
  android.os.cts.VibratorManagerTest \
  android.os.cts.VibrationEffectTest \
  android.os.cts.VibrationAttributesTest \
  android.os.cts.CombinedVibrationTest
Change-Id: I32258500ec02c2a8cbfc6d0b37aaea2c83c7c8b4
2024-03-06 11:19:19 +00:00
Chase Wu
e4e692f74d cs40l26: Add a maximum scale protection for primitive effects
Bug: 267419872
Test: HW test
Change-Id: I18f0e096e63ae6844bb0b47c43011cd012845f75
2023-02-08 17:20:41 +08:00
Nathan Kulczak
6346fec3af [DO NOT MERGE] vibrator/cs40l26: Adding minimum scale for composition primitives
Adding minimum scale for composition primitives to make 0 scale
primitives perform similarly to C10.

Bug: 260611234
Test: Flashed to device and played compositions with idlcli
Change-Id: Iaf872011b79de9da46de0de3ca770b794f67cd88
Signed-off-by: Nathan Kulczak <nathankulczak@google.com>
2022-12-20 19:27:56 +00:00
Chase Wu
97a989bfba [DO NOT MERGE] cs40l26: Fix the temporary no function symptom
When device was stuck on the erased timeout process, user cannot
feel the continuous haptic effects.

Bug: 262675927
Test: Fold the device and unfold the device under OOBE thud effect
Change-Id: Ia7b07b26e77f1e35d00075b91a31199575b61e3a
Signed-off-by: Chase Wu <chasewu@google.com>
2022-12-18 20:22:34 +08:00
Chase Wu
07468b074a [DO NOT MERGE] cs40l26: single HAL for dual haptics
We need to sync both haptics on the single HAL
architecture to reduce the time overhead and prevent the
mismatch behavior from vibrator manager HAL implementation.

Bug: 260090235
Bug: 261687849
Bug: 261841035
Bug: 261832151
Test: atest PtsVibratorHalTestSuite \
PtsHapticsTestCases \
PtsHapticsFeatureTestCases \
VibratorHalCs40l26TestSuite \
VtsHalVibratorManagerTargetTest \
VtsHalVibratorTargetTest \
android.os.cts.VibratorTest \
android.os.cts.VibratorManagerTest \
android.os.cts.VibrationEffectTest \
android.os.cts.VibrationAttributesTest \
android.os.cts.CombinedVibrationTest \
Change-Id: I084e1da952ab2f63e5c217a7f708ac3d34635336
Signed-off-by: Chase Wu <chasewu@google.com>
2022-12-12 17:34:18 +00:00
Nathan Kulczak
c73579497f [DO NOT MERGE] vibrator/cs40l26: Synchronize base and flip actuator F0
Calculate F0 offset using calibration data during initialization for
both Vibrator services.

Bug: 255435707
Test: Flashed to F10 with logs to verify correct offsets were
calculated.
Change-Id: I923b45967f5cae04f968178b75382584091869b8
Signed-off-by: Nathan Kulczak <nathankulczak@google.com>
2022-11-30 19:06:45 +00:00
Chase Wu
3584a67955 cs40l26: Add vibrator manager support
Bug: 181615889
Test: Manual type and trigger a long/short vibration
Test: cmd vibrator_manager synced xxxx
Test: cmd vibrator_manager sequential -v 0 xxxx
Test: atest VtsHalVibratorManagerTargetTest \
VtsHalVibratorTargetTest android.os.cts.VibratorTest \
android.os.cts.VibratorManagerTest android.os.cts.VibrationEffectTest \
android.os.cts.VibrationAttributesTest \
android.os.cts.CombinedVibrationTest \
Signed-off-by: Chase Wu <chasewu@google.com>
Change-Id: Ib93e8eb4a0de9269116e07f76b66a77b58915211
2022-10-28 23:31:25 +08:00
Chase Wu
89fda9efcb cs40l26: Move the latest vibrator HAL to device
This is the base version for the vibrator manager feature.

Bug: 181615889
Test: Run all test suites
Signed-off-by: Chase Wu <chasewu@google.com>
Change-Id: I703835346864853a0d5a5918e3c50f541b67dc1f
2022-10-28 23:31:07 +08:00