Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package soapy-plutosdr for openSUSE:Factory 
checked in at 2026-10-15 12:19:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/soapy-plutosdr (Old)
 and      /work/SRC/openSUSE:Factory/.soapy-plutosdr.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "soapy-plutosdr"

Thu Oct 15 12:19:01 2026 rev:2 rq:1384074 version:0.2.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/soapy-plutosdr/soapy-plutosdr.changes    
2026-09-01 15:47:51.099699355 +0200
+++ 
/work/SRC/openSUSE:Factory/.soapy-plutosdr.new.3698736/soapy-plutosdr.changes   
    2026-10-15 12:19:08.629568164 +0200
@@ -1,0 +2,10 @@
+Sun Oct 11 09:23:54 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 0.2.3:
+  * Scale TX streamer buffer with sample rate, fixing drops at high rates
+  * Honor the bufflen stream kwarg and set the RX streamer MTU
+  * Drop the device cache from device discovery
+  * Make libusb support optional in cmake
+  * Update for compat with newer CMake
+
+-------------------------------------------------------------------

Old:
----
  SoapyPlutoSDR-soapy-plutosdr-0.2.2.tar.gz

New:
----
  SoapyPlutoSDR-soapy-plutosdr-0.2.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ soapy-plutosdr.spec ++++++
--- /var/tmp/diff_new_pack.DJPrmA/_old  2026-10-15 12:19:09.438602003 +0200
+++ /var/tmp/diff_new_pack.DJPrmA/_new  2026-10-15 12:19:09.441602129 +0200
@@ -19,7 +19,7 @@
 %define soapy_modver 0.8-3
 %define soapy_modname soapysdr%{soapy_modver}-module-plutosdr
 Name:           soapy-plutosdr
-Version:        0.2.2
+Version:        0.2.3
 Release:        0
 Summary:        SoapySDR PlutoSDR module
 # Legal-Review-Notice: LGPL-2.1-only is deliberate. Upstream ships the bare

++++++ SoapyPlutoSDR-soapy-plutosdr-0.2.2.tar.gz -> 
SoapyPlutoSDR-soapy-plutosdr-0.2.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/.github/workflows/build.yml 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/.github/workflows/build.yml
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/.github/workflows/build.yml  
1970-01-01 01:00:00.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/.github/workflows/build.yml  
2026-10-10 16:22:09.000000000 +0200
@@ -0,0 +1,63 @@
+name: Build check
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+jobs:
+  macos_macports_build_job:
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [macos-15, macos-26]
+    runs-on: ${{ matrix.os }}
+    name: Build on ${{ matrix.os }} (macports)
+    steps:
+      - uses: actions/checkout@v7
+      - uses: melusina-org/setup-macports@v1
+      - name: Install ports
+        run: |
+          sudo port install SoapySDR libusb libiio libad9361-iio
+      - name: Configure
+        run: cmake -B build
+      - name: Build
+        run: cmake --build build
+
+  macos_pothos_build_job:
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [macos-15, macos-26]
+    runs-on: ${{ matrix.os }}
+    name: Build on ${{ matrix.os }} (pothos)
+    steps:
+      - uses: actions/checkout@v7
+      - name: Setup tools
+        run: |
+          brew tap pothosware/homebrew-pothos
+          brew trust pothosware/homebrew-pothos
+          brew update
+          brew install soapysdr libusb libiio libad9361
+      - name: Configure
+        run: cmake -B build
+      - name: Build
+        run: cmake --build build
+
+  linux_build_job:
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-22.04, ubuntu-24.04]
+    runs-on: ${{ matrix.os }}
+    name: Build on ${{ matrix.os }}
+    steps:
+      - uses: actions/checkout@v7
+      - name: Setup tools
+        run: |
+          sudo apt-get update -q -y
+          sudo apt-get install -y --no-install-recommends cmake ninja-build
+          sudo apt-get install -q -y libsoapysdr-dev libusb-1.0-0-dev 
libiio-dev libad9361-dev
+      - name: Configure
+        run: cmake -GNinja -B build
+      - name: Build
+        run: cmake --build build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/CMakeLists.txt 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/CMakeLists.txt
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/CMakeLists.txt       2024-02-18 
18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/CMakeLists.txt       2026-10-10 
16:22:09.000000000 +0200
@@ -1,7 +1,7 @@
 ########################################################################
 # Project setup
 ########################################################################
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 2.8.12...3.10)
 project(SoapyPlutoSDR CXX)
 
 # select build type to get optimization flags
