aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-06-18 17:59:57 -0700
committerJosh Blum <josh@joshknows.com>2010-06-18 17:59:57 -0700
commit1c1d967ec73906d50ee6e7257a4153db4ab9c507 (patch)
tree6f7e9f2f8297990265081d1d71e35c8342e89211 /host/lib/usrp
parent2d7c3f4cc38627a8f0243b78c3c10adc6f1cda46 (diff)
downloaduhd-1c1d967ec73906d50ee6e7257a4153db4ab9c507.tar.gz
uhd-1c1d967ec73906d50ee6e7257a4153db4ab9c507.tar.bz2
uhd-1c1d967ec73906d50ee6e7257a4153db4ab9c507.zip
usrp2: init clock rate shadows for dboard iface, uhd: pthread sched fix error condition check
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/usrp2/clock_ctrl.cpp2
-rw-r--r--host/lib/usrp/usrp2/dboard_iface.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/clock_ctrl.cpp b/host/lib/usrp/usrp2/clock_ctrl.cpp
index 59fac6fcf..b9be037c0 100644
--- a/host/lib/usrp/usrp2/clock_ctrl.cpp
+++ b/host/lib/usrp/usrp2/clock_ctrl.cpp
@@ -61,9 +61,7 @@ public:
this->enable_external_ref(false);
this->enable_rx_dboard_clock(false);
- this->set_rate_rx_dboard_clock(get_rates_rx_dboard_clock().at(0));
this->enable_tx_dboard_clock(false);
- this->set_rate_tx_dboard_clock(get_rates_tx_dboard_clock().at(0));
/* private clock enables, must be set here */
this->enable_dac_clock(true);
diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp
index ec6c98186..6f2fb9396 100644
--- a/host/lib/usrp/usrp2/dboard_iface.cpp
+++ b/host/lib/usrp/usrp2/dboard_iface.cpp
@@ -21,6 +21,7 @@
#include <uhd/usrp/dboard_iface.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/utils/assert.hpp>
+#include <uhd/utils/algorithm.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/asio.hpp> //htonl and ntohl
#include <boost/math/special_functions/round.hpp>
@@ -109,6 +110,10 @@ usrp2_dboard_iface::usrp2_dboard_iface(
_dac_regs[unit].cmd = ad5623_regs_t::CMD_RESET;
this->_write_aux_dac(unit);
}
+
+ //init the clock rate shadows with max rate clock
+ this->set_clock_rate(UNIT_RX, sorted(this->get_clock_rates(UNIT_RX)).back());
+ this->set_clock_rate(UNIT_TX, sorted(this->get_clock_rates(UNIT_TX)).back());
}
usrp2_dboard_iface::~usrp2_dboard_iface(void){