allow for iq swap on TX side as well
authormatt <matt@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 10 Feb 2008 23:36:53 +0000 (23:36 +0000)
committermatt <matt@221aa14e-8319-0410-a670-987f0aec2ac5>
Sun, 10 Feb 2008 23:36:53 +0000 (23:36 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7626 221aa14e-8319-0410-a670-987f0aec2ac5

gr-usrp/src/db_base.py
gr-usrp/src/usrp.py

index 787d4c3c3fb4f3c1dcdb3741f59c36a884bec5cf..947f815592c952ccb63d71754fefb40d7203a5f0 100644 (file)
@@ -214,7 +214,8 @@ class db_base(object):
 
     def i_and_q_swapped(self):
         """
-        Return True if this is a quadrature device and ADC 0 is Q.
+        Return True if this is a quadrature device and (for RX) ADC 0 is Q
+        or (for TX) DAC 0 is Q
         """
         return False
 
index f149a3ff8e96e76cbd6ebeb754fdc60fe14e8aab..d5eb1d5a2fe1a7594d2b2bb23657c28e2be180e4 100644 (file)
@@ -367,11 +367,15 @@ def determine_tx_mux_value(u, subdev_spec):
     # determine the value manually.
 
     side = subdev_spec[0]  # side A = 0, side B = 1
-
     if not(side in (0, 1)):
         raise ValueError, "Invalid subdev_spec: %r:" % (subdev_spec,)
 
-    return gru.hexint([0x0098, 0x9800][side])
+    db = u.db[side]
+
+    if(db[0].i_and_q_swapped()):
+        return gru.hexint([0x0089, 0x8900][side])
+    else:
+        return gru.hexint([0x0098, 0x9800][side])
 
 
 def selected_subdev(u, subdev_spec):