[svn-commits] russell: branch 1.4 r3012 - in /branches/1.4/wctdm24xxp: base.c wctdm24xxp.h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Sep 11 13:10:58 CDT 2007


Author: russell
Date: Tue Sep 11 13:10:58 2007
New Revision: 3012

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3012
Log:
After committing the patch to make ringdebounce a module parameter in wctdm, I
went ahead and made the same change to wctdm24xxp.

*** Note that there is a discrepancy here.  wctdm uses 64 ms as the default ring
    debounce value while this module uses 128 ms.  I'm not sure which one is more
	appropriate, but they should certainly default to the same thing.

Modified:
    branches/1.4/wctdm24xxp/base.c
    branches/1.4/wctdm24xxp/wctdm24xxp.h

Modified: branches/1.4/wctdm24xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.4/wctdm24xxp/base.c?view=diff&rev=3012&r1=3011&r2=3012
==============================================================================
--- branches/1.4/wctdm24xxp/base.c (original)
+++ branches/1.4/wctdm24xxp/base.c Tue Sep 11 13:10:58 2007
@@ -283,6 +283,7 @@
 static int fxstxgain = 0;
 static int fxsrxgain = 0;
 static int nativebridge = 1;
+static int ringdebounce = DEFAULT_RING_DEBOUNCE;
 #ifdef VPM_SUPPORT
 static int vpmsupport = 1;
 static int vpmdtmfsupport = 0;
@@ -1300,14 +1301,14 @@
 		res = wc->cmdq[card].isrshadow[0];	/* Hook/Ring state */
 		if ((res & 0x60) && wc->mods[card].fxo.battery) {
 			wc->mods[card].fxo.ringdebounce += (ZT_CHUNKSIZE * 4);
-			if (wc->mods[card].fxo.ringdebounce >= ZT_CHUNKSIZE * RING_DEBOUNCE) {
+			if (wc->mods[card].fxo.ringdebounce >= ZT_CHUNKSIZE * ringdebounce) {
 				if (!wc->mods[card].fxo.wasringing) {
 					wc->mods[card].fxo.wasringing = 1;
 					zt_hooksig(&wc->chans[card], ZT_RXSIG_RING);
 					if (debug & DEBUG_CARD)
 						printk("RING on %d/%d!\n", wc->span.spanno, card + 1);
 				}
-				wc->mods[card].fxo.ringdebounce = ZT_CHUNKSIZE * RING_DEBOUNCE;
+				wc->mods[card].fxo.ringdebounce = ZT_CHUNKSIZE * ringdebounce;
 			}
 		} else {
 			wc->mods[card].fxo.ringdebounce -= ZT_CHUNKSIZE;
@@ -4196,6 +4197,7 @@
 module_param(fxorxgain, int, 0600);
 module_param(fxstxgain, int, 0600);
 module_param(fxsrxgain, int, 0600);
+module_param(ringdebounce, int, 0600);
 #ifdef VPM_SUPPORT
 module_param(vpmsupport, int, 0600);
 module_param(vpmdtmfsupport, int, 0600);
@@ -4219,6 +4221,7 @@
 MODULE_PARM(fxorxgain, "i");
 MODULE_PARM(fxstxgain, "i");
 MODULE_PARM(fxsrxgain, "i");
+MODULE_PARM(ringdebounce, "i");
 #ifdef VPM_SUPPORT
 MODULE_PARM(vpmsupport, "i");
 MODULE_PARM(vpmdtmfsupport, "i");

Modified: branches/1.4/wctdm24xxp/wctdm24xxp.h
URL: http://svn.digium.com/view/zaptel/branches/1.4/wctdm24xxp/wctdm24xxp.h?view=diff&rev=3012&r1=3011&r2=3012
==============================================================================
--- branches/1.4/wctdm24xxp/wctdm24xxp.h (original)
+++ branches/1.4/wctdm24xxp/wctdm24xxp.h Tue Sep 11 13:10:58 2007
@@ -8,7 +8,13 @@
 
 #define WC_MAX_IFACES 128
 
-#define RING_DEBOUNCE	128		/* Ringer Debounce (in ms) */
+/*!
+ * \brief Default ringer debounce (in ms)
+ *
+ * \todo This value differs from that in wctdm.  In that module, it is 64 ms
+ *       instead of 128 ms.  Which one is more appropriate?
+ */
+#define DEFAULT_RING_DEBOUNCE	128
 #define DEFAULT_BATT_DEBOUNCE	64		/* Battery debounce (in ms) */
 #define POLARITY_DEBOUNCE 64           /* Polarity debounce (in ms) */
 #define DEFAULT_BATT_THRESH	3		/* Anything under this is "no battery" */




More information about the svn-commits mailing list