summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-11 02:21:39 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-02-11 02:21:39 +0000
commitd6b694db85f32e706bb948b4dd4198c93859b555 (patch)
tree5bb6d8b0d67ffee67cf230e3819ec0f58f6bd07c
parent7bb61e1e3d2eb83681c1f7890d307501eecc442d (diff)
parent744867aa387aa6cc8b776b357e76daf500bf6e46 (diff)
Snap for 9593491 from 744867aa387aa6cc8b776b357e76daf500bf6e46 to tm-qpr3-release
Change-Id: Ieeb1924577f5ae4d51de7e4a96cf322868512759
-rw-r--r--vibrator/cs40l26/Hardware.h7
-rw-r--r--vibrator/cs40l26/Vibrator.cpp1
-rw-r--r--vibrator/cs40l26/Vibrator.h3
3 files changed, 2 insertions, 9 deletions
diff --git a/vibrator/cs40l26/Hardware.h b/vibrator/cs40l26/Hardware.h
index 2143b96..ae052ba 100644
--- a/vibrator/cs40l26/Hardware.h
+++ b/vibrator/cs40l26/Hardware.h
@@ -220,10 +220,7 @@ class HwApi : public Vibrator::HwApi, private HwApiBase {
ALOGE("Invalid waveform index for OWT erase: %d", effectIndex);
return false;
}
- // Turn off the waiting time for SVC init phase to complete since chip
- // should already under STOP state
- setMinOnOffInterval(0);
- // Do erase flow
+
if (effectIndex < WAVEFORM_MAX_INDEX) {
/* Normal situation. Only erase the effect which we just played. */
if (ioctl(fd, EVIOCRMFF, effectIndex) < 0) {
@@ -251,8 +248,6 @@ class HwApi : public Vibrator::HwApi, private HwApiBase {
(*effect)[i].id = -1;
}
}
- // Turn on the waiting time for SVC init phase to complete
- setMinOnOffInterval(Vibrator::MIN_ON_OFF_INTERVAL_US);
return true;
}
diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp
index 2501224..c19c7f8 100644
--- a/vibrator/cs40l26/Vibrator.cpp
+++ b/vibrator/cs40l26/Vibrator.cpp
@@ -48,6 +48,7 @@ static constexpr uint32_t WAVEFORM_LONG_VIBRATION_THRESHOLD_MS = 50;
static constexpr uint8_t VOLTAGE_SCALE_MAX = 100;
static constexpr int8_t MAX_COLD_START_LATENCY_MS = 6; // I2C Transaction + DSP Return-From-Standby
+static constexpr uint32_t MIN_ON_OFF_INTERVAL_US = 8500; // SVC initialization time
static constexpr int8_t MAX_PAUSE_TIMING_ERROR_MS = 1; // ALERT Irq Handling
static constexpr uint32_t MAX_TIME_MS = UINT16_MAX;
diff --git a/vibrator/cs40l26/Vibrator.h b/vibrator/cs40l26/Vibrator.h
index 27ee283..220c974 100644
--- a/vibrator/cs40l26/Vibrator.h
+++ b/vibrator/cs40l26/Vibrator.h
@@ -154,9 +154,6 @@ class Vibrator : public BnVibrator {
binder_status_t dump(int fd, const char **args, uint32_t numArgs) override;
- // SVC initialization time
- static constexpr uint32_t MIN_ON_OFF_INTERVAL_US = 8500;
-
private:
ndk::ScopedAStatus on(uint32_t timeoutMs, uint32_t effectIndex, struct dspmem_chunk *ch,
const std::shared_ptr<IVibratorCallback> &callback);