leonardian
1d29f93863
vibrator: common: Check whether file is opened correctly
...
- Add compile-time type checking inside the has() function to ensure it
receives the correct type.
- Add is_open() inside the has() function.
Bug: 350911314
Test: alarm, ringtone vibrations
Test: keyboard vibrations
Test: idlcli commands
Test: atest PTS, CTS, VTS
Flag: EXEMPT bugfix
Change-Id: Ifa8f197f6f4b25d51b2edaf6fec27a086bd4f73c
2024-08-02 12:55:23 +08:00
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
Chris Paulo
e1ab132994
vibrator/cs40l26: Update ff_effect duration
...
Update the ff_effect duration to pass in 0 for compositions and RAM
indices. This will allow firmware to take control of the playback
duration, as well as apply SVC braking as required. This will also help
avoid ending the effect early which can cause ringing.
Bug: 317280093
Test: Verified perception and plotted acceleration
Change-Id: I048b2bbda04af2a627aa8993aafc1f55ccf8fe13
Signed-off-by: Chris Paulo <chrispaulo@google.com>
2024-01-19 14:29:57 -08:00
Nathan Kulczak
74a0f2b801
felix/vibrator: Disable PWLE by default
...
Set chirp.enabled prop to 0 by default so that it will not cause tests
to fail.
Change prop to persist from ro so that it can be enabled for testing.
Update Felix HAL to use new prop.
Bug: 286921585
Test: Tried using idlcli composePwle before/after setting prop
Change-Id: Ibca473aef62b7cc8e84689ddba83a91daddb8d2e
Signed-off-by: Nathan Kulczak <nathankulczak@google.com>
2023-08-17 00:34:36 +00:00
Tai Kuo
07417015d4
cs40l26: set redc_comp_enable as disabled by default
...
Bug: 287725914
Bug: 288338790
Test: Check system property and driver attribute.
Change-Id: I3fa5c99daa96168bdd9d15e9a686d1e53a5c90f8
2023-06-27 15:22:28 +08:00
Tai Kuo
cfabdfaacc
Replace vibrator/ from git_tm-qpr-dev
...
Lastest commit:
2724d61
vibrator/cs40l26: Fix unsupport primitive effects test
Bug: 267926374
Bug: 264625320
Test: HAL init properly.
Change-Id: I1c01ea8c6d584ae58d8d20f21a9ac43a8977f435
2023-02-06 11:34:50 +08: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