From osmith at sysmocom.de Wed Aug 18 07:09:25 2021 From: osmith at sysmocom.de (Oliver Smith) Date: Wed, 18 Aug 2021 09:09:25 +0200 Subject: [PATCH] rtl_tcp: put new DEFAULT_* constants in defines In-Reply-To: References: Message-ID: <20210818070925.8800-1-osmith@sysmocom.de> Fix failures with some GCC versions: /usr/src/packages/BUILD/src/rtl_tcp.c:90:24: error: initializer element is not constant static int llbuf_num = DEFAULT_MAX_NUM_BUFFERS; Fixes: 641c22 ("rtl_tcp: Extracted some constants out of printf strings") Change-Id: Ia9e18d4c22d957f561dcdaf2657bb6d201374375 --- src/rtl_tcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c index ad930c8..89b1fb9 100644 --- a/src/rtl_tcp.c +++ b/src/rtl_tcp.c @@ -56,9 +56,9 @@ typedef int socklen_t; #define SOCKET_ERROR -1 #endif -static const char* DEFAULT_PORT_STR = "1234"; -static const uint32_t DEFAULT_SAMPLE_RATE_HZ = 2048000; -static const int DEFAULT_MAX_NUM_BUFFERS = 500; +#define DEFAULT_PORT_STR "1234" +#define DEFAULT_SAMPLE_RATE_HZ 2048000 +#define DEFAULT_MAX_NUM_BUFFERS 500 static SOCKET s; -- 2.20.1 From laforge at osmocom.org Wed Aug 18 08:32:27 2021 From: laforge at osmocom.org (Harald Welte) Date: Wed, 18 Aug 2021 10:32:27 +0200 Subject: [PATCH] rtl_tcp: put new DEFAULT_* constants in defines In-Reply-To: <20210818070925.8800-1-osmith@sysmocom.de> References: <20210818070925.8800-1-osmith@sysmocom.de> Message-ID: On Wed, Aug 18, 2021 at 09:09:25AM +0200, Oliver Smith wrote: > Fix failures with some GCC versions: > /usr/src/packages/BUILD/src/rtl_tcp.c:90:24: error: initializer element is not constant > static int llbuf_num = DEFAULT_MAX_NUM_BUFFERS; thanks, fix pushed. -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From steve at steve-m.de Wed Aug 18 21:14:56 2021 From: steve at steve-m.de (Steve Markgraf) Date: Wed, 18 Aug 2021 23:14:56 +0200 Subject: [PATCH] add a new option to rtl_fm to select 2nd direct sampling mode In-Reply-To: References: Message-ID: <64b1028b-dfac-22aa-62b9-0364716ec869@steve-m.de> Hi, On 29.07.21 19:38, Doug Hammond wrote: > The USB dongle I am using requires direct mode 2 for sampling the Q > branch. The rtl_fm program assumes that "direct" means mode 1. I added a > 2nd option to allow to select the other mode. Thanks, merged. Regards, Steve