From 74a0f2b801aec693668a8a16ff790124cf374772 Mon Sep 17 00:00:00 2001 From: Nathan Kulczak Date: Tue, 15 Aug 2023 17:32:24 +0000 Subject: [PATCH] felix/vibrator: Disable PWLE by default Set chirp.enabled prop to 0 by default so that it will not cause tests to fail. Change prop to persist from ro so that it can be enabled for testing. Update Felix HAL to use new prop. Bug: 286921585 Test: Tried using idlcli composePwle before/after setting prop Change-Id: Ibca473aef62b7cc8e84689ddba83a91daddb8d2e Signed-off-by: Nathan Kulczak --- device-felix.mk | 3 ++- vibrator/cs40l26/Hardware.h | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/device-felix.mk b/device-felix.mk index e00d126..f065850 100644 --- a/device-felix.mk +++ b/device-felix.mk @@ -214,7 +214,8 @@ PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_VENDOR_PROPERTIES +=\ ro.vendor.vibrator.hal.long.frequency.shift=0 \ ro.vendor.vibrator.hal.gpio.num=44 \ - ro.vendor.vibrator.hal.gpio.shift=2 + ro.vendor.vibrator.hal.gpio.shift=2 \ + persist.vendor.vibrator.hal.chirp.enabled=0 ACTUATOR_MODEL := luxshare_ict_lt_xlra1906d # Fingerprint diff --git a/vibrator/cs40l26/Hardware.h b/vibrator/cs40l26/Hardware.h index 51619e5..7ad4017 100644 --- a/vibrator/cs40l26/Hardware.h +++ b/vibrator/cs40l26/Hardware.h @@ -359,9 +359,7 @@ class HwCal : public Vibrator::HwCal, private HwCalBase { return true; } bool isChirpEnabled() override { - bool value; - getProperty("chirp.enabled", &value, false); - return value; + return utils::getProperty("persist.vendor.vibrator.hal.chirp.enabled", false); } bool getSupportedPrimitives(uint32_t *value) override { return getProperty("supported_primitives", value, (uint32_t)0);