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
This commit is contained in:
Shaun Ruffell 2011-06-29 19:53:52 +00:00
parent 59e277ef5a
commit f2c8359d2e
1 changed files with 16 additions and 1 deletions

View File

@ -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);