diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2018-06-19 10:44:03 +0200
committerHarald Welte <laforge@gnumonks.org>2018-06-20 07:41:16 +0000
commit58c89fb8d62f70adf5305becf04264c750acba63 (patch)
parent16e7e20f8553060ece8d54ae72b33dc06a6f3e2c (diff)
lms: Allow values diff than 34dB to be set by setRxGain()
Until now, setRxGain in LMSDevice did not take into account the setter parameter and was always using hardcoded 34dB, which was experimentally found to be a good default value. Let's force that value during initialization, but still allow the upper layers (controlled by BTS) to set different values. osmo-bts only sends a SETRXGAIN command (which calls setRxGain in osmo-trx) if a value is explicitly set in its VTY config, so we are on the safe side if the user doesn't explicitly configure a desired dB. Change-Id: I5684e675281a3f581855dbb56d199a6fe238a712
1 files changed, 1 insertions, 3 deletions
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index 16585e6..ffea505 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -223,7 +223,7 @@ bool LMSDevice::start()
// Set gains to midpoint
setTxGain((minTxGain() + maxTxGain()) / 2, i);
- setRxGain((minRxGain() + maxRxGain()) / 2, i);
+ setRxGain(34.0, i);
m_lms_stream_rx[i] = {};
m_lms_stream_rx[i].isTx = false;
@@ -327,8 +327,6 @@ double LMSDevice::setRxGain(double dB, size_t chan)
return 0.0;
- dB = 34.0;
if (dB > maxRxGain())
dB = maxRxGain();
if (dB < minRxGain())