aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-09-04 11:11:50 -0700
committerJosh Blum <josh@joshknows.com>2013-09-04 11:11:50 -0700
commit8c1b63e1949134ec476b5b43e1caca42ffe017d5 (patch)
treed708fd27588ae35c77d8edad1d9a1df81264d31c /host/lib/usrp/cores
parent0284b5fb03608202f02897bf1a86307cb4a4f69b (diff)
downloaduhd-8c1b63e1949134ec476b5b43e1caca42ffe017d5.tar.gz
uhd-8c1b63e1949134ec476b5b43e1caca42ffe017d5.tar.bz2
uhd-8c1b63e1949134ec476b5b43e1caca42ffe017d5.zip
b200: integrate support for new converters
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp17
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_3000.cpp15
2 files changed, 21 insertions, 11 deletions
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
index 36d9af5bc..7b3324f74 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
@@ -169,21 +169,26 @@ public:
void setup(const uhd::stream_args_t &stream_args){
- //unsigned format_word = 0;
if (stream_args.otw_format == "sc16"){
- //format_word = 0;
_dsp_extra_scaling = 1.0;
_host_extra_scaling = 1.0;
}
- /*
else if (stream_args.otw_format == "sc8"){
- format_word = (1 << 0);
double peak = stream_args.args.cast<double>("peak", 1.0);
peak = std::max(peak, 1.0/256);
_host_extra_scaling = peak*256;
- _dsp_extra_scaling = peak*256;
+ _dsp_extra_scaling = peak;
+ }
+ else if (stream_args.otw_format == "sc12"){
+ double peak = stream_args.args.cast<double>("peak", 1.0);
+ peak = std::max(peak, 1.0/16);
+ _host_extra_scaling = peak*16;
+ _dsp_extra_scaling = peak;
+ }
+ else if (stream_args.otw_format == "fc32"){
+ _host_extra_scaling = 1.0;
+ _dsp_extra_scaling = 1.0;
}
- */
else throw uhd::value_error("USRP RX cannot handle requested wire format: " + stream_args.otw_format);
_host_extra_scaling *= stream_args.args.cast<double>("fullscale", 1.0);
diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.cpp b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
index ff4392a13..feb749cd9 100644
--- a/host/lib/usrp/cores/tx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
@@ -146,22 +146,27 @@ public:
void setup(const uhd::stream_args_t &stream_args){
- //unsigned format_word = 0;
if (stream_args.otw_format == "sc16"){
- //format_word = 0;
_dsp_extra_scaling = 1.0;
_host_extra_scaling = 1.0;
}
- /*
else if (stream_args.otw_format == "sc8"){
- format_word = (1 << 0);
double peak = stream_args.args.cast<double>("peak", 1.0);
peak = std::max(peak, 1.0/256);
_host_extra_scaling = 1.0/peak/256;
_dsp_extra_scaling = 1.0/peak;
}
+ else if (stream_args.otw_format == "sc12"){
+ double peak = stream_args.args.cast<double>("peak", 1.0);
+ peak = std::max(peak, 1.0/16);
+ _host_extra_scaling = 1.0/peak/16;
+ _dsp_extra_scaling = 1.0/peak;
+ }
+ else if (stream_args.otw_format == "fc32"){
+ _host_extra_scaling = 1.0;
+ _dsp_extra_scaling = 1.0;
+ }
else throw uhd::value_error("USRP TX cannot handle requested wire format: " + stream_args.otw_format);
- */
_host_extra_scaling /= stream_args.args.cast<double>("fullscale", 1.0);