summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-06-29 19:53:52 +0000
committerShaun Ruffell <sruffell@digium.com>2011-06-29 19:53:52 +0000
commit1aa4b05da2bf4afc4ced71e897dad63c87b03c8d (patch)
treef98534729a18fe7692ceefcbbc39c2b2b6a6e659 /drivers/dahdi/wctdm24xxp
parentf74b496ea631869522605153651d0c2304f33a34 (diff)
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@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10006 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp')
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 699a294..5570602 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -233,6 +233,7 @@ static char *opermode = "FCC";
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_init_voicedaa(struct wctdm *wc, struct wctdm_module *mod,
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 @@ static int __init wctdm_init(void)
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 @@ static void __exit wctdm_cleanup(void)
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);