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>