Skip to content

Commit

Permalink
Enable DETACH_KERNEL_DRIVER (all Linux), ENABLE_ZEROCOPY (Linux not A…
Browse files Browse the repository at this point in the history
…RM), update patches, and bump post version (#12)

automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Oct 4, 2023
2 parents c9aa0b2 + d13c526 commit dd441d0
Show file tree
Hide file tree
Showing 10 changed files with 196 additions and 67 deletions.
56 changes: 8 additions & 48 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .scripts/logging_utils.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 115 additions & 0 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion recipe/0007-Add-rtl-sdr-blog-features.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ Subject: [PATCH] Add rtl-sdr-blog features:
4) Add direct sampling to rtl_sdr

5) Add auto enable direct sampling when tuned below 24 MHz

6) Update tuner_r82xx.c for new rev of rtl-sdr-blog v4
---
include/rtl-sdr.h | 8 +++++++
src/librtlsdr.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++-
src/rtl_eeprom.c | 35 ++++++++++++++++---------------
src/rtl_sdr.c | 12 ++++++++++-
src/rtl_tcp.c | 11 +++++++++-
5 files changed, 99 insertions(+), 20 deletions(-)
src/tuner_r82xx.c | 6 ++++++
6 files changed, 105 insertions(+), 20 deletions(-)

diff --git a/include/rtl-sdr.h b/include/rtl-sdr.h
index 4b7660e..a1ff1bd 100644
Expand Down Expand Up @@ -406,6 +409,23 @@ index 8781ba9..588ca97 100644
/* Set the tuner error */
verbose_ppm_set(dev, ppm_error);

diff --git a/src/tuner_r82xx.c b/src/tuner_r82xx.c
index dbdf4e9..233fe08 100644
--- a/src/tuner_r82xx.c
+++ b/src/tuner_r82xx.c
@@ -1160,6 +1160,12 @@ int r82xx_set_freq(struct r82xx_priv *priv, uint32_t freq)
cable_2_in = (band == HF) ? 0x08 : 0x00;
rc = r82xx_write_reg_mask(priv, 0x06, cable_2_in, 0x08);

+ if (rc < 0)
+ goto err;
+
+ /* Control upconverter GPIO switch on newer batches */
+ rc = rtlsdr_set_bias_tee_gpio(priv->rtl_dev, 5, !cable_2_in);
+
if (rc < 0)
goto err;

--
2.40.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: rtlsdrblog <[email protected]>
Date: Thu, 31 Aug 2023 17:37:22 +1200
Subject: [PATCH] fix rtl_tcp error on windows when hints not initialized to 0

---
src/rtl_tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c
index 772a403..78d625a 100644
--- a/src/rtl_tcp.c
+++ b/src/rtl_tcp.c
@@ -386,7 +386,7 @@ int main(int argc, char **argv)
struct sockaddr_storage local, remote;
struct addrinfo *ai;
struct addrinfo *aiHead;
- struct addrinfo hints;
+ struct addrinfo hints = { 0 };
char hostinfo[NI_MAXHOST];
char portinfo[NI_MAXSERV];
char remhostinfo[NI_MAXHOST];
--
2.40.0

Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Subject: [PATCH] Set version for conda-forge.
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e2946ba..f41af7f 100644
index e2946ba..25cb5ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,7 +43,7 @@ include(CMakePackageConfigHelpers)
# Set the version information here
set(VERSION_INFO_MAJOR_VERSION 0) # increment major on api compatibility changes
set(VERSION_INFO_MINOR_VERSION 6) # increment minor on feature-level changes
-set(VERSION_INFO_PATCH_VERSION git) # increment patch for bug fixes and docs
+set(VERSION_INFO_PATCH_VERSION 0.post20230829) # increment patch for bug fixes and docs
+set(VERSION_INFO_PATCH_VERSION 0.post20231004) # increment patch for bug fixes and docs
include(Version) # setup version info

########################################################################
Expand Down
13 changes: 11 additions & 2 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ cmake_config_args=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_INSTALL_PREFIX=$PREFIX
-DDETACH_KERNEL_DRIVER=OFF
-DENABLE_ZEROCOPY=OFF
-DDETACH_KERNEL_DRIVER=ON
-DINSTALL_UDEV_RULES=OFF
)

if [[ $target_platform == linux-64 || $target_platform == linux-ppc64le ]] ; then
cmake_config_args+=(
-DENABLE_ZEROCOPY=ON
)
else
cmake_config_args+=(
-DENABLE_ZEROCOPY=OFF
)
fi

cmake ${CMAKE_ARGS} .. "${cmake_config_args[@]}"
cmake --build . --config Release -- -j${CPU_COUNT}
cmake --build . --config Release --target install
Expand Down
7 changes: 4 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package:
name: {{ name|lower }}
version: {{ version }}.post20230829
version: {{ version }}.post20231004

source:
url: https://github.com/osmocom/{{ name }}/archive/{{ version }}.tar.gz
Expand All @@ -18,10 +18,11 @@ source:
- 0007-Add-rtl-sdr-blog-features.patch
- 0008-follow-keenerd-and-don-t-stop-the-i2c-repeater-on-tu.patch
- 0009-fix-rtl_tcp-on-macos.patch
- 0010-Set-version-for-conda-forge.patch
- 0010-fix-rtl_tcp-error-on-windows-when-hints-not-initiali.patch
- 0011-Set-version-for-conda-forge.patch

build:
number: 1
number: 0
run_exports:
- {{ pin_subpackage('rtl-sdr', max_pin='x') }}

Expand Down

0 comments on commit dd441d0

Please sign in to comment.