Lines Matching full:effect
36 struct ff_effect *effect; member
37 unsigned long flags; /* effect state (STARTED, PLAYING, etc) */
38 int count; /* loop count of the effect */
41 unsigned long adj_at; /* last time the effect was sent */
52 struct ff_effect *effect);
55 static const struct ff_envelope *get_envelope(const struct ff_effect *effect) in get_envelope() argument
59 switch (effect->type) { in get_envelope()
61 return &effect->u.periodic.envelope; in get_envelope()
64 return &effect->u.constant.envelope; in get_envelope()
76 const struct ff_envelope *envelope = get_envelope(state->effect); in calculate_next_time()
87 if (state->effect->replay.length) { in calculate_next_time()
152 struct ff_effect *effect = state->effect; in apply_envelope() local
168 } else if (envelope->fade_length && effect->replay.length && in apply_envelope()
193 * Return the type the effect has to be converted into (memless devices)
240 static void ml_combine_effects(struct ff_effect *effect, in ml_combine_effects() argument
244 struct ff_effect *new = state->effect; in ml_combine_effects()
262 effect->u.ramp.start_level = in ml_combine_effects()
263 clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f); in ml_combine_effects()
264 effect->u.ramp.end_level = in ml_combine_effects()
265 clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f); in ml_combine_effects()
272 if (effect->u.rumble.strong_magnitude + strong) in ml_combine_effects()
273 effect->direction = ml_calculate_direction( in ml_combine_effects()
274 effect->direction, in ml_combine_effects()
275 effect->u.rumble.strong_magnitude, in ml_combine_effects()
277 else if (effect->u.rumble.weak_magnitude + weak) in ml_combine_effects()
278 effect->direction = ml_calculate_direction( in ml_combine_effects()
279 effect->direction, in ml_combine_effects()
280 effect->u.rumble.weak_magnitude, in ml_combine_effects()
283 effect->direction = 0; in ml_combine_effects()
284 effect->u.rumble.strong_magnitude = in ml_combine_effects()
285 min(strong + effect->u.rumble.strong_magnitude, in ml_combine_effects()
287 effect->u.rumble.weak_magnitude = in ml_combine_effects()
288 min(weak + effect->u.rumble.weak_magnitude, 0xffffU); in ml_combine_effects()
298 if (effect->u.rumble.strong_magnitude + i) in ml_combine_effects()
299 effect->direction = ml_calculate_direction( in ml_combine_effects()
300 effect->direction, in ml_combine_effects()
301 effect->u.rumble.strong_magnitude, in ml_combine_effects()
304 effect->direction = 0; in ml_combine_effects()
305 effect->u.rumble.strong_magnitude = in ml_combine_effects()
306 min(i + effect->u.rumble.strong_magnitude, 0xffffU); in ml_combine_effects()
307 effect->u.rumble.weak_magnitude = in ml_combine_effects()
308 min(i + effect->u.rumble.weak_magnitude, 0xffffU); in ml_combine_effects()
320 * Because memoryless devices have only one effect per effect type active
327 struct ff_effect *effect; in ml_get_combo_effect() local
339 effect = state->effect; in ml_get_combo_effect()
352 effect_type = get_compatible_type(ml->dev->ff, effect->type); in ml_get_combo_effect()
364 } else if (effect->replay.length && in ml_get_combo_effect()
373 msecs_to_jiffies(effect->replay.delay); in ml_get_combo_effect()
375 msecs_to_jiffies(effect->replay.length); in ml_get_combo_effect()
389 struct ff_effect effect; in ml_play_effects() local
394 while (ml_get_combo_effect(ml, handled_bm, &effect)) in ml_play_effects()
395 ml->play_effect(ml->dev, ml->private, &effect); in ml_play_effects()
430 * Start/stop specified FF effect. Called with dev->event_lock held.
443 msecs_to_jiffies(state->effect->replay.delay); in ml_ff_playback()
445 msecs_to_jiffies(state->effect->replay.length); in ml_ff_playback()
463 struct ff_effect *effect, struct ff_effect *old) in ml_ff_upload() argument
466 struct ml_effect_state *state = &ml->states[effect->id]; in ml_ff_upload()
473 msecs_to_jiffies(state->effect->replay.delay); in ml_ff_upload()
475 msecs_to_jiffies(state->effect->replay.length); in ml_ff_upload()
505 * @play_effect: driver-specific method for playing FF effect
549 ml->states[i].effect = &ff->effects[i]; in input_ff_create_memless()