diff options
-rwxr-xr-x | mec3.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -225,4 +225,19 @@ static inline echo_can_state_t *echo_can_create(int taps, int adaption_mode) return ec; } +static inline int echo_can_traintap(echo_can_state_t *ec, int pos, short val) +{ + /* Reset hang counter to avoid adjustments after + initial forced training */ + ec->hcntr = ec->taps << 1; + if (pos >= ec->taps) + return 1; + ec->a_i[pos] = val << 17; + ec->a_s[pos] = val << 1; + if (++pos >= ec->taps) + return 1; + return 0; +} + + #endif |