aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r--host/lib/usrp/dboard/db_tvrx.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp
index 47807caa1..fd86d5b83 100644
--- a/host/lib/usrp/dboard/db_tvrx.cpp
+++ b/host/lib/usrp/dboard/db_tvrx.cpp
@@ -400,5 +400,12 @@ double tvrx::set_freq(double freq) {
_lo_freq = actual_lo_freq; //for rx props
+ //Check the the IF if larger than the dsp rate and apply a corrective adjustment
+ //so that the cordic will be tuned to a possible rate within its range.
+ const double codec_rate = this->get_iface()->get_codec_rate(dboard_iface::UNIT_RX);
+ if (tvrx_if_freq >= codec_rate/2){
+ return _lo_freq - codec_rate;
+ }
+
return _lo_freq;
}