summaryrefslogtreecommitdiff
path: root/wctdm24xxp
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-11-06 21:14:12 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-11-06 21:14:12 +0000
commit9b38b9202f3af41e638866e1d280383fd8e5d42b (patch)
tree2ed73407124fb454cea62ab2f5acfdaf5f510fd6 /wctdm24xxp
parentc476a522d26f83dba9d833145a83fd5debc9520d (diff)
Merged revisions 3215 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r3215 | mattf | 2007-11-06 15:13:09 -0600 (Tue, 06 Nov 2007) | 1 line Cross port fxo line voltage monitoring patch from wctdm to wctdm24xxp ........ git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3216 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm24xxp')
-rw-r--r--wctdm24xxp/base.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wctdm24xxp/base.c b/wctdm24xxp/base.c
index 63eae84..f951eb4 100644
--- a/wctdm24xxp/base.c
+++ b/wctdm24xxp/base.c
@@ -262,6 +262,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;
@@ -1330,6 +1331,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
@@ -4192,6 +4201,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);
@@ -4216,6 +4226,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");