Lines Matching refs:amplitude
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()
1095 ndk::ScopedAStatus Vibrator::setEffectAmplitude(float amplitude, float maximum) { in setEffectAmplitude() argument
1096 uint16_t scale = amplitudeToScale(amplitude, maximum); in setEffectAmplitude()
1111 uint8_t amplitude = set ? roundf(mLongEffectScale * mLongEffectVol[1]) : VOLTAGE_SCALE_MAX; in setGlobalAmplitude() local
1116 return setEffectAmplitude(amplitude, VOLTAGE_SCALE_MAX); in setGlobalAmplitude()