From f991d3dc751e110425d4a0eed722f6de0fef4261 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 14 May 2011 19:57:03 -0700 Subject: 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. --- host/lib/usrp/usrp1/io_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/usrp1/io_impl.cpp') diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp index 22d078e70..7252ac587 100644 --- a/host/lib/usrp/usrp1/io_impl.cpp +++ b/host/lib/usrp/usrp1/io_impl.cpp @@ -240,12 +240,13 @@ void usrp1_impl::io_init(void){ boost::bind(&usrp1_impl::rx_stream_on_off, this, _1) ); + this->enable_tx(true); //always enabled rx_stream_on_off(false); _io_impl->flush_send_buff(); } void usrp1_impl::rx_stream_on_off(bool enb){ - return _iface->write_firmware_cmd(VRQ_FPGA_SET_RX_ENABLE, enb, 0, 0, 0); + this->enable_rx(enb); //drain any junk in the receive transport after stop streaming command while(not enb and _data_transport->get_recv_buff().get() != NULL){ /* NOP */ -- cgit v1.2.3