diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-10-27 17:00:04 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-10-27 17:00:04 +0000 |
commit | 398f396e0f94fb6009a3b27ffbae417becee566b (patch) | |
tree | 2a6d60c717ca01981ed3555ea6e52f4cf1292ac7 /mec2.h | |
parent | 74768740b2a7dd30d85567e258c9a8c9c75a0cae (diff) |
Create echo "Pretraining" ioctl
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@260 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'mec2.h')
-rwxr-xr-x | mec2.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -391,6 +391,18 @@ static inline echo_can_state_t *echo_can_create(int len, 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_d = ec->N_d << 1; + if (pos >= ec->N_d) + return 1; + ec->a_i[pos] = val << 17; + ec->a_s[pos] = val << 1; + if (++pos >= ec->N_d) + return 1; + return 0; +} #endif |