lms: Fix start after stop of device

Change-Id: I56358a1d1601853bc6dd2e6bb5f80798d0ba84b2
This commit is contained in:
Pau Espin 2018-12-03 11:19:52 +01:00
parent ebb37693a5
commit 69869bd58f
1 changed files with 6 additions and 0 deletions

View File

@ -213,6 +213,11 @@ bool LMSDevice::start()
unsigned int i;
if (started) {
LOGC(DDEV, ERR) << "Device already started";
return false;
}
/* configure the channels/streams */
for (i=0; i<chans; i++) {
if (LMS_EnableChannel(m_lms_dev, LMS_CH_RX, i, true) < 0)
@ -277,6 +282,7 @@ bool LMSDevice::stop()
LMS_EnableChannel(m_lms_dev, LMS_CH_TX, i, false);
}
started = false;
return true;
}