From fbebb285f6e2dc3cc3f3eed42b5ca1e82e263566 Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 6 Nov 2007 21:13:09 +0000 Subject: 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 --- wctdm24xxp/base.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'wctdm24xxp') 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"); -- cgit v1.2.3