Lines Matching full:effect
37 struct ff_effect *effect; member
38 unsigned long flags; /* effect state (STARTED, PLAYING, etc) */
39 int count; /* loop count of the effect */
42 unsigned long adj_at; /* last time the effect was sent */
53 struct ff_effect *effect);
56 static const struct ff_envelope *get_envelope(const struct ff_effect *effect) in get_envelope() argument
60 switch (effect->type) { in get_envelope()
62 return &effect->u.periodic.envelope; in get_envelope()
65 return &effect->u.constant.envelope; in get_envelope()
77 const struct ff_envelope *envelope = get_envelope(state->effect); in calculate_next_time()
88 if (state->effect->replay.length) { in calculate_next_time()
153 struct ff_effect *effect = state->effect; in apply_envelope() local
169 } else if (envelope->fade_length && effect->replay.length && in apply_envelope()
194 * Return the type the effect has to be converted into (memless devices)
241 static void ml_combine_effects(struct ff_effect *effect, in ml_combine_effects() argument
245 struct ff_effect *new = state->effect; in ml_combine_effects()
263 effect->u.ramp.start_level = in ml_combine_effects()
264 clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f); in ml_combine_effects()
265 effect->u.ramp.end_level = in ml_combine_effects()
266 clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f); in ml_combine_effects()
273 if (effect->u.rumble.strong_magnitude + strong) in ml_combine_effects()
274 effect->direction = ml_calculate_direction( in ml_combine_effects()
275 effect->direction, in ml_combine_effects()
276 effect->u.rumble.strong_magnitude, in ml_combine_effects()
278 else if (effect->u.rumble.weak_magnitude + weak) in ml_combine_effects()
279 effect->direction = ml_calculate_direction( in ml_combine_effects()
280 effect->direction, in ml_combine_effects()
281 effect->u.rumble.weak_magnitude, in ml_combine_effects()
284 effect->direction = 0; in ml_combine_effects()
285 effect->u.rumble.strong_magnitude = in ml_combine_effects()
286 min(strong + effect->u.rumble.strong_magnitude, in ml_combine_effects()
288 effect->u.rumble.weak_magnitude = in ml_combine_effects()
289 min(weak + effect->u.rumble.weak_magnitude, 0xffffU); in ml_combine_effects()
299 if (effect->u.rumble.strong_magnitude + i) in ml_combine_effects()
300 effect->direction = ml_calculate_direction( in ml_combine_effects()
301 effect->direction, in ml_combine_effects()
302 effect->u.rumble.strong_magnitude, in ml_combine_effects()
305 effect->direction = 0; in ml_combine_effects()
306 effect->u.rumble.strong_magnitude = in ml_combine_effects()
307 min(i + effect->u.rumble.strong_magnitude, 0xffffU); in ml_combine_effects()
308 effect->u.rumble.weak_magnitude = in ml_combine_effects()
309 min(i + effect->u.rumble.weak_magnitude, 0xffffU); in ml_combine_effects()
321 * Because memoryless devices have only one effect per effect type active
328 struct ff_effect *effect; in ml_get_combo_effect() local
340 effect = state->effect; in ml_get_combo_effect()
353 effect_type = get_compatible_type(ml->dev->ff, effect->type); in ml_get_combo_effect()
365 } else if (effect->replay.length && in ml_get_combo_effect()
374 msecs_to_jiffies(effect->replay.delay); in ml_get_combo_effect()
376 msecs_to_jiffies(effect->replay.length); in ml_get_combo_effect()
390 struct ff_effect effect; in ml_play_effects() local
395 while (ml_get_combo_effect(ml, handled_bm, &effect)) in ml_play_effects()
396 ml->play_effect(ml->dev, ml->private, &effect); in ml_play_effects()
429 * Start/stop specified FF effect. Called with dev->event_lock held.
442 msecs_to_jiffies(state->effect->replay.delay); in ml_ff_playback()
444 msecs_to_jiffies(state->effect->replay.length); in ml_ff_playback()
462 struct ff_effect *effect, struct ff_effect *old) in ml_ff_upload() argument
465 struct ml_effect_state *state = &ml->states[effect->id]; in ml_ff_upload()
472 msecs_to_jiffies(state->effect->replay.delay); in ml_ff_upload()
474 msecs_to_jiffies(state->effect->replay.length); in ml_ff_upload()
502 * @play_effect: driver-specific method for playing FF effect
542 ml->states[i].effect = &ff->effects[i]; in input_ff_create_memless()