Skip to content

Commit 2b882e5

Browse files
committed
merge original updates
2 parents 0034206 + 33427f7 commit 2b882e5

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed

cmake/Modules/FindLibUSB.cmake

+10-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,16 @@ if(NOT LIBUSB_FOUND)
88
/usr/local/include
99
)
1010

11-
find_library(LIBUSB_LIBRARIES NAMES usb-1.0
11+
#standard library name for libusb-1.0
12+
set(libusb1_library_names usb-1.0)
13+
14+
#libusb-1.0 compatible library on freebsd
15+
if((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD"))
16+
list(APPEND libusb1_library_names usb)
17+
endif()
18+
19+
find_library(LIBUSB_LIBRARIES
20+
NAMES ${libusb1_library_names}
1221
PATHS
1322
${LIBUSB_PKG_LIBRARY_DIRS}
1423
/usr/lib

rtl-sdr.rules

+2
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,5 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", MODE:="066
111111
# SVEON STV20 DVB-T USB & FM (FC0012)
112112
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", MODE:="0666"
113113

114+
# SVEON STV21 DVB-T USB & FM
115+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", MODE:="0666"

src/librtlsdr.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ int r820t_init(void *dev) {
195195

196196
rtlsdr_get_xtal_freq(devt, NULL, &devt->r82xx_c.xtal);
197197

198-
devt->r82xx_c.max_i2c_msg_len = 2;
198+
devt->r82xx_c.max_i2c_msg_len = 8;
199199
devt->r82xx_c.use_predetect = 0;
200200
devt->r82xx_p.cfg = &devt->r82xx_c;
201201

@@ -301,6 +301,7 @@ static rtlsdr_dongle_t known_devices[] = {
301301
{ 0x1b80, 0xd394, "DIKOM USB-DVBT HD" },
302302
{ 0x1b80, 0xd395, "Peak 102569AGPK" },
303303
{ 0x1b80, 0xd39d, "SVEON STV20 DVB-T USB & FM" },
304+
{ 0x1b80, 0xd3b0, "SVEON STV21 DVB-T USB & FM" },
304305
};
305306

306307
#define DEFAULT_BUF_NUMBER 32

src/rtl_eeprom.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,9 @@ int main(int argc, char **argv)
411411
if (r < 0)
412412
fprintf(stderr, "Error while writing EEPROM: %i\n", r);
413413
else
414-
fprintf(stderr, "Configuration successfully written.\n");
414+
fprintf(stderr, "\nConfiguration successfully written.\n"
415+
"Please replug the device for changes"
416+
" to take effect.\n");
415417

416418
exit:
417419
if (file)

src/rtl_fm.c

+2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
#include <io.h>
5858
#include "getopt/getopt.h"
5959
#define usleep(x) Sleep(x/1000)
60+
#ifdef _MSC_VER
6061
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
62+
#endif
6163
#define _USE_MATH_DEFINES
6264
#endif
6365

src/rtl_power.c

+2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@
5353
#include <io.h>
5454
#include "getopt/getopt.h"
5555
#define usleep(x) Sleep(x/1000)
56+
#ifdef _MSC_VER
5657
#define round(x) (x > 0.0 ? floor(x + 0.5): ceil(x - 0.5))
58+
#endif
5759
#define _USE_MATH_DEFINES
5860
#endif
5961

0 commit comments

Comments
 (0)