diff options
author | Josh Blum <josh@joshknows.com> | 2011-05-14 19:57:03 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-05-14 19:57:03 -0700 |
commit | f991d3dc751e110425d4a0eed722f6de0fef4261 (patch) | |
tree | d147596eba8d16294d4131dec2f66ca5c653f37a /host/lib/usrp/usrp1/mboard_impl.cpp | |
parent | 29a0c916dfdc2f960761c1bebcccc53478abd30c (diff) | |
download | uhd-f991d3dc751e110425d4a0eed722f6de0fef4261.tar.gz uhd-f991d3dc751e110425d4a0eed722f6de0fef4261.tar.bz2 uhd-f991d3dc751e110425d4a0eed722f6de0fef4261.zip |
usrp1: apply conditional disables/enables to rx and tx
Scapped the old gnuradio code for information about VRQ_FPGA_SET_XX_ENABLE.
It turns out that we should disabled + restore state when changing muxes or rates.
The USRP seems to stream properly when receiving single and dual channel.
Prior to this commit, tx was accicentally always disabled from a few commits ago.
Diffstat (limited to 'host/lib/usrp/usrp1/mboard_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp1/mboard_impl.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp1/mboard_impl.cpp b/host/lib/usrp/usrp1/mboard_impl.cpp index cd04e7351..d6f6832a4 100644 --- a/host/lib/usrp/usrp1/mboard_impl.cpp +++ b/host/lib/usrp/usrp1/mboard_impl.cpp @@ -339,7 +339,7 @@ void usrp1_impl::mboard_set(const wax::obj &key, const wax::obj &val) //handle the get request conditioned on the key switch(key.as<mboard_prop_t>()){ - case MBOARD_PROP_RX_SUBDEV_SPEC: + case MBOARD_PROP_RX_SUBDEV_SPEC:{ _rx_subdev_spec = val.as<subdev_spec_t>(); if (_rx_subdev_spec.size() > this->get_num_ddcs()){ throw uhd::value_error(str(boost::format( @@ -349,10 +349,12 @@ void usrp1_impl::mboard_set(const wax::obj &key, const wax::obj &val) } verify_rx_subdev_spec(_rx_subdev_spec, _mboard_proxy->get_link()); //set the mux and set the number of rx channels + bool s = this->disable_rx(); _iface->poke32(FR_RX_MUX, calc_rx_mux(_rx_subdev_spec, _mboard_proxy->get_link())); - return; + this->restore_rx(s); + }return; - case MBOARD_PROP_TX_SUBDEV_SPEC: + case MBOARD_PROP_TX_SUBDEV_SPEC:{ _tx_subdev_spec = val.as<subdev_spec_t>(); if (_tx_subdev_spec.size() > this->get_num_ducs()){ throw uhd::value_error(str(boost::format( @@ -362,8 +364,10 @@ void usrp1_impl::mboard_set(const wax::obj &key, const wax::obj &val) } verify_tx_subdev_spec(_tx_subdev_spec, _mboard_proxy->get_link()); //set the mux and set the number of tx channels + bool s = this->disable_tx(); _iface->poke32(FR_TX_MUX, calc_tx_mux(_tx_subdev_spec, _mboard_proxy->get_link())); - return; + this->restore_tx(s); + }return; case MBOARD_PROP_EEPROM_MAP: // Step1: commit the map, writing only those values set. |