@@ -11,10 +11,13 @@
 endif(NOT CMAKE_BUILD_TYPE)
 set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
 
-find_package(SoapySDR NO_MODULE)
-if (NOT SoapySDR_FOUND)
-    message(FATAL_ERROR "Soapy SDR development files not found...")
-endif ()
+find_package(SoapySDR NO_MODULE REQUIRED)
+
+get_filename_component(_SoapySDR_ROOT "${SoapySDR_INCLUDE_DIRS}/.." ABSOLUTE)
+message(STATUS "SoapySDR root directory: ${_SoapySDR_ROOT}")
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND NOT "${_SoapySDR_ROOT}" 
STREQUAL "/usr")
+    set_property(CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE ${_SoapySDR_ROOT})
+endif()
 
 ########################################################################
 # Find libiio
@@ -26,6 +29,7 @@
     message(STATUS "LibIIO_INCLUDE_DIRS: ${LibIIO_INCLUDE_DIRS}")
     message(STATUS "LibIIO_LIBRARIES: ${LibIIO_LIBRARIES}")
     message(STATUS "LibIIO_DEFINITIONS: ${LibIIO_DEFINITIONS}")
+    list(APPEND PLUTOSDR_LIBS ${LibIIO_LIBRARIES})
 endif()
 
 include_directories(${LibIIO_INCLUDE_DIRS})
@@ -58,6 +62,7 @@
     message(STATUS "LibAD9361_INCLUDE_DIRS: ${LibAD9361_INCLUDE_DIRS}")
     message(STATUS "LibAD9361_LIBRARIES: ${LibAD9361_LIBRARIES}")
     message(STATUS "LibAD9361_DEFINITIONS: ${LibAD9361_DEFINITIONS}")
+    list(APPEND PLUTOSDR_LIBS ${LibAD9361_LIBRARIES})
     include_directories(${LibAD9361_INCLUDE_DIRS})
     add_definitions(-DHAS_AD9361_IIO)
 endif()
@@ -71,6 +76,7 @@
     message(STATUS "LibUSB_INCLUDE_DIRS: ${LibUSB_INCLUDE_DIRS}")
     message(STATUS "LibUSB_LIBRARIES: ${LibUSB_LIBRARIES}")
     message(STATUS "LibUSB_DEFINITIONS: ${LibUSB_DEFINITIONS}")
+    list(APPEND PLUTOSDR_LIBS ${LibUSB_LIBRARIES})
     include_directories(${LibUSB_INCLUDE_DIRS})
     add_definitions(-DHAS_LIBUSB1)
     #disable warnings for libusb.h
@@ -84,7 +90,7 @@
     PlutoSDR_Registration.cpp
     PlutoSDR_Settings.cpp
     PlutoSDR_Streaming.cpp
