Commit Graph

26 Commits

Author SHA1 Message Date
Vince Leung
9bf4215108 vibrator: implement chirp APIs
Implement the chirp APIs and necessary helper methods. This capability
is not supported on drv2624 so we return EX_UNSUPPORTED_OPERATION.

Bug: 162859057
Test: m
Change-Id: Ibcf28b10f9313d94379103cafcf0400afc7b33b4
2021-03-24 06:20:43 +00:00
Bob Badour
ec6f90ee58 [LSC] Add LOCAL_LICENSE_KINDS to device/google/redfin am: 5cbf8e687b
Original change: https://googleplex-android-review.googlesource.com/c/device/google/redfin/+/13848445

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2fc3247dec36f7b7dfed6634d9df22f7f3cda132
2021-03-12 18:38:05 +00:00
Bob Badour
5cbf8e687b [LSC] Add LOCAL_LICENSE_KINDS to device/google/redfin
Added SPDX-license-identifier-Apache-2.0 to:
  dumpstate/Android.mk
  redfin/overlay_packages/SettingsOverlayG5NZ6/Android.bp
  redfin/overlay_packages/SettingsOverlayGD1YQ/Android.bp
  redfin/overlay_packages/SettingsOverlayGTT9Q/Android.bp
  self-extractors/qcom/staging/Android.mk
  usb/Android.bp
  vibrator/Android.bp
  vibrator/drv2624/Android.bp
  vibrator/drv2624/bench/Android.bp
  vibrator/drv2624/tests/Android.bp
  voice_processing/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I192bb56f5e770950bebf7f91e430d4cff3a0a73b
2021-03-11 18:59:02 -08:00
Vince Leung
800e73d52d Add APIs to get resonant frequency and Q factor
Actuators can have resonant frequency and Q factor information.
Exposing this information can allow for better optimized audio
generated haptics.

Bug: 178826612
Test: m
Change-Id: I1953d90a7c27ac64644a0b3d9c4e4fae5778dee4
2021-02-11 21:29:02 +00:00
Yifan Hong
a91886da50 vibrator: declare AIDL version in VINTF
Vibrator HAL uses unstable version, which is currently version 2.

Test: pass
Bug: 178035621
Change-Id: I78549bb2ef639bec9233d9b337c63dda7701501d
2021-01-21 15:54:08 -08:00
chasewu
d63b63d42b vibrator: Dogfood haptic tuning setting V6 (IMU)
Tracking for Dofgood tuning setting + non stop solution + loop gain solution
Tuning device: 06141FDD40001K (DVT)
Click 1: [vibrator.hal.effect.strength1]: [275]
Click 2: [vibrator.hal.effect.strength2]: [550]
Click 3: [vibrator.hal.effect.strength3]: [600]
Click 4: [vibrator.hal.effect.strength4]: [900]
Click 5: [vibrator.hal.effect.strength5]: [1120]
High motion: [vibrator.hal.steady.strength1]: [2150]
Non-motion: [vibrator.hal.steady.strength3]: [1300]

Duration bin file as attachment
Texture tick 6ms
TICK 6ms
CLICK 6ms
DOUBLE_CLICKS 8 + 139+ 12 ms
HEAVY_CLICK 6ms

Bug: 165890524
Test: UT test
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: Ia3b3cc3ad1da3b6cc28f2584abfbe4408fceee80
2020-08-21 18:22:32 +08:00
chasewu
214cb227e2 vibrator: Add a threshold to filter out some short vibration cases
Some app will use short vibration to implement haptics effect and
those cases will feel a delay from the motion awareness mechanism.

We add this patch to filter out those cases since those behaviors
beyond the motion awareness mechanism scope.

Bug: 162346934
Test: UT test
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: Iee8d5993f040126243d90330f03b897970c70c1b
2020-08-07 18:33:12 +08:00
chasewu
94cfbe7067 vibrator: Updare haptic tuning setting V5 (IMU)
Click 1: [vibrator.hal.effect.strength1]: [275]
Click 2: [vibrator.hal.effect.strength2]: [550]
Click 3: [vibrator.hal.effect.strength3]: [600]
Click 4: [vibrator.hal.effect.strength4]: [900]
Click 5: [vibrator.hal.effect.strength5]: [1120]
High motion: [vibrator.hal.steady.strength1]: [2000]
Non-motion: [vibrator.hal.steady.strength3]: [1300]

Duration bin file as attachment
Texture tick 6ms
TICK 6ms
CLICK 6ms
DOUBLE_CLICKS 8 + 139+ 12 ms
HEAVY_CLICK 6ms

Bug: 161413239
Test: build pass
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I54df53382e98887bebf1f986eb15c177f4459e72
2020-07-16 18:09:45 +08:00
eddielan
fdd1bdfd4d vibrator: Update haptic tuning setting V4(IMU)
Click 1: [vibrator.hal.effect.strength1]: [275]
Click 2: [vibrator.hal.effect.strength2]: [550]
Click 3: [vibrator.hal.effect.strength3]: [600]
Click 4: [vibrator.hal.effect.strength4]: [900]
Click 5: [vibrator.hal.effect.strength5]: [1120]
High motion: [vibrator.hal.steady.strength1]: [2000]
Non-motion: [vibrator.hal.steady.strength3]: [1000]

Bug: 160444095
Test: Build Pass
Change-Id: Ied7f75d7d6b5b5a23e4cc42d323f05ecb3001c00
2020-07-03 17:15:15 +08:00
eddielan
b0d28c30f8 vibrator: Update haptic tuning setting V3(IMU)
Bug: 160290874
Test: Build Pass
Change-Id: Icdc1db946e26e83a87c2373c7c2c48e353545846
2020-07-01 18:06:49 +08:00
chasewu
c690b7248c vibrator: Correct the device version comparison
1. Correct device version comparison method
2. Support proto device to use previous target G

