[Asterisk-cvs] zaptel mec.h,1.1.1.1,1.2 sec-2.h,1.1.1.1,1.2 sec.h,1.1.1.1,1.2

martinp at lists.digium.com martinp at lists.digium.com
Fri Nov 7 18:29:14 CST 2003


Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv24084

Modified Files:
	mec.h sec-2.h sec.h 
Log Message:
Add training routine to other EC


Index: mec.h
===================================================================
RCS file: /usr/cvsroot/zaptel/mec.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- mec.h	12 Feb 2003 13:59:20 -0000	1.1.1.1
+++ mec.h	8 Nov 2003 00:55:26 -0000	1.2
@@ -292,4 +292,17 @@
 	return suppr;
 }
 
+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->hangt = NUM_TAPS << 1;
+	if (pos >= NUM_TAPS)
+		return 1;
+	ec->a[pos] = val << 17;
+	if (++pos >= NUM_TAPS)
+		return 1;
+	return 0;
+}
+
 #endif

Index: sec-2.h
===================================================================
RCS file: /usr/cvsroot/zaptel/sec-2.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- sec-2.h	12 Feb 2003 13:59:20 -0000	1.1.1.1
+++ sec-2.h	8 Nov 2003 00:55:26 -0000	1.2
@@ -410,6 +410,21 @@
     return clean_rx;
 }
 /*- End of function --------------------------------------------------------*/
-/*- End of file ------------------------------------------------------------*/
 #endif
+
+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->nonupdate_dwell = ec->taps << 1;
+	if (pos >= ec->taps)
+		return 1;
+	ec->fir_taps32[pos] = val << 17;
+	ec->fir_taps16[pos] = val << 1;
+	if (++pos >= ec->taps)
+		return 1;
+	return 0;
+}
+
+/*- End of file ------------------------------------------------------------*/
 #endif

Index: sec.h
===================================================================
RCS file: /usr/cvsroot/zaptel/sec.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- sec.h	12 Feb 2003 13:59:20 -0000	1.1.1.1
+++ sec.h	8 Nov 2003 00:55:26 -0000	1.2
@@ -267,5 +267,20 @@
     return clean_rx;
 }
 /*- End of function --------------------------------------------------------*/
+
+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->nonupdate_dwell = ec->taps << 1;
+	if (pos >= ec->taps)
+		return 1;
+	ec->fir_taps[pos] = val << 17;
+	ec->fir_taps_short[pos] = val << 1;
+	if (++pos >= ec->taps)
+		return 1;
+	return 0;
+}
+
 /*- End of file ------------------------------------------------------------*/
 #endif




More information about the svn-commits mailing list