Since a typo in rtlsdr_set_gpio_output() was fixed,
FC0012 tuners were not detected anymore, as the reset pin
is actually 4, not 5.
Thanks to David Basden et al for reporting the bug.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
At least one distributor of rtl-sdr dongles (rtl-sdr.com) added
a bias-t to their dongles which could be toggled via GPIO P0 of the
RTL2832U chip.
source: http://www.rtl-sdr.com/rtl-sdr-blog-v-3-dongles-user-guide/
Signed-off-by: Steve Markgraf <steve@steve-m.de>
This improves SDR performence for nearby channel interference.
As a sideeffect also improves dynamic range becase ADC is not overloaded
by onwanted singlas.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
In contradiction with the documentation, e4k_reg_write() was
returning the value 2 upon success (the number of bytes written),
not zero as documented.
Patched to return zero upon success.
As a consequence, this corrects also the return value of
e4k_reg_set_mask() and e4k_dc_offset_calibrate().
So far we had 32 * 256KB which was a bit overkill,
15 are more than enough.
15 was chosen instead of 16 because at least on Linux
there seems to be a system-wide limit of 63 transfers
(when they are 256KB large), so 4 dongles can be used
on a single machine without lowering the default transfer
number.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Otherwise the new transfer status does not propagate
into the xfer->status and we try to cancel all transfers
twice.
Also replace the ifdefs with a single macro for backwards
compatibility.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
libusb < 1.0.9 doesn't have libusb_handle_events_timeout_completed(),
but libusb <= 1.0.8 doesn't have version.h, so we need to check
for the function.
The cmake-code was borrowed from UHD, which also checks
for libusb_error_name(), we add that as well since it might come
handy later on.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Now we're using libusb_handle_events_timeout_completed()
instead of the deprecated libusb_handle_events_timeout(),
and notify our async state machine when rtlsdr_cancel_async()
is called. This speeds up exiting from any program that uses the
device asynchronously.
Signed-off-by: Steve Markgraf <steve@steve-m.de>
Thanks to Joris van Rantwijk for finding what seems to be
a hardware limitation/bug (bit 28 of the rsamp register being
forced to the value of bit 27).
Signed-off-by: Steve Markgraf <steve@steve-m.de>