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

SVN commits to the AADK repository aadk-commits at lists.digium.com
Mon Jul 23 13:44:41 CDT 2007


Author: dbailey
Date: Mon Jul 23 13:44:41 2007
New Revision: 538

URL: http://svn.digium.com/view/aadk?view=rev&rev=538
Log:
Reverted the registers used for setting the fxo tx/rx gains on the DAA IC.  

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=538&r1=537&r2=538
==============================================================================
--- 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 Mon Jul 23 13:44:41 2007
@@ -1730,21 +1730,21 @@
 	sx00_setreg(wc, card, 5, 0x08);
 
 	/* Take values for fxotxgain and fxorxgain and apply them to module */
+	if (fxotxgain >=  -150 && fxotxgain < 0) {
+		sx00_setreg(wc, card, 38, 16 + (fxotxgain/-10));
+		sx00_setreg(wc, card, 40, 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, 38, 16 + (fxorxgain/-10));
-		sx00_setreg(wc, card, 40, 16 + (-fxorxgain%10));
+		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, 38, fxorxgain/10);
-		sx00_setreg(wc, card, 40, (fxorxgain%10));
-	}
-	if (fxotxgain >=  -150 && fxotxgain < 0) {
-		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, 39, fxotxgain/10);
-		sx00_setreg(wc, card, 41, (fxotxgain%10));
+		sx00_setreg(wc, card, 39, fxorxgain/10);
+		sx00_setreg(wc, card, 41, (fxorxgain%10));
 	}
 
 	return 0;




More information about the aadk-commits mailing list