diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-12-17 02:19:03 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-12-17 02:19:03 +0000 |
commit | e2cab742b1d41becf87d7b21e4b451370e8a7c12 (patch) | |
tree | 2766ab70c7472182f7adeca4b66bd8545b0170e3 | |
parent | 51be44f5b34ffe5032414266787aca1aa8213316 (diff) |
don't include the echo canceller headers in every module that includes zaptel.h... instead, only in zaptel.c
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@867 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | kb1ec.h | 22 | ||||
-rw-r--r-- | mec.h | 16 | ||||
-rw-r--r-- | mec2.h | 22 | ||||
-rw-r--r-- | mec3-float.h | 16 | ||||
-rw-r--r-- | mec3.h | 18 | ||||
-rw-r--r-- | mg2ec.h | 22 | ||||
-rw-r--r-- | sec-2.h | 24 | ||||
-rw-r--r-- | sec.h | 22 | ||||
-rw-r--r-- | zaptel.c | 38 | ||||
-rw-r--r-- | zaptel.h | 34 |
10 files changed, 117 insertions, 117 deletions
@@ -74,7 +74,7 @@ typedef struct { } echo_can_cb_s; /* Echo canceller definition */ -typedef struct { +struct echo_can_state { /* an arbitrary ID for this echo can - this really should be settable from the calling channel... */ int id; @@ -139,7 +139,7 @@ typedef struct { int avg_Lu_i_ok; #endif -} echo_can_state_t; +}; static inline void init_cb_s(echo_can_cb_s *cb, int len, void *where) { @@ -167,13 +167,13 @@ static inline short get_cc_s(echo_can_cb_s *cb, int pos) return cb->buf_d[cb->idx_d + pos]; } -static inline void init_cc(echo_can_state_t *ec, int N, int maxy, int maxu) +static inline void init_cc(struct echo_can_state *ec, int N, int maxy, int maxu) { void *ptr = ec; unsigned long tmp; /* Double-word align past end of state */ - ptr += sizeof(echo_can_state_t); + ptr += sizeof(struct echo_can_state); tmp = (unsigned long)ptr; tmp += 3; tmp &= ~3L; @@ -232,12 +232,12 @@ static inline void init_cc(echo_can_state_t *ec, int N, int maxy, int maxu) } -static inline void echo_can_free(echo_can_state_t *ec) +static inline void echo_can_free(struct echo_can_state *ec) { FREE(ec); } -static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig) +static inline short echo_can_update(struct echo_can_state *ec, short iref, short isig) { /* Declare local variables that are used more than once */ @@ -515,9 +515,9 @@ static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig return u; } -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; int maxy; int maxu; maxy = len + DEFAULT_M; @@ -528,7 +528,7 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) maxy = (1 << DEFAULT_SIGMA_LY_I); if (maxu < (1 << DEFAULT_SIGMA_LU_I)) maxu = (1 << DEFAULT_SIGMA_LU_I); - ec = (echo_can_state_t *)MALLOC(sizeof(echo_can_state_t) + + ec = (struct echo_can_state *)MALLOC(sizeof(struct echo_can_state) + 4 + /* align */ sizeof(int) * len + /* a_i */ sizeof(short) * len + /* a_s */ @@ -537,7 +537,7 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) 2 * sizeof(short) * (maxu) + /* u_s */ 2 * sizeof(short) * len); /* y_tilde_s */ if (ec) { - memset(ec, 0, sizeof(echo_can_state_t) + + memset(ec, 0, sizeof(struct echo_can_state) + 4 + /* align */ sizeof(int) * len + /* a_i */ sizeof(short) * len + /* a_s */ @@ -550,7 +550,7 @@ 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) +static inline int echo_can_traintap(struct echo_can_state *ec, int pos, short val) { /* Set the hangover counter to the length of the can to * avoid adjustments occuring immediately after initial forced training @@ -53,7 +53,7 @@ #define HANG_T 600 /* 600 samples, or 75ms */ -typedef struct mark_ec { +struct echo_can_state { /* Circular position */ int cpos; short y[NUM_TAPS]; /* Last N samples (relative to cpos) transmitted */ @@ -80,7 +80,7 @@ typedef struct mark_ec { int lastmax; /* Optimize maximum search */ int maxTy; /* Maximum Ty */ -} echo_can_state_t; +}; #define INLINE inline @@ -98,11 +98,11 @@ typedef struct mark_ec { #define FREE(a) free(a) #endif -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; /* Uhm, we're only one length, sorry. */ - ec = MALLOC(sizeof(echo_can_state_t)); + ec = MALLOC(sizeof(struct echo_can_state)); if (ec) memset(ec, 0, sizeof(*ec)); return ec; @@ -111,12 +111,12 @@ static INLINE echo_can_state_t *echo_can_create(int len, int adaption_mode) #define PASSPOS 32000 #undef PASSPOS -static INLINE void echo_can_free(echo_can_state_t *ec) +static INLINE void echo_can_free(struct echo_can_state *ec) { FREE(ec); } -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) { /* Process a sample, where tx is the near end and rx is the far end + echo */ @@ -292,7 +292,7 @@ static INLINE int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t return suppr; } -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 */ @@ -51,7 +51,7 @@ typedef struct { // class definition // -typedef struct { +struct echo_can_state { /* Echo canceller definition */ /* absolute time */ @@ -86,7 +86,7 @@ typedef struct { short max_y_tilde; int max_y_tilde_pos; -} echo_can_state_t; +}; static inline void init_cb_s(echo_can_cb_s *cb, int len, void *where) { @@ -112,12 +112,12 @@ static inline short get_cc_s(echo_can_cb_s *cb, int pos) return cb->buf_d[cb->idx_d + pos]; } -static inline void init_cc(echo_can_state_t *ec, int N, int maxy, int maxu) { +static inline void init_cc(struct echo_can_state *ec, int N, int maxy, int maxu) { void *ptr = ec; unsigned long tmp; /* double-word align past end of state */ - ptr += sizeof(echo_can_state_t); + ptr += sizeof(struct echo_can_state); tmp = (unsigned long)ptr; tmp += 3; tmp &= ~3L; @@ -170,12 +170,12 @@ static inline void init_cc(echo_can_state_t *ec, int N, int maxy, int maxu) { // } -static inline void echo_can_free(echo_can_state_t *ec) +static inline void echo_can_free(struct echo_can_state *ec) { FREE(ec); } -static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig) { +static inline short echo_can_update(struct echo_can_state *ec, short iref, short isig) { /* declare local variables that are used more than once */ @@ -370,9 +370,9 @@ static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig return u; } -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; int maxy; int maxu; maxy = len + DEFAULT_M; @@ -383,7 +383,7 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) maxy = (1 << DEFAULT_SIGMA_LY_I); if (maxu < (1 << DEFAULT_SIGMA_LU_I)) maxu = (1 << DEFAULT_SIGMA_LU_I); - ec = (echo_can_state_t *)MALLOC(sizeof(echo_can_state_t) + + ec = (struct echo_can_state *)MALLOC(sizeof(echo_can_state_t) + 4 + /* align */ sizeof(int) * len + /* a_i */ sizeof(short) * len + /* a_s */ @@ -392,7 +392,7 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) 2 * sizeof(short) * (maxu) + /* u_s */ 2 * sizeof(short) * len); /* y_tilde_s */ if (ec) { - memset(ec, 0, sizeof(echo_can_state_t) + + memset(ec, 0, sizeof(struct echo_can_state) + 4 + /* align */ sizeof(int) * len + /* a_i */ sizeof(short) * len + /* a_s */ @@ -405,7 +405,7 @@ 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) +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 */ diff --git a/mec3-float.h b/mec3-float.h index b5e0109..12c3038 100644 --- a/mec3-float.h +++ b/mec3-float.h @@ -63,7 +63,7 @@ typedef struct { int maxexp; } cbuf_f; -typedef struct { +struct echo_can_state { float a[NTAPS]; /* Coefficients */ #ifdef COEFF_BACKUP float b[NTAPS]; /* Coefficients */ @@ -77,9 +77,9 @@ typedef struct { int taps; /* Number of taps */ int hcntr; /* Hangtime counter */ int pos; /* Position in curcular buffers */ -} echo_can_state_t; +}; -static inline void echo_can_free(echo_can_state_t *ec) +static inline void echo_can_free(struct echo_can_state *ec) { FREE(ec); } @@ -106,7 +106,7 @@ static inline void buf_add(cbuf_f *b, float sample, int pos, int taps) } } -static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig) +static inline short echo_can_update(struct echo_can_state *ec, short iref, short isig) { int x; float ref; @@ -210,14 +210,14 @@ static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig return (short)(u); } -static inline echo_can_state_t *echo_can_create(int taps, int adaption_mode) +static inline struct echo_can_state *echo_can_create(int taps, int adaption_mode) { - echo_can_state_t *ec; + struct echo_can_state *ec; taps = NTAPS; - ec = MALLOC(sizeof(echo_can_state_t)); + ec = MALLOC(sizeof(struct echo_can_state)); if (ec) { printk("Allocating MEC3 canceller (%d)\n", taps); - memset(ec, 0, sizeof(echo_can_state_t)); + memset(ec, 0, sizeof(struct echo_can_state)); ec->taps = taps; if (ec->taps > NTAPS) ec->taps = NTAPS; @@ -69,7 +69,7 @@ typedef struct { int maxexp; } cbuf_s; -typedef struct { +struct echo_can_state { short a_s[NTAPS]; /* Coefficients in shorts */ int a_i[NTAPS]; /* Coefficients in ints*/ #ifdef DO_BACKUP @@ -85,9 +85,9 @@ typedef struct { int hcntr; /* Hangtime counter */ int pos; /* Position in curcular buffers */ int backup; /* Backup timer */ -} echo_can_state_t; +}; -static inline void echo_can_free(echo_can_state_t *ec) +static inline void echo_can_free(struct echo_can_state *ec) { FREE(ec); } @@ -114,7 +114,7 @@ static inline void buf_add(cbuf_s *b, short sample, int pos, int taps) } } -static inline short echo_can_update(echo_can_state_t *ec, short ref, short sig) +static inline short echo_can_update(struct echo_can_state *ec, short ref, short sig) { int x; short u; @@ -204,15 +204,15 @@ static inline short echo_can_update(echo_can_state_t *ec, short ref, short sig) return u; } -static inline echo_can_state_t *echo_can_create(int taps, int adaption_mode) +static inline struct echo_can_state *echo_can_create(int taps, int adaption_mode) { - echo_can_state_t *ec; + struct echo_can_state *ec; int x; taps = NTAPS; - ec = MALLOC(sizeof(echo_can_state_t)); + ec = MALLOC(sizeof(struct echo_can_state)); if (ec) { - memset(ec, 0, sizeof(echo_can_state_t)); + memset(ec, 0, sizeof(struct echo_can_state)); ec->taps = taps; ec->pos = ec->taps-1; for (x=0;x<31;x++) { @@ -225,7 +225,7 @@ 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) +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 */ @@ -76,7 +76,7 @@ typedef struct { } echo_can_cb_s; /* Echo canceller definition */ -typedef struct { +struct echo_can_state { /* an arbitrary ID for this echo can - this really should be settable from the calling channel... */ int id; @@ -143,7 +143,7 @@ typedef struct { short lastsig[256]; int lastpos; -} echo_can_state_t; +}; static inline void init_cb_s(echo_can_cb_s *cb, int len, void *where) { @@ -171,13 +171,13 @@ static inline short get_cc_s(echo_can_cb_s *cb, int pos) return cb->buf_d[cb->idx_d + pos]; } -static inline void init_cc(echo_can_state_t *ec, int N, int maxy, int maxu) +static inline void init_cc(struct echo_can_state *ec, int N, int maxy, int maxu) { void *ptr = ec; unsigned long tmp; /* Double-word align past end of state */ - ptr += sizeof(echo_can_state_t); + ptr += sizeof(struct echo_can_state); tmp = (unsigned long)ptr; tmp += 3; tmp &= ~3L; @@ -236,12 +236,12 @@ static inline void init_cc(echo_can_state_t *ec, int N, int maxy, int maxu) } -static inline void echo_can_free(echo_can_state_t *ec) +static inline void echo_can_free(struct echo_can_state *ec) { FREE(ec); } -static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig) +static inline short echo_can_update(struct echo_can_state *ec, short iref, short isig) { /* Declare local variables that are used more than once */ @@ -556,9 +556,9 @@ static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig return u; } -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; int maxy; int maxu; maxy = len + DEFAULT_M; @@ -569,7 +569,7 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) maxy = (1 << DEFAULT_SIGMA_LY_I); if (maxu < (1 << DEFAULT_SIGMA_LU_I)) maxu = (1 << DEFAULT_SIGMA_LU_I); - ec = (echo_can_state_t *)MALLOC(sizeof(echo_can_state_t) + + ec = (struct echo_can_state *)MALLOC(sizeof(echo_can_state_t) + 4 + /* align */ sizeof(int) * len + /* a_i */ sizeof(short) * len + /* a_s */ @@ -578,7 +578,7 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode) 2 * sizeof(short) * (maxu) + /* u_s */ 2 * sizeof(short) * len); /* y_tilde_s */ if (ec) { - memset(ec, 0, sizeof(echo_can_state_t) + + memset(ec, 0, sizeof(struct echo_can_state) + 4 + /* align */ sizeof(int) * len + /* a_i */ sizeof(short) * len + /* a_s */ @@ -591,7 +591,7 @@ 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) +static inline int echo_can_traintap(struct echo_can_state *ec, int pos, short val) { /* Set the hangover counter to the length of the can to * avoid adjustments occuring immediately after initial forced training @@ -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,11 @@ 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); /* * According to Jim... @@ -113,12 +113,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 +139,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 +278,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 +412,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 */ @@ -70,7 +70,7 @@ #define NONUPDATE_DWELL_TIME 600 /* 600 samples, or 75ms */ -typedef struct +struct echo_can_state { int tx_power; int rx_power; @@ -98,11 +98,11 @@ 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); /* Original parameters : #define MIN_TX_POWER_FOR_ADAPTION 256 @@ -117,12 +117,12 @@ static int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx); #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 * 3 * sizeof(int16_t)); if (ec == NULL) return NULL; @@ -141,13 +141,13 @@ 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) { 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) { int32_t echo_value; int clean_rx; @@ -268,7 +268,7 @@ static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t } /*- End of function --------------------------------------------------------*/ -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 */ @@ -89,6 +89,38 @@ #include <linux/moduleparam.h> #endif +#ifdef AGGRESSIVE_SUPPRESSOR +#define ZAPTEL_ECHO_AGGRESSIVE " (aggressive)" +#else +#define ZAPTEL_ECHO_AGGRESSIVE +#endif + +#ifdef __KERNEL__ +/* Echo cancellation */ +#if defined(ECHO_CAN_STEVE) +#define ZAPTEL_ECHO_CANCELLER "STEVE" +#include "sec.h" +#elif defined(ECHO_CAN_STEVE2) +#define ZAPTEL_ECHO_CANCELLER "STEVE2" +#include "sec-2.h" +#elif defined(ECHO_CAN_MARK) +#define ZAPTEL_ECHO_CANCELLER "MARK" +#include "mec.h" +#elif defined(ECHO_CAN_MARK2) +#define ZAPTEL_ECHO_CANCELLER "MARK2" +#include "mec2.h" +#elif defined(ECHO_CAN_KB1) +#define ZAPTEL_ECHO_CANCELLER "KB1" +#include "kb1ec.h" +#elif defined(ECHO_CAN_MG2) +#define ZAPTEL_ECHO_CANCELLER "MG2" +#include "mg2ec.h" +#else +#define ZAPTEL_ECHO_CANCELLER "MARK3" +#include "mec3.h" +#endif +#endif + /* Get helper arithmetic */ #include "arith.h" #if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_FP) @@ -932,7 +964,7 @@ static void close_channel(struct zt_chan *chan) { unsigned long flags; void *rxgain = NULL; - echo_can_state_t *ec = NULL; + struct echo_can_state *ec = NULL; int oldconf; #ifdef CONFIG_ZAPATA_PPP struct ppp_channel *ppp; @@ -2026,7 +2058,7 @@ static int initialize_channel(struct zt_chan *chan) int res; unsigned long flags; void *rxgain=NULL; - echo_can_state_t *ec=NULL; + struct echo_can_state *ec=NULL; if ((res = zt_reallocbufs(chan, ZT_DEFAULT_BLOCKSIZE, ZT_DEFAULT_NUM_BUFS))) return res; @@ -3972,7 +4004,7 @@ static int zt_chan_ioctl(struct inode *inode, struct file *file, unsigned int cm int ret; int oldconf; void *rxgain=NULL; - echo_can_state_t *ec, *tec; + struct echo_can_state *ec, *tec; if (!chan) return -ENOSYS; @@ -151,38 +151,6 @@ #define RING_DEBOUNCE_TIME 2000 /* 2000 ms ring debounce time */ -#ifdef AGGRESSIVE_SUPPRESSOR -#define ZAPTEL_ECHO_AGGRESSIVE " (aggressive)" -#else -#define ZAPTEL_ECHO_AGGRESSIVE -#endif - -#ifdef __KERNEL__ -/* Echo cancellation */ -#if defined(ECHO_CAN_STEVE) -#define ZAPTEL_ECHO_CANCELLER "STEVE" -#include "sec.h" -#elif defined(ECHO_CAN_STEVE2) -#define ZAPTEL_ECHO_CANCELLER "STEVE2" -#include "sec-2.h" -#elif defined(ECHO_CAN_MARK) -#define ZAPTEL_ECHO_CANCELLER "MARK" -#include "mec.h" -#elif defined(ECHO_CAN_MARK2) -#define ZAPTEL_ECHO_CANCELLER "MARK2" -#include "mec2.h" -#elif defined(ECHO_CAN_KB1) -#define ZAPTEL_ECHO_CANCELLER "KB1" -#include "kb1ec.h" -#elif defined(ECHO_CAN_MG2) -#define ZAPTEL_ECHO_CANCELLER "MG2" -#include "mg2ec.h" -#else -#define ZAPTEL_ECHO_CANCELLER "MARK3" -#include "mec3.h" -#endif -#endif - #define ZT_GET_PARAMS_RETURN_MASTER 0x40000000 typedef struct zt_params @@ -1125,7 +1093,7 @@ struct zt_chan { /* Is echo cancellation enabled or disabled */ int echocancel; - echo_can_state_t *ec; + struct echo_can_state *ec; echo_can_disable_detector_state_t txecdis; echo_can_disable_detector_state_t rxecdis; |