From 265db795c26cf9609f8f1288484f85788cbf7b3d Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Thu, 6 Nov 2014 14:21:39 -0800 Subject: x300: Cleaned up DAC ctrl and clock init logic - DAC: Squashed configuration into 2 main operations: reset and reset_and_resync - DAC: Put in sleep mode during configuration - DAC: Synchronize only if streaming to more than one DAC - DAC: Use falling edge sync mode - DAC: Fixed power up/down settings - DAC: Frontend sync failure is fatal - Clocks: Refactored clock source change logic - Clocks: Cleaned up init and lock-check sequence --- host/lib/usrp/x300/x300_io_impl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/x300/x300_io_impl.cpp') diff --git a/host/lib/usrp/x300/x300_io_impl.cpp b/host/lib/usrp/x300/x300_io_impl.cpp index c5b8f49e3..04042049d 100644 --- a/host/lib/usrp/x300/x300_io_impl.cpp +++ b/host/lib/usrp/x300/x300_io_impl.cpp @@ -540,6 +540,7 @@ tx_streamer::sptr x300_impl::get_tx_stream(const uhd::stream_args_t &args_) //shared async queue for all channels in streamer boost::shared_ptr async_md(new async_md_type(1000/*messages deep*/)); + std::vector radios_list; boost::shared_ptr my_streamer; for (size_t stream_i = 0; stream_i < args.channels.size(); stream_i++) { @@ -557,9 +558,10 @@ tx_streamer::sptr x300_impl::get_tx_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) / "tx_chan_dsp_mapping") + const size_t radio_index = _tree->access >("/mboards/" + boost::lexical_cast(mb_index) / "tx_chan_dsp_mapping") .get().at(mb_chan); radio_perifs_t &perif = mb.radio_perifs[radio_index]; + radios_list.push_back(&perif); //setup the dsp transport hints (TODO) device_addr_t device_addr = mb.send_args; @@ -571,8 +573,8 @@ tx_streamer::sptr x300_impl::get_tx_stream(const uhd::stream_args_t &args_) both_xports_t xport = this->make_transport(mb_index, dest, X300_RADIO_DEST_PREFIX_TX, device_addr, data_sid); UHD_LOG << boost::format("data_sid = 0x%08x\n") % data_sid << std::endl; - // To calculate the max number of samples per packet, we assume the maximum header length - // to avoid fragmentation should the entire header be used. + // To calculate the max number of samples per packet, we assume the maximum header length + // to avoid fragmentation should the entire header be used. const size_t bpp = xport.send->get_send_frame_size() - X300_TX_MAX_HDR_LEN; const size_t bpi = convert::get_bytes_per_item(args.otw_format); const size_t spp = unsigned(args.args.cast("spp", bpp/bpi)); @@ -640,5 +642,6 @@ tx_streamer::sptr x300_impl::get_tx_stream(const uhd::stream_args_t &args_) _tree->access(mb_path / "tx_dsps" / boost::lexical_cast(radio_index) / "rate" / "value").update(); } + synchronize_dacs(radios_list); return my_streamer; } -- cgit v1.2.3