0db068b63c
Add capability for vibrator HAL to detect whether the device is face-up and adjust/scale haptic alerts to avoid loud and startling buzzing when there is no case on the device. Added global compile-time disable that can be set in the environment. Bug: 198239103 Test: Verified tests and functionality Change-Id: I6b2355acb7fa5e0323b8eca6327bb19ac42a2c56 Signed-off-by: Chris Paulo <chrispaulo@google.com>
47 lines
2 KiB
Text
47 lines
2 KiB
Text
on property:vendor.all.modules.ready=1
|
|
wait /sys/bus/i2c/devices/i2c-cs40l26a/calibration/redc_cal_time_ms
|
|
|
|
mkdir /mnt/vendor/persist/haptics 0770 system system
|
|
chmod 770 /mnt/vendor/persist/haptics
|
|
chmod 440 /mnt/vendor/persist/haptics/cs40l26.cal
|
|
chown system system /mnt/vendor/persist/haptics
|
|
chown system system /mnt/vendor/persist/haptics/cs40l26.cal
|
|
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/f0_stored
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/q_stored
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/redc_stored
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/vibe_state
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/num_waves
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_offset
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/owt_free_space
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_comp_enable
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/redc_comp_enable
|
|
chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/delay_before_stop_playback_us
|
|
|
|
enable vendor.vibrator.cs40l26
|
|
|
|
service vendor.vibrator.cs40l26 /vendor/bin/hw/android.hardware.vibrator-service.cs40l26-private-lynx
|
|
class hal
|
|
user system
|
|
group system input context_hub
|
|
|
|
setenv INPUT_EVENT_NAME cs40l26_input
|
|
setenv INPUT_EVENT_PATH /dev/input/event*
|
|
setenv PROPERTY_PREFIX ro.vendor.vibrator.hal.
|
|
setenv CALIBRATION_FILEPATH /mnt/vendor/persist/haptics/cs40l26.cal
|
|
|
|
setenv HWAPI_PATH_PREFIX /sys/bus/i2c/devices/i2c-cs40l26a/
|
|
setenv HWAPI_DEBUG_PATHS "
|
|
calibration/f0_stored
|
|
calibration/redc_stored
|
|
calibration/q_stored
|
|
default/vibe_state
|
|
default/num_waves
|
|
default/f0_offset
|
|
default/owt_free_space
|
|
default/f0_comp_enable
|
|
default/redc_comp_enable
|
|
default/delay_before_stop_playback_us
|
|
"
|
|
|
|
disabled
|