In r82xx_read, there is a 1-byte I2C write followed by the I2C read. If
this I2C write fails, r82xx_read correctly bails out but may return 0.
Callers that check whether (rc < 0) will assume that the buffer was written
when it has not been, e.g. in r82xx_set_tv_standard where
priv->fil_cal_code = data[4] & 0x0f;
consumes a garbage value for data[4].
This change resolves that issue by copying the error path from r82xx_write.
We certainly don't use quilt, as we build packages using
git-buildpackage.
This is what likely causes build failures on our osmocom nightly
builds stating
gbp:error: Non-native package 'rtl-sdr' has invalid version '0.5.4.32.3d7c'
If the package now is 'native', the errors should be gone.
As several current LTS distributions currently ship with CMake
< 3.12.0, add a work-around for CMake Issue 16967.
Otherwise we get:
CMake Error at
/usr/share/cmake-3.7/Modules/CheckCXXSourceCompiles.cmake:64 (try_compile):
Unknown extension ".cxx" for file
/tmp/rtl-sdr/build/CMakeFiles/CMakeTmp/src.cxx
try_compile() works only for enabled languages. Currently these are:
C
New minimum version is CMake 3.7.2.
This patch has been rebased to incorporate changes that happened
since the creation of the original patch.
Original Author: A. Maitland Bottoms <bottoms@debian.org>, 07 Sep 2018
Older versions of GCC will complain that it can be used
uninitialized - which is not the case, but it breaks our Jenkins
build as we build with -Werror.
I've prepared this patch in response to Debian bug #870804https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870804
It passes the text from the -a and -p options through
getaddrinfo() and uses the first result that has a valid
socket with a successful bind.
While not a complete bind to all possible valid names, it
does appear to address the use case of the bug submitter
without completely changing the program flow.
librtlsdr.pc should declare -lusb-1.0 in Libs.private section
to exclude usb library from dynamic linking.
References to libusb headers are not needed in Cflags, since these
headers are not used by external rtlsdr API, but this is optional.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784912
When trying to build a simple program which uses librtlsdr
as a subproject on Windows, CMake reported several problems
which were solved by:
- Added complete name of libusb in FindLibUSB module.
- Replaced CMAKE_SOURCE_DIR to PROJECT_SOURCE_DIR in src/CMakeLists.txt.
- Replaced header file <afxres.h> in src/rtlsdr.rc.in (only present when windows MFC is
installed) by <windows.h> which defines the same constants.
This is an import of the rtl_biast command line tool from the
rtlsdrblog github repository. It's easier to include it here than
try to package up the separate application because they both
wish to install dynamic libraries.
Gets rid of librt, which doesn't exist on OpenBSD. The version of
librtlsdr in the OpenBSD ports tree is extremely old (~2013), so this
should help some users.
Tested against tag 0.6.0, but it should apply just fine to HEAD.
Re-purpose remote-enabled EEPROM flag to determine if direct sampling mode should be forced ON. Useful for apps that don't have any direct sampling mode settings in their GUI.
Re-purpose remote-enabled EEPROM flag to determine if direct sampling mode should be forced ON. Useful for apps that don't have any direct sampling mode settings in their GUI.
Use the offset tuning button to enable the bias tee on the V3. Offset tuning is not used for the R820T so this is okay and allows us to toggle the bias tee on software that hasn't implemented specific bias tee controls.
Although we added a detection mechanism for the presence of the Kernel
bug earlier, reading from the incorrectly mapped memory might cause a
bus error on some ARM systems.
With the overall performance benefit being rather minimal for the
data rates of rtl-sdr, disable zero-copy by default.
Removed the linked list structure, locking, and malloc/free on each USB callback.
Replaced it with a non blocking ring buffer for performance. This resulted
in a large performance improvement when using an Raspberry Pi or Raspberry Pi Zero W
as a rtl_tcp server. The sample rate could be doubled and instead of wired ethernet
wifi could be used. Frequnecy change lag was reduced greatly also.
Signed-off-by: Stephen Blinick <stephen@stesoft.com>
The Linux Kernel has a bug on ARM/ARM64 systems where the USB CMA
memory is incorrectly mapped to userspace, breaking zerocopy.
When the Kernel allocates the memory, it clears it with memset().
If the mapping worked correctly, we should have zeroed out buffers,
if it doesn't, we get random Kernel memory. We now check for this,
and fall back to buffers in userspace if that's the case.
Signed-off-by: Steve Markgraf <steve@steve-m.de>