[svn-commits] trunk - r873 /trunk/wctdm24xxp.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Dec 22 16:49:55 CST 2005


Author: kpfleming
Date: Thu Dec 22 16:49:53 2005
New Revision: 873

URL: http://svn.digium.com/view/zaptel?rev=873&view=rev
Log:
adjust input/output signals from FXO modules that were too high

Modified:
    trunk/wctdm24xxp.c

Modified: trunk/wctdm24xxp.c
URL: http://svn.digium.com/view/zaptel/trunk/wctdm24xxp.c?rev=873&r1=872&r2=873&view=diff
==============================================================================
--- trunk/wctdm24xxp.c (original)
+++ trunk/wctdm24xxp.c Thu Dec 22 16:49:53 2005
@@ -33,7 +33,7 @@
 #include "proslic.h"
 #include "wctdm.h"
 
-/* Uncomment to enable VPM support */
+/* Comment to disable VPM support */
 #define VPM_SUPPORT
 
 #ifdef VPM_SUPPORT
@@ -1816,6 +1816,15 @@
 		       (wctdm_getreg(wc, card, 13) >> 2) & 0xf);
 	/* Enable on-hook line monitor */
 	wctdm_setreg(wc, card, 5, 0x08);
+	
+	/* Apply negative Tx gain of 4.5db to DAA */
+	wctdm_setreg(wc, card, 38, 0x14);	/* 4db */
+	wctdm_setreg(wc, card, 40, 0x15);	/* 0.5db */
+
+	/* Apply negative Rx gain of 4.5db to DAA */
+	wctdm_setreg(wc, card, 39, 0x14);	/* 4db */
+	wctdm_setreg(wc, card, 41, 0x15);	/* 0.5db */
+	
 	return 0;
 		
 }
@@ -2031,7 +2040,7 @@
 	struct wctdm_echo_coefs echoregs;
 	struct wctdm *wc = chan->pvt;
 	int x;
-	int j;
+
 #if 0
 	/* XXX */
 	printk("RxInts: %d, TxInts: %d\n", wc->rxints, wc->txints);
@@ -2145,17 +2154,17 @@
 		break;
 #ifdef VPM_SUPPORT
 	case ZT_TONEDETECT:
-		if (get_user(j, (int *)data))
+		if (get_user(x, (int *) data))
 			return -EFAULT;
 		if (!wc->vpm)
 			return -ENOSYS;
-		if (j && !vpmdtmfsupport)
+		if (x && !vpmdtmfsupport)
 			return -ENOSYS;
-		if (j & ZT_TONEDETECT_ON)
+		if (x & ZT_TONEDETECT_ON)
 			wc->dtmfmask |= (1 << (chan->chanpos - 1));
 		else
 			wc->dtmfmask &= ~(1 << (chan->chanpos - 1));
-		if (j & ZT_TONEDETECT_MUTE)
+		if (x & ZT_TONEDETECT_MUTE)
 			wc->dtmfmutemask |= (1 << (chan->chanpos - 1));
 		else
 			wc->dtmfmutemask &= ~(1 << (chan->chanpos - 1));



More information about the svn-commits mailing list