diff options
| author | Ashish Chaudhari <ashish@ettus.com> | 2014-11-06 14:21:39 -0800 | 
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2014-11-13 01:16:18 +0100 | 
| commit | 265db795c26cf9609f8f1288484f85788cbf7b3d (patch) | |
| tree | 682c9a4b6ebb204a5ac896f392a01836b86c8815 /host/lib/usrp/x300/x300_io_impl.cpp | |
| parent | bda6bcb2301281304981380cb804babcc681641a (diff) | |
| download | uhd-265db795c26cf9609f8f1288484f85788cbf7b3d.tar.gz uhd-265db795c26cf9609f8f1288484f85788cbf7b3d.tar.bz2 uhd-265db795c26cf9609f8f1288484f85788cbf7b3d.zip  | |
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
Diffstat (limited to 'host/lib/usrp/x300/x300_io_impl.cpp')
| -rw-r--r-- | host/lib/usrp/x300/x300_io_impl.cpp | 9 | 
1 files changed, 6 insertions, 3 deletions
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_type> async_md(new async_md_type(1000/*messages deep*/)); +    std::vector<radio_perifs_t*> radios_list;      boost::shared_ptr<sph::send_packet_streamer> 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<std::vector<size_t> >("/mboards/" + boost::lexical_cast<std::string>(mb_index) / "tx_chan_dsp_mapping") +        const size_t radio_index = _tree->access<std::vector<size_t> >("/mboards/" + boost::lexical_cast<std::string>(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<double>("spp", bpp/bpi)); @@ -640,5 +642,6 @@ tx_streamer::sptr x300_impl::get_tx_stream(const uhd::stream_args_t &args_)          _tree->access<double>(mb_path / "tx_dsps" / boost::lexical_cast<std::string>(radio_index) / "rate" / "value").update();      } +    synchronize_dacs(radios_list);      return my_streamer;  }  | 
