[zaptel-commits] mattf: trunk r2854 - in /trunk: ./ wctdm24xxp/base.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Thu Aug 16 12:09:22 CDT 2007


Author: mattf
Date: Thu Aug 16 12:09:22 2007
New Revision: 2854

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2854
Log:
Merged revisions 2853 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.4

................
r2853 | mattf | 2007-08-16 12:05:26 -0500 (Thu, 16 Aug 2007) | 9 lines

Merged revisions 2852 via svnmerge from 
https://origsvn.digium.com/svn/zaptel/branches/1.2

........
r2852 | mattf | 2007-08-16 12:01:18 -0500 (Thu, 16 Aug 2007) | 1 line

Make sure the gain adjustment is only done if the VPM100M is present
........

................

Modified:
    trunk/   (props changed)
    trunk/wctdm24xxp/base.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/wctdm24xxp/base.c
URL: http://svn.digium.com/view/zaptel/trunk/wctdm24xxp/base.c?view=diff&rev=2854&r1=2853&r2=2854
==============================================================================
--- trunk/wctdm24xxp/base.c (original)
+++ trunk/wctdm24xxp/base.c Thu Aug 16 12:09:22 2007
@@ -2035,15 +2035,6 @@
 	/* 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 */
-
-	
 	/* Take values for fxotxgain and fxorxgain and apply them to module */
 	if (fxotxgain) {
 		if (fxotxgain >=  -150 && fxotxgain < 0) {
@@ -3773,6 +3764,20 @@
 		wc->vpm = 2;
 	else
 		wc->vpm = 1;
+
+	printk("Enabling VPM100 gain adjustments on any FXO ports found\n");
+	for (i = 0; i < wc->type; i++) {
+		if (wc->modtype[i] == MOD_TYPE_FXO) {
+			/* Apply negative Tx gain of 4.5db to DAA */
+			wctdm_setreg(wc, i, 38, 0x14);	/* 4db */
+			wctdm_setreg(wc, i, 40, 0x15);	/* 0.5db */
+
+			/* Apply negative Rx gain of 4.5db to DAA */
+			wctdm_setreg(wc, i, 39, 0x14);	/* 4db */
+			wctdm_setreg(wc, i, 41, 0x15);	/* 0.5db */
+		}
+	}
+
 }
 
 #endif




More information about the zaptel-commits mailing list