From 35bd9dd1f29649a642264d628f4cdd0465a024a3 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 15 Dec 2011 16:59:10 -0800 Subject: tvrx: adjust returned lo freq to compensate for negative cordic shift --- host/lib/usrp/dboard/db_tvrx.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- cgit v1.2.3