-    LIBRARIES ${LibIIO_LIBRARIES} ${LibAD9361_LIBRARIES} ${LibUSB_LIBRARIES}
+    LIBRARIES ${PLUTOSDR_LIBS}
 )
 
 ########################################################################
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/Changelog.txt 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/Changelog.txt
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/Changelog.txt        2024-02-18 
18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/Changelog.txt        2026-10-10 
16:22:09.000000000 +0200
@@ -1,3 +1,9 @@
+Release 0.2.3 (2026-10-10)
+==========================
+
+- Minor fixes
+- Updated CMake builds
+
 Release 0.2.2 (2024-02-18)
 ==========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/FindLibAD9361.cmake 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/FindLibAD9361.cmake
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/FindLibAD9361.cmake  2024-02-18 
18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/FindLibAD9361.cmake  2026-10-10 
16:22:09.000000000 +0200
@@ -15,17 +15,38 @@
 pkg_check_modules(PC_LibAD9361 QUIET libad9361)
 set(LibAD9361_DEFINITIONS ${PC_LibAD9361_CFLAGS_OTHER})
 
+# $ENV{HOMEBREW_PREFIX} can be /opt/homebrew (arm64) or defaults to /usr/local
+set(HOMEBREW_PREFIX $ENV{HOMEBREW_PREFIX})
+if(NOT HOMEBREW_PREFIX)
+    set(HOMEBREW_PREFIX "/usr/local")
+endif()
+
+# Note: a 0.2 version might be named 0.3 and a 0.1 might be missing the version
 find_path(LibAD9361_INCLUDE_DIR ad9361.h
           HINTS ${PC_LibAD9361_INCLUDEDIR} ${PC_LibAD9361_INCLUDE_DIRS}
+          PATHS
+          /opt/local/Library/Frameworks
+          
${HOMEBREW_PREFIX}/Cellar/libad9361-iio/${PC_LibIIO_VERSION}/Frameworks
+          ${HOMEBREW_PREFIX}/Cellar/libad9361-iio/0.3/Frameworks
+          ${HOMEBREW_PREFIX}/Cellar/libad9361/${PC_LibIIO_VERSION}
+          ${HOMEBREW_PREFIX}/Cellar/libad9361/0.1
           PATH_SUFFIXES libad9361-iio)
 
 find_library(LibAD9361_LIBRARY NAMES ad9361 libad9361
-             HINTS ${PC_LibAD9361_LIBDIR} ${PC_LibAD9361_LIBRARY_DIRS})
+             HINTS ${PC_LibAD9361_LIBDIR} ${PC_LibAD9361_LIBRARY_DIRS}
+             PATHS
+             /opt/local/Library/Frameworks
+             
${HOMEBREW_PREFIX}/Cellar/libad9361-iio/${PC_LibIIO_VERSION}/Frameworks
+             ${HOMEBREW_PREFIX}/Cellar/libad9361-iio/0.3/Frameworks
+             ${HOMEBREW_PREFIX}/Cellar/libad9361/${PC_LibIIO_VERSION}
+             ${HOMEBREW_PREFIX}/Cellar/libad9361/0.1)
 
 set(LibAD9361_VERSION ${PC_LibAD9361_VERSION})
 
 include(FindPackageHandleStandardArgs)
+# Note that `FOUND_VAR LibIIO_FOUND` is needed for cmake 3.2 and older.
 find_package_handle_standard_args(LibAD9361
+                                  FOUND_VAR LibAD9361_FOUND
                                   REQUIRED_VARS LibAD9361_LIBRARY 
LibAD9361_INCLUDE_DIR
                                   VERSION_VAR LibAD9361_VERSION)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/FindLibIIO.cmake 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/FindLibIIO.cmake
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/FindLibIIO.cmake     2024-02-18 
18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/FindLibIIO.cmake     2026-10-10 
16:22:09.000000000 +0200
@@ -15,17 +15,33 @@
 pkg_check_modules(PC_LibIIO QUIET libiio)
 set(LibIIO_DEFINITIONS ${PC_LibIIO_CFLAGS_OTHER})
 
