diff options
author | Josh Blum <josh@joshknows.com> | 2011-12-15 16:59:10 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-12-15 16:59:10 -0800 |
commit | 35bd9dd1f29649a642264d628f4cdd0465a024a3 (patch) | |
tree | 3f652f79ea1910d584e63d8972836457aa3f0bd4 /host/lib/usrp | |
parent | 518d481ec24558724ead302635ab50fbaf71ca12 (diff) | |
download | uhd-35bd9dd1f29649a642264d628f4cdd0465a024a3.tar.gz uhd-35bd9dd1f29649a642264d628f4cdd0465a024a3.tar.bz2 uhd-35bd9dd1f29649a642264d628f4cdd0465a024a3.zip |
tvrx: adjust returned lo freq to compensate for negative cordic shift
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/dboard/db_tvrx.cpp | 7 |
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; } |