Lines Matching defs:det
47 echo_can_disable_detector_init(struct ec_disable_detector_state *det)
52 biquad2_init(&det->notch,
59 det->channel_level = 0;
60 det->notch_level = 0;
61 det->tone_present = FALSE;
62 det->tone_cycle_duration = 0;
63 det->good_cycles = 0;
64 det->hit = 0;
69 echo_can_disable_detector_update(struct ec_disable_detector_state *det,
74 notched = biquad2(&det->notch, amp);
81 det->channel_level += ((abs(amp) - det->channel_level) >> 5);
82 det->notch_level += ((abs(notched) - det->notch_level) >> 4);
83 if (det->channel_level > 280) {
86 if (det->notch_level*6 < det->channel_level) {
88 if (!det->tone_present) {
90 if (det->tone_cycle_duration >= 425*8
91 && det->tone_cycle_duration <= 475*8) {
92 det->good_cycles++;
93 if (det->good_cycles > 2)
94 det->hit = TRUE;
96 det->tone_cycle_duration = 0;
98 det->tone_present = TRUE;
100 det->tone_present = FALSE;
101 det->tone_cycle_duration++;
103 det->tone_present = FALSE;
104 det->tone_cycle_duration = 0;
105 det->good_cycles = 0;
107 return det->hit;