• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/input/

Lines Matching refs:effect

52 	struct ff_effect *effect;
53 unsigned long flags; /* effect state (STARTED, PLAYING, etc) */
54 int count; /* loop count of the effect */
57 unsigned long adj_at; /* last time the effect was sent */
68 struct ff_effect *effect);
71 static const struct ff_envelope *get_envelope(const struct ff_effect *effect)
75 switch (effect->type) {
77 return &effect->u.periodic.envelope;
79 return &effect->u.constant.envelope;
90 const struct ff_envelope *envelope = get_envelope(state->effect);
101 if (state->effect->replay.length) {
166 struct ff_effect *effect = state->effect;
182 } else if (envelope->fade_length && effect->replay.length &&
207 * Return the type the effect has to be converted into (memless devices)
243 static void ml_combine_effects(struct ff_effect *effect,
247 struct ff_effect *new = state->effect;
265 effect->u.ramp.start_level =
266 clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f);
267 effect->u.ramp.end_level =
268 clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f);
275 if (effect->u.rumble.strong_magnitude + strong)
276 effect->direction = ml_calculate_direction(
277 effect->direction,
278 effect->u.rumble.strong_magnitude,
280 else if (effect->u.rumble.weak_magnitude + weak)
281 effect->direction = ml_calculate_direction(
282 effect->direction,
283 effect->u.rumble.weak_magnitude,
286 effect->direction = 0;
287 effect->u.rumble.strong_magnitude =
288 min(strong + effect->u.rumble.strong_magnitude,
290 effect->u.rumble.weak_magnitude =
291 min(weak + effect->u.rumble.weak_magnitude, 0xffffU);
301 if (effect->u.rumble.strong_magnitude + i)
302 effect->direction = ml_calculate_direction(
303 effect->direction,
304 effect->u.rumble.strong_magnitude,
307 effect->direction = 0;
308 effect->u.rumble.strong_magnitude =
309 min(i + effect->u.rumble.strong_magnitude, 0xffffU);
310 effect->u.rumble.weak_magnitude =
311 min(i + effect->u.rumble.weak_magnitude, 0xffffU);
323 * Because memoryless devices have only one effect per effect type active
330 struct ff_effect *effect;
342 effect = state->effect;
355 effect_type = get_compatible_type(ml->dev->ff, effect->type);
367 } else if (effect->replay.length &&
376 msecs_to_jiffies(effect->replay.delay);
378 msecs_to_jiffies(effect->replay.length);
392 struct ff_effect effect;
397 while (ml_get_combo_effect(ml, handled_bm, &effect))
398 ml->play_effect(ml->dev, ml->private, &effect);
433 * Start/stop specified FF effect. Called with dev->event_lock held.
446 msecs_to_jiffies(state->effect->replay.delay);
448 msecs_to_jiffies(state->effect->replay.length);
466 struct ff_effect *effect, struct ff_effect *old)
469 struct ml_effect_state *state = &ml->states[effect->id];
476 msecs_to_jiffies(state->effect->replay.delay);
478 msecs_to_jiffies(state->effect->replay.length);
499 * @play_effect: driver-specific method for playing FF effect
543 ml->states[i].effect = &ff->effects[i];