Commit Graph

412 Commits

Author SHA1 Message Date
Steve Markgraf 7ebcb041f2 lib: set SOVERSION back to 0
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.
2024-04-07 21:42:51 +02:00
Harald Welte ab2434e30d Add funding link to github mirror
see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository
2024-03-23 11:28:41 +01:00
Ethan Halsall d81ef9a9d9 fix: round gain input to nearest value 2024-03-10 23:01:56 +01:00
Ethan Halsall e04c42c019 fix: set fc0012 gain to low on init 2024-03-10 23:01:56 +01:00
Steve Markgraf ef23f806ec Merge pull request 'r82xx: improved tuning speed and accuracy' (#6) from sultanqasim/rtl-sdr:upstream_fast_retune into master
Reviewed-on: #6
2024-03-08 20:18:37 +00:00
Steve Markgraf dd2511a7c2 Merge pull request 'Improve CLI usage docs: '-d' also accepts serial' (#5) from kerel-fs/rtl-sdr:docs into master
Reviewed-on: #5
2024-03-08 20:08:08 +00:00
Sultan Qasim Khan 2acb75cff3 r82xx: batch register writes for tuning
Batch six register writes into a single step to speed up retuning.
2024-03-07 17:46:00 -05:00
Sultan Qasim Khan 0b64f07fd5 r82xx: avoid redundant register writes for speed 2024-02-29 12:53:28 -05:00
Oliver Jowett f5978e8871 r82xx: improve tuner precision
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.
2024-02-29 12:53:27 -05:00
hayati ayguen 91ef34d922 improve CLI usage docs: '-d' also accepts serial
commit e30dbd52b638629d58ae6e33ebcf5a2d71a768a5 in https://github.com/librtlsdr/librtlsdr

Signed-off-by: hayati ayguen <h_ayguen@web.de>
[F. Schmidt: rebased on latest master]
Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>
2024-02-16 17:27:28 +01:00
Clayton Smith af33886796 Only use LIBUSB_LINK_LIBRARIES if it exists
FindPkgConfig only sets <XXX>_LINK_LIBRARIES in CMake >= 3.12.

Signed-off-by: Clayton Smith <argilo@gmail.com>
Signed-off-by: Dimitri Stolnikov <horiz0n@gmx.net>
2023-12-24 04:31:25 +01:00
Dimitri Stolnikov b85f037d85 Merge pull request 'Use library paths from pkg-config' (#4) from argilo/rtl-sdr:libusb-pkgconfig into master
Reviewed-on: #4
2023-12-07 17:03:28 +00:00
Clayton Smith c945bd075c Use library paths from pkg-config
Signed-off-by: Clayton Smith <argilo@gmail.com>
2023-12-06 21:47:25 -05:00
Mikael Falkvidd 448a6551ab Fix small typo in rtl_sdr man page 2023-11-15 10:08:39 +01:00
Oliver Smith 420086af84 Release 2.0.1
Create a fixup release that contains an updated debian/changelog.

Change-Id: Ie7df1b4e2b703d1c562d4394fecb2cf2dc1da594
2023-11-03 10:21:21 +01:00
Oliver Smith 632c77bf43 gitignore: add files created by autotools
Change-Id: Ie84a7003ee5aa564e9cfaa17dbcde98b504ce2c0
2023-11-03 10:16:50 +01:00
Oliver Smith 3818ea771a debian/changelog: update for 2.0.0
Change-Id: Iff525cf65a0b74a331a56d03118c222057189066
2023-11-03 10:16:07 +01:00
Steve Markgraf 42e820754c change version to 2.0.0
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2023-11-02 13:29:20 +01:00
rtlsdrblog 2f28c0f498 add direct sampling to rtl_sdr 2023-11-02 12:28:54 +01:00
rtlsdrblog 6de0987c3d add -D direct sampling flag to rtl_tcp 2023-11-02 12:28:51 +01:00
rtlsdrblog 138cd052f5 add blog v4 upconverter gpio switch
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.
2023-11-02 12:28:34 +01:00
rtlsdrblog 178267c399 fix rtl_tcp error on windows when hints not initialized to 0 2023-11-02 12:09:46 +01:00
rtlsdrblog 6ca9082aec fix rtl_tcp on macos 2023-11-02 12:08:22 +01:00
rtlsdrblog 1261fbb285 add rtl-sdr blog v4 support 2023-08-23 00:34:08 +02:00
Tobias Girstmair 142325a93c Fix signal handler from getting stuck in an endless loop
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.
2022-12-17 21:18:49 +01:00
Clayton Smith 5e73f90f1d lib: Stop applying workaround for libusb < 1.0.9
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
849f8efca4. 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
2659e2df31 might stem from the same bug.
2022-01-19 17:59:16 +01:00
jvde.github 2659e2df31 lib: force wait state after cancel of usb transfer
..and before handling usb events

This avoids an occasional crash when closing the device on Windows.
Also see https://github.com/libusb/libusb/issues/1043.
2022-01-08 20:57:02 +01:00
Martin Hauke d770add42e Fix minGW build
MinGW-w64 ships all Windows SDK headers as lowercase, which prevents
cross-compiling this code from Linux.
2021-09-11 19:09:17 +02:00
Doug Hammond a4eab76c8c rtl_fm: add a new option to select 2nd direct sampling mode 2021-08-18 23:14:10 +02:00
Oliver Smith 3163b8817f rtl_tcp: put new DEFAULT_* constants in defines
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
2021-08-18 10:32:10 +02:00
David Neiss 641c221fab rtl_tcp: Extracted some constants out of printf strings
The help output contained constants that should print values
based on code constants and not be hardcoded into the print strings.
2021-08-17 23:39:17 +02:00
Eric Wild 0847e93e08 fix windows build
We really should not have pkgconfig as a build requirement on windows.
2020-11-01 01:13:33 +01:00
Eric Wild ed0317e6a5 cmake: populate pkgconfig file with prefix
Previously the prefix and related paths were not set.
2020-08-02 23:48:42 +02:00
Steve Markgraf c1faae295c Add rtl_biast as install target
Thanks to https://github.com/erikarn for pointing this out.
2020-06-06 21:30:44 +02:00
Derrick Pallas d794155ba6 tuner_r82xx: fix short-write in r82xx_read
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.
2020-03-18 23:51:46 +01:00
Harald Welte dc92af01bf debian: fix source/format from quilt to native
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.
2020-03-02 23:21:17 +01:00
Steve Markgraf d6ca2b0fc5 Fix for CMake < 3.12.0
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
2020-03-02 21:11:40 +01:00
Steve Markgraf 3d7cdc5221 Add missing rtlsdrConfig.cmake
This file was missing in commit
849f8efca4.
2020-02-27 00:18:26 +01:00
Steve Markgraf f016af882f Update Debian packaging information 2020-02-27 00:07:47 +01:00
Steve Markgraf 849f8efca4 Modernize CMake
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
2020-02-26 23:55:32 +01:00
Steve Markgraf f427883320 rtl_tcp: Initialize listensocket
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.
2020-02-26 23:52:02 +01:00
A. Maitland Bottoms 8985b45e1f rtl_tcp: Add IPv6 support
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.
2020-02-26 22:55:23 +01:00
A. Maitland Bottoms b281473156 Use udev uaccess rules 2020-02-26 22:39:45 +01:00
A. Maitland Bottoms f2a9a81c4b rtl_fm/rtl_power: Improve scanning range parsing 2020-02-26 22:16:29 +01:00
A. Maitland Bottoms b2ee24eff5 CMake: support for libusb on GNU/Hurd
Debian builds on hurd-i386 with a variant of libusb.
2020-02-26 22:16:29 +01:00
A. Maitland Bottoms 222517b506 Improve librtlsdr.pc file
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
2020-02-26 22:16:29 +01:00
Benjamin Larsson 1dff8e0b4c lib: enable better UHF reception (>862MHz) for FC0013 2020-02-18 20:52:20 +01:00
Steve Markgraf be2e4f899a set CMake policy CMP0075 if it exists
Otherwise newer versions of CMake are throwing a warning.
2020-01-19 16:56:51 +01:00
leonsal b5af355b1d Fixed issues compiling on Windows with MSVC, CMake and NMake (#61)
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.
2019-12-03 20:47:17 +01:00
leonsal bd73737c49 allow building librtlsdr as CMake subproject
Replace CMAKE_SOURCE_DIR by PROJECT_SOURCE_DIR in main CMakeLists.txt
to fix CMake errors when building librtlsdr as a subproject.
2019-11-12 21:09:05 +01:00