/device/google/felix/vibrator/cs40l26/tests/ |
D | utils.h | 23 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()
|
D | test-vibrator.cpp | 420 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/ |
D | benchmark.cpp | 180 uint8_t amplitude = UINT8_MAX; 189 mVibrator->setAmplitude(amplitude); 250 uint8_t amplitude = UINT8_MAX; 263 mVibrator->setAmplitude(amplitude);
|
/device/google/felix/vibrator/cs40l26/ |
D | Vibrator.cpp | 111 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 …]
|
D | Vibrator.h | 152 ndk::ScopedAStatus setAmplitude(float amplitude) override; 184 ndk::ScopedAStatus setEffectAmplitude(float amplitude, float maximum);
|
/device/google/bramble/vibrator/drv2624/tests/ |
D | utils.h | 23 static inline int32_t amplitudeToRtpInput(EffectAmplitude amplitude) { in amplitudeToRtpInput() argument 24 return std::round(amplitude * 127); in amplitudeToRtpInput()
|
D | test-vibrator.cpp | 355 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/ |
D | utils.h | 23 static inline int32_t amplitudeToRtpInput(EffectAmplitude amplitude) { in amplitudeToRtpInput() argument 24 return std::round(amplitude * 127); in amplitudeToRtpInput()
|
D | test-vibrator.cpp | 355 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/ |
D | utils.h | 23 static inline int32_t amplitudeToRtpInput(EffectAmplitude amplitude) { in amplitudeToRtpInput() argument 24 return std::round((amplitude - 1) / 254.0 * 127); in amplitudeToRtpInput()
|
D | test-vibrator.cpp | 355 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/ |
D | utils.h | 23 static inline int32_t amplitudeToRtpInput(EffectAmplitude amplitude) { in amplitudeToRtpInput() argument 24 return std::round(amplitude * 127); in amplitudeToRtpInput()
|
D | test-vibrator.cpp | 355 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/ |
D | benchmark.cpp | 117 uint8_t amplitude = std::rand() ?: 1; 120 mVibrator->setAmplitude(amplitude);
|
/device/google/redfin/vibrator/drv2624/bench/ |
D | benchmark.cpp | 117 uint8_t amplitude = std::rand() ?: 1; 120 mVibrator->setAmplitude(amplitude);
|
/device/google/bramble/vibrator/drv2624/bench/ |
D | benchmark.cpp | 117 uint8_t amplitude = std::rand() ?: 1; 120 mVibrator->setAmplitude(amplitude);
|
/device/google/sunfish/vibrator/drv2624/bench/ |
D | benchmark.cpp | 129 uint8_t amplitude = std::rand() ?: 1; 132 mVibrator->setAmplitude(amplitude);
|
/device/google/bramble/vibrator/drv2624/ |
D | Vibrator.cpp | 492 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()
|
D | Vibrator.h | 164 ndk::ScopedAStatus setAmplitude(float amplitude) override;
|
/device/google/redfin/vibrator/drv2624/ |
D | Vibrator.cpp | 528 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()
|
D | Vibrator.h | 170 ndk::ScopedAStatus setAmplitude(float amplitude) override;
|
/device/google/barbet/vibrator/drv2624/ |
D | Vibrator.cpp | 497 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()
|
D | Vibrator.h | 164 ndk::ScopedAStatus setAmplitude(float amplitude) override;
|
/device/google/sunfish/vibrator/drv2624/ |
D | Vibrator.cpp | 345 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()
|
D | Vibrator.h | 162 Return<Status> setAmplitude(uint8_t amplitude) override;
|