diff options
author | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-09-11 18:10:58 +0000 |
---|---|---|
committer | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-09-11 18:10:58 +0000 |
commit | e629d7e5ea761222b3c086a8a7ea0485646ceae2 (patch) | |
tree | af9cee1d416a0cedc1ab4d2636fa18d73dc7c642 /wctdm24xxp/base.c | |
parent | 1f0a059c7f501eed084f24ef4b51baa4068d6b1c (diff) |
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.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3012 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm24xxp/base.c')
-rw-r--r-- | wctdm24xxp/base.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/wctdm24xxp/base.c b/wctdm24xxp/base.c index c789dc6..c91f3fd 100644 --- a/wctdm24xxp/base.c +++ b/wctdm24xxp/base.c @@ -283,6 +283,7 @@ static int fxorxgain = 0; 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 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card) 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(fxotxgain, int, 0600); 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(fxotxgain, "i"); 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"); |