From e90a42becce19e9adcbf648d34fec5332cebc5ba Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Wed, 13 Nov 2013 23:38:09 -0500 Subject: Transceiver52M: Add dual channel diversity receiver option This patch add support for dual channel diversity on the receive path. This allows two antennas two shared antennas to be used for each ARFCN handling channel in the receiver. This configuration may improvde performance in multi-path fading environments, however, noise andpotential interference levels are increased due to the higher bandwidth used. The receive path is oversampled by a factor of four for a rate of 1.083333 Msps. If the receive paths are tuned within a maximum channel spacing (currently set at 600 kHz), then both ARFCN frequencies are processed by each channel of the receiver. Otherwise, the frequency shifted diversity path is disabled and standard non-diversity operation takes place. Diversity processing is handled by selecting the path with the higheset energy level and discarding the burst on the second path. Selection occurs on a burst-by-burst basis. Signed-off-by: Thomas Tsou --- Transceiver52M/radioInterfaceResamp.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'Transceiver52M/radioInterfaceResamp.cpp') diff --git a/Transceiver52M/radioInterfaceResamp.cpp b/Transceiver52M/radioInterfaceResamp.cpp index 95ed16d..6f14a42 100644 --- a/Transceiver52M/radioInterfaceResamp.cpp +++ b/Transceiver52M/radioInterfaceResamp.cpp @@ -50,16 +50,14 @@ extern "C" { static Resampler *upsampler = NULL; static Resampler *dnsampler = NULL; -static int resamp_inrate = 0; -static int resamp_inchunk = 0; -static int resamp_outrate = 0; -static int resamp_outchunk = 0; +static size_t resamp_inrate = 0; +static size_t resamp_inchunk = 0; +static size_t resamp_outrate = 0; +static size_t resamp_outchunk = 0; RadioInterfaceResamp::RadioInterfaceResamp(RadioDevice *wRadio, - int wReceiveOffset, - size_t sps, size_t chan, - GSM::Time wStartTime) - : RadioInterface(wRadio, wReceiveOffset, sps, chan, wStartTime), + size_t sps, size_t chans) + : RadioInterface(wRadio, sps, chans), innerSendBuffer(NULL), outerSendBuffer(NULL), innerRecvBuffer(NULL), outerRecvBuffer(NULL) { @@ -191,7 +189,7 @@ void RadioInterfaceResamp::pullBuffer() &overrun, readTimestamp, &local_underrun); - if (num_recv != resamp_outchunk) { + if (num_recv != (int) resamp_outchunk) { LOG(ALERT) << "Receive error " << num_recv; return; } -- cgit v1.2.3