Commit Graph

10 Commits

Author SHA1 Message Date
Harpreet "Eli" Sangha
2c3507689a vibrator: Enforce API-Specific Effect Range
Bug: 132135335
Test: vts-tradefed run singleCommand vts-hal -m VtsHalVibratorV1_0Target
Change-Id: I45ea5b65220158995a0fe7be603be8fbde5581ad
Signed-off-by: Harpreet "Eli" Sangha <eliptus@google.com>
2019-05-09 14:46:04 +09:00
David Lin
811d138338 haptics: Implement constant effect for heavy click
This patch implements support for heavy click effect which has the
following UX requirements:

- 8 ms in square wave and full amplitude for Walleye
- 12 ms in square wave and full amplitude for Taimen

Bug: 77863933
Test: manual long press test
Change-Id: Ibc30117fecb234a6b400123e5f18a7c100ae36cb
Signed-off-by: David Lin <dtwlin@google.com>
2018-04-17 10:29:18 -07:00
Michael Wright
3e8e659997 Upgrade vibrator to HAL 1.2
Bug: 64184692
Test: build, flash and play with device
Change-Id: I44d82371e6a6d7dc7e05e740aa5f2fdb5c3f8df6
2018-02-22 12:25:36 -08:00
David Lin
2dc836a07b haptics: enable low-power trigger mode for edge sense
This patch enables the low-power trigger mode for drv2624 to allow the
SLPI to trigger the leading edge of a gesture while AP is in suspend
mode.

Bug: 62658365
Test: manually toggle the trigger gpio to verity
Change-Id: Icb795867355dda9bb6987a78eb93c8af1dfb0577
2017-07-31 14:02:40 -07:00
David Lin
9a0a8d2f42 haptics: move playback mode setting to on()
This patch moves the device playback mode configuration from off() to
on() to avoid the unnecessarily switching from rtp to waveform mode for
consecutive waveform playbacks.

Bug: 62507430
Test: vts, haptic stresss test
Change-Id: I0f7c1f6263dcb4da59695c1619aade47f7381541
Signed-off-by: David Lin <dtwlin@google.com>
2017-06-13 02:41:40 +00:00
David Lin
e2ac78d27f haptics: implements vibrator 1.1 HAL
Obtain tick/click effect duration from system property and implement the
new perform 1.1 function for supporting tick effect.

Bug: 62176703
Test: VtsHalVibratorV1_1TargetTest
Change-Id: Icbd50c2e7d05fd520aeda4511ba95151dde2a5ed
Signed-off-by: David Lin <dtwlin@google.com>
2017-06-05 16:21:17 -07:00
David Lin
89b4aa84af haptics: update effect waveform
EFFECT_CLICK
- Walleye: On resonance (f1=155 Hz), square wave full amplitude
  (A1=127), auto-brake, duration T1=6ms.
- Taimen: On resonance (f1=155 Hz), square wave full amplitude
  (A1=127), auto-brake, duration T1=10 ms.

EFFECT_DOUBLE_CLICK
- Two actuations T1=25 ms, A1=63, T3=100ms, T2=10 ms, A2=127

LONG_PRESS
- Walleye: 8ms duration with full amplitude
- Taimen: 12ms duration with full amplitude

Bug: 62176703
Test: VTS 1.0
Change-Id: Idf728ad793b3dd64f52d1ea95e8ea2cf3085a72a
Signed-off-by: David Lin <dtwlin@google.com>
2017-06-01 13:32:11 -07:00
David Lin
ed1c9bd230 vibrator: update manifest.xml and fix issue with setAmplitude()
When outputting uint8_t / char to sysfs using ofstream it gets to
stringified to a character instead of string. For example, writing 127
would get converted to "\x7F\0a" in text while sysfs generally only
accept input in dec "127" or "0x7f" in hex format. This patch changes
the rtp_input type to uint32_t instead.

Bug: 36097386
Test done: VtsHalVibratorV1_0TargetTest all passed
Change-Id: Ie98e42584fd32843dec46edde7af54f9cdcbc4cc
Signed-off-by: David Lin <dtwlin@google.com>
2017-05-22 09:35:42 -07:00
David Lin
646e1e592b vibrator hal: add loop mode control and update waveform
This patch updates the click waveform to use 6 ms full amplitude as well
as switching to open-loop mode for any duration that's less than 20 ms.
The medium and strong now shares the same strength to provide a stronger
default feedback.

Bug: 37952639
Test: keyboard and home key taps
Change-Id: I00086e47e41d97ce8363ba4032eeab320ad1b765
Signed-off-by: David Lin <dtwlin@google.com>
2017-05-05 00:37:04 +00:00
David Lin
971ea5d074 vibrator hal: add support for drv2624 haptics driver on wahoo
This adds the vibrator HAL that implements the new setAmplitude and
perform(Effect) API.

Test done: vibrator_hidl_hal_test
Bug: 36782452

Change-Id: If9988434277790becb469d4dd928e75f7e6af41a
Signed-off-by: David Lin <dtwlin@google.com>
2017-04-05 12:44:20 -07:00