This change removes all usage of boost::mutex,
boost::mutex::scoped_lock, boost::unique_lock, and
boost::condition_variable. It also removes usage of boost::shared_ptr
and boost::weak_ptr outside of block definitions (which must continue to
use Boost until GNU Radio 3.9).
Signed-off-by: Eric Wild <ewild@sysmocom.de>
On closer inspection, switching AGC off results in samples stalling for
an extended period (hundreds of milliseconds). As such, we hit the
timeout in SoapyAirspyHF::readStream() and return SOAPY_SDR_TIMEOUT
(-1).
Things go wrong at this point. It takes a long time before readStream()
is called again, presumably because we returned 0 from work(). By this
time our buffers have overflown, readStream() returns SOAPY_SDR_OVERFLOW
(-2) and work() returns 0. We loop forever, continually overflowing
buffers.
Fix this by looping in soapy_source_c::work() when ->readStream returns
SOAPY_SDR_OVERFLOW so that we consume the buffers straight away.
Signed-off-by: Anton Blanchard <anton at ozlabs.org>
Signed-off-by: Eric Wild <ewild@sysmocom.de>
CMake 3.13 is not present in older (~2 years old)
Linux distributions and GNU Radio requires min CMake
version 3.8.
All that is needed in order to avoid bumping CMake version
is to not use 'target_link_libraries' in subdirectories.
Here this is done by creating a list of needed
libraries and adding them for linking at the end (like
it was done in gr-osmosdr before porting to GNU Radio 3.8).
One thing that is lost here is 'PRIVATE' statement in case
of FCD libraries linking.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
This is a typo, some modules use the "CORR" string
in the setFrequency(dir, chan, name, value) API
to perform fine frequency adjustments.
Updated modules will use setFrequencyCorrection(),
this is support for backwards compatible implementations.
Switch to the newer API call which can provide a list of ranges.
There are feature detection ifdefs provided by the library
so that code will always correctly compile.
* This change is backwards compatible and checks for API support for step size.
* Created soapy_common.cc/h to house common gain range functions
* Moved factory mutex declaration to common source files as well
Switch to the newer API call which can provide a list of ranges.
There are feature detection ifdefs provided by the library
so that code will always correctly compile.
The soapysdr range type does not provide a step size,
however apps like the osmocom siggen use this size for a slider,
and a value of zero will cause a divide by zero error.
Although many ranges are not actually linear,
the idea to provide some default step to avoid crashes.
A future addition to the API may include providing a step.
When the special 0.0 bandwidth setting is used, set the filter bandwidth to rate * 0.75.
Passing automatic 0.0 bandwidth for some devices was problematic.
The automatic IQ balance mode is not supported,
but we should not throw when it is set to disabled.
Setting to disabled is techinically allowable,
and currently throwing is disruptive for users.