aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-07-16lib: disable usbfs zero-copy support by defaultHEADmasterSteve Markgraf3-1/+15
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-16lib: fix memory leak in rtlsdr_open()Steve Markgraf1-0/+3
Thanks to Vincent Perrier for reporting the bug.
2019-07-16contrib/jenkins.sh: run "make maintainer-clean"Oliver Smith1-0/+1
Related: OS#3047 Signed-off-by: Oliver Smith <osmith@sysmocom.de> Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-10-07lib: Add workaround for Linux usbfs mmap() bugSteve Markgraf1-2/+17
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-07change version to 0.6gitSteve Markgraf1-1/+1
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-08-26change version to 0.6.00.6.0Steve Markgraf1-1/+1
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-07-03Fix inline functions to use 'static inline'David Woodhouse2-5/+5
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-06-03Add Debian packaging informationHarald Welte29-0/+1507
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-03README: Update homepage/wiki URL from old trac to redmineHarald Welte1-1/+1
Signed-off-by: Harald Welte <laforge@gnumonks.org>
2018-06-03Fix "make uninstall" for documentationHarald Welte1-1/+1
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-05-25tuner_r82xx: turn off loop-through, remove dead codeSteve Markgraf1-73/+13
As pointed out by Carl Laufer on the mailing list, turning the loop-through output off reduces the current consumption by 10-20mA which in turn reduces the heat a bit. So far there seem to be no devices that have anything connected to the loop-through output. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-05-23rtl_adsb: fix hanging upon a signal in Fedora 27Pete Zaitcev1-0/+2
This code stayed unchanged for many years, but for some reason rtl_adsb started hanging upon exit: *b66116a5164b69281eacc42ae950; ^CSignal caught, exiting! <------ hangs here forever Examining it with gdb reveals that the demod thread waits peacefully on the condition variable, which we're trying to destroy. Either the signals killed all threads before, or condition variables were possible to destroy while other threads still waited on them. The easiest fix appears to be just cancel the demod thread and wait for it to exit before proceeding for the door. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-05-01lib: use USB zero-copy transfers if possibleSteve Markgraf1-8/+60
Decreases CPU load especially for embedded machines. Requires Linux >= 4.6 and libusb >= 1.0.21. If this is not the case or the allocation fails, we will fall back to buffers allocated in userspace. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-05-01Fix build with MinGWMartin Hauke1-1/+3
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-05-01change version to 0.6gitSteve Markgraf1-2/+2
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-04-29change version to 0.5.4v0.5.40.5.4Steve Markgraf1-1/+1
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-04-26rtl_test: fix build on Mac OSSteve Markgraf1-2/+2
Thanks to mot for reporting. closes #3130 Signed-off-by: Steve Markgraf <steve@steve-m.de>
2018-04-19Makefile.am: Fix "permission denied" during "make distcheck"Harald Welte1-1/+1
This fixes the following error during "make distcheck": echo 0.5.3.24-2a36 > ../../.version-t && mv ../../.version-t ../../.version /bin/sh: ../../.version-t: Permission denied
2018-04-18add contrib/jenkins.sh for build testingHarald Welte1-0/+40
2018-04-18configure.ac: Add --enable-sanitize and --enable-werrorHarald Welte1-0/+27
this is "osmocom standard" these days, and is used by our CI scripts
2018-04-18fix "-Wshift-negative-value" compiler warning on ggc-7.3.0Harald Welte1-1/+1
2018-04-18cosmetic: Fix "implicit fall-through" gcc 7.3.0 warningsHarald Welte3-0/+6
2018-02-20lib: fix FC0012 reset GPIOSteve Markgraf1-3/+3
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>
2018-02-20rtl_test: Support PPM error measurement on Windows.Kacper Michajłow1-12/+46
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2017-09-19fix for msvc14Hoernchen1-0/+3
2017-06-13Add option '-T' for activating bias-T in rtl_(adsb|fm|power|tcp)hayati ayguen4-5/+41
* added debug output when activating Signed-off-by: hayati ayguen <h_ayguen@web.de> * fixed options argument Signed-off-by: Fabian P. Schmidt <kerel-fs@gmx.de> Signed-off-by: Steve Markgraf <steve@steve-m.de>
2017-06-12rtl_tcp: add command for bias tee controlDimitri Stolnikov1-0/+4
2017-06-09lib: Use GPIO P0 to toggle an (optional) bias-tLucas Teske2-0/+20
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>
2017-06-09lib: fix direction bit in GPIO codeLucas Teske1-1/+1
source: http://lea.hamradio.si/~s57uuu/mischam/rtlsdr/ports.html * Removed unnecessary comment of old code. Signed-off-by: Fabian P. Schmidt <kerel-fs@gmx.de> Signed-off-by: Steve Markgraf <steve@steve-m.de>
2016-11-27lib: add new HanfTek dongleSteve Markgraf2-0/+4
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2015-06-09lib: check for libusb init failureHoernchen1-6/+16
2015-06-09tools: allow built-in functions for newer versions of MSVCHoernchen3-4/+6
2015-05-16Merge pull request #20 from lcl7/correct-e4k_reg_writeSteve Markgraf1-1/+3
Correct return code of e4k_reg_write().
2015-05-16New functions rtlsdr_set_tuner_bandwidth()Jiří Pinkava2-4/+40
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2015-05-16Allow setting bandwidth for R820TJiří Pinkava3-2/+93
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>
2015-05-08Correct return code of e4k_reg_write().lcl1-1/+3
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().
2014-08-26cmake: include resource file for MSVC buildsDimitri Stolnikov2-26/+70
2014-02-10rtl_tcp: make all global variables staticSteve Markgraf1-2/+2
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-10lib: change default number of transfers to 15Steve Markgraf6-11/+8
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>
2014-02-09lib: handle events after canceling transfersSteve Markgraf1-10/+15
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>
2014-02-08lib: only print to stderr in tuner_r82xx_set_pll()Steve Markgraf1-1/+1
Found by keenerd. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-08change version to 0.5.3gitSteve Markgraf1-1/+1
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-07change version to 0.5.3v0.5.3Steve Markgraf1-1/+1
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-05add configuration file for Travis CISteve Markgraf1-0/+10
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-04remove unused variables, type fixesSteve Markgraf7-20/+13
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-04rtl_test: update copyright headerSteve Markgraf1-1/+5
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-04rtl_sdr: clean up getopt-stringSteve Markgraf1-1/+1
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-02-04rtl_test: refactoring and optimization for PPM errorMichael Tatarinov1-91/+97
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-01-29lib: add missing 'goto' in tuner detection codeDenys Berkovskyy1-0/+1
Add missing ‘goto’ to avoid checks for other tuners when R828D tuner is found. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2014-01-26unbreak 'make distcheck' with automakeSteve Markgraf1-0/+1
Thanks to zecke for pointing this out. Signed-off-by: Steve Markgraf <steve@steve-m.de>