[aadk-commits] dbailey: uClinux/trunk r326 - /uClinux/trunk/uClinux-dist/linux-2.6.x/drivers...

aadk-commits at lists.digium.com aadk-commits at lists.digium.com
Sat Apr 7 11:51:06 MST 2007


Author: dbailey
Date: Sat Apr  7 13:51:04 2007
New Revision: 326

URL: http://svn.digium.com/view/aadk?view=rev&rev=326
Log:
Modified the debounce counts for detecting on/off hook so Caller ID could be captured

Modified:
    uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c

Modified: uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c
URL: http://svn.digium.com/view/aadk/uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c?view=diff&rev=326&r1=325&r2=326
==============================================================================
--- uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c (original)
+++ uClinux/trunk/uClinux-dist/linux-2.6.x/drivers/zaptel/sx00i.c Sat Apr  7 13:51:04 2007
@@ -1003,7 +1003,7 @@
 	if (!wc->mods[card].fxo.offhook) {
 		res = wc->reg0shadow[card];	/* Hook/Ring state */
 		if ((res & 0x60) && wc->mods[card].fxo.battery) {
-			wc->mods[card].fxo.ringdebounce += (ZT_CHUNKSIZE * 4);
+			wc->mods[card].fxo.ringdebounce += (ZT_CHUNKSIZE * 32);
 			if (wc->mods[card].fxo.ringdebounce >= ZT_CHUNKSIZE * 64) {
 				if (!wc->mods[card].fxo.wasringing) {
 					wc->mods[card].fxo.wasringing = 1;
@@ -1015,7 +1015,7 @@
 				wc->mods[card].fxo.ringdebounce = ZT_CHUNKSIZE * 64;
 			}
 		} else {
-			wc->mods[card].fxo.ringdebounce -= ZT_CHUNKSIZE;
+			wc->mods[card].fxo.ringdebounce -= (ZT_CHUNKSIZE * 8);
 			if (wc->mods[card].fxo.ringdebounce <= 0) {
 				if (wc->mods[card].fxo.wasringing) {
 					wc->mods[card].fxo.wasringing = 0;
@@ -1126,14 +1126,14 @@
 	hook = (res & 1);
 		
 	if (hook != wc->mods[card].fxs.lastrxhook) {
-		/* Reset the debounce (must be multiple of 4ms) */
-		wc->mods[card].fxs.debounce = 8 * (4 * 8);
+		/* Reset the debounce (must be multiple of 8ms) */
+		wc->mods[card].fxs.debounce = (32 * ZT_CHUNKSIZE);
 #if 0
 		printk("Resetting debounce card %d hook %d, %d\n", card, hook, wc->mods[card].fxs.debounce);
 #endif
 	} else {
 		if (wc->mods[card].fxs.debounce > 0) {
-			wc->mods[card].fxs.debounce-= 4 * ZT_CHUNKSIZE;
+			wc->mods[card].fxs.debounce-= (8 * ZT_CHUNKSIZE);
 #if 0
 			printk("Sustaining hook %d, %d\n", hook, wc->mods[card].fxs.debounce);
 #endif



More information about the aadk-commits mailing list