Commit Graph

448 Commits

Author SHA1 Message Date
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
rtlsdrblog
dc6dd6ae47
Update README 2020-01-22 12:07:52 +13: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
rtlsdrblog
c36500ddc9
Update README 2019-12-31 12:59:53 +13:00
rtlsdrblog
3380a12520
Update README 2019-12-20 20:14:38 +13:00
rtlsdrblog
5d87307bf3
Update README 2019-12-20 20:13:56 +13:00
rtlsdrblog
82b7ab5213
Update README 2019-12-20 17:44:50 +13: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
Adrian Chadd
43b257854c rtl_biast: Add rtl_biast
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.
2019-11-12 20:46:02 +01:00
Adrian Chadd
5d0735f5df lib: Add GPIO version of the bias tee configuration API
rtl_biast allows for non-default GPIO pins to be used.
Add an API call which allows for that.
2019-11-12 20:32:35 +01:00
Brian Waters
9d05150a64 Fix building librtlsdr on OpenBSD
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.
2019-11-11 14:28:46 +01:00
rtlsdrblog
c868a614cb Remove build folder 2019-11-01 18:37:57 +13:00
rtlsdrblog
dd0759fc52
Update README 2019-11-01 18:28:17 +13:00
rtlsdrblog
0293c8de9f
Update README 2019-11-01 18:21:23 +13:00
rtlsdrblog
47dc55765b
Update README 2019-11-01 18:15:47 +13:00
rtlsdrblog
31ad06018f
Update README 2019-11-01 17:36:54 +13:00
rtlsdrblog
4ff1c4f74f
Enable EEPROM to force direct sampling mode
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.
2019-11-01 17:34:12 +13:00
rtlsdrblog
4f6c1b2e98
Enable EEPROM to force direct sampling mode
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.
2019-11-01 17:33:14 +13:00
rtlsdrblog
8a3d6a919f
offset tuning -> bias tee hack
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.
2019-11-01 15:42:27 +13:00
Steve Markgraf
3c263b7451 rtl_eeprom: fix warnings
Account for \0 string terminator when calling strncpy().

Fixes the following GCC 9 warning:
warning: ‘__builtin_strncpy’ specified
bound 256 equals destination size
2019-11-01 02:18:54 +01:00
rtlsdrblog
6f9efc9343 lband opts 2019-10-18 06:55:36 +01:00
rtlsdrblog
9b900be7c6 fix EEPROM always on bias tee 2019-10-18 05:10:08 +01:00
rtlsdrblog
65ea7235bc add rtl_biast, add biast EEPROM hack 2019-10-17 13:18:24 +01:00
rtlsdrblog
9d3d8a5faf direct sampling added to rtl_tcp 2019-10-11 13:23:38 +01:00
rtlsdrblog
775daa821f
Merge pull request #1 from blinick/wip_rtltcp_ringbuf
Wip rtltcp ringbuf
2019-10-11 19:48:13 +13:00
rtlsdrblog
f26bf11bbd
Max VCO currents
Better L-Band locks
2019-10-11 15:06:50 +13:00
Steve Markgraf
81833a1cf6 lib: disable usbfs zero-copy support by default
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.
2019-07-16 23:49:48 +02:00
Steve Markgraf
be1d1206bf lib: fix memory leak in rtlsdr_open()
Thanks to Vincent Perrier for reporting the bug.
2019-07-16 23:31:31 +02:00
Oliver Smith
7f2ae12548 contrib/jenkins.sh: run "make maintainer-clean"
Related: OS#3047
Signed-off-by: Oliver Smith <osmith@sysmocom.de>
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2019-07-16 23:19:46 +02:00
Stephen Blinick
da0c8ea073 Clean out stale data in ring buffer when client disconnects. 2019-02-10 15:23:42 -07:00
Stephen Blinick
d0e7dcde04 Perf: Replace rtl_tcp linked list with ring buffer
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>
2019-02-10 10:20:48 -07:00
Steve Markgraf
f68bb2fa77 lib: Add workaround for Linux usbfs mmap() bug
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>
2018-10-07 01:25:07 +02:00
Steve Markgraf
c4452b6d5a change version to 0.6git
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-10-07 01:00:49 +02:00
Steve Markgraf
1f0eafe604 change version to 0.6.0
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-08-26 14:54:51 +02:00
David Woodhouse
9047eef701 Fix inline functions to use 'static inline'
With just 'inline', if the compiler decides not to inline them, it isn't
required to emit them at all. For some targets with -Os that is causing
build failures, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86360.

Perhaps we might consider using '__attribute__((always_inline))' for
GCC builds, but 'static inline' is a good start.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-07-03 23:59:01 +02:00
Harald Welte
8a26abaf79 Add Debian packaging information
This allows (among others) to build rtl-sdr nightly packages
for a variety of distributions as part of the network:osmocom:nightly
builds
2018-06-03 15:19:53 +02:00
Harald Welte
9573e68d10 README: Update homepage/wiki URL from old trac to redmine
Signed-off-by: Harald Welte <laforge@gnumonks.org>
2018-06-03 14:31:39 +02:00
Harald Welte
8e9d4e6f2a Fix "make uninstall" for documentation
During "make uninstall", the documentatin was not deleted properly,
if DESTDIR was used.  The existing commands expanded to:

make[3]: Entering directory '/home/osmocom-build/jenkins/workspace/master-rtl-sdr/a1/default/a2/default/a3/default/label/osmocom-master-debian9/librtlsdr-0.5.4.5-5c30/_build/sub'
cd /tmp/am-dc-24621/ && rm -rf /home/osmocom-build/jenkins/workspace/master-rtl-sdr/a1/default/a2/default/a3/default/label/osmocom-master-debian9/librtlsdr-0.5.4.5-5c30/_inst/share/doc/librtlsdr/librtlsdr-0.5.4.5-5c30/html

This fixes the "make distcheck" step of rtl-sdr, and hence should also
fix the long-standing jenkins build verification for rtl-sdr
at https://jenkins.osmocom.org/jenkins/job/master-rtl-sdr/

Signed-off-by: Harald Welte <laforge@gnumonks.org>
2018-06-03 13:24:42 +02:00