diff options
author | dbailey <dbailey@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-08-13 20:51:31 +0000 |
---|---|---|
committer | dbailey <dbailey@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-08-13 20:51:31 +0000 |
commit | b595c2b756ad36fd12005317bd283f83e4ac811a (patch) | |
tree | 2ee5dedf9667e58e5a5f6443ad6ddb519a0a0629 /kernel/wctdm24xxp/base.c | |
parent | 29c38b862560126b6bd9150838be7c422f4f321d (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
Diffstat (limited to 'kernel/wctdm24xxp/base.c')
-rw-r--r-- | kernel/wctdm24xxp/base.c | 8 |
1 files changed, 4 insertions, 4 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 && |