Home
last modified time | relevance | path

Searched refs:amplitude (Results 1 – 25 of 25) 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/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/felix/vibrator/cs40l26/
DVibrator.cpp111 static uint16_t amplitudeToScale(float amplitude, float maximum) { in amplitudeToScale() argument
114 ratio = amplitude / maximum * 100; in amplitudeToScale()
644 ndk::ScopedAStatus Vibrator::setAmplitude(float amplitude) { in setAmplitude() argument
647 if (amplitude <= 0.0f || amplitude > 1.0f) { in setAmplitude()
651 mLongEffectScale = amplitude; in setAmplitude()
952 ndk::ScopedAStatus Vibrator::setEffectAmplitude(float amplitude, float maximum) { in setEffectAmplitude() argument
953 uint16_t scale = amplitudeToScale(amplitude, maximum); in setEffectAmplitude()
968 uint8_t amplitude = set ? roundf(mLongEffectScale * mLongEffectVol[1]) : VOLTAGE_SCALE_MAX; in setGlobalAmplitude() local
973 return setEffectAmplitude(amplitude, VOLTAGE_SCALE_MAX); in setGlobalAmplitude()
1091 static void constructPwleSegment(dspmem_chunk *ch, uint16_t delay, uint16_t amplitude, in constructPwleSegment() argument
[all …]
DVibrator.h152 ndk::ScopedAStatus setAmplitude(float amplitude) override;
184 ndk::ScopedAStatus setEffectAmplitude(float amplitude, float maximum);
/device/google/bramble/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/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/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/bramble/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/bramble/vibrator/drv2624/
DVibrator.cpp492 ndk::ScopedAStatus Vibrator::setAmplitude(float amplitude) { in setAmplitude() argument
494 if (amplitude <= 0.0f || amplitude > 1.0f) { in setAmplitude()
498 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/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/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;