aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1/dsp_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-05-14 19:57:03 -0700
committerJosh Blum <josh@joshknows.com>2011-05-14 19:57:03 -0700
commitf991d3dc751e110425d4a0eed722f6de0fef4261 (patch)
treed147596eba8d16294d4131dec2f66ca5c653f37a /host/lib/usrp/usrp1/dsp_impl.cpp
parent29a0c916dfdc2f960761c1bebcccc53478abd30c (diff)
downloaduhd-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/dsp_impl.cpp')
-rw-r--r--host/lib/usrp/usrp1/dsp_impl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp1/dsp_impl.cpp b/host/lib/usrp/usrp1/dsp_impl.cpp
index 9f1e4975a..1679c0470 100644
--- a/host/lib/usrp/usrp1/dsp_impl.cpp
+++ b/host/lib/usrp/usrp1/dsp_impl.cpp
@@ -113,7 +113,9 @@ void usrp1_impl::rx_dsp_set(const wax::obj &key_, const wax::obj &val, size_t wh
//TODO Poll every 100ms. Make it selectable?
_rx_samps_per_poll_interval = size_t(0.1 * _clock_ctrl->get_master_clock_freq() / rate);
+ bool s = this->disable_rx();
_iface->poke32(FR_DECIM_RATE, _rx_dsp_decim/2 - 1);
+ this->restore_rx(s);
}
return;
@@ -212,7 +214,9 @@ void usrp1_impl::tx_dsp_set(const wax::obj &key_, const wax::obj &val, size_t wh
//TODO Poll every 100ms. Make it selectable?
_tx_samps_per_poll_interval = size_t(0.1 * _clock_ctrl->get_master_clock_freq() * 2 / rate);
+ bool s = this->disable_tx();
_iface->poke32(FR_INTERP_RATE, _tx_dsp_interp / 4 - 1);
+ this->restore_tx(s);
return;
}
default: UHD_THROW_PROP_SET_ERROR();