aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/mimo_usrp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/mimo_usrp.cpp')
-rw-r--r--host/lib/usrp/mimo_usrp.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/host/lib/usrp/mimo_usrp.cpp b/host/lib/usrp/mimo_usrp.cpp
index b40f98226..fbb863022 100644
--- a/host/lib/usrp/mimo_usrp.cpp
+++ b/host/lib/usrp/mimo_usrp.cpp
@@ -33,6 +33,11 @@
using namespace uhd;
using namespace uhd::usrp;
+static inline freq_range_t add_dsp_shift(const freq_range_t &range, wax::obj dsp){
+ double codec_rate = dsp[DSP_PROP_CODEC_RATE].as<double>();
+ return freq_range_t(range.min - codec_rate/2.0, range.max + codec_rate/2.0);
+}
+
/***********************************************************************
* MIMO USRP Implementation
**********************************************************************/
@@ -188,7 +193,7 @@ public:
}
freq_range_t get_rx_freq_range(size_t chan){
- return _rx_subdevs.at(chan)[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>();
+ return add_dsp_shift(_rx_subdevs.at(chan)[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>(), _rx_dsps.at(chan));
}
void set_rx_gain(size_t chan, float gain){
@@ -251,7 +256,7 @@ public:
}
freq_range_t get_tx_freq_range(size_t chan){
- return _tx_subdevs.at(chan)[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>();
+ return add_dsp_shift(_tx_subdevs.at(chan)[SUBDEV_PROP_FREQ_RANGE].as<freq_range_t>(), _tx_dsps.at(chan));
}
void set_tx_gain(size_t chan, float gain){