mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-26 21:58:37 -05:00
Fix for above 3Mhz sample rate on LimeSDR-USB
This problem could also be present on other devices using the FX3 driver and is perhaps part of a larger general problem in the LMS7 Soapy module.
This commit is contained in:
parent
94e252db51
commit
ed5993748f
@ -446,12 +446,18 @@ void SDRThread::updateSettings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rate_changed.load()) {
|
if (rate_changed.load()) {
|
||||||
|
|
||||||
device->setSampleRate(SOAPY_SDR_RX,0,sampleRate.load());
|
device->setSampleRate(SOAPY_SDR_RX,0,sampleRate.load());
|
||||||
// TODO: explore bandwidth setting option to see if this is necessary for others
|
// TODO: explore bandwidth setting option to see if this is necessary for others
|
||||||
if (device->getDriverKey() == "bladeRF") {
|
if (device->getDriverKey() == "bladeRF") {
|
||||||
device->setBandwidth(SOAPY_SDR_RX, 0, sampleRate.load());
|
device->setBandwidth(SOAPY_SDR_RX, 0, sampleRate.load());
|
||||||
}
|
}
|
||||||
|
// Fix for LimeSDR-USB not properly handling samplerate changes while device is
|
||||||
|
// active.
|
||||||
|
else if (device->getHardwareKey() == "LimeSDR-USB") {
|
||||||
|
std::cout << "SDRThread::updateSettings(): Force deactivate / activate limeSDR stream" << std::endl << std::flush;
|
||||||
|
device->deactivateStream(stream);
|
||||||
|
device->activateStream(stream);
|
||||||
|
}
|
||||||
sampleRate.store(device->getSampleRate(SOAPY_SDR_RX,0));
|
sampleRate.store(device->getSampleRate(SOAPY_SDR_RX,0));
|
||||||
numChannels.store(getOptimalChannelCount(sampleRate.load()));
|
numChannels.store(getOptimalChannelCount(sampleRate.load()));
|
||||||
numElems.store(getOptimalElementCount(sampleRate.load(), TARGET_DISPLAY_FPS));
|
numElems.store(getOptimalElementCount(sampleRate.load(), TARGET_DISPLAY_FPS));
|
||||||
|
Loading…
Reference in New Issue
Block a user