aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
diff options
context:
space:
mode:
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);