Skip to content

Commit

Permalink
add option to disable librtlsdr zero copy workaround
Browse files Browse the repository at this point in the history
only disable workaround if zerocopy is disabled in librtlsdr
otherwise expect significantly increased CPU use
  • Loading branch information
wiedehopf committed Apr 27, 2024
1 parent 1d515cb commit f599f1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ else
LIBS += -lncurses
endif

# only disable workaround if zerocopy is disabled in librtlsdr, otherwise expect significantly increased CPU use
ifeq ($(DISABLE_RTLSDR_ZEROCOPY_WORKAROUND), yes)
CFLAGS += -DDISABLE_RTLSDR_ZEROCOPY_WORKAROUND
endif

ifeq ($(HISTORY), yes)
CFLAGS += -DALL_JSON=1
endif
Expand Down
2 changes: 1 addition & 1 deletion sdr_rtlsdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

#include <rtl-sdr.h>

#if defined(__arm__) || defined(__aarch64__)
#if (defined(__arm__) || defined(__aarch64__)) && !defined(DISABLE_RTLSDR_ZEROCOPY_WORKAROUND)
// Assume we need to use a bounce buffer to avoid performance problems on Pis running kernel 5.x and using zerocopy
# define USE_BOUNCE_BUFFER
#endif
Expand Down

0 comments on commit f599f1b

Please sign in to comment.