Lines Matching refs:effect
211 struct ff_effect *effect) in need_magnitude_modifier() argument
213 if (effect->type != FF_CONSTANT) { in need_magnitude_modifier()
219 return old->u.constant.level != effect->u.constant.level; in need_magnitude_modifier()
227 struct ff_effect *effect) in need_envelope_modifier() argument
229 switch (effect->type) { in need_envelope_modifier()
231 if (old->u.constant.envelope.attack_length != effect->u.constant.envelope.attack_length in need_envelope_modifier()
232 || old->u.constant.envelope.attack_level != effect->u.constant.envelope.attack_level in need_envelope_modifier()
233 || old->u.constant.envelope.fade_length != effect->u.constant.envelope.fade_length in need_envelope_modifier()
234 || old->u.constant.envelope.fade_level != effect->u.constant.envelope.fade_level) in need_envelope_modifier()
239 if (old->u.periodic.envelope.attack_length != effect->u.periodic.envelope.attack_length in need_envelope_modifier()
240 || old->u.periodic.envelope.attack_level != effect->u.periodic.envelope.attack_level in need_envelope_modifier()
241 || old->u.periodic.envelope.fade_length != effect->u.periodic.envelope.fade_length in need_envelope_modifier()
242 || old->u.periodic.envelope.fade_level != effect->u.periodic.envelope.fade_level) in need_envelope_modifier()
338 int iforce_upload_periodic(struct iforce *iforce, struct ff_effect *effect, struct ff_effect *old) in iforce_upload_periodic() argument
341 int core_id = effect->id; in iforce_upload_periodic()
349 if (!old || need_period_modifier(iforce, old, effect)) { in iforce_upload_periodic()
352 effect->u.periodic.magnitude, effect->u.periodic.offset, in iforce_upload_periodic()
353 effect->u.periodic.period, effect->u.periodic.phase); in iforce_upload_periodic()
359 if (!old || need_envelope_modifier(iforce, old, effect)) { in iforce_upload_periodic()
362 effect->u.periodic.envelope.attack_length, in iforce_upload_periodic()
363 effect->u.periodic.envelope.attack_level, in iforce_upload_periodic()
364 effect->u.periodic.envelope.fade_length, in iforce_upload_periodic()
365 effect->u.periodic.envelope.fade_level); in iforce_upload_periodic()
371 switch (effect->u.periodic.waveform) { in iforce_upload_periodic()
380 if (!old || need_core(old, effect)) { in iforce_upload_periodic()
381 core_err = make_core(iforce, effect->id, in iforce_upload_periodic()
386 effect->replay.length, in iforce_upload_periodic()
387 effect->replay.delay, in iforce_upload_periodic()
388 effect->trigger.button, in iforce_upload_periodic()
389 effect->trigger.interval, in iforce_upload_periodic()
390 effect->direction); in iforce_upload_periodic()
409 int iforce_upload_constant(struct iforce *iforce, struct ff_effect *effect, struct ff_effect *old) in iforce_upload_constant() argument
411 int core_id = effect->id; in iforce_upload_constant()
419 if (!old || need_magnitude_modifier(iforce, old, effect)) { in iforce_upload_constant()
422 effect->u.constant.level); in iforce_upload_constant()
428 if (!old || need_envelope_modifier(iforce, old, effect)) { in iforce_upload_constant()
431 effect->u.constant.envelope.attack_length, in iforce_upload_constant()
432 effect->u.constant.envelope.attack_level, in iforce_upload_constant()
433 effect->u.constant.envelope.fade_length, in iforce_upload_constant()
434 effect->u.constant.envelope.fade_level); in iforce_upload_constant()
440 if (!old || need_core(old, effect)) { in iforce_upload_constant()
441 core_err = make_core(iforce, effect->id, in iforce_upload_constant()
446 effect->replay.length, in iforce_upload_constant()
447 effect->replay.delay, in iforce_upload_constant()
448 effect->trigger.button, in iforce_upload_constant()
449 effect->trigger.interval, in iforce_upload_constant()
450 effect->direction); in iforce_upload_constant()
465 int iforce_upload_condition(struct iforce *iforce, struct ff_effect *effect, struct ff_effect *old) in iforce_upload_condition() argument
467 int core_id = effect->id; in iforce_upload_condition()
475 switch (effect->type) { in iforce_upload_condition()
481 if (!old || need_condition_modifier(iforce, old, effect)) { in iforce_upload_condition()
484 effect->u.condition[0].right_saturation, in iforce_upload_condition()
485 effect->u.condition[0].left_saturation, in iforce_upload_condition()
486 effect->u.condition[0].right_coeff, in iforce_upload_condition()
487 effect->u.condition[0].left_coeff, in iforce_upload_condition()
488 effect->u.condition[0].deadband, in iforce_upload_condition()
489 effect->u.condition[0].center); in iforce_upload_condition()
496 effect->u.condition[1].right_saturation, in iforce_upload_condition()
497 effect->u.condition[1].left_saturation, in iforce_upload_condition()
498 effect->u.condition[1].right_coeff, in iforce_upload_condition()
499 effect->u.condition[1].left_coeff, in iforce_upload_condition()
500 effect->u.condition[1].deadband, in iforce_upload_condition()
501 effect->u.condition[1].center); in iforce_upload_condition()
508 if (!old || need_core(old, effect)) { in iforce_upload_condition()
509 core_err = make_core(iforce, effect->id, in iforce_upload_condition()
512 effect->replay.length, effect->replay.delay, in iforce_upload_condition()
513 effect->trigger.button, effect->trigger.interval, in iforce_upload_condition()
514 effect->direction); in iforce_upload_condition()