+# $ENV{HOMEBREW_PREFIX} can be /opt/homebrew (arm64) or defaults to /usr/local
+set(HOMEBREW_PREFIX $ENV{HOMEBREW_PREFIX})
+if(NOT HOMEBREW_PREFIX)
+    set(HOMEBREW_PREFIX "/usr/local")
+endif()
+
 find_path(LibIIO_INCLUDE_DIR iio.h
           HINTS ${PC_LibIIO_INCLUDEDIR} ${PC_LibIIO_INCLUDE_DIRS}
+          PATHS
+          /opt/local/Library/Frameworks
+          ${HOMEBREW_PREFIX}/Cellar/libiio/${PC_LibIIO_VERSION}/Frameworks
+          ${HOMEBREW_PREFIX}/Cellar/libiio/${PC_LibIIO_VERSION}
           PATH_SUFFIXES libiio)
 
 find_library(LibIIO_LIBRARY NAMES iio libiio
-             HINTS ${PC_LibIIO_LIBDIR} ${PC_LibIIO_LIBRARY_DIRS})
+             HINTS ${PC_LibIIO_LIBDIR} ${PC_LibIIO_LIBRARY_DIRS}
+             PATHS
+             /opt/local/Library/Frameworks
+             ${HOMEBREW_PREFIX}/Cellar/libiio/${PC_LibIIO_VERSION}/Frameworks
+             ${HOMEBREW_PREFIX}/Cellar/libiio/${PC_LibIIO_VERSION})
 
 set(LibIIO_VERSION ${PC_LibIIO_VERSION})
 
 include(FindPackageHandleStandardArgs)
+# Note that `FOUND_VAR LibIIO_FOUND` is needed for cmake 3.2 and older.
 find_package_handle_standard_args(LibIIO
+                                  FOUND_VAR LibIIO_FOUND
                                   REQUIRED_VARS LibIIO_LIBRARY 
LibIIO_INCLUDE_DIR
                                   VERSION_VAR LibIIO_VERSION)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/FindLibUSB.cmake 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/FindLibUSB.cmake
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/FindLibUSB.cmake     2024-02-18 
18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/FindLibUSB.cmake     2026-10-10 
16:22:09.000000000 +0200
@@ -44,7 +44,9 @@
 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set LibUSB_FOUND to TRUE
 # if all listed variables are TRUE
+# Note that `FOUND_VAR LibIIO_FOUND` is needed for cmake 3.2 and older.
 find_package_handle_standard_args(LibUSB
+                                  FOUND_VAR LibUSB_FOUND
                                   REQUIRED_VARS LibUSB_LIBRARY 
LibUSB_INCLUDE_DIR
                                   VERSION_VAR LibUSB_VERSION)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/PlutoSDR_Registration.cpp 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Registration.cpp
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/PlutoSDR_Registration.cpp    
2024-02-18 18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Registration.cpp    
2026-10-10 16:22:09.000000000 +0200
@@ -7,14 +7,11 @@
 #include <libusb.h>
 #endif
 
