aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2019-07-16 23:45:57 +0200
committerSteve Markgraf <steve@steve-m.de>2019-07-16 23:49:48 +0200
commit81833a1cf6288fee93a9157c0f60cafb5ec340b9 (patch)
tree6f1824e3b7b895e25a1e9314ec0fa13747ad0a71 /CMakeLists.txt
parentbe1d1206bfb6e6c41f7d91b20b77e20f929fa6a7 (diff)
lib: disable usbfs zero-copy support by defaultHEADmaster
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index abc8f9b..57a1c2e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,6 +126,14 @@ else (DETACH_KERNEL_DRIVER)
message (STATUS "Building with kernel driver detaching disabled, use -DDETACH_KERNEL_DRIVER=ON to enable")
endif (DETACH_KERNEL_DRIVER)
+option(ENABLE_ZEROCOPY "Enable usbfs zero-copy support" OFF)
+if (ENABLE_ZEROCOPY)
+ message (STATUS "Building with usbfs zero-copy support enabled")
+ add_definitions(-DENABLE_ZEROCOPY=1)
+else (ENABLE_ZEROCOPY)
+ message (STATUS "Building with usbfs zero-copy support disabled, use -DENABLE_ZEROCOPY=ON to enable")
+endif (ENABLE_ZEROCOPY)
+
########################################################################
# Add subdirectories
########################################################################