[zaptel-commits] branch kpfleming/version-tag - commit revision 870

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Fri Dec 16 20:29:38 CST 2005


Author: kpfleming
Date: Fri Dec 16 20:29:37 2005
New Revision: 870

URL: http://svn.digium.com/view/zaptel?rev=870&view=rev
Log:
update to trunk

Modified:
    team/kpfleming/version-tag/   (props changed)
    team/kpfleming/version-tag/Makefile
    team/kpfleming/version-tag/kb1ec.h
    team/kpfleming/version-tag/mec.h
    team/kpfleming/version-tag/mec2.h
    team/kpfleming/version-tag/mec3-float.h
    team/kpfleming/version-tag/mec3.h
    team/kpfleming/version-tag/mg2ec.h
    team/kpfleming/version-tag/sec-2.h
    team/kpfleming/version-tag/sec.h
    team/kpfleming/version-tag/zaptel.c
    team/kpfleming/version-tag/zaptel.h

Propchange: team/kpfleming/version-tag/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Dec 16 20:29:37 2005
@@ -1,1 +1,1 @@
-/trunk:1-864
+/trunk:1-869

Modified: team/kpfleming/version-tag/Makefile
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/Makefile?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/Makefile (original)
+++ team/kpfleming/version-tag/Makefile Fri Dec 16 20:29:37 2005
@@ -228,7 +228,7 @@
 
 zaptel.c: tones.h 
 
-prereq: tones.h tor2fw.h radfw.h
+prereq: tones.h tor2fw.h radfw.h version.h
 
 zttool.o: zttool.c zaptel.h
 

Modified: team/kpfleming/version-tag/kb1ec.h
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/kb1ec.h?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/kb1ec.h (original)
+++ team/kpfleming/version-tag/kb1ec.h Fri Dec 16 20:29:37 2005
@@ -74,7 +74,7 @@
 } 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 @@
 	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 @@
 	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 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 @@
 	return u;
 }
 
-static inline echo_can_state_t *echo_can_create(int len, int adaption_mode)
-{
-	echo_can_state_t *ec;
+static inline struct echo_can_state *echo_can_create(int len, int adaption_mode)
+{
+	struct echo_can_state *ec;
 	int maxy;
 	int maxu;
 	maxy = len + DEFAULT_M;
@@ -528,7 +528,7 @@
 		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 @@
 									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 @@
 	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 

Modified: team/kpfleming/version-tag/mec.h
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/mec.h?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/mec.h (original)
+++ team/kpfleming/version-tag/mec.h Fri Dec 16 20:29:37 2005
@@ -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 @@
 
 	int lastmax;			/* Optimize maximum search */
 	int maxTy;			/* Maximum Ty */
-} echo_can_state_t;
+};
 
 #define INLINE inline
 
@@ -98,11 +98,11 @@
 #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 @@
 #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 @@
 	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 */

Modified: team/kpfleming/version-tag/mec2.h
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/mec2.h?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/mec2.h (original)
+++ team/kpfleming/version-tag/mec2.h Fri Dec 16 20:29:37 2005
@@ -51,7 +51,7 @@
 
 // class definition
 //