-static std::vector<SoapySDR::Kwargs> results;
 static std::vector<SoapySDR::Kwargs> find_PlutoSDR(const SoapySDR::Kwargs 
&args) {
-
-       if (!results.empty())
-               return results;
+    
+    std::vector<SoapySDR::Kwargs> results;
 
        ssize_t ret = 0;
-       iio_context *ctx = nullptr;
        iio_scan_context *scan_ctx;
        iio_context_info **info;
        SoapySDR::Kwargs options;
@@ -84,8 +81,14 @@
 
                info = nullptr;
                ret = iio_scan_context_get_info_list(scan_ctx, &info);
+               if (ret == -19) {
+                       // ignore error -19 "Backend unavailable", e.g. 
"local:" on MacOS
+                       continue;
+               }
                if (ret < 0) {
-                       SoapySDR_logf(SOAPY_SDR_WARNING, "Unable to scan %s: 
%li\n", it->c_str(), (long)ret);
+                       char err[256];
+                       iio_strerror(ret, err, sizeof(err));
+                       SoapySDR_logf(SOAPY_SDR_WARNING, "Unable to scan 
\"%s\": %li (%s)\n", it->c_str(), (long)ret, err);
                        iio_context_info_list_free(info);
                        iio_scan_context_destroy(scan_ctx);
                        continue;
@@ -100,6 +103,7 @@
                        if (args.count("hostname") == 0) continue;
 
                        //try to connect at the specified hostname
+                       iio_context *ctx = nullptr;
                        ctx = 
iio_create_network_context(args.at("hostname").c_str());
                        if (ctx == nullptr) continue; //failed to connect
                        options["hostname"] = args.at("hostname");
@@ -109,10 +113,11 @@
                        options["label"] = label_str.str();
 
                        results.push_back(options);
-                       if (ctx != nullptr) iio_context_destroy(ctx);
+                       iio_context_destroy(ctx);
 
                } else {
                        for (int i = 0; i < ret; i++) {
+                               iio_context *ctx = nullptr;
                                ctx = 
iio_create_context_from_uri(iio_context_info_get_uri(info[i]));
                                if (ctx != nullptr) {
                                        options["uri"] = 
std::string(iio_context_info_get_uri(info[i]));
@@ -134,7 +139,7 @@
                                                }
                                        }
 
-                                       if (ctx != nullptr) 
iio_context_destroy(ctx);
+                                       iio_context_destroy(ctx);
                                }
 
                        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/PlutoSDR_Settings.cpp 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Settings.cpp
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/PlutoSDR_Settings.cpp        
2024-02-18 18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Settings.cpp        
2026-10-10 16:22:09.000000000 +0200
@@ -590,6 +590,8 @@
 
                iio_channel_attr_write_longlong(iio_device_find_channel(dev, 
"voltage0", true),"sampling_frequency", samplerate);
                iio_channel_attr_write_longlong(iio_device_find_channel(tx_dev, 
"voltage0", true), "sampling_frequency", interpolation?samplerate / 
8:samplerate);
+               if(tx_stream)
+                       tx_stream->set_buffer_size_by_samplerate(interpolation 
? samplerate / 8 : samplerate);
 
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/PlutoSDR_Streaming.cpp 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Streaming.cpp
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/PlutoSDR_Streaming.cpp       
2024-02-18 18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Streaming.cpp       
2026-10-10 16:22:09.000000000 +0200
@@ -173,7 +173,7 @@
     }
 
        if (IsValidTxStreamHandle(handle)) {
-               return 4096;
+               return this->tx_stream->get_mtu_size();
        }
 
     return 0;
@@ -323,13 +323,14 @@
                channel_list.push_back(chn);
        }
 
