diff options
author | Tom Tsou <tom.tsou@ettus.com> | 2016-07-20 16:35:03 -0700 |
---|---|---|
committer | Tom Tsou <tom.tsou@ettus.com> | 2016-07-20 16:36:27 -0700 |
commit | 8f0ccf618d553b2731caa24a2575a48065917959 (patch) | |
tree | a2023374ba4f3094307c98a16dd13bb122f90656 /Transceiver52M/radioInterfaceResamp.cpp | |
parent | 06676ead634d85d2acdd84dfdd79d55dd618187b (diff) |
uhd: Update USRP2/N200/N210 for 4 SPS Rx
Requires changing the radioInterface API to pass in Rx side SPS
value. Update the (deprecated) diversity configuration to match
as well.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Diffstat (limited to 'Transceiver52M/radioInterfaceResamp.cpp')
-rw-r--r-- | Transceiver52M/radioInterfaceResamp.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/Transceiver52M/radioInterfaceResamp.cpp b/Transceiver52M/radioInterfaceResamp.cpp index 26dd40b..b0f799e 100644 --- a/Transceiver52M/radioInterfaceResamp.cpp +++ b/Transceiver52M/radioInterfaceResamp.cpp @@ -58,10 +58,9 @@ static size_t resamp_outrate = 0; static size_t resamp_outchunk = 0; RadioInterfaceResamp::RadioInterfaceResamp(RadioDevice *wRadio, - size_t sps, size_t chans) - : RadioInterface(wRadio, sps, chans), - outerSendBuffer(NULL), - outerRecvBuffer(NULL) + size_t tx_sps, size_t rx_sps) + : RadioInterface(wRadio, tx_sps, rx_sps, 1), + outerSendBuffer(NULL), outerRecvBuffer(NULL) { } @@ -97,11 +96,6 @@ bool RadioInterfaceResamp::init(int type) { float cutoff = 1.0f; - if (mChans != 1) { - LOG(ALERT) << "Unsupported channel configuration " << mChans; - return false; - } - close(); sendBuffer.resize(1); @@ -126,13 +120,8 @@ bool RadioInterfaceResamp::init(int type) return false; } - resamp_inchunk = resamp_inrate * 4; - resamp_outchunk = resamp_outrate * 4; - - if (resamp_inchunk * NUMCHUNKS < 157 * mSPSTx * 2) { - LOG(ALERT) << "Invalid inner chunk size " << resamp_inchunk; - return false; - } + resamp_inchunk = resamp_inrate * 4 * mSPSRx; + resamp_outchunk = resamp_outrate * 4 * mSPSRx; if (mSPSTx == 4) cutoff = RESAMP_TX4_FILTER; |