• Home
  • Raw
  • Download

Lines Matching refs:effect

51 	struct ff_effect *effect;  member
67 struct ff_effect *effect);
70 static const struct ff_envelope *get_envelope(const struct ff_effect *effect) in get_envelope() argument
74 switch (effect->type) { in get_envelope()
76 return &effect->u.periodic.envelope; in get_envelope()
79 return &effect->u.constant.envelope; in get_envelope()
91 const struct ff_envelope *envelope = get_envelope(state->effect); in calculate_next_time()
102 if (state->effect->replay.length) { in calculate_next_time()
167 struct ff_effect *effect = state->effect; in apply_envelope() local
183 } else if (envelope->fade_length && effect->replay.length && in apply_envelope()
255 static void ml_combine_effects(struct ff_effect *effect, in ml_combine_effects() argument
259 struct ff_effect *new = state->effect; in ml_combine_effects()
277 effect->u.ramp.start_level = in ml_combine_effects()
278 clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f); in ml_combine_effects()
279 effect->u.ramp.end_level = in ml_combine_effects()
280 clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f); in ml_combine_effects()
287 if (effect->u.rumble.strong_magnitude + strong) in ml_combine_effects()
288 effect->direction = ml_calculate_direction( in ml_combine_effects()
289 effect->direction, in ml_combine_effects()
290 effect->u.rumble.strong_magnitude, in ml_combine_effects()
292 else if (effect->u.rumble.weak_magnitude + weak) in ml_combine_effects()
293 effect->direction = ml_calculate_direction( in ml_combine_effects()
294 effect->direction, in ml_combine_effects()
295 effect->u.rumble.weak_magnitude, in ml_combine_effects()
298 effect->direction = 0; in ml_combine_effects()
299 effect->u.rumble.strong_magnitude = in ml_combine_effects()
300 min(strong + effect->u.rumble.strong_magnitude, in ml_combine_effects()
302 effect->u.rumble.weak_magnitude = in ml_combine_effects()
303 min(weak + effect->u.rumble.weak_magnitude, 0xffffU); in ml_combine_effects()
313 if (effect->u.rumble.strong_magnitude + i) in ml_combine_effects()
314 effect->direction = ml_calculate_direction( in ml_combine_effects()
315 effect->direction, in ml_combine_effects()
316 effect->u.rumble.strong_magnitude, in ml_combine_effects()
319 effect->direction = 0; in ml_combine_effects()
320 effect->u.rumble.strong_magnitude = in ml_combine_effects()
321 min(i + effect->u.rumble.strong_magnitude, 0xffffU); in ml_combine_effects()
322 effect->u.rumble.weak_magnitude = in ml_combine_effects()
323 min(i + effect->u.rumble.weak_magnitude, 0xffffU); in ml_combine_effects()
342 struct ff_effect *effect; in ml_get_combo_effect() local
354 effect = state->effect; in ml_get_combo_effect()
367 effect_type = get_compatible_type(ml->dev->ff, effect->type); in ml_get_combo_effect()
379 } else if (effect->replay.length && in ml_get_combo_effect()
388 msecs_to_jiffies(effect->replay.delay); in ml_get_combo_effect()
390 msecs_to_jiffies(effect->replay.length); in ml_get_combo_effect()
404 struct ff_effect effect; in ml_play_effects() local
409 while (ml_get_combo_effect(ml, handled_bm, &effect)) in ml_play_effects()
410 ml->play_effect(ml->dev, ml->private, &effect); in ml_play_effects()
458 msecs_to_jiffies(state->effect->replay.delay); in ml_ff_playback()
460 msecs_to_jiffies(state->effect->replay.length); in ml_ff_playback()
478 struct ff_effect *effect, struct ff_effect *old) in ml_ff_upload() argument
481 struct ml_effect_state *state = &ml->states[effect->id]; in ml_ff_upload()
488 msecs_to_jiffies(state->effect->replay.delay); in ml_ff_upload()
490 msecs_to_jiffies(state->effect->replay.length); in ml_ff_upload()
564 ml->states[i].effect = &ff->effects[i]; in input_ff_create_memless()