diff options
author | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-11-06 21:13:09 +0000 |
---|---|---|
committer | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-11-06 21:13:09 +0000 |
commit | fbebb285f6e2dc3cc3f3eed42b5ca1e82e263566 (patch) | |
tree | c23aa2f6a2697ace7a4d6b2ed49207e68bae5e02 /wctdm24xxp | |
parent | ebfa391bb98078c551439c6357bde687d0c1b6ee (diff) |
Cross port fxo line voltage monitoring patch from wctdm to wctdm24xxp
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3215 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm24xxp')
-rw-r--r-- | wctdm24xxp/base.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/wctdm24xxp/base.c b/wctdm24xxp/base.c index a9b7302..5101395 100644 --- a/wctdm24xxp/base.c +++ b/wctdm24xxp/base.c @@ -256,6 +256,7 @@ spinlock_t ifacelock = SPIN_LOCK_UNLOCKED; static void wctdm_release(struct wctdm *wc); +static int fxovoltage = 0; static int battdebounce = DEFAULT_BATT_DEBOUNCE; static int battthresh = DEFAULT_BATT_THRESH; static int debug = 0; @@ -1219,6 +1220,14 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card) } } b = wc->cmdq[card].isrshadow[1]; /* Voltage */ + + if (fxovoltage) { + if (!(wc->intcount % 100)) { + printk("Port %d: Voltage: %d Debounce %d\n", card + 1, + b, wc->mods[card].fxo.battdebounce); + } + } + if (abs(b) < battthresh) { wc->mods[card].fxo.nobatttimer++; #if 0 @@ -3593,6 +3602,7 @@ static void __exit wctdm_cleanup(void) #ifdef LINUX26 module_param(debug, int, 0600); +module_param(fxovoltage, int, 0600); module_param(loopcurrent, int, 0600); module_param(robust, int, 0600); module_param(_opermode, int, 0600); @@ -3611,6 +3621,7 @@ module_param(dtmfthreshold, int, 0600); #endif #else MODULE_PARM(debug, "i"); +MODULE_PARM(fxovoltage, "i"); MODULE_PARM(loopcurrent, "i"); MODULE_PARM(robust, "i"); MODULE_PARM(_opermode, "i"); |