Lines Matching full:envelope
28 /* Envelope update interval in ms */
61 return &effect->u.periodic.envelope; in get_envelope()
64 return &effect->u.constant.envelope; in get_envelope()
72 * Check for the next time envelope requires an update on memoryless devices
76 const struct ff_envelope *envelope = get_envelope(state->effect); in calculate_next_time() local
79 if (envelope->attack_length) { in calculate_next_time()
81 msecs_to_jiffies(envelope->attack_length); in calculate_next_time()
88 if (envelope->fade_length) { in calculate_next_time()
91 msecs_to_jiffies(envelope->fade_length); in calculate_next_time()
147 * Apply an envelope to a value
150 struct ff_envelope *envelope) in apply_envelope() argument
159 if (envelope->attack_length && in apply_envelope()
161 state->play_at + msecs_to_jiffies(envelope->attack_length))) { in apply_envelope()
163 value, envelope->attack_level); in apply_envelope()
165 time_of_envelope = envelope->attack_length; in apply_envelope()
166 envelope_level = min_t(u16, envelope->attack_level, 0x7fff); in apply_envelope()
168 } else if (envelope->fade_length && effect->replay.length && in apply_envelope()
170 state->stop_at - msecs_to_jiffies(envelope->fade_length)) && in apply_envelope()
173 time_of_envelope = envelope->fade_length; in apply_envelope()
174 envelope_level = min_t(u16, envelope->fade_level, 0x7fff); in apply_envelope()
254 &new->u.constant.envelope)); in ml_combine_effects()
293 &new->u.periodic.envelope); in ml_combine_effects()