aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/device/lms/LMSDevice.cpp
diff options
context:
space:
mode:
authorZydrunas Tamosevicius <z.tamosevicius@limemicro.com>2018-06-12 00:29:16 +0200
committerHarald Welte <laforge@gnumonks.org>2018-06-13 21:45:32 +0000
commit0494d0591604be7e54c240c0d195a34adcf9bbc2 (patch)
tree9d47767823c5e3f669fbc2d4a2ce9973ce561139 /Transceiver52M/device/lms/LMSDevice.cpp
parentfd268b6f5a596592305ef3a1efce5d0415d9d634 (diff)
lms: fix LMS_StartStream() handling for multiple channels
LMS_StartStream() (in LMSDevice::start()) was moved to separate loop. It is because LMS_SetupStream() would fail for second channel if streaming has already been started (LMS_StartStream()) for single channel configuration. Change-Id: I6704bb92864aa81417507c4ae24a22f41dc529c1
Diffstat (limited to 'Transceiver52M/device/lms/LMSDevice.cpp')
-rw-r--r--Transceiver52M/device/lms/LMSDevice.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index 9c74c0a..ad6f67b 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -205,6 +205,7 @@ bool LMSDevice::start()
unsigned int i;
+ /* configure the channels/streams */
for (i=0; i<chans; i++) {
if (LMS_EnableChannel(m_lms_dev, LMS_CH_RX, i, true) < 0)
return false;
@@ -235,7 +236,11 @@ bool LMSDevice::start()
if (LMS_SetupStream(m_lms_dev, &m_lms_stream_tx[i]) < 0)
return false;
+ }
+ /* now start the streams in a second loop, as we can no longer call
+ * LMS_SetupStream() after LMS_StartStream() of the first stream */
+ for (i = 0; i < chans; i++) {
if (LMS_StartStream(&m_lms_stream_rx[i]) < 0)
return false;