[svn-commits] sruffell: linux/trunk r10006 - /linux/trunk/drivers/dahdi/wctdm24xxp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 29 14:53:56 CDT 2011


Author: sruffell
Date: Wed Jun 29 14:53:52 2011
New Revision: 10006

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10006
Log:
wctdm24xxp: Add 'fastpick' module parameter.

When true / 1 the FXO port will use a shorter off-hook calibration
delay. This is sometimes necessary in order to properly decode Type-II
Caller ID information which is sent shortly after an FXO port goes off
hook.

Defaults to 0 unless opermode is "JAPAN" then it will default to 1. This
functionality was ported from the wctdm.c driver.

DAHDI-854.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=10006&r1=10005&r2=10006
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Wed Jun 29 14:53:52 2011
@@ -233,6 +233,7 @@
 static int fxshonormode = 0;
 static int alawoverride = 0;
 static char *companding = "auto";
+static int fastpickup = -1; /* -1 auto, 0 no, 1 yes */
 static int fxotxgain = 0;
 static int fxorxgain = 0;
 static int fxstxgain = 0;
@@ -2869,7 +2870,8 @@
 	wctdm_setreg(wc, mod, 30, reg30);
 
 	/* Misc. DAA parameters */
-	reg31 = 0xa3;
+	reg32 = (fastpickup) ? 0xb3 : 0xa3;
+
 	reg31 |= (fxo_modes[_opermode].ohs2 << 3);
 	wctdm_setreg(wc, mod, 31, reg31);
 
@@ -5671,6 +5673,13 @@
 		fxshonormode = 1;
 	}
 
+	if (-1 == fastpickup) {
+		if (!strcmp(opermode, "JAPAN"))
+			fastpickup = 1;
+		else
+			fastpickup = 0;
+	}
+
 	/* for the voicedaa_check_hook defaults, if the user has not overridden
 	   them by specifying them as module parameters, then get the values
 	   from the selected operating mode
@@ -5704,6 +5713,12 @@
 
 
 module_param(debug, int, 0600);
+module_param(fastpickup, int, 0400);
+MODULE_PARM_DESC(fastpickup,
+		 "Set to 1 to shorten the calibration delay when taking " \
+		 "an FXO port off hook. This can be required for Type-II " \
+		 "CID. If -1 the calibration delay will depend on the " \
+		 "current opermode.\n");
 module_param(fxovoltage, int, 0600);
 module_param(loopcurrent, int, 0600);
 module_param(reversepolarity, int, 0600);




More information about the svn-commits mailing list