Commit Graph

14 Commits

Author SHA1 Message Date
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
Chih-Hung Hsieh
456f1bb4ef Use -Werror in device/google/wahoo am: 7d0bdbefcd am: 3d6511ce09
am: be8cb41927

Change-Id: I25651013fdd066d350c8caf98a496969cc4a452d
2017-11-06 19:31:36 +00:00
Chih-Hung Hsieh
7d0bdbefcd Use -Werror in device/google/wahoo
* Remove unused variables.
* Return result of registerAsService().

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I79d1add6190e835de20a0b0c247bbbb259096c14
2017-11-02 15:26:20 -07:00
Jaekyun Seok
cc0d522669 Add 'vendor.' prefix to a vendor HAL service name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: Idc995c550657feca5e0f934444a31805bc3538f9
2017-08-31 12:51:25 +09: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
TreeHugger Robot
e57a86cce7 Merge "vibrator: add calibration data loading support" 2017-05-22 21:27:43 +00:00
David Lin
0f959efa6c vibrator: add calibration data loading support
This patch adds the support of loading a calibration file and write it
back to the drv2624 kernel driver. The calibration file contains the
BEMF, GAIN and COMP numbers generated using the auto-calibration feature
of the drv2624 driver IC. The file also contains the per-device resonant
frequency number.

Test: calibrate the device and read back the values from kernel
Change-Id: Ieafe5b317c7544bd8d657168250fb41e2ee0d8fc
Signed-off-by: David Lin <dtwlin@google.com>
2017-05-22 16:36:47 +00: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
a6e2550687 vibrator: fix incorrect error checking when opening kernel sysfs nodes
Test: test device vibrates
Change-Id: I05c2e5afa6d66a69aacd65885d7d3092ef0fec63
Signed-off-by: David Lin <dtwlin@google.com>
2017-05-15 18:09:01 -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