From 5f34bce4ef9d7c274b4b704c08f4c03611ce06c6 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 8 Jul 2020 10:20:24 +0200 Subject: e3xx: Enable AGC property tree nodes This enables AGC via multi_usrp and property tree for E31x and E320. --- host/lib/usrp/dboard/e3xx/e3xx_radio_ctrl_init.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/host/lib/usrp/dboard/e3xx/e3xx_radio_ctrl_init.cpp b/host/lib/usrp/dboard/e3xx/e3xx_radio_ctrl_init.cpp index b2cdee696..2b3de3303 100644 --- a/host/lib/usrp/dboard/e3xx/e3xx_radio_ctrl_init.cpp +++ b/host/lib/usrp/dboard/e3xx/e3xx_radio_ctrl_init.cpp @@ -236,6 +236,21 @@ void e3xx_radio_ctrl_impl::_init_frontend_subtree( }); } + // RX AGC setup + const std::list mode_strings{"slow", "fast"}; + const std::string rx_fe = get_which_ad9361_chain(RX_DIRECTION, chan_idx); + subtree->create(rx_fe_path / "gain/agc/enable") + .set(E3XX_DEFAULT_AGC_ENABLE) + .add_coerced_subscriber( + [this, rx_fe](const bool enable) { _ad9361->set_agc(rx_fe, enable); }); + subtree->create(rx_fe_path / "gain/agc/mode/value") + .set(mode_strings.front()) + .add_coerced_subscriber([this, rx_fe](const std::string& value) { + _ad9361->set_agc_mode(rx_fe, value); + }); + subtree->create>(rx_fe_path / "gain/agc/mode/options") + .set(mode_strings); + // TX LO lock sensor ////////////////////////////////////////////////////// // Note: The AD9361 LO lock sensors are generated programmatically in // set_rpc_client(). The actual lo_locked publisher is also set there. -- cgit v1.2.3-59-g8ed1b