summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-09-29 18:27:08 -0700
committerNick Foster <nick@nerdnetworks.org>2010-09-29 18:27:08 -0700
commit56751efbe6e0751a2b8cd0f7a31d5dfd07fec5dd (patch)
treec0276e51f4ba46193dbddf3e1441787d918d7681 /host/lib/usrp/usrp1
parent9c58df56e805cc924aef980f466cd45a42b2d1a4 (diff)
downloaduhd-56751efbe6e0751a2b8cd0f7a31d5dfd07fec5dd.tar.gz
uhd-56751efbe6e0751a2b8cd0f7a31d5dfd07fec5dd.tar.bz2
uhd-56751efbe6e0751a2b8cd0f7a31d5dfd07fec5dd.zip
TVRX: works for USRP and USRP2.
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/codec_ctrl.cpp3
-rw-r--r--host/lib/usrp/usrp1/dboard_iface.cpp6
2 files changed, 8 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp1/codec_ctrl.cpp b/host/lib/usrp/usrp1/codec_ctrl.cpp
index 33b18b196..4aa730573 100644
--- a/host/lib/usrp/usrp1/codec_ctrl.cpp
+++ b/host/lib/usrp/usrp1/codec_ctrl.cpp
@@ -423,7 +423,8 @@ void usrp1_codec_ctrl_impl::set_duc_freq(double freq)
/***********************************************************************
* Codec Control ADC buffer bypass
- * Enable this for DC-coupled daughterboards (TVRX)
+ * Disable this for AC-coupled daughterboards (TVRX)
+ * By default it is initialized TRUE.
**********************************************************************/
void usrp1_codec_ctrl_impl::bypass_adc_buffers(bool bypass) {
_ad9862_regs.byp_buffer_a = bypass;
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp
index 4f0549a37..1ac15a46a 100644
--- a/host/lib/usrp/usrp1/dboard_iface.cpp
+++ b/host/lib/usrp/usrp1/dboard_iface.cpp
@@ -32,6 +32,8 @@ using namespace uhd;
using namespace uhd::usrp;
using namespace boost::assign;
+static const dboard_id_t tvrx_id(0x0040);
+
class usrp1_dboard_iface : public dboard_iface {
public:
@@ -51,6 +53,10 @@ public:
//init the clock rate shadows
this->set_clock_rate(UNIT_RX, this->get_clock_rates(UNIT_RX).front());
this->set_clock_rate(UNIT_TX, this->get_clock_rates(UNIT_TX).front());
+
+ //yes this is evil but it's necessary for TVRX to work on USRP1
+ if(_rx_dboard_id == tvrx_id) _codec->bypass_adc_buffers(false);
+ //else _codec->bypass_adc_buffers(false); //don't think this is necessary
}
~usrp1_dboard_iface()