diff options
author | Josh Blum <josh@joshknows.com> | 2011-06-28 12:30:01 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-28 12:30:01 -0700 |
commit | 8aa22b5c091c6c7d822990aa078dc782b08e51e7 (patch) | |
tree | 4462220eb3668152f37dfacac5de1dfaa7a840f2 /host/lib/usrp2/io_impl.cpp | |
parent | f578729ecca18962ae34d0820632ee69709caa93 (diff) | |
download | uhd-8aa22b5c091c6c7d822990aa078dc782b08e51e7.tar.gz uhd-8aa22b5c091c6c7d822990aa078dc782b08e51e7.tar.bz2 uhd-8aa22b5c091c6c7d822990aa078dc782b08e51e7.zip |
usrp2: init subdev specs and tick rates
Diffstat (limited to 'host/lib/usrp2/io_impl.cpp')
-rw-r--r-- | host/lib/usrp2/io_impl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/host/lib/usrp2/io_impl.cpp b/host/lib/usrp2/io_impl.cpp index 5ebb1609d..4232b0151 100644 --- a/host/lib/usrp2/io_impl.cpp +++ b/host/lib/usrp2/io_impl.cpp @@ -306,9 +306,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 size_t which_mb, const subdev_spec_t &spec){ +void usrp2_impl::update_rx_subdev_spec(const size_t which_mb, const subdev_spec_t &spec_){ boost::mutex::scoped_lock recv_lock = _io_impl->recv_handler.get_scoped_lock(); + //sanity checking TODO + subdev_spec_t spec(spec_); + //TODO setup mux for this spec //compute the new occupancy and resize @@ -320,6 +323,7 @@ void usrp2_impl::update_rx_subdev_spec(const size_t which_mb, const subdev_spec_ size_t chan = 0; for (size_t mb = 0; mb < _mboard_stuff.size(); mb++){ for (size_t dsp = 0; dsp < _io_impl->rx_chan_occ[mb]; dsp++){ + _mboard_stuff[mb].rx_dsps[dsp]->set_nsamps_per_packet(get_max_recv_samps_per_packet()); //seems to be a good place to set this _io_impl->recv_handler.set_xport_chan_get_buff(chan++, boost::bind( &zero_copy_if::get_recv_buff, _mboard_stuff[mb].dsp_xports[dsp], _1 )); @@ -337,7 +341,7 @@ void usrp2_impl::update_tx_subdev_spec(const size_t which_mb, const subdev_spec_ //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(db_name + ":" + sd_name); + 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"); |