[aadk-commits] kpfleming: uClinux/trunk r527 - /uClinux/trunk/uClinux-dist/linux-2.6.x/drive...

SVN commits to the AADK repository aadk-commits at lists.digium.com
Thu Jul 19 11:00:35 CDT 2007


Author: kpfleming
Date: Thu Jul 19 11:00:35 2007
New Revision: 527

URL: http://svn.digium.com/view/aadk?view=rev&rev=527
Log:
switch the registers that fxotxgain and fxorxgain modify, so that TX and RX match what the rest of Zaptel defines them to be

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=527&r1=526&r2=527
==============================================================================
--- 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 Thu Jul 19 11:00:35 2007
@@ -393,8 +393,8 @@
 static int fxshonormode = 0;
 static int alawoverride = 0;
 static int fxo_addrs[4] = { 0x00, 0x08, 0x04, 0x0c };
-static int fxotxgain = -45;	/* -4.5 dB to satsify the VPM */
-static int fxorxgain = -45;
+static int fxotxgain = 0;
+static int fxorxgain = 0;
 /* static int csmap[4] = { 0x0400, 0x0040, 0x0020, 0x0010 }; */
 static int csmap[4] = { 0x0100, 0x0040, 0x0020, 0x0010 };
 #ifdef VPM_SUPPORT
@@ -1730,21 +1730,21 @@
 	sx00_setreg(wc, card, 5, 0x08);
 
 	/* Take values for fxotxgain and fxorxgain and apply them to module */
+	if (fxorxgain >=  -150 && fxorxgain < 0) {
+		sx00_setreg(wc, card, 38, 16 + (fxorxgain/-10));
+		sx00_setreg(wc, card, 40, 16 + (-fxorxgain%10));
+	}
+	else if (fxorxgain <= 120 && fxorxgain >= 0) {
+		sx00_setreg(wc, card, 38, fxorxgain/10);
+		sx00_setreg(wc, card, 40, (fxorxgain%10));
+	}
 	if (fxotxgain >=  -150 && fxotxgain < 0) {
-		sx00_setreg(wc, card, 38, 16 + (fxotxgain/-10));
-		sx00_setreg(wc, card, 40, 16 + (-fxotxgain%10));
+		sx00_setreg(wc, card, 39, 16+ (fxotxgain/-10));
+		sx00_setreg(wc, card, 41, 16 + (-fxotxgain%10));
 	}
 	else if (fxotxgain <= 120 && fxotxgain >= 0) {
-		sx00_setreg(wc, card, 38, fxotxgain/10);
-		sx00_setreg(wc, card, 40, (fxotxgain%10));
-	}
-	if (fxorxgain >=  -150 && fxorxgain < 0) {
-		sx00_setreg(wc, card, 39, 16+ (fxorxgain/-10));
-		sx00_setreg(wc, card, 41, 16 + (-fxorxgain%10));
-	}
-	else if (fxorxgain <= 120 && fxorxgain >= 0) {
-		sx00_setreg(wc, card, 39, fxorxgain/10);
-		sx00_setreg(wc, card, 41, (fxorxgain%10));
+		sx00_setreg(wc, card, 39, fxotxgain/10);
+		sx00_setreg(wc, card, 41, (fxotxgain%10));
 	}
 
 	return 0;
@@ -2857,6 +2857,3 @@
 
 module_init(sx00_init);
 module_exit(sx00_cleanup);
-
-
-




More information about the aadk-commits mailing list