diff options
Diffstat (limited to 'host/lib/usrp2')
-rw-r--r-- | host/lib/usrp2/io_impl.cpp | 19 | ||||
-rw-r--r-- | host/lib/usrp2/usrp2_impl.cpp | 4 |
2 files changed, 5 insertions, 18 deletions
diff --git a/host/lib/usrp2/io_impl.cpp b/host/lib/usrp2/io_impl.cpp index fde02577c..a8ca0cd3a 100644 --- a/host/lib/usrp2/io_impl.cpp +++ b/host/lib/usrp2/io_impl.cpp @@ -302,18 +302,12 @@ void usrp2_impl::update_tx_samp_rate(const double rate){ _io_impl->send_handler.set_samp_rate(rate); } -void usrp2_impl::update_rx_subdev_spec(const std::string &which_mb, const subdev_spec_t &spec_){ +void usrp2_impl::update_rx_subdev_spec(const std::string &which_mb, const subdev_spec_t &spec){ boost::mutex::scoped_lock recv_lock = _io_impl->recv_handler.get_scoped_lock(); property_tree::path_type root = "/mboards/" + which_mb + "/dboards"; //sanity checking - subdev_spec_t spec(spec_); - if (spec.size() == 0){ - //determine the first subdev spec that exists - const std::string db_name = _tree->list(root).at(0); - const std::string sd_name = _tree->list(root / db_name / "rx_frontends").at(0); - spec.push_back(subdev_spec_pair_t(db_name, sd_name)); - } + if (spec.size() == 0) throw uhd::value_error("rx subdev spec cant be empty"); if (spec.size() > _mbc[which_mb].rx_dsps.size()) throw uhd::value_error("rx subdev spec too long"); //setup mux for this spec @@ -341,18 +335,11 @@ void usrp2_impl::update_rx_subdev_spec(const std::string &which_mb, const subdev } } -void usrp2_impl::update_tx_subdev_spec(const std::string &which_mb, const subdev_spec_t &spec_){ +void usrp2_impl::update_tx_subdev_spec(const std::string &which_mb, const subdev_spec_t &spec){ boost::mutex::scoped_lock send_lock = _io_impl->send_handler.get_scoped_lock(); property_tree::path_type root = "/mboards/" + which_mb + "/dboards"; //sanity checking - subdev_spec_t spec(spec_); - if (spec.size() == 0){ - //determine the first subdev spec that exists - const std::string db_name = _tree->list(root).at(0); - const std::string sd_name = _tree->list(root / db_name / "tx_frontends").at(0); - spec.push_back(subdev_spec_pair_t(db_name, sd_name)); - } if (spec.size() != 1) throw uhd::value_error("tx subdev spec has to be size 1"); //set the mux for this spec diff --git a/host/lib/usrp2/usrp2_impl.cpp b/host/lib/usrp2/usrp2_impl.cpp index 829becd19..50d1eb2e2 100644 --- a/host/lib/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp2/usrp2_impl.cpp @@ -544,8 +544,8 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){ BOOST_FOREACH(const std::string &mb, _mbc.keys()){ property_tree::path_type root = "/mboards/" + mb; _tree->access<double>(root / "tick_rate").update(); - _tree->access<subdev_spec_t>(root / "rx_subdev_spec").set(subdev_spec_t()); - _tree->access<subdev_spec_t>(root / "tx_subdev_spec").set(subdev_spec_t()); + _tree->access<subdev_spec_t>(root / "rx_subdev_spec").set(subdev_spec_t("A:"+_mbc[mb].dboard_manager->get_rx_subdev_names()[0])); + _tree->access<subdev_spec_t>(root / "tx_subdev_spec").set(subdev_spec_t("A:"+_mbc[mb].dboard_manager->get_tx_subdev_names()[0])); _tree->access<std::string>(root / "ref_source/value").set("internal"); _tree->access<std::string>(root / "time_source/value").set("none"); |