Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downstream #2

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open

Downstream #2

wants to merge 58 commits into from

Conversation

paulyc
Copy link
Owner

@paulyc paulyc commented Jul 28, 2020

No description provided.

osmith42 and others added 30 commits July 16, 2019 23:19
Related: OS#3047
Signed-off-by: Oliver Smith <[email protected]>
Signed-off-by: Steve Markgraf <[email protected]>
Thanks to Vincent Perrier for reporting the bug.
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.
Account for \0 string terminator when calling strncpy().

Fixes the following GCC 9 warning:
warning: ‘__builtin_strncpy’ specified
bound 256 equals destination size
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.
rtl_biast allows for non-default GPIO pins to be used.
Add an API call which allows for that.
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.
Replace CMAKE_SOURCE_DIR by PROJECT_SOURCE_DIR in main CMakeLists.txt
to fix CMake errors when building librtlsdr as a subproject.
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.
Otherwise newer versions of CMake are throwing a warning.
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
Debian builds on hurd-i386 with a variant of libusb.
I've prepared this patch in response to Debian bug #870804
https://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.
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.
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  <[email protected]>, 07 Sep 2018
This file was missing in commit
849f8ef.
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
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.
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.
Previously the prefix and related paths were not set.
We really should not have pkgconfig as a build requirement on windows.
The help output contained constants that should print values
based on code constants and not be hardcoded into the print strings.
Fix failures with some GCC versions:
  /usr/src/packages/BUILD/src/rtl_tcp.c:90:24: error: initializer element is not constant
   static int llbuf_num = DEFAULT_MAX_NUM_BUFFERS;

Fixes: 641c22 ("rtl_tcp: Extracted some constants out of printf strings")
Change-Id: Ia9e18d4c22d957f561dcdaf2657bb6d201374375
MinGW-w64 ships all Windows SDK headers as lowercase, which prevents
cross-compiling this code from Linux.
jvde-github and others added 28 commits January 8, 2022 20:57
..and before handling usb events

This avoids an occasional crash when closing the device on Windows.
Also see libusb/libusb#1043.
Librtlsdr has a workaround for libusb versions that lack
libusb_handle_events_timeout_completed, which was added in version 1.0.9
(released 2012-04-02). The workaround is always applied unless the
HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED macro is set, but the cmake
code that sets this macro was removed in
849f8ef. As a result, the workaround is
now always applied. This results in an extra 1-second delay whenever a
GNU Radio flowgraph containing an RTL-SDR block is stopped, which makes
operations like switching between demodulators in Gqrx annoyingly slow.

To solve this problem, I've simply removed the workaround, as it should
no longer be needed.

I wonder if perhaps the workaround recently applied in
2659e2d might stem from the same bug.
The signal handler for SIGINT/TERM/QUIT and, importantly, SIGPIPE tries
to write an informational message to stderr. When however stderr is
redirected to a closed pipe, this will cause (another) SIGPIPE, and in
turn the signal handler will get called again, and again and again.

Since we intend to exit rtl_fm anyways, we can just ignore this signal.
In future blog v4 production batches (out in several months time), it
will be possible to turn off the upconverter when tuned outside of the
HF bands. The code controls the GPIOs to turn off the upconverter
when it is not in use.
Signed-off-by: Steve Markgraf <[email protected]>
Change-Id: Iff525cf65a0b74a331a56d03118c222057189066
Change-Id: Ie84a7003ee5aa564e9cfaa17dbcde98b504ce2c0
Create a fixup release that contains an updated debian/changelog.

Change-Id: Ie7df1b4e2b703d1c562d4394fecb2cf2dc1da594
FindPkgConfig only sets <XXX>_LINK_LIBRARIES in CMake >= 3.12.

Signed-off-by: Clayton Smith <[email protected]>
Signed-off-by: Dimitri Stolnikov <[email protected]>
commit e30dbd5 in https://github.com/librtlsdr/librtlsdr

Signed-off-by: hayati ayguen <[email protected]>
[F. Schmidt: rebased on latest master]
Signed-off-by: Fabian P. Schmidt <[email protected]>
Improve tuner precision by calculating the VCO divisor at full precision, not
at kHz resolution. Also replace the manual divison loop with a simpler
fixed-point calculation.
Batch six register writes into a single step to speed up retuning.
When the version was incremented to 2.0.0, this resulted
in the SOVERSION being set to 2, indicating an ABI change,
which was actually not the case.

People have been complaining that software linked against
librtlsdr.so.0 is no longer working, so change the SOVERSION
back to 0.
Change-Id: I7723639673836905af2bf4551816d8503ea74ae1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.