-typedef struct  {
+struct echo_can_state {
   /* Echo canceller definition */
 
   /* absolute time */
@@ -86,7 +86,7 @@
   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 @@
 	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 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 @@
   return u;
 }
 
-static inline echo_can_state_t *echo_can_create(int len, int adaption_mode)
-{
-	echo_can_state_t *ec;
+static inline struct echo_can_state *echo_can_create(int len, int adaption_mode)
+{
+	struct echo_can_state *ec;
 	int maxy;
 	int maxu;
 	maxy = len + DEFAULT_M;
@@ -383,7 +383,7 @@
 		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 @@
 									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 @@
 	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 */

Modified: team/kpfleming/version-tag/mec3-float.h
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/mec3-float.h?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/mec3-float.h (original)
+++ team/kpfleming/version-tag/mec3-float.h Fri Dec 16 20:29:37 2005
@@ -63,7 +63,7 @@
 	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 @@
 	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 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 @@
 	return (short)(u);
 }
 
-static inline echo_can_state_t *echo_can_create(int taps, int adaption_mode)
-{
-	echo_can_state_t *ec;
+static inline struct echo_can_state *echo_can_create(int taps, int adaption_mode)
+{
+	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;

Modified: team/kpfleming/version-tag/mec3.h
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/mec3.h?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/mec3.h (original)
+++ team/kpfleming/version-tag/mec3.h Fri Dec 16 20:29:37 2005
@@ -69,7 +69,7 @@
 	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 @@
 	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 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 @@
 	return u;
 }
 
-static inline echo_can_state_t *echo_can_create(int taps, int adaption_mode)
-{
-	echo_can_state_t *ec;
+static inline struct echo_can_state *echo_can_create(int taps, int adaption_mode)
+{
+	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 @@
 	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 */

Modified: team/kpfleming/version-tag/mg2ec.h
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/mg2ec.h?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/mg2ec.h (original)
+++ team/kpfleming/version-tag/mg2ec.h Fri Dec 16 20:29:37 2005
@@ -76,7 +76,7 @@
 } 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 @@
 	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 @@
 	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 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 @@
 	return u;
 }
 
-static inline echo_can_state_t *echo_can_create(int len, int adaption_mode)
-{
-	echo_can_state_t *ec;
+static inline struct echo_can_state *echo_can_create(int len, int adaption_mode)
+{
+	struct echo_can_state *ec;
 	int maxy;
 	int maxu;
 	maxy = len + DEFAULT_M;
@@ -569,7 +569,7 @@
 		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 @@
 									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 @@
 	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 

Modified: team/kpfleming/version-tag/sec-2.h
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/sec-2.h?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/sec-2.h (original)
+++ team/kpfleming/version-tag/sec-2.h Fri Dec 16 20:29:37 2005
@@ -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 @@
     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 @@
 /* #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)
-{
-    echo_can_state_t *ec;
+static inline struct echo_can_state *echo_can_create(int len, int adaption_mode)
+{
+    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 @@
 }
 /*- 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 @@
 }
 
 #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 @@
 /*- 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 */

Modified: team/kpfleming/version-tag/sec.h
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/sec.h?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/sec.h (original)
+++ team/kpfleming/version-tag/sec.h Fri Dec 16 20:29:37 2005
@@ -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 @@
     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 @@
 #define MIN_RX_POWER_FOR_ADAPTION   64
 */
 
-static inline echo_can_state_t *echo_can_create(int len, int adaption_mode)
-{
-    echo_can_state_t *ec;
+static inline struct echo_can_state *echo_can_create(int len, int adaption_mode)
+{
+    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 @@
 }
 /*- 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 @@
 }
 /*- 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 */

Modified: team/kpfleming/version-tag/zaptel.c
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/zaptel.c?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/zaptel.c (original)
+++ team/kpfleming/version-tag/zaptel.c Fri Dec 16 20:29:37 2005
@@ -87,6 +87,38 @@
 
 #ifdef LINUX26
 #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 */
@@ -932,7 +964,7 @@
 {
 	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 @@
 	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 @@
 	int ret;
 	int oldconf;
 	void *rxgain=NULL;
-	echo_can_state_t *ec, *tec;
+	struct echo_can_state *ec, *tec;
 
 	if (!chan)
 		return -ENOSYS;

Modified: team/kpfleming/version-tag/zaptel.h
URL: http://svn.digium.com/view/zaptel/team/kpfleming/version-tag/zaptel.h?rev=870&r1=869&r2=870&view=diff
==============================================================================
--- team/kpfleming/version-tag/zaptel.h (original)
+++ team/kpfleming/version-tag/zaptel.h Fri Dec 16 20:29:37 2005
@@ -150,38 +150,6 @@
 #define ZT_POLICY_WHEN_FULL  1		/* Start play/record when buffer is full */
 
 #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
 
@@ -1125,7 +1093,7 @@
 
 	/* 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;
 	



More information about the zaptel-commits mailing list