diff options
author | Trung N Tran <trung.tran@ettus.com> | 2017-11-30 13:16:47 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:05:57 -0800 |
commit | e98a7159bea9324edc87fcee701ea4de356765bf (patch) | |
tree | 3b9a10027e381c019447f31b02b21f156acfc403 /host/lib/usrp | |
parent | 1e4e90d240dec91e56f0a0717f3e925c067105e4 (diff) | |
download | uhd-e98a7159bea9324edc87fcee701ea4de356765bf.tar.gz uhd-e98a7159bea9324edc87fcee701ea4de356765bf.tar.bz2 uhd-e98a7159bea9324edc87fcee701ea4de356765bf.zip |
mg: fix rx gain on channel 1
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp index ff4683fe5..a8eb7c6fb 100644 --- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp +++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_gain.cpp @@ -25,6 +25,7 @@ double magnesium_radio_ctrl_impl::_set_all_gain( "freq=" << freq << " Hz, " "chan=" << chan << ", " "dir=" << dir); + size_t ad9371_chan = _master?0:1; const auto gain_tuple = get_gain_tuple(gain, freq, dir); const double ad9371_gain = ((dir == RX_DIRECTION) ? AD9371_MAX_RX_GAIN : AD9371_MAX_TX_GAIN) @@ -34,7 +35,7 @@ double magnesium_radio_ctrl_impl::_set_all_gain( "AD9371 gain==" << ad9371_gain << " dB, " "DSA attenuation == " << gain_tuple.dsa_att << " dB." ); - _ad9371->set_gain(ad9371_gain, chan, dir); + _ad9371->set_gain(ad9371_gain, ad9371_chan, dir); _dsa_set_att(gain_tuple.dsa_att, chan, dir); if (dir == RX_DIRECTION or dir == DX_DIRECTION) { _all_rx_gain = gain; |