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-11-09 16:07:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/soapy-plutosdr (Old)
 and      /work/SRC/openSUSE:Factory/.soapy-plutosdr.new.3759290 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "soapy-plutosdr"

Mon Nov  9 16:07:57 2026 rev:3 rq:1396136 version:0.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/soapy-plutosdr/soapy-plutosdr.changes    
2026-10-15 12:19:08.629568164 +0200
+++ 
/work/SRC/openSUSE:Factory/.soapy-plutosdr.new.3759290/soapy-plutosdr.changes   
    2026-11-09 16:08:56.905634850 +0100
@@ -1,0 +2,23 @@
+Sun Nov  8 09:30:51 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Add soapy-plutosdr-libiio1-includedir.patch: search the
+  include/iio/ header layout as well (libiio 1.x moved the
+  headers there), fixing the CMake configure failure.
+- Add soapy-plutosdr-libiio1-scan-api.patch: port the device
+  scan to the libiio 1.x API (iio_scan, iio_err); the scan
+  context API 0.2.4 uses was removed in libiio 1.0.
+- Add soapy-plutosdr-libiio1-streaming.patch: port contexts,
+  channel attrs and the streaming engine to the libiio 1.x
+  block-queue API the driver needs to build at all.
+
+-------------------------------------------------------------------
+Wed Oct 21 07:53:39 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 0.2.4:
+  * Keep a bufflen buffer size across sample rate changes
+  * Double the automatic RX buffer at 10.5 to 15.7 Msps, fixing
+    sample loss at 13-15 Msps
+  * Close remaining streams during device teardown, fixing a
+    segfault when streams outlive the device
+
+-------------------------------------------------------------------

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

New:
----
  SoapyPlutoSDR-soapy-plutosdr-0.2.4.tar.gz
  soapy-plutosdr-libiio1-includedir.patch
  soapy-plutosdr-libiio1-scan-api.patch
  soapy-plutosdr-libiio1-streaming.patch

----------(New B)----------
  New:
- Add soapy-plutosdr-libiio1-includedir.patch: search the
  include/iio/ header layout as well (libiio 1.x moved the
  New:  headers there), fixing the CMake configure failure.
- Add soapy-plutosdr-libiio1-scan-api.patch: port the device
  scan to the libiio 1.x API (iio_scan, iio_err); the scan
  New:  context API 0.2.4 uses was removed in libiio 1.0.
- Add soapy-plutosdr-libiio1-streaming.patch: port contexts,
  channel attrs and the streaming engine to the libiio 1.x
----------(New E)----------

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

Other differences:
------------------
++++++ soapy-plutosdr.spec ++++++
--- /var/tmp/diff_new_pack.zXWRFL/_old  2026-11-09 16:08:57.760670666 +0100
+++ /var/tmp/diff_new_pack.zXWRFL/_new  2026-11-09 16:08:57.762670750 +0100
@@ -19,7 +19,7 @@
 %define soapy_modver 0.8-3
 %define soapy_modname soapysdr%{soapy_modver}-module-plutosdr
 Name:           soapy-plutosdr
-Version:        0.2.3
+Version:        0.2.4
 Release:        0
 Summary:        SoapySDR PlutoSDR module
 # Legal-Review-Notice: LGPL-2.1-only is deliberate. Upstream ships the bare
@@ -30,6 +30,12 @@
 URL:            https://github.com/pothosware/SoapyPlutoSDR/wiki
 #Git-Clone:     https://github.com/pothosware/SoapyPlutoSDR.git
 Source:         
