#1150431 rtl-sdr: zero-copy still enabled on ARM due to typo in debian/rules

#1150431#5
Date:
2026-10-09 15:59:04 UTC
From:
To:
Dear Maintainer,

the fix for #1041701 (2.0.1-2) is ineffective. Line 13 of debian/rules
reads "-DENABLE_ZEROCOPY=$DEB_ZEROCOPY_OPTION", which make expands as
$D followed by the literal text "EB_ZEROCOPY_OPTION". CMake therefore
receives -DENABLE_ZEROCOPY=EB_ZEROCOPY_OPTION, which is truthy, so
zero-copy is enabled on all architectures, including ARM.

The arm64 buildd log for 2.0.3-1 confirms this:
"Building with usbfs zero-copy support enabled".

Impact: on SoCs with non-coherent USB DMA (e.g. RK3588, Raspberry Pi)
the mmapped usbfs buffers are uncached. With dumpvdl2 on an RK3588
(trixie, librtlsdr0 2.0.2-2+b1) the thread reading the buffers uses
about 52% of a core, versus about 2.6% when the buffer is copied first.

The attached patch changes it to $(DEB_ZEROCOPY_OPTION). Checked with
"make -n -f debian/rules override_dh_auto_configure":
DEB_BUILD_ARCH=arm64 now gives OFF, amd64 gives ON.

Possibly DEB_HOST_ARCH instead of DEB_BUILD_ARCH in line 6 would be
more correct for cross builds.

Regards,
Martin Paul