Commit graph

60 commits

Author SHA1 Message Date
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
Bob Badour
bfaa6d8336 [LSC] Add LOCAL_LICENSE_KINDS
Added SPDX-license-identifier-Apache-2.0 to:
  vibrator/cs40l26/aidl/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Change-Id: I0f79d8c1a23c701b8cb149d966a9bc8b688ef585
Merged-In: I0f79d8c1a23c701b8cb149d966a9bc8b688ef585
2022-12-09 16:38:14 +08: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
8d22072195 cs40l26: Add cancelSynced when prepare sync fail
Also add more logs to improve the ability of debugging.

Bug: 259012441
Test: scrolling the minute hand in alarm
Change-Id: I93b9dc7999ef0285d66a54a4fa5b74f4b72150bc
Signed-off-by: Chase Wu <chasewu@google.com>
2022-11-21 22:01:35 +08:00
Chase Wu
a5ab84ba2a cs40l26: Improve the vibrator manager stability
1. Add the return check when doing the prepareSynced process.
2. Add more debugging log pattern
3. Correst the corner case when doing the erase process

Bug: 258391756
Test: command in the bug
Change-Id: Ib6e189cca66f67b0501299cdb1a8c2572215a70e
Signed-off-by: Chase Wu <chasewu@google.com>
2022-11-10 10:58:31 +00:00
Chase Wu
3f32520d2f [DO NOT MERGE] cs40l26: Enable vibrator manager feature
This patch remove the old dual design and add it into the original
vibrator HALs'rc file.

Also, this patch dynamically gets the service name from rc file.

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
Signed-off-by: Chase Wu <chasewu@google.com>
Change-Id: I7a5dd65c67e01a008f8d2c675dc7b96599469622
2022-11-02 22:26:31 +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
fd52691553 [DO NOT MERGE] cs40l26: using the project folder mk
The based mk file is different from master one, so
there is no need to merge this patch to master branch.

Bug: 181615889
Test: Run all test suites
Signed-off-by: Chase Wu <chasewu@google.com>
Change-Id: I61106aee64c87f77cef966d307ca5f047b5cc0b2
2022-10-28 23:31:13 +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