Home
last modified time | relevance | path

Searched refs:amplitude (Results 1 – 20 of 20) sorted by relevance

/device/google/felix/vibrator/cs40l26/tests/
Dutils.h23 static inline EffectScale toScale(float amplitude, float maximum) { in toScale() argument
26 ratio = amplitude / maximum * 100; in toScale()
38 static inline EffectScale amplitudeToScale(EffectAmplitude amplitude) { in amplitudeToScale() argument
39 return toScale(amplitude, 1.0f); in amplitudeToScale()
Dtest-vibrator.cpp420 EffectAmplitude amplitude = static_cast<float>(std::rand()) / RAND_MAX ?: 1.0f; in TEST_F() local
422 EXPECT_CALL(*mMockApi, setFFGain(_, amplitudeToScale(amplitude))).WillOnce(Return(true)); in TEST_F()
424 EXPECT_TRUE(mVibrator->setAmplitude(amplitude).isOk()); in TEST_F()
/device/google/felix/vibrator/cs40l26/
DVibrator.cpp107 static uint16_t amplitudeToScale(float amplitude, float maximum) { in amplitudeToScale() argument
110 ratio = amplitude / maximum * 100; in amplitudeToScale()
209 void constructPwleSegment(uint16_t delay, uint16_t amplitude, uint16_t frequency, uint8_t flags, in constructPwleSegment() argument
212 write(12, amplitude); in constructPwleSegment()
270 int constructActiveSegment(int duration, float amplitude, float frequency, bool chirp) { in constructActiveSegment() argument
280 (fToU16(amplitude, &amp, 2048, CS40L26_PWLE_LEVEL_MIN, CS40L26_PWLE_LEVEL_MAX) < 0) || in constructActiveSegment()
282 ALOGE("%s: Invalid argument: %d, %f, %f", __func__, duration, amplitude, frequency); in constructActiveSegment()
792 ndk::ScopedAStatus Vibrator::setAmplitude(float amplitude) { in setAmplitude() argument
795 if (amplitude <= 0.0f || amplitude > 1.0f) { in setAmplitude()
799 mLongEffectScale = amplitude; in setAmplitude()
[all …]
DVibrator.h152 ndk::ScopedAStatus setAmplitude(float amplitude) override;
184 ndk::ScopedAStatus setEffectAmplitude(float amplitude, float maximum);
/device/google/sunfish/vibrator/common/bench/
Dbenchmark.cpp180 uint8_t amplitude = UINT8_MAX;
189 mVibrator->setAmplitude(amplitude);
250 uint8_t amplitude = UINT8_MAX;
263 mVibrator->setAmplitude(amplitude);
/device/google/barbet/vibrator/drv2624/tests/
Dutils.h23 static inline int32_t amplitudeToRtpInput(EffectAmplitude amplitude) { in amplitudeToRtpInput() argument
24 return std::round(amplitude * 127); in amplitudeToRtpInput()
Dtest-vibrator.cpp355 EffectAmplitude amplitude = static_cast<float>(std::rand()) / RAND_MAX ?: 1.0f; in TEST_P() local
357 EXPECT_CALL(*mMockApi, setRtpInput(amplitudeToRtpInput(amplitude))).WillOnce(Return(true)); in TEST_P()
359 EXPECT_EQ(EX_NONE, mVibrator->setAmplitude(amplitude).getExceptionCode()); in TEST_P()
/device/google/redfin/vibrator/drv2624/tests/
Dutils.h23 static inline int32_t amplitudeToRtpInput(EffectAmplitude amplitude) { in amplitudeToRtpInput() argument
24 return std::round(amplitude * 127); in amplitudeToRtpInput()
Dtest-vibrator.cpp355 EffectAmplitude amplitude = static_cast<float>(std::rand()) / RAND_MAX ?: 1.0f; in TEST_P() local
357 EXPECT_CALL(*mMockApi, setRtpInput(amplitudeToRtpInput(amplitude))).WillOnce(Return(true)); in TEST_P()
359 EXPECT_EQ(EX_NONE, mVibrator->setAmplitude(amplitude).getExceptionCode()); in TEST_P()
/device/google/sunfish/vibrator/drv2624/tests/
Dutils.h23 static inline int32_t amplitudeToRtpInput(EffectAmplitude amplitude) { in amplitudeToRtpInput() argument
24 return std::round((amplitude - 1) / 254.0 * 127); in amplitudeToRtpInput()
Dtest-vibrator.cpp355 EffectAmplitude amplitude = std::rand(); in TEST_P() local
357 EXPECT_CALL(*mMockApi, setRtpInput(amplitudeToRtpInput(amplitude))).WillOnce(Return(true)); in TEST_P()
359 EXPECT_EQ(Status::OK, mVibrator->setAmplitude(amplitude)); in TEST_P()
/device/google/barbet/vibrator/drv2624/bench/
Dbenchmark.cpp117 uint8_t amplitude = std::rand() ?: 1;
120 mVibrator->setAmplitude(amplitude);
/device/google/redfin/vibrator/drv2624/bench/
Dbenchmark.cpp117 uint8_t amplitude = std::rand() ?: 1;
120 mVibrator->setAmplitude(amplitude);
/device/google/sunfish/vibrator/drv2624/bench/
Dbenchmark.cpp129 uint8_t amplitude = std::rand() ?: 1;
132 mVibrator->setAmplitude(amplitude);
/device/google/barbet/vibrator/drv2624/
DVibrator.cpp497 ndk::ScopedAStatus Vibrator::setAmplitude(float amplitude) { in setAmplitude() argument
499 if (amplitude <= 0.0f || amplitude > 1.0f) { in setAmplitude()
503 int32_t rtp_input = std::round(amplitude * (MAX_RTP_INPUT - MIN_RTP_INPUT) + MIN_RTP_INPUT); in setAmplitude()
DVibrator.h164 ndk::ScopedAStatus setAmplitude(float amplitude) override;
/device/google/redfin/vibrator/drv2624/
DVibrator.cpp528 ndk::ScopedAStatus Vibrator::setAmplitude(float amplitude) { in setAmplitude() argument
530 if (amplitude <= 0.0f || amplitude > 1.0f) { in setAmplitude()
534 int32_t rtp_input = std::round(amplitude * (MAX_RTP_INPUT - MIN_RTP_INPUT) + MIN_RTP_INPUT); in setAmplitude()
DVibrator.h170 ndk::ScopedAStatus setAmplitude(float amplitude) override;
/device/google/sunfish/vibrator/drv2624/
DVibrator.cpp345 Return<Status> Vibrator::setAmplitude(uint8_t amplitude) { in setAmplitude() argument
347 if (amplitude == 0) { in setAmplitude()
352 std::round((amplitude - 1) / 254.0 * (MAX_RTP_INPUT - MIN_RTP_INPUT) + MIN_RTP_INPUT); in setAmplitude()
DVibrator.h162 Return<Status> setAmplitude(uint8_t amplitude) override;