/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/felix/vibrator/cs40l26/ |
D | Vibrator.cpp | 107 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, &, 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 …]
|
D | Vibrator.h | 152 ndk::ScopedAStatus setAmplitude(float amplitude) override; 184 ndk::ScopedAStatus setEffectAmplitude(float amplitude, float maximum);
|
/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/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/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/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/sunfish/vibrator/drv2624/bench/ |
D | benchmark.cpp | 129 uint8_t amplitude = std::rand() ?: 1; 132 mVibrator->setAmplitude(amplitude);
|
/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/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/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;
|