diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-01 00:55:41 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-01 00:55:41 +0000 |
commit | 13179eb2fc4b2384550a1681513986584634bfd6 (patch) | |
tree | 5e450b5b4ef50a7dfb8268e75d04785ab0adc13e /sec-2.h | |
parent | 7976f3ed8ba610c565d4cd80a7f8c0643005de49 (diff) |
add support for Digium's High Performance Echo Canceller
rework the top-level Makefile so kernel 2.6 modules are built by a dedicated Makefile
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@2076 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'sec-2.h')
-rw-r--r-- | sec-2.h | 33 |
1 files changed, 21 insertions, 12 deletions
@@ -67,7 +67,7 @@ #define NONUPDATE_DWELL_TIME 600 /* 600 samples, or 75ms */ -typedef struct +struct echo_can_state { int tx_power; int rx_power; @@ -95,11 +95,20 @@ typedef struct int32_t latest_correction; /* Indication of the magnitude of the latest adaption, or a code to indicate why adaption was skipped, for test purposes */ -} echo_can_state_t; +}; -static echo_can_state_t *echo_can_create(int len, int adaption_mode); -static void echo_can_free(echo_can_state_t *ec); -static int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx); +static struct echo_can_state *echo_can_create(int len, int adaption_mode); +static void echo_can_free(struct echo_can_state *ec); +static int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx); + +static void echo_can_init(void) +{ + printk("Zaptel Echo Canceller: STEVE2%s\n", ZAPTEL_ECHO_AGGRESSIVE); +} + +static void echo_can_shutdown(void) +{ +} /* * According to Jim... @@ -113,12 +122,12 @@ static int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx); /* #define MIN_TX_POWER_FOR_ADAPTION 4096 #define MIN_RX_POWER_FOR_ADAPTION 64 */ -static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) +static inline struct echo_can_state *echo_can_create(int len, int adaption_mode) { - echo_can_state_t *ec; + struct echo_can_state *ec; void *ptr; - ptr = ec = (echo_can_state_t *) MALLOC(sizeof(*ec) + len * sizeof(int32_t) + + ptr = ec = (struct echo_can_state *) MALLOC(sizeof(*ec) + len * sizeof(int32_t) + len * sizeof(int16_t)); if (ec == NULL) return NULL; @@ -139,14 +148,14 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) } /*- End of function --------------------------------------------------------*/ -static inline void echo_can_free(echo_can_state_t *ec) +static inline void echo_can_free(struct echo_can_state *ec) { fir16_free(&ec->fir_state); FREE(ec); } /*- End of function --------------------------------------------------------*/ -static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx) +static inline int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx) { int offset1; int offset2; @@ -278,7 +287,7 @@ static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t } #if 0 -static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx) +static inline int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx) { int offset; int limit; @@ -412,7 +421,7 @@ static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t /*- End of function --------------------------------------------------------*/ #endif -static inline int echo_can_traintap(echo_can_state_t *ec, int pos, short val) +static inline int echo_can_traintap(struct echo_can_state *ec, int pos, short val) { /* Reset hang counter to avoid adjustments after initial forced training */ |