From fa9e37dc0ad2f0b40d242289965438d498984bed Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 10 Mar 2014 11:55:00 +0100 Subject: x300: Added comments on mb/chan search code --- host/lib/usrp/x300/x300_io_impl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'host') diff --git a/host/lib/usrp/x300/x300_io_impl.cpp b/host/lib/usrp/x300/x300_io_impl.cpp index 1b10e8001..84f96d9f5 100644 --- a/host/lib/usrp/x300/x300_io_impl.cpp +++ b/host/lib/usrp/x300/x300_io_impl.cpp @@ -350,6 +350,7 @@ rx_streamer::sptr x300_impl::get_rx_stream(const uhd::stream_args_t &args_) boost::shared_ptr my_streamer; for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++) { + // Find the mainboard and subdev that corresponds to channel args.channels[stream_i] const size_t chan = args.channels[stream_i]; size_t mb_chan = chan, mb_index; for (mb_index = 0; mb_index < _mb.size(); mb_index++) { @@ -362,6 +363,7 @@ rx_streamer::sptr x300_impl::get_rx_stream(const uhd::stream_args_t &args_) } } + // Find the DSP that corresponds to this mainboard and subdev mboard_members_t &mb = _mb[mb_index]; const size_t radio_index = _tree->access >("/mboards/" + boost::lexical_cast(mb_index) / "rx_chan_dsp_mapping") .get().at(mb_chan); @@ -533,6 +535,7 @@ tx_streamer::sptr x300_impl::get_tx_stream(const uhd::stream_args_t &args_) boost::shared_ptr my_streamer; for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++) { + // Find the mainboard and subdev that corresponds to channel args.channels[stream_i] const size_t chan = args.channels[stream_i]; size_t mb_chan = chan, mb_index; for (mb_index = 0; mb_index < _mb.size(); mb_index++) { @@ -544,6 +547,7 @@ tx_streamer::sptr x300_impl::get_tx_stream(const uhd::stream_args_t &args_) mb_chan -= curr_subdev_spec.size(); } } + // Find the DSP that corresponds to this mainboard and subdev mboard_members_t &mb = _mb[mb_index]; const size_t radio_index = _tree->access >("/mboards/" + boost::lexical_cast(mb_index) / "tx_chan_dsp_mapping") .get().at(mb_chan); -- cgit v1.2.3