From 3ebc4ed5456583abdf1534b4261f72989490237d Mon Sep 17 00:00:00 2001
From: Josh Blum <josh@joshknows.com>
Date: Mon, 9 Jan 2012 12:07:33 -0800
Subject: usrp: compensate for other sc8 conversion gain

---
 host/lib/usrp/cores/rx_dsp_core_200.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'host/lib/usrp/cores')

diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp
index f184a8346..7c4231103 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp
@@ -216,7 +216,9 @@ public:
         }
         else if (format == "sc8"){
             format_word = (1 << 18);
-            _fxpt_scale_adj = 32767./scale;
+            _fxpt_scale_adj = 127. * scale;
+            _fxpt_scale_adj /= 256; //engine 16to8 drops lower 8 bits
+            _fxpt_scale_adj /= 4; //scale operation 2-bit pad
         }
         else throw uhd::value_error("USRP RX cannot handle requested wire format: " + format);
 
-- 
cgit v1.2.3