Bug: 157610908
Test: use proto and dvt device to check it
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: Id5de9f6de3788284cd56908b3189b1f8cefc8ab4
2020-06-30 16:18:38 +08:00
chasewu
46d645318c vibrator: Update property naming rule
Bug: 158802146
Test: manual check properies value
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I2a092f79ca8105dc175ba026561234ce553da933
2020-06-17 16:37:47 +08:00
chasewu
9f4c9b3752 vibrator: Dynamically support different HW stage device
Since EVT and DVT devices were applied different target G values,
we have to add a workaround to support this condition.

Bug: 157610908
Bug: 157714236
Bug: 154788092
Test: manual check logs
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I5d534d44a6f765250f16a13cc7bb9ccecc120f99
2020-06-10 15:15:15 +08:00
chasewu
0808fdb6df vibrator: Use interpolation method for non-motion voltage
Bug: 156428459
Test: manual check the ol_clamp
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I3ef918098391a08d4ed36e057f6ce093a702d924
2020-05-29 21:22:49 +08:00
chasewu
6b2456b0d7 vibrator: Add an initial value for non-motion vibration intensity
Bug: 155709426
Test: remove cal file and trigger vibration
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I07e63dc8106a2f5d875b6be665e67e6f8dda9239
2020-05-29 21:22:48 +08:00
chasewu
ccacf4a4ab vibrator: Update 1st version haptics tuning result
Click 1: 0.15g
Click 2: 0.27g
Click 3: 0.32g
Click 4: 0.48g
Click 5: 0.62g
High motion: 1.2g
Non-motion: 0.4g

Duration bin file as attachment
Texture tick 6ms
TICK 6ms
CLICK 6ms
DOUBLE_CLICKS 8 + 139+ 12 ms
HEAVY_CLICK 6ms

Bug: 151275921
Test: UT member test
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I0ac830e030916524333fa7654f678235130c11b7
2020-05-29 21:22:07 +08:00
chasewu
42619ce0af vibrator: Support external target G input
Due to factory request, I add this support to
calibration process flow.

Bug: 154684508
Test: local push cal file to check the value
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I66a7adf5cc0c5515a13b532c6a341601ad8ac1cd
2020-05-29 21:22:07 +08:00
chasewu
074b4896f9 vibrator: Remove redundant logs
Those sensor logs are experimential for a while.

Bug: 154279225
Test: manual check logs
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I60ddbf80ae7dd9ce5a86fcadfc4e7720954e4e0e
2020-05-29 21:22:04 +08:00
chasewu
893543e1b2 vibrator: Fix wrong strength setting
In motion awareness function, it was expected to use
previous sensor data to apply motion or non-motion
strength within 2 secs.
However, it used the default value which is 0 to determine
the strength.

Bug: 153830649
Bug: 153934655
Test: UT and local test
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: Ic12512a9635d95c42bbe52ad92a0ad603af4081b
2020-05-29 21:22:01 +08:00
chasewu
aeea8a8447 vibrator: Sync up the delta from leading project
1. Add motion awareness
2. Switch from HIDL to AIDL

Bug: 148249136
Bug: 150916170
Bug: 150737103
Test: VTS, Unit Test
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: I50e317d880ca9d01bf3eff16b754c9dc91617b49
2020-05-29 21:21:59 +08:00
chasewu
2f2d7e9d43 vibrator: Add a temperature awareness mechanism
From component reliability test results, the actuator
operating life is lower in low temperature.
Thus, we changed the voltage when device in a low
temperature to expand the actuator operating life.

Temperature rule:
> 10°C : Switch to "Normal Intensity" => Depends on each device's K file
5 ~ 10°C: This is a buffer period. Keep current voltage setting.
< 5°C: Switch to "Low Bound Intensity" => ~1.8 Vpeak(od_clamp=90), sine wave, F0-10.

Bug: 151063347
Test: remove vibrator properties and test VTS items
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: Ie0d22e561aca94a3b61f5e42ddf50ca4a991bda2
2020-05-29 21:21:40 +08:00
chasewu
76aac18865 vibrator: Update calibration precision
Bug: 149885637
Test: manual check logs
Signed-off-by: chasewu <chasewu@google.com>
Change-Id: Idd750456a4884a025e97f9b96577dfcc2834647c
2020-05-29 21:21:05 +08:00
chasewu
4057c6cb8d vibrator: Sync factory fixed to mainline
Bug: 149666621
Bug: 149274114
Test: manual check logs
Change-Id: Ib360f31008c5619d64a1c5c2a9b24baed53140f7
Signed-off-by: chasewu <chasewu@google.com>
2020-05-29 21:20:52 +08:00
chasewu
1ccb101fe3 vibrator: Modify some delta and apply calibration fix
Reference the delta from the leading project.

Bug: 148918900
Test: manual haptics function check and logs
Change-Id: I777d3295a7a92e2ce8547b85886038cfbe32ac5a
Signed-off-by: chasewu <chasewu@google.com>
2020-05-29 21:20:38 +08:00
Steven Moreland
178f2195e1 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I82b2f09a41aaffd30e943b87c0a84bc85fdf4c14
2019-10-02 12:49:06 -07:00
Alex Hong
1c2dbd8222 Create aosp_redfin target
Bug: 139478768
Change-Id: I061f89a72b5e7b81280406abf85cca479b86f340
2019-08-19 12:39:55 +08:00