-       if ( args.count( "bufflen" ) != 0 ){
-
+       if ( args.count( "bufflen" ) != 0 ) {
                try
                {
                        size_t bufferLength = std::stoi(args.at("bufflen"));
-                       if (bufferLength > 0)
+                       if (bufferLength > 0) {
                                this->set_buffer_size(bufferLength);
+                               this->set_mtu_size(this->buffer_size);
+                       }
                }
                catch (const std::invalid_argument &){}
 
@@ -606,12 +607,23 @@
                channel_list.push_back(chn);
        }
 
-       buf_size = 4096;
-       items_in_buf = 0;
-       buf = iio_device_create_buffer(dev, buf_size, false);
-       if (!buf) {
-               SoapySDR_logf(SOAPY_SDR_ERROR, "Unable to create buffer!");
-               throw std::runtime_error("Unable to create buffer!");
+       if ( args.count( "bufflen" ) != 0 ) {
+               try
+               {
+                       size_t bufferLength = std::stoi(args.at("bufflen"));
+                       if (bufferLength > 0) {
+                               this->set_buffer_size(bufferLength);
+                               this->set_mtu_size(this->buffer_size);
+                       }
+               }
+               catch (const std::invalid_argument &){}
+
+       } else {
+               long long samplerate;
+
+               iio_channel_attr_read_longlong(iio_device_find_channel(dev, 
"voltage0", true),"sampling_frequency",&samplerate);
+
+               this->set_buffer_size_by_samplerate(samplerate);
        }
 
        direct_copy = has_direct_copy();
@@ -629,6 +641,66 @@
 
 }
 
+void tx_streamer::set_buffer_size_by_samplerate(const size_t samplerate) {
+
+    // The original buffer size of 4096 is not enough for a full duplex stream 
at sample rates above 1 Msps
+       // Avoid samples getting dropped in the TX stream by setting a high 
enough buffer size.
+    // Apply the same logic as for the rx_streamer buffer. Keep it a power of 
2 which seems to be better.
+    int rounded_nb_samples_per_call = (int)::round(samplerate / 60.0);
+
+    int power_of_2_nb_samples = 0;
+
+    while (rounded_nb_samples_per_call > (1 << power_of_2_nb_samples)) {
+        power_of_2_nb_samples++;
+    }
+
+    this->set_buffer_size(1 << power_of_2_nb_samples);
+
+       SoapySDR_logf(SOAPY_SDR_INFO, "Auto setting TX Buffer Size: %lu", 
(unsigned long)buffer_size);
+
+    //Recompute transmit MTU from buffer size change.
+    //We always set MTU size = Buffer Size.
+    //On buffer size adjustment to sample rate,
+    //MTU can be changed accordingly safely here.
+    set_mtu_size(this->buffer_size);
+}
+
+void tx_streamer::set_mtu_size(const size_t mtu_size) {
+
+    this->mtu_size = mtu_size;
+
+    SoapySDR_logf(SOAPY_SDR_INFO, "Set TX MTU Size: %lu", (unsigned 
long)mtu_size);
+}
+
+void tx_streamer::set_buffer_size(const size_t _buffer_size){
+
+       if (!buf || this->buffer_size != _buffer_size) {
+        //cancel first
+        if (buf) {
+            iio_buffer_cancel(buf);
+        }
+        //then destroy
+        if (buf) {
+            iio_buffer_destroy(buf);
+        }
+
+               items_in_buf = 0;
+
+               buf = iio_device_create_buffer(dev, _buffer_size, false);
+               if (!buf) {
+                       SoapySDR_logf(SOAPY_SDR_ERROR, "Unable to create TX 
buffer!");
+                       throw std::runtime_error("Unable to create TX 
buffer!\n");
+               }
+
+       }
+
+       this->buffer_size=_buffer_size;
+}
+
+size_t tx_streamer::get_mtu_size() {
+    return this->mtu_size;
+}
+
 int tx_streamer::send( const void * const *buffs,
                const size_t numElems,
                int &flags,
@@ -640,7 +712,7 @@
         return 0;
     }
 
-       size_t items = std::min(buf_size - items_in_buf, numElems);
+       size_t items = std::min(this->buffer_size - items_in_buf, numElems);
 
        int16_t src = 0;
        int16_t const *src_ptr = &src;
@@ -729,14 +801,14 @@
 
        items_in_buf += items;
 
-       if (items_in_buf == buf_size || (flags & SOAPY_SDR_END_BURST && 
numElems == items)) {
+       if (items_in_buf == this->buffer_size || (flags & SOAPY_SDR_END_BURST 
&& numElems == items)) {
                int ret = send_buf();
 
                if (ret < 0) {
                        return SOAPY_SDR_ERROR;
                }
 
-               if ((size_t)ret != buf_size) {
+               if ((size_t)ret != this->buffer_size) {
                        return SOAPY_SDR_ERROR;
                }
        }
@@ -757,7 +829,7 @@
     }
 
        if (items_in_buf > 0) {
-               if (items_in_buf < buf_size) {
+               if (items_in_buf < this->buffer_size) {
                        ptrdiff_t buf_step = iio_buffer_step(buf);
                        uint8_t *buf_ptr = (uint8_t *)iio_buffer_start(buf) + 
items_in_buf * buf_step;
                        uint8_t *buf_end = (uint8_t *)iio_buffer_end(buf);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/SoapyPlutoSDR.hpp 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/SoapyPlutoSDR.hpp
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/SoapyPlutoSDR.hpp    2024-02-18 
18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/SoapyPlutoSDR.hpp    2026-10-10 
16:22:09.000000000 +0200
@@ -63,8 +63,12 @@
                ~tx_streamer();
                int send(const void * const *buffs,const size_t numElems,int 
&flags,const long long timeNs,const long timeoutUs );
                int flush();
+               void set_buffer_size_by_samplerate(const size_t _samplerate);
+               size_t get_mtu_size();
 
        private:
+               void set_buffer_size(const size_t _buffer_size);
+               void set_mtu_size(const size_t mtu_size);
                int send_buf();
                bool has_direct_copy();
 
@@ -73,9 +77,10 @@
                const plutosdrStreamFormat format;
                
                iio_buffer  *buf;
-               size_t buf_size;
                size_t items_in_buf;
                bool direct_copy;
+               size_t buffer_size;
+               size_t mtu_size;
 
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/changelog 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/changelog
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/changelog     2024-02-18 
18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/changelog     2026-10-10 
16:22:09.000000000 +0200
@@ -1,3 +1,9 @@
+soapyplutosdr (0.2.3-1) unstable; urgency=low
+
+  * Release 0.2.3 (2026-10-10)
+
+ -- Christian W. Zuckschwerdt <[email protected]>  Sat, 10 Oct 2026 15:00:00 -0000
+
 soapyplutosdr (0.2.2-1) unstable; urgency=low
 
   * Release 0.2.2 (2024-02-18)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/compat 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/compat
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/compat        2024-02-18 
18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/compat        2026-10-10 
16:22:09.000000000 +0200
@@ -1 +1 @@
-9
+10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/control 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/control
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/control       2024-02-18 
18:31:42.000000000 +0100
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/control       2026-10-10 
16:22:09.000000000 +0200
@@ -1,9 +1,9 @@
 Source: soapyplutosdr
 Section: libs
 Priority: optional
-Maintainer: Josh Blum <[email protected]>
+Maintainer: Christian W. Zuckschwerdt <[email protected]>
 Build-Depends:
-    debhelper (>= 9.0.0),
+    debhelper,
     cmake,
     libiio-dev,
     libad9361-dev,
@@ -13,7 +13,7 @@
 Vcs-Git: https://github.com/pothosware/SoapyPlutoSDR.git
 Vcs-Browser: https://github.com/pothosware/SoapyPlutoSDR
 
-Package: soapysdr0.7-module-plutosdr
+Package: soapysdr0.9-module-plutosdr
 Architecture: any
 Multi-Arch: same
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -22,7 +22,7 @@
 
 Package: soapysdr-module-plutosdr
 Architecture: all
-Depends: soapysdr0.7-module-plutosdr, ${misc:Depends}
+Depends: soapysdr0.9-module-plutosdr, ${misc:Depends}
 Description: Soapy PlutoSDR - PlutoSDR device support for Soapy SDR.
  A Soapy module that supports PlutoSDR devices within the Soapy API.
  .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/soapysdr0.7-module-plutosdr.install
 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/soapysdr0.7-module-plutosdr.install
--- 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/soapysdr0.7-module-plutosdr.install
   2024-02-18 18:31:42.000000000 +0100
+++ 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/soapysdr0.7-module-plutosdr.install
   1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-usr/lib/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/soapysdr0.9-module-plutosdr.install
 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/soapysdr0.9-module-plutosdr.install
--- 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.2/debian/soapysdr0.9-module-plutosdr.install
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/soapysdr0.9-module-plutosdr.install
   2026-10-10 16:22:09.000000000 +0200
@@ -0,0 +1 @@
+usr/lib/*

Reply via email to