aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/Transceiver.cpp
diff options
context:
space:
mode:
authorttsou <ttsou@19bc5d8c-e614-43d4-8b26-e1612bc8e597>2012-08-08 00:51:31 +0000
committerttsou <ttsou@19bc5d8c-e614-43d4-8b26-e1612bc8e597>2012-08-08 00:51:31 +0000
commit2173abfe56edbffbf8ca265523a35e7a566db66a (patch)
tree94efb6366150cb0348b8d904734e9329ccca66a6 /Transceiver52M/Transceiver.cpp
parent9123274be93080b69de3a576c71ec9290fb3e5d8 (diff)
transceiver: b100: raise minimum transmit latency value
Put a floor on the transmit latency of the B100 in order to suppress underruns in typical conditions. Empirical data from a handful of relatively recent machines shows that the B100 will underrun when the transmit threshold is reduced to a time of 6 and a half frames, so we set a minimum 7 frame threshold. The overall benefit should be marginal and may increase the possibility of bursts arriving stale (after the trasmit deadline), but will reduce the number of alarming UHD related messages that appear in the log file. This patch is UHD and B100 specific - USRP1 is unaffected. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@3980 19bc5d8c-e614-43d4-8b26-e1612bc8e597
Diffstat (limited to 'Transceiver52M/Transceiver.cpp')
-rw-r--r--Transceiver52M/Transceiver.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index d152b2d..caf7bf0 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -32,7 +32,17 @@
#include "Transceiver.h"
#include <Logger.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define USB_LATENCY_INTRVL (10,0)
+#if USE_UHD
+# define USB_LATENCY_MIN (6,7)
+#else
+# define USB_LATENCY_MIN (1,1)
+#endif
Transceiver::Transceiver(int wBasePort,
const char *TRXAddress,
@@ -716,8 +726,8 @@ void Transceiver::driveTransmitFIFO()
// enough. Need to increase latency by one GSM frame.
if (mRadioInterface->getBus() == RadioDevice::USB) {
if (mRadioInterface->isUnderrun()) {
- // only do latency update every 10 frames, so we don't over update
- if (radioClock->get() > mLatencyUpdateTime + GSM::Time(10,0)) {
+ // only update latency at the defined frame interval
+ if (radioClock->get() > mLatencyUpdateTime + GSM::Time(USB_LATENCY_INTRVL)) {
mTransmitLatency = mTransmitLatency + GSM::Time(1,0);
LOG(INFO) << "new latency: " << mTransmitLatency;
mLatencyUpdateTime = radioClock->get();
@@ -726,7 +736,7 @@ void Transceiver::driveTransmitFIFO()
else {
// if underrun hasn't occurred in the last sec (216 frames) drop
// transmit latency by a timeslot
- if (mTransmitLatency > GSM::Time(1,1)) {
+ if (mTransmitLatency > GSM::Time(USB_LATENCY_MIN)) {
if (radioClock->get() > mLatencyUpdateTime + GSM::Time(216,0)) {
mTransmitLatency.decTN();
LOG(INFO) << "reduced latency: " << mTransmitLatency;