summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2014-02-21 13:39:47 +0100
committerMartin Braun <martin.braun@ettus.com>2014-03-10 11:46:02 +0100
commit81f9036788edbdb3498ac3b60b3e37791aab3e2b (patch)
tree6130f412303d0fa6f9ee82fc3ab976907969cd39 /host/lib
parent973b47c48339dbae2e125a8c8d84ef67fedc4bdf (diff)
downloaduhd-81f9036788edbdb3498ac3b60b3e37791aab3e2b.tar.gz
uhd-81f9036788edbdb3498ac3b60b3e37791aab3e2b.tar.bz2
uhd-81f9036788edbdb3498ac3b60b3e37791aab3e2b.zip
x300: remove data that was duplicating property tree
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp4
-rw-r--r--host/lib/usrp/x300/x300_io_impl.cpp35
2 files changed, 19 insertions, 20 deletions
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index 1fb3676a0..62ec0f83a 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -194,10 +194,6 @@ private:
radio_perifs_t radio_perifs[2];
uhd::usrp::dboard_eeprom_t db_eeproms[8];
- //per mboard frontend mapping
- uhd::usrp::subdev_spec_t rx_fe_map;
- uhd::usrp::subdev_spec_t tx_fe_map;
-
//other perifs on mboard
x300_clock_ctrl::sptr clock;
uhd::gps_ctrl::sptr gps;
diff --git a/host/lib/usrp/x300/x300_io_impl.cpp b/host/lib/usrp/x300/x300_io_impl.cpp
index 00a31b8d6..603eb5704 100644
--- a/host/lib/usrp/x300/x300_io_impl.cpp
+++ b/host/lib/usrp/x300/x300_io_impl.cpp
@@ -109,8 +109,6 @@ void x300_impl::update_rx_subdev_spec(const size_t mb_i, const subdev_spec_t &sp
//see usrp/io_impl.cpp if multiple DSPs share the frontend:
_mb[mb_i].radio_perifs[i].rx_fe->set_mux(fe_swapped);
}
-
- _mb[mb_i].rx_fe_map = spec;
}
void x300_impl::update_tx_subdev_spec(const size_t mb_i, const subdev_spec_t &spec)
@@ -143,8 +141,6 @@ void x300_impl::update_tx_subdev_spec(const size_t mb_i, const subdev_spec_t &sp
_mb[mb_i].radio_perifs[i].tx_fe->set_mux(conn);
}
-
- _mb[mb_i].tx_fe_map = spec;
}
/***********************************************************************
@@ -376,13 +372,17 @@ rx_streamer::sptr x300_impl::get_rx_stream(const uhd::stream_args_t &args_)
for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++)
{
const size_t chan = args.channels[stream_i];
- size_t mb_chan = chan, mb_index = 0;
- BOOST_FOREACH(mboard_members_t &mb, _mb)
- {
- if (mb_chan < mb.rx_fe_map.size()) break;
- else mb_chan -= mb.rx_fe_map.size();
- mb_index++;
+ size_t mb_chan = chan, mb_index;
+ for (mb_index = 0; mb_index < _mb.size(); mb_index++) {
+ const subdev_spec_t &curr_subdev_spec =
+ _tree->access<subdev_spec_t>("/mboards/" + boost::lexical_cast<std::string>(mb_index) / "rx_subdev_spec").get();
+ if (mb_chan < curr_subdev_spec.size()) {
+ break;
+ } else {
+ mb_chan -= curr_subdev_spec.size();
+ }
}
+
mboard_members_t &mb = _mb[mb_index];
radio_perifs_t &perif = mb.radio_perifs[mb_chan];
@@ -553,12 +553,15 @@ tx_streamer::sptr x300_impl::get_tx_stream(const uhd::stream_args_t &args_)
for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++)
{
const size_t chan = args.channels[stream_i];
- size_t mb_chan = chan, mb_index = 0;
- BOOST_FOREACH(mboard_members_t &mb, _mb)
- {
- if (mb_chan < mb.tx_fe_map.size()) break;
- else mb_chan -= mb.tx_fe_map.size();
- mb_index++;
+ size_t mb_chan = chan, mb_index;
+ for (mb_index = 0; mb_index < _mb.size(); mb_index++) {
+ const subdev_spec_t &curr_subdev_spec =
+ _tree->access<subdev_spec_t>("/mboards/" + boost::lexical_cast<std::string>(mb_index) / "tx_subdev_spec").get();
+ if (mb_chan < curr_subdev_spec.size()) {
+ break;
+ } else {
+ mb_chan -= curr_subdev_spec.size();
+ }
}
mboard_members_t &mb = _mb[mb_index];
radio_perifs_t &perif = mb.radio_perifs[mb_chan];