summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-01-09 12:07:33 -0800
committerJosh Blum <josh@joshknows.com>2012-01-09 14:12:10 -0800
commit3ebc4ed5456583abdf1534b4261f72989490237d (patch)
treeee63c5c01b9cb89e8b7c5a04a7f81e10cc8c3d2d
parentf72dc7bd5b1cc3049a431efa676382e2270000be (diff)
downloaduhd-3ebc4ed5456583abdf1534b4261f72989490237d.tar.gz
uhd-3ebc4ed5456583abdf1534b4261f72989490237d.tar.bz2
uhd-3ebc4ed5456583abdf1534b4261f72989490237d.zip
usrp: compensate for other sc8 conversion gain
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.cpp4
1 files changed, 3 insertions, 1 deletions
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);