File 0011-fix-Update-sample-drop-size-for-hardware-bug-workaro.patch of Package libsigrok
From 13429dae451237075c452138efb4eadbd9907d85 Mon Sep 17 00:00:00 2001
From: taorye <taorye@outlook.com>
Date: Fri, 12 Dec 2025 16:10:35 +0800
Subject: [PATCH 11/17] fix: Update sample drop size for hardware bug
workaround
---
src/hardware/sipeed-slogic-analyzer/protocol.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hardware/sipeed-slogic-analyzer/protocol.c b/src/hardware/sipeed-slogic-analyzer/protocol.c
index 3862a9b0d..f48b926b8 100644
--- a/src/hardware/sipeed-slogic-analyzer/protocol.c
+++ b/src/hardware/sipeed-slogic-analyzer/protocol.c
@@ -59,9 +59,9 @@ static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer)
devc->transfers_reached_nbytes +=
devc->transfers_reached_nbytes_latest;
- // remove 2 samples for hardware bug workaround
+ // remove 32bit for hardware bug workaround
if (first_here) {
- size_t drop_bytes = (2*devc->cur_samplechannel/8)?:1;
+ const size_t drop_bytes = 4;
if (transfer->actual_length >= drop_bytes) {
transfer->actual_length -= drop_bytes;
memmove(transfer->buffer, transfer->buffer + drop_bytes,
--
2.52.0