EDGE: Setup variable sampling on receive path
Allow setting the device to non single SPS sample rates - mainly
running at 4 SPS as the signal processing library does not support
other rates. Wider bandwith support is required on the receive path
to avoid 8-PSK bandlimiting distortion for EDGE.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp
index 14a4fc2..7256b9b 100644
--- a/Transceiver52M/radioInterface.cpp
+++ b/Transceiver52M/radioInterface.cpp
@@ -33,12 +33,12 @@
#define CHUNK 625
#define NUMCHUNKS 4
-RadioInterface::RadioInterface(RadioDevice *wRadio,
- size_t sps, size_t chans, size_t diversity,
+RadioInterface::RadioInterface(RadioDevice *wRadio, size_t tx_sps,
+ size_t rx_sps, size_t chans, size_t diversity,
int wReceiveOffset, GSM::Time wStartTime)
- : mRadio(wRadio), mSPSTx(sps), mSPSRx(1), mChans(chans), mMIMO(diversity),
- sendCursor(0), recvCursor(0), underrun(false), overrun(false),
- receiveOffset(wReceiveOffset), mOn(false)
+ : mRadio(wRadio), mSPSTx(tx_sps), mSPSRx(rx_sps), mChans(chans),
+ mMIMO(diversity), sendCursor(0), recvCursor(0), underrun(false),
+ overrun(false), receiveOffset(wReceiveOffset), mOn(false)
{
mClock.set(wStartTime);
}
@@ -262,7 +262,12 @@
int recvSz = recvCursor;
int readSz = 0;
const int symbolsPerSlot = gSlotLen + 8;
- int burstSize = (symbolsPerSlot + (tN % 4 == 0)) * mSPSRx;
+ int burstSize;
+
+ if (mSPSRx == 4)
+ burstSize = 625;
+ else
+ burstSize = symbolsPerSlot + (tN % 4 == 0);
/*
* Pre-allocate head room for the largest correlation size
@@ -297,7 +302,8 @@
tN = rcvClock.TN();
- burstSize = (symbolsPerSlot + (tN % 4 == 0)) * mSPSRx;
+ if (mSPSRx != 4)
+ burstSize = (symbolsPerSlot + (tN % 4 == 0)) * mSPSRx;
}
if (readSz > 0) {