• Home
  • Raw
  • Download

Lines Matching refs:effect

39 	struct ff_effect *effect;  member
55 struct ff_effect *effect);
58 static const struct ff_envelope *get_envelope(const struct ff_effect *effect) in get_envelope() argument
62 switch (effect->type) { in get_envelope()
64 return &effect->u.periodic.envelope; in get_envelope()
67 return &effect->u.constant.envelope; in get_envelope()
79 const struct ff_envelope *envelope = get_envelope(state->effect); in calculate_next_time()
90 if (state->effect->replay.length) { in calculate_next_time()
155 struct ff_effect *effect = state->effect; in apply_envelope() local
171 } else if (envelope->fade_length && effect->replay.length && in apply_envelope()
243 static void ml_combine_effects(struct ff_effect *effect, in ml_combine_effects() argument
247 struct ff_effect *new = state->effect; in ml_combine_effects()
265 effect->u.ramp.start_level = in ml_combine_effects()
266 clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f); in ml_combine_effects()
267 effect->u.ramp.end_level = in ml_combine_effects()
268 clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f); in ml_combine_effects()
275 if (effect->u.rumble.strong_magnitude + strong) in ml_combine_effects()
276 effect->direction = ml_calculate_direction( in ml_combine_effects()
277 effect->direction, in ml_combine_effects()
278 effect->u.rumble.strong_magnitude, in ml_combine_effects()
280 else if (effect->u.rumble.weak_magnitude + weak) in ml_combine_effects()
281 effect->direction = ml_calculate_direction( in ml_combine_effects()
282 effect->direction, in ml_combine_effects()
283 effect->u.rumble.weak_magnitude, in ml_combine_effects()
286 effect->direction = 0; in ml_combine_effects()
287 effect->u.rumble.strong_magnitude = in ml_combine_effects()
288 min(strong + effect->u.rumble.strong_magnitude, in ml_combine_effects()
290 effect->u.rumble.weak_magnitude = in ml_combine_effects()
291 min(weak + effect->u.rumble.weak_magnitude, 0xffffU); in ml_combine_effects()
301 if (effect->u.rumble.strong_magnitude + i) in ml_combine_effects()
302 effect->direction = ml_calculate_direction( in ml_combine_effects()
303 effect->direction, in ml_combine_effects()
304 effect->u.rumble.strong_magnitude, in ml_combine_effects()
307 effect->direction = 0; in ml_combine_effects()
308 effect->u.rumble.strong_magnitude = in ml_combine_effects()
309 min(i + effect->u.rumble.strong_magnitude, 0xffffU); in ml_combine_effects()
310 effect->u.rumble.weak_magnitude = in ml_combine_effects()
311 min(i + effect->u.rumble.weak_magnitude, 0xffffU); in ml_combine_effects()
330 struct ff_effect *effect; in ml_get_combo_effect() local
342 effect = state->effect; in ml_get_combo_effect()
355 effect_type = get_compatible_type(ml->dev->ff, effect->type); in ml_get_combo_effect()
367 } else if (effect->replay.length && in ml_get_combo_effect()
376 msecs_to_jiffies(effect->replay.delay); in ml_get_combo_effect()
378 msecs_to_jiffies(effect->replay.length); in ml_get_combo_effect()
392 struct ff_effect effect; in ml_play_effects() local
397 while (ml_get_combo_effect(ml, handled_bm, &effect)) in ml_play_effects()
398 ml->play_effect(ml->dev, ml->private, &effect); in ml_play_effects()
446 msecs_to_jiffies(state->effect->replay.delay); in ml_ff_playback()
448 msecs_to_jiffies(state->effect->replay.length); in ml_ff_playback()
466 struct ff_effect *effect, struct ff_effect *old) in ml_ff_upload() argument
469 struct ml_effect_state *state = &ml->states[effect->id]; in ml_ff_upload()
476 msecs_to_jiffies(state->effect->replay.delay); in ml_ff_upload()
478 msecs_to_jiffies(state->effect->replay.length); in ml_ff_upload()
552 ml->states[i].effect = &ff->effects[i]; in input_ff_create_memless()