Changed the casting of pointers to `long int` to `reinterpret_cast<std::intptr_t>`
in `source_impl.cc` and `sink_impl.cc`. This resolves the issue of precision
loss when compiling on 64-bit systems, where the size of pointers is 64 bits
and `long int` is typically 32 bits. Using `std::intptr_t` ensures safe
and portable casting across different platforms.
Additionally this fixes build in MSYS2 MinGW64 environment.
This was originally removed in fe03d83703
There are apparently a bunch of different compatible libmirisdr
libraries which are actually being used that have nothing in common with
the old, unmaintained hack we built this support for.
Linking to the libxtrx libs got lost while merging
the xtrx support, which led to runtime issues when trying to use it.
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Signed-off-by: Eric Wild <ewild@sysmocom.de>
All instances of BOOST_FOREACH were removed in an earlier commit, but it
was reintroduced when xtrx support was merged. I removed BOOST_FOREACH
again here.
Also, xtrx support fails to build because it relies on the
xtrx_open_list function, which was removed from the xtrx API in 2019. It
was replaced with xtrx_open_string.
I don't have xtrx hardware, so I've only tested that gr-osmosdr compiles
with these changes.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
The T/R switching code added in ae2253c516
fails to set custom filter bandwidths because it sets bandwidth and
sample rate in the wrong order. As noted in the documentation for
hackrf_set_sample_rate: "If you want to override the baseband filter
selection, you must do so after setting the sample rate."
To solve this problem I moved the set_bandwidth call after
set_sample_rate. It was also necessary to skip the call if a custom
bandwidth was not requested.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
Fix receive path hangs if another thread closes down the hackrf
receive whilst this buffer receive function is waiting to be
woken up.
Now:
* Sleep for up to 100ms each time waiting for the cond to be kicked;
* Check whether streaming is still enabled each time rather than
only when the function is entered.
This fixes hangs where consumers like gqrx via gnuradio
will do a stop_rx/start_rx very quickly to change something, and
the buffer receive path is waiting for a buffer.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
OsmoSDR and MiriSDR support was disabled in v0.2.1 because the hardware
is rare and obsolete. I think it would be useful to completely remove
the associated code, since this will reduce the future maintenance
burden for gr-osmosdr.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
Asio sockets were replaced with native BSD sockets in
e1b699fda0, and the old code was placed
behind #ifdef USE_ASIO. Subsequent commits soon broke the asio code.
Since it's been broken for a long time, I doubt anyone is using it, so
it makes sense to remove it.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
Range-based for loops are available since C++11. Using them reduces
gr-osmosdr's dependence on Boost. Here I've done the replacement using a
global search-and-replace.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
The LUT changes in 2e7d343fed inadvertently started interpreting samples
as unsigned. This change puts it back to signed (and fixes an outdated
comment).
Signed-off-by: Eric Wild <ewild@sysmocom.de>
The actual osmosdr had only a very limited production run many years
ago and is therefore of little interest to most gr-osmosdr users.
Mirisdr was experimental at best, because the dongles were never
widely avaialble outside of Japan and had multiple unconnected antenna
ports.
This fixes the template syntax that removes a set of variables from sink
blocks. Previously, this was causing NameErrors when trying to generate
a flowgraph containing a sink block.
Signed-off-by: Eric Wild <ewild@sysmocom.de>
Similar to commit 33a8d1c for RTL-SDR, this uses two lookups in a
256-element LUT instead of one lookup in a 65536-element LUT, which
saves a bit of CPU cache. It also eliminates a dependency on the
host's byte ordering.
Signed-off-by: Eric Wild <ewild@sysmocom.de>