From 74f560448b9d08a40a5b10c73afa33908d22a6a5 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Thu, 22 Apr 2010 13:28:43 +0000 Subject: Configurable debounce to support old rotary phones (closes issue #16339) Reported by: alecdavis Patches: 20091129__issue16339.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8556 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wctdm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/dahdi/wctdm.c') diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c index 3ab575f..1160686 100644 --- a/drivers/dahdi/wctdm.c +++ b/drivers/dahdi/wctdm.c @@ -295,6 +295,8 @@ static unsigned int battdebounce; static unsigned int battalarm; static unsigned int battthresh; static int ringdebounce = DEFAULT_RING_DEBOUNCE; +/* times 4, because must be a multiple of 4ms: */ +static int dialdebounce = 8 * 8; static int fwringdetect = 0; static int debug = 0; static int robust = 0; @@ -1015,7 +1017,7 @@ static inline void wctdm_proslic_check_hook(struct wctdm *wc, int card) hook = (res & 1); if (hook != fxs->lastrxhook) { /* Reset the debounce (must be multiple of 4ms) */ - fxs->debounce = 8 * (4 * 8); + fxs->debounce = dialdebounce * 4; #if 0 printk(KERN_DEBUG "Resetting debounce card %d hook %d, %d\n", card, hook, fxs->debounce); @@ -2812,6 +2814,7 @@ module_param(battdebounce, uint, 0600); module_param(battalarm, uint, 0600); module_param(battthresh, uint, 0600); module_param(ringdebounce, int, 0600); +module_param(dialdebounce, int, 0600); module_param(fwringdetect, int, 0600); module_param(alawoverride, int, 0600); module_param(fastpickup, int, 0600); -- cgit v1.2.3