RTL-SDR and RTL-TCP drivers

Krzysztof Halasa khc at pm.waw.pl
Wed Aug 24 21:43:03 UTC 2016


it's my first mail on this list, so please forgive me if I do something

I'm about to post a couple of patches for RTL drivers:

1. RTL-SDR: convert _lut to float[] to reduce size by a factor of 256.

The _lut is being indexed by I + Q (16 bits = 65536 entries), however
both samples can be processed independently, resulting in 8-bit LUT.
Saves a bit of RAM and CPU cache.

lib/rtl/rtl_source_c.cc | 19 ++++++-------------
lib/rtl/rtl_source_c.h  |  4 ++--
2 files changed, 8 insertions(+), 15 deletions(-)

2. RTL-TCP: Convert to single class model

The existing RTL TCP driver is quite different from its brother RTL_SDR.
It's much more complicated, uses gr::blocks::deinterleave and
gr::blocks::float_to_complex, and generally doesn't work correctly
(e.g. https://github.com/csete/gqrx/issues/99
 Spectrum is mirrored when filter or demodulator changes (rtl_tcp) #99)

I've converted the RTL TCP driver to the model used by RTL_SDR,
simplifying it in the process, and fixing the GQRX issue.

lib/rtl_tcp/CMakeLists.txt      |   1 -
lib/rtl_tcp/rtl_tcp_source_c.cc | 352 ++++++++++++++++++++++++++++++++--------
lib/rtl_tcp/rtl_tcp_source_c.h  |  32 +++-
lib/rtl_tcp/rtl_tcp_source_f.cc | 327 -------------------------------------
lib/rtl_tcp/rtl_tcp_source_f.h  | 125 --------------
5 files changed, 309 insertions(+), 528 deletions(-)

I'm also thinking about merging the code common to RTL-SDR and RTL-TCP,
but this it's done yet.

Krzysztof Halasa

More information about the osmocom-sdr mailing list