lms: Destroy streams on device stop
They are recreated during start(). Actually, if they are not stopped
here, during start() after stop(), LMS_SetupStream() will fail because
it will detect the streams are already opened.
Change-Id: I70d47c287aabdabc5dc1304a942d130aeb10bdc5
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index cb5e31d..2ceca0d 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -277,7 +277,11 @@
for (i=0; i<chans; i++) {
LMS_StopStream(&m_lms_stream_tx[i]);
LMS_StopStream(&m_lms_stream_rx[i]);
+ }
+ for (i=0; i<chans; i++) {
+ LMS_DestroyStream(m_lms_dev, &m_lms_stream_tx[i]);
+ LMS_DestroyStream(m_lms_dev, &m_lms_stream_rx[i]);
LMS_EnableChannel(m_lms_dev, LMS_CH_RX, i, false);
LMS_EnableChannel(m_lms_dev, LMS_CH_TX, i, false);
}