diff options
author | sruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-04-03 20:04:09 +0000 |
---|---|---|
committer | sruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-04-03 20:04:09 +0000 |
commit | 78ba1b383b6caae696d7881290de9a3f252aafd8 (patch) | |
tree | 48aa3fa897b3ac24aa1e23b33cc6de5ce4492832 /wctdm.c | |
parent | 97f7651c9572dc6807bafcfa793925035abc5847 (diff) |
svn merge -r 3010:3011 https://origsvn.digium.com/svn/zaptel/branches/1.4
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@4126 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm.c')
-rw-r--r-- | wctdm.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -247,12 +247,13 @@ static struct fxo_mode { #define FLAG_WRITE 1 #define FLAG_READ 2 +#define DEFAULT_RING_DEBOUNCE 64 /* Ringer Debounce (64 ms) */ + /* the constants below control the 'debounce' periods enforced by the check_hook routines; these routines are called once every 4 interrupts (the interrupt cycles around the four modules), so the periods are specified in _4 millisecond_ increments */ -#define RING_DEBOUNCE 4 /* Ringer Debounce (64 ms) */ #define DEFAULT_BATT_DEBOUNCE 4 /* Battery debounce (64 ms) */ #define POLARITY_DEBOUNCE 4 /* Polarity debounce (64 ms) */ #define DEFAULT_BATT_THRESH 3 /* Anything under this is "no battery" */ @@ -364,6 +365,7 @@ static void wctdm_release(struct wctdm *wc); static int battdebounce = DEFAULT_BATT_DEBOUNCE; static int battthresh = DEFAULT_BATT_THRESH; +static int ringdebounce = DEFAULT_RING_DEBOUNCE; static int debug = 0; static int robust = 0; static int timingonly = 0; @@ -853,14 +855,14 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card) res = wc->reg0shadow[card]; if ((res & 0x60) && wc->mod[card].fxo.battery) { wc->mod[card].fxo.ringdebounce += (ZT_CHUNKSIZE * 16); - if (wc->mod[card].fxo.ringdebounce >= ZT_CHUNKSIZE * 64) { + if (wc->mod[card].fxo.ringdebounce >= ZT_CHUNKSIZE * ringdebounce) { if (!wc->mod[card].fxo.wasringing) { wc->mod[card].fxo.wasringing = 1; zt_hooksig(&wc->chans[card], ZT_RXSIG_RING); if (debug) printk("RING on %d/%d!\n", wc->span.spanno, card + 1); } - wc->mod[card].fxo.ringdebounce = ZT_CHUNKSIZE * 64; + wc->mod[card].fxo.ringdebounce = ZT_CHUNKSIZE * ringdebounce; } } else { wc->mod[card].fxo.ringdebounce -= ZT_CHUNKSIZE * 4; @@ -2403,6 +2405,7 @@ module_param(fastringer, int, 0600); module_param(fxshonormode, int, 0600); module_param(battdebounce, int, 0600); module_param(battthresh, int, 0600); +module_param(ringdebounce, int, 0600); module_param(alawoverride, int, 0600); #else MODULE_PARM(debug, "i"); @@ -2418,6 +2421,7 @@ MODULE_PARM(fastringer, "i"); MODULE_PARM(fxshonormode, "i"); MODULE_PARM(battdebounce, "i"); MODULE_PARM(battthresh, "i"); +MODULE_PARM(ringdebounce, "i"); MODULE_PARM(alawoverride, "i"); #endif MODULE_DESCRIPTION("Wildcard TDM400P Zaptel Driver"); |