summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordbailey <dbailey@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-08-13 20:51:31 +0000
committerdbailey <dbailey@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-08-13 20:51:31 +0000
commitb595c2b756ad36fd12005317bd283f83e4ac811a (patch)
tree2ee5dedf9667e58e5a5f6443ad6ddb519a0a0629
parent29c38b862560126b6bd9150838be7c422f4f321d (diff)
clean up a timing issue on debounce of neon mwi detect
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4480 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--kernel/wctdm24xxp/base.c8
-rw-r--r--kernel/wctdm24xxp/wctdm24xxp.h1
2 files changed, 4 insertions, 5 deletions
diff --git a/kernel/wctdm24xxp/base.c b/kernel/wctdm24xxp/base.c
index 1de74da..c92fc67 100644
--- a/kernel/wctdm24xxp/base.c
+++ b/kernel/wctdm24xxp/base.c
@@ -194,8 +194,8 @@ static int ringdebounce = DEFAULT_RING_DEBOUNCE;
static int fwringdetect = 0;
static int latency = VOICEBUS_DEFAULT_LATENCY;
-#define NEONMWI_ON_DEBOUNCE (3)
#define MS_PER_HOOKCHECK (1)
+#define NEONMWI_ON_DEBOUNCE (100/MS_PER_HOOKCHECK)
static int neonmwi_monitor = 0; /* Note: this causes use of full wave ring detect */
static int neonmwi_level = 75; /* neon mwi trip voltage */
@@ -1363,9 +1363,9 @@ static inline void wctdm_voicedaa_check_hook(struct wctdm *wc, int card)
/* Look for neon mwi pulse */
if (neonmwi_monitor && !wc->mods[card].fxo.offhook) {
- /* Look for 4 consecutive voltage readings
- * where the voltage is over the neon limit but
- * does not vary greatly from the last reading
+ /* Look for NEONMWI_ON_DEBOUNCE mS of consecutive voltage readings
+ * where the voltage is over the neon limit butdoes not vary greatly
+ * from the last reading
*/
if (fxo->battery == 1 &&
abs_voltage > neonmwi_level &&
diff --git a/kernel/wctdm24xxp/wctdm24xxp.h b/kernel/wctdm24xxp/wctdm24xxp.h
index bb2830c..b898aa4 100644
--- a/kernel/wctdm24xxp/wctdm24xxp.h
+++ b/kernel/wctdm24xxp/wctdm24xxp.h
@@ -233,7 +233,6 @@ struct wctdm {
int neonmwi_last_voltage;
unsigned int neonmwi_debounce;
unsigned int neonmwi_offcounter;
-
} fxo;
struct fxs {
int oldrxhook;