https://github.com/pothosware/SoapyPlutoSDR/archive/%{name}-%{version}.tar.gz#/SoapyPlutoSDR-%{name}-%{version}.tar.gz
+# PATCH-FIX-OPENSUSE soapy-plutosdr-libiio1-includedir.patch [email protected] 
-- find libiio 1.x headers under include/iio/ too, not just the Homebrew libiio 
layout
+Patch0:         soapy-plutosdr-libiio1-includedir.patch
+# PATCH-FIX-OPENSUSE soapy-plutosdr-libiio1-scan-api.patch [email protected] 
-- port the device scan to the libiio 1.x API (iio_scan, iio_err), the 0.24-era 
scan context API is gone
+Patch1:         soapy-plutosdr-libiio1-scan-api.patch
+# PATCH-FIX-OPENSUSE soapy-plutosdr-libiio1-streaming.patch [email protected] 
-- port contexts, channel attrs and the streaming engine to the libiio 1.x 
block-queue API
+Patch2:         soapy-plutosdr-libiio1-streaming.patch
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
 BuildRequires:  pkgconfig

++++++ SoapyPlutoSDR-soapy-plutosdr-0.2.3.tar.gz -> 
SoapyPlutoSDR-soapy-plutosdr-0.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/Changelog.txt 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/Changelog.txt
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/Changelog.txt        2026-10-10 
16:22:09.000000000 +0200
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/Changelog.txt        2026-10-20 
19:43:23.000000000 +0200
@@ -1,3 +1,10 @@
+Release 0.2.4 (2026-10-20)
+==========================
+
+- Close remaining streams during device teardown (#81)
+- Double the automatic RX buffer at 10.5 to 15.7 Msps (#79)
+- Keep a "bufflen" buffer size across sample rate changes (#78)
+
 Release 0.2.3 (2026-10-10)
 ==========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Settings.cpp 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/PlutoSDR_Settings.cpp
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Settings.cpp        
2026-10-10 16:22:09.000000000 +0200
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/PlutoSDR_Settings.cpp        
2026-10-20 19:43:23.000000000 +0200
@@ -48,6 +48,14 @@
 
 SoapyPlutoSDR::~SoapyPlutoSDR(void){
 
+    // Close any remaining streams while the IIO context is still valid.
+    if (this->rx_stream) {
+        this->closeStream(reinterpret_cast<SoapySDR::Stream 
*>(this->rx_stream.get()));
+    }
+    if (this->tx_stream) {
+        this->closeStream(reinterpret_cast<SoapySDR::Stream 
*>(this->tx_stream.get()));
+    }
+
        long long samplerate=0;
        if(decimation){
                iio_channel_attr_read_longlong(iio_device_find_channel(dev, 
"voltage0", false),"sampling_frequency",&samplerate);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Streaming.cpp 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/PlutoSDR_Streaming.cpp
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/PlutoSDR_Streaming.cpp       
2026-10-10 16:22:09.000000000 +0200
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/PlutoSDR_Streaming.cpp       
2026-10-20 19:43:23.000000000 +0200
@@ -9,6 +9,9 @@
 
 //TODO: Need to be a power of 2 for maximum efficiency ?
 # define DEFAULT_RX_BUFFER_SIZE (1 << 16)
+# define HIGH_RX_SAMPLE_RATE 10e6
+# define MIN_RX_BUFFER_SECONDS 0.025
+# define MAX_DOUBLED_RX_BUFFER_SIZE (1 << 19)
 
 
 std::vector<std::string> SoapyPlutoSDR::getStreamFormats(const int direction, 
const size_t channel) const
@@ -272,6 +275,11 @@
 
 void rx_streamer::set_buffer_size_by_samplerate(const size_t samplerate) {
 
+    //A buffer size given with "bufflen" outlasts sample rate changes.
+    if (bufflen_given) {
+        return;
+    }
+
     //Adapt buffer size (= MTU) as a tradeoff to minimize readStream overhead 
but at
     //the same time allow realtime applications. Keep it a power of 2 which 
seems to be better.
     //so try to target very roughly 60fps [30 .. 100] readStream calls / s for 
realtime applications.
@@ -283,6 +291,17 @@
         power_of_2_nb_samples++;
     }
 
+    //At 13 to 15 Msps, 262144-sample buffers (under 25 ms) lost samples over
+    //the network in my tests (up to ~1% at 15 Msps on gigabit Ethernet), with
+    //no overflow reported; 524288-sample buffers lost none. Above 10 Msps,
+    //double buffers under 25 ms, at the cost of up to one buffer of latency,
+    //capped to stay in the band tested (10.49 to 15.73 Msps).
+    if (samplerate > HIGH_RX_SAMPLE_RATE &&
+        (1 << power_of_2_nb_samples) < MIN_RX_BUFFER_SECONDS * samplerate &&
+        (2 << power_of_2_nb_samples) <= MAX_DOUBLED_RX_BUFFER_SIZE) {
+        power_of_2_nb_samples++;
+    }
+
     this->set_buffer_size(1 << power_of_2_nb_samples);
 
        SoapySDR_logf(SOAPY_SDR_INFO, "Auto setting Buffer Size: %lu", 
(unsigned long)buffer_size);
@@ -330,6 +349,7 @@
                        if (bufferLength > 0) {
                                this->set_buffer_size(bufferLength);
                                this->set_mtu_size(this->buffer_size);
+                               bufflen_given = true;
                        }
                }
                catch (const std::invalid_argument &){}
@@ -614,6 +634,7 @@
                        if (bufferLength > 0) {
                                this->set_buffer_size(bufferLength);
                                this->set_mtu_size(this->buffer_size);
+                               bufflen_given = true;
                        }
                }
                catch (const std::invalid_argument &){}
@@ -643,6 +664,11 @@
 
 void tx_streamer::set_buffer_size_by_samplerate(const size_t samplerate) {
 
+    //A buffer size given with "bufflen" outlasts sample rate changes.
+    if (bufflen_given) {
+        return;
+    }
+
     // 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.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/SoapyPlutoSDR.hpp 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/SoapyPlutoSDR.hpp
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/SoapyPlutoSDR.hpp    2026-10-10 
16:22:09.000000000 +0200
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/SoapyPlutoSDR.hpp    2026-10-20 
19:43:23.000000000 +0200
@@ -47,6 +47,7 @@
                const iio_device  *dev;
 
                size_t buffer_size;
+               bool bufflen_given = false;
                size_t byte_offset;
                size_t items_in_buffer;
                iio_buffer  *buf;
@@ -80,6 +81,7 @@
                size_t items_in_buf;
                bool direct_copy;
                size_t buffer_size;
+               bool bufflen_given = false;
                size_t mtu_size;
 
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/changelog 
new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/debian/changelog
--- old/SoapyPlutoSDR-soapy-plutosdr-0.2.3/debian/changelog     2026-10-10 
16:22:09.000000000 +0200
+++ new/SoapyPlutoSDR-soapy-plutosdr-0.2.4/debian/changelog     2026-10-20 
19:43:23.000000000 +0200
@@ -1,3 +1,9 @@
+soapyplutosdr (0.2.4-1) unstable; urgency=low
+
+  * Release 0.2.4 (2026-10-20)
+
+ -- Christian W. Zuckschwerdt <[email protected]>  Tue, 20 Oct 2026 17:00:00 -0000
+
 soapyplutosdr (0.2.3-1) unstable; urgency=low
 
   * Release 0.2.3 (2026-10-10)

++++++ soapy-plutosdr-libiio1-includedir.patch ++++++
Find libiio 1.x headers in their new location too.

libiio 1.0 moved the public headers from %{_includedir}/iio.h to
%{_includedir}/iio/iio.h. The finder's PATH_SUFFIXES only knew the
Homebrew "libiio" layout, so with the system sysroot it looked for
/usr/include/iio.h (gone) and never /usr/include/iio/iio.h, failing
the configure with "missing LibIIO_INCLUDE_DIR" even though the
right libiio was present. Searching the "iio" suffix as well finds
either layout; the include directory then points at the headers and
the in-tree "#include <iio.h>" keeps working unchanged.

--- a/FindLibIIO.cmake
+++ b/FindLibIIO.cmake
@@ -27,7 +27,7 @@
           /opt/local/Library/Frameworks
           ${HOMEBREW_PREFIX}/Cellar/libiio/${PC_LibIIO_VERSION}/Frameworks
           ${HOMEBREW_PREFIX}/Cellar/libiio/${PC_LibIIO_VERSION}
-          PATH_SUFFIXES libiio)
+          PATH_SUFFIXES libiio iio)
 
 find_library(LibIIO_LIBRARY NAMES iio libiio
              HINTS ${PC_LibIIO_LIBDIR} ${PC_LibIIO_LIBRARY_DIRS}

++++++ soapy-plutosdr-libiio1-scan-api.patch ++++++
Port the device scan to the libiio 1.x API.

libiio 1.0 removed the iio_scan_context / iio_context_info /
iio_create_scan_context / iio_create_network_context /
iio_create_context_from_uri API (replaced by iio_scan with
iio_scan_get_results_count / _get_uri / _get_description,
iio_create_context(NULL, uri) and the iio_err() error-pointer
helper). Without this the 0.2.4 tree cannot compile against the
libiio 1.0 in Factory. The discovery flow is unchanged; the
macOS-only -19 special case is gone (a failed scan already skips
the hostname fallback the same way).

--- a/PlutoSDR_Registration.cpp
+++ b/PlutoSDR_Registration.cpp
@@ -11,9 +11,7 @@
     
     std::vector<SoapySDR::Kwargs> results;
 
-       ssize_t ret = 0;
-       iio_scan_context *scan_ctx;
-       iio_context_info **info;
+       struct iio_scan *scan_ctx;
        SoapySDR::Kwargs options;
 
        // Backends can error, scan each one individually
@@ -73,39 +71,26 @@
                        
std::this_thread::sleep_for(std::chrono::milliseconds(500));
                }
 
-               scan_ctx = iio_create_scan_context(it->c_str(), 0);
-               if (scan_ctx == nullptr) {
+               scan_ctx = iio_scan(NULL, it->c_str());
+               if (iio_err(scan_ctx)) {
                        SoapySDR_logf(SOAPY_SDR_WARNING, "Unable to setup %s 
scan\n", it->c_str());
                        continue;
                }
 
-               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) {
-                       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;
-               }
+               size_t nresults = iio_scan_get_results_count(scan_ctx);
 
                options["device"] = "PlutoSDR";
-               if (ret == 0) {
-                       iio_context_info_list_free(info);
-                       iio_scan_context_destroy(scan_ctx);
+               if (nresults == 0) {
+                       iio_scan_destroy(scan_ctx);
 
                        //no devices discovered, the user must specify a 
hostname
                        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
+                       std::string uri = std::string("ip:") + 
args.at("hostname");
+                       ctx = iio_create_context(NULL, uri.c_str());
+                       if (iio_err(ctx)) continue; //failed to connect
                        options["hostname"] = args.at("hostname");
 
                        std::ostringstream label_str;
@@ -116,11 +101,11 @@
                        iio_context_destroy(ctx);
 
                } else {
-                       for (int i = 0; i < ret; i++) {
+                       for (size_t i = 0; i < nresults; 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]));
+                               ctx = iio_create_context(NULL, 
iio_scan_get_uri(scan_ctx, i));
+                               if (!iio_err(ctx)) {
+                                       options["uri"] = 
std::string(iio_scan_get_uri(scan_ctx, i));
 
                                        // check if discovered libiio context 
can be a PlutoSDR (and not some other sensor),
           // it must contain "ad9361-phy", "cf-ad9361-lpc" and 
"cf-ad9361-dds-core-lpc" devices
@@ -143,8 +128,7 @@
                                }
 
                        }
-                       iio_context_info_list_free(info);
-                       iio_scan_context_destroy(scan_ctx);
+                       iio_scan_destroy(scan_ctx);
                }
 
        }

++++++ soapy-plutosdr-libiio1-streaming.patch ++++++
++++ 697 lines (skipped)

Reply via email to