From e380af3ecc94b64754de501deb211a31ba6573f9 Mon Sep 17 00:00:00 2001 From: "kurtis.heimerl" Date: Sat, 26 Nov 2011 03:18:55 +0000 Subject: transceiver: make the transmit drive loop bus dependent With the introduction of the B100, there is USB support using UHD devices. The characteristics of the trasmit side burst submissions are more reflective of the bus type than the device or driver. Use a fixed latency interval for network devices and the adaptive underrun approach for USB devices - regardless of driver or device type. The GPMC based transport on the E100 appears unaffected by either latency scheme, which defaults to network. Signed-off-by: Thomas Tsou git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2677 19bc5d8c-e614-43d4-8b26-e1612bc8e597 --- Transceiver52M/Transceiver.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'Transceiver52M/Transceiver.cpp') diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index 20c6aad..d152b2d 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -714,27 +714,27 @@ void Transceiver::driveTransmitFIFO() while (radioClock->get() + mTransmitLatency > mTransmitDeadlineClock) { // if underrun, then we're not providing bursts to radio/USRP fast // enough. Need to increase latency by one GSM frame. -#ifndef USE_UHD - if (mRadioInterface->isUnderrun()) { - // only do latency update every 10 frames, so we don't over update - if (radioClock->get() > mLatencyUpdateTime + GSM::Time(10,0)) { - mTransmitLatency = mTransmitLatency + GSM::Time(1,0); - LOG(INFO) << "new latency: " << mTransmitLatency; - mLatencyUpdateTime = radioClock->get(); - } + 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)) { + mTransmitLatency = mTransmitLatency + GSM::Time(1,0); + LOG(INFO) << "new latency: " << mTransmitLatency; + mLatencyUpdateTime = radioClock->get(); + } + } + 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 (radioClock->get() > mLatencyUpdateTime + GSM::Time(216,0)) { + mTransmitLatency.decTN(); + LOG(INFO) << "reduced latency: " << mTransmitLatency; + mLatencyUpdateTime = radioClock->get(); + } + } + } } - 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 (radioClock->get() > mLatencyUpdateTime + GSM::Time(216,0)) { - mTransmitLatency.decTN(); - LOG(INFO) << "reduced latency: " << mTransmitLatency; - mLatencyUpdateTime = radioClock->get(); - } - } - } -#endif // time to push burst to transmit FIFO pushRadioVector(mTransmitDeadlineClock); mTransmitDeadlineClock.incTN(); -- cgit v1.2.3