aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-22 17:47:10 -0700
committerJosh Blum <josh@joshknows.com>2010-10-22 17:47:10 -0700
commit16791bedfdb6f62dbb49f124d75b8793b8a599f0 (patch)
treea2a1d03a73f061025c02725d325070f4e6e7c479 /host/lib
parent960078083c602685a8680e68bbd82bbf8956828c (diff)
parent3974e544393bd5a720838cbf4790c532bca2aae4 (diff)
downloaduhd-16791bedfdb6f62dbb49f124d75b8793b8a599f0.tar.gz
uhd-16791bedfdb6f62dbb49f124d75b8793b8a599f0.tar.bz2
uhd-16791bedfdb6f62dbb49f124d75b8793b8a599f0.zip
Merge branch 'master' into flow_ctrl
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/dboard/db_dbsrx.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp
index 0b8b4db83..aecd7249d 100644
--- a/host/lib/usrp/dboard/db_dbsrx.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx.cpp
@@ -236,8 +236,10 @@ void dbsrx::set_lo_freq(double target_freq){
bool update_filter_settings = false;
//choose refclock
std::vector<double> clock_rates = this->get_iface()->get_clock_rates(dboard_iface::UNIT_RX);
+ const double max_clock_rate = std::sorted(clock_rates).back();
BOOST_FOREACH(ref_clock, std::reversed(std::sorted(clock_rates))){
if (ref_clock > 27.0e6) continue;
+ if (size_t(max_clock_rate/ref_clock)%2 == 1) continue; //reject asymmetric clocks (odd divisors)
//choose m_divider such that filter tuning constraint is met
m = 31;