diff options
| author | Nick Foster <nick@nerdnetworks.org> | 2011-01-19 17:16:37 -0800 | 
|---|---|---|
| committer | Nick Foster <nick@nerdnetworks.org> | 2011-01-19 17:16:37 -0800 | 
| commit | fc138381ee4bd8d191795230b7447071a85e1f28 (patch) | |
| tree | 2592627042dd1d72335dbbe6fda7605285afe3d9 | |
| parent | ea20cc274cdd7ea15df2347e9d1a3539bd819bed (diff) | |
| download | uhd-fc138381ee4bd8d191795230b7447071a85e1f28.tar.gz uhd-fc138381ee4bd8d191795230b7447071a85e1f28.tar.bz2 uhd-fc138381ee4bd8d191795230b7447071a85e1f28.zip | |
master: fixed N210 analog ADC gain to "on" to fix RFX noise issue
| -rw-r--r-- | host/lib/usrp/usrp2/codec_ctrl.cpp | 3 | ||||
| -rw-r--r-- | host/lib/usrp/usrp2/codec_impl.cpp | 4 | 
2 files changed, 4 insertions, 3 deletions
| diff --git a/host/lib/usrp/usrp2/codec_ctrl.cpp b/host/lib/usrp/usrp2/codec_ctrl.cpp index 4f2cd88bb..3a34afe11 100644 --- a/host/lib/usrp/usrp2/codec_ctrl.cpp +++ b/host/lib/usrp/usrp2/codec_ctrl.cpp @@ -74,6 +74,7 @@ public:              //_ads62p44_regs.decimation = DECIMATION_DECIMATE_1;              _ads62p44_regs.power_down = ads62p44_regs_t::POWER_DOWN_NORMAL;              this->send_ads62p44_reg(0x14); +            this->set_rx_analog_gain(1);              break;          case usrp2_iface::USRP_NXXX: break; @@ -151,7 +152,7 @@ public:          switch(_iface->get_rev()){          case usrp2_iface::USRP_N200:          case usrp2_iface::USRP_N210: -            _ads62p44_regs.coarse_gain = gain ? ads62p44_regs_t::COARSE_GAIN_3_5DB : ads62p44_regs_t::COARSE_GAIN_0DB; +            _ads62p44_regs.coarse_gain = ads62p44_regs_t::COARSE_GAIN_3_5DB;//gain ? ads62p44_regs_t::COARSE_GAIN_3_5DB : ads62p44_regs_t::COARSE_GAIN_0DB;              this->send_ads62p44_reg(0x14);              break; diff --git a/host/lib/usrp/usrp2/codec_impl.cpp b/host/lib/usrp/usrp2/codec_impl.cpp index e417bc340..8299ce0a6 100644 --- a/host/lib/usrp/usrp2/codec_impl.cpp +++ b/host/lib/usrp/usrp2/codec_impl.cpp @@ -30,7 +30,6 @@ using namespace boost::assign;  //this only applies to USRP2P  static const uhd::dict<std::string, gain_range_t> codec_rx_gain_ranges = map_list_of -                                  ("analog", gain_range_t(0, float(3.5), float(3.5)))                                    ("digital", gain_range_t(0, float(6.0), float(0.5)))                                    ("digital-fine", gain_range_t(0, float(0.5), float(0.05))); @@ -127,11 +126,12 @@ void usrp2_mboard_impl::rx_codec_set_gain(float gain, const std::string &name){    assert_has(codec_rx_gain_ranges.keys(), name, "codec rx gain name");    _codec_rx_gains[name] = gain; - +/*    if(name == "analog") {      _codec_ctrl->set_rx_analog_gain(gain > 0); //just turn it on or off      return;    } +*/    if(name == "digital") {      _codec_ctrl->set_rx_digital_gain(gain);      return; | 
