From rene@exactco.de Tue Sep 02 19:21:59 2025 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.98) for linux-minidisc@lists.fu-berlin.de with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1utUhj-00000001KO6-0wQS; Tue, 02 Sep 2025 19:21:59 +0200 Received: from exactco.de ([176.9.10.151]) by relay1.zedat.fu-berlin.de (Exim 4.98) for linux-minidisc@lists.fu-berlin.de with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1utUhj-00000000ZOo-0YYd; Tue, 02 Sep 2025 19:21:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=exactco.de; s=x; h=Sender:Content-Transfer-Encoding:Content-Type:Mime-Version:From: Subject:Cc:To:Message-Id:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=aWeJa1vGkabpIOq4QN9iknok8zB2coEHENjfFNZUJNc=; b=OY7Rz9uhvF46bXYbOB2fPM6gF1 crGi+J5MIIAEUusVhVFgo0RMJcPXKPftwNvLq4NXo0WM97g3VIsaKgvGEE1MNTYKje+aL4R0dDFvd sfnaFI9nSK3cNxQ8b0tGTmy5/CRbS8NrtR0zm/x5kZf0pp86aKzmH+h+j5GgwDfuCvAv9xuf4ip48 lKc/sZnjncgZoNgNYZhCfM5Q1YkzPjFcrvrHXg7mfNSUDiNmIQQThkQIHF+3kg5spVY1o6Rga6Evi 7mPSkAjycUtXQ7hTN+RAbSv2EppYm7YVpqiJpuxx9Skea+W3iOq/jQFSeKLL4Mk0XK9E0XQwQ9cHQ bdWP4IBA==; Date: Tue, 02 Sep 2025 19:22:00 +0200 (CEST) Message-Id: <20250902.192200.1700867074617091139.rene@exactcode.com> To: linux-minidisc@lists.fu-berlin.de From: Rene Rebe X-Mailer: Mew version 6.10 on Emacs 30.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Sender: rene@exactco.de X-Originating-IP: 176.9.10.151 X-ZEDAT-Hint: I X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1756833719-6D810338-7D2A3400/0/0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.053461, version=1.2.4 X-Spam-Flag: NO X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS X-Spam-Checker-Version: SpamAssassin 3.4.6 on Vanuatu.ZEDAT.FU-Berlin.DE X-Spam-Level: Subject: [linux-minidisc] [PATCH] NetMD SP Transfer results in audible 'pop' on packet boundary X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2025 17:22:00 -0000 Hi, your emails reminded me that I hit GH#39 this year and wanted to sent you the re-based patch. IIRC the quoated webnetmd code did not apply due to some code changes over the years: Fix audible noise every ~47s, GH#39: NetMD SP Transfer results in audible 'pop' on packet boundary. Tested on Sony MZ-RH1. --- linux-minidisc/libnetmd/secure.c.vanilla 2025-02-22 18:33:21.819516= 328 +0100 +++ linux-minidisc/libnetmd/secure.c 2025-02-22 20:09:42.859406102 +010= 0 @@ -5,6 +5,7 @@ * * Copyright (C) 2004 Bertrik Sikken * Copyright (C) 2011 Alexander Sulfrian + * Copyright (C) 2025 Ren=E9 Rebe * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -485,7 +486,7 @@ gcry_cipher_setkey(data_handle, rand, sizeof(rand)); gcry_cipher_encrypt(data_handle, next->data, chunksize, data += position, packet_data_length); /* set last encrypted block as iv for the next packet */ - memcpy(iv, data + position + packet_data_length - 8, 8); + memcpy(iv, next->data + chunksize - 8, 8); = /* next packet */ position =3D position + chunksize; -- = Ren=E9 Rebe, ExactCODE GmbH, Berlin, Germany https://exactcode.com | https://t2linux.com | https://rene.rebe.de From th.perl@gmail.com Thu Sep 04 11:02:00 2025 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.98) for linux-minidisc@lists.fu-berlin.de with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1uu5qx-00000000RBu-229o; Thu, 04 Sep 2025 11:01:59 +0200 Received: from mail-ej1-f42.google.com ([209.85.218.42]) by relay1.zedat.fu-berlin.de (Exim 4.98) for linux-minidisc@lists.fu-berlin.de with esmtps (TLS1.3) tls TLS_AES_128_GCM_SHA256 (envelope-from ) id 1uu5qx-00000000Dbi-1dba; Thu, 04 Sep 2025 11:01:59 +0200 Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-aff0365277aso302695166b.1 for ; Thu, 04 Sep 2025 02:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756976518; x=1757581318; darn=lists.fu-berlin.de; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1S2d4AmAImXy/t0nsCnFu3s/gw+9zNm9gR6r8upkghI=; b=ISaPOerTVm0matVlALeMlWHoBIedxl8vfWMQ4x4rz5d2Ml6FxMfc7L0Ky3uS1d0GzK joSARR5ePupBEBoJma2g8LWsqiaICSRwr2ucVNeh621yEQjq5/6LMoXSIODMXiku3WJT q2EJmVLgi9wnUG+yn3siGYtM5hU6blPAN5wZ/loQnQoVgzn+sg65tAKphJZ7iXAFzsSz obDlOR4Zvbv68vWeC4o+l9MvbnHcQgGgINl+JIJcMVK6DwdZkSZ0iD6AoSgM0jYIGVdK RjKXDw6ou4kThWQ77X/BnkRs86ARtOyeQtfop9c0j3AUOyJfRMxF8N/ifUoWTs7O7lip nBbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756976518; x=1757581318; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1S2d4AmAImXy/t0nsCnFu3s/gw+9zNm9gR6r8upkghI=; b=dL3aNd2B1G3eV+PvtIGrI+8MVOZT4nD8jymU53BU+bu1ofX0sndmPqxZO3fWrU/Y7B YFpdpJyPego7EM3IJ3AzPaTLTWUpW7HDU/zXNciJSOoFIExwTYLKOub8P7AdMnsl4AE8 Cak3Yo4XDbEbiQ0UfRio1s88V5sB2gzlC76GsV3fHNnaJgHPawKHs4BnkjM5TtP6rviE 0KabobjC4uJzrlmSThqgGWeMNUqTxEpwROjhl6b6N17gNFkrKxY19jYDORwPJyXEfWDe AcNfso+8H+p/XKqmBt2qRrZAWBeUxrBG7o39I/8dqNwSK3uc9+MZyuzXgfyQS2jYsSs1 kaZQ== X-Gm-Message-State: AOJu0YynOQJn83tJMj2XZPK2FmXL9kqeo5mAepxSDkDmXvIvOiLm/I6g Yn+zeeliKgYJdqEA8YLV7XuGdmyzfMFhZ6p6l/Zg1wqqt6G72y1oUp3h7bSmKw== X-Gm-Gg: ASbGncvdbywW9067vd1eMTS73hTBiQtiPce345MPXBGgrJ8JgdCMWYwJXG6UDeirxj8 qmG9KfT98hCvHRGSlQDYGmrGFhs/KB4I/WQg2NWr9Yw1fWee7kZrKQGolDaCD80+u7V6IZmrP1Z nOSPjnQ3HJCm+baaPz4HSqqxNxHqSwKNcfoEQkrBFu+oCLV80hbbNDG3GLt6N1CsYJxLGjWAax5 JiiMYWIl0tpAzcWWxyvcKC1dyOiE7D3wRQaA/uNn8tvF4+dtc+TkYldlbfvkTNXsCdfiaWm0gZl 3ldzq9L0Npsa4YzkO0MMCr4W+Ki7SLhsywLyYqipfzIlwo+twM3GMIXKa+vVYN9M9YMYQ8rt7XV Cs+UUU/HFy1rKDFu8c+kPPZHe7KTAPyzxiAYQW0cQtzWQ00FB75getIKS8WE= X-Google-Smtp-Source: AGHT+IEieraveGCeMgMwVnFs/gXP06b4mcP9GW5fWJDPTlF2XnDOWH4Iix7Jy7ZyCMpC8UOXG0ahOA== X-Received: by 2002:a17:907:3f09:b0:b04:25e6:2dc2 with SMTP id a640c23a62f3a-b0425e63244mr1549939166b.22.1756976517385; Thu, 04 Sep 2025 02:01:57 -0700 (PDT) Received: from smtpclient.apple ([2a02:1748:f39f:7171:d544:1170:fe96:ea1d]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b017e4b9ed7sm1289060766b.90.2025.09.04.02.01.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Sep 2025 02:01:56 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) From: "Thomas Perl (thp)" In-Reply-To: <20250902.192200.1700867074617091139.rene@exactcode.com> Date: Thu, 4 Sep 2025 11:01:46 +0200 Cc: linux-minidisc@lists.fu-berlin.de Content-Transfer-Encoding: quoted-printable Message-Id: <4F71B28D-1381-4A8D-B06B-175174BBAE97@gmail.com> References: <20250902.192200.1700867074617091139.rene@exactcode.com> To: Rene Rebe X-Mailer: Apple Mail (2.3826.700.81) X-Originating-IP: 209.85.218.42 X-ZEDAT-Hint: I X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1756976519-6DA6A324-4C170EE0/0/0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.435860, version=1.2.4 X-Spam-Flag: NO X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE,SPF_PASS X-Spam-Checker-Version: SpamAssassin 3.4.6 on Niue.ZEDAT.FU-Berlin.DE X-Spam-Level: Subject: Re: [linux-minidisc] [PATCH] NetMD SP Transfer results in audible 'pop' on packet boundary X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2025 09:02:00 -0000 Hi, A similar patch has already been applied to minidisc-ffwd here: = https://github.com/thp/linux-minidisc/commit/048d61cbbd3b1ed8f5a9cf07028dd= 30238f4db8d=20 This comes from vuori=E2=80=99s fork of the repo: https://github.com/vuori/linux-minidisc Some other not-yet-merged-upstream patches also collected here: https://github.com/thp/linux-minidisc=20 Thanks, Thomas > On 02.09.2025, at 19:22, Rene Rebe wrote: >=20 > Hi, >=20 > your emails reminded me that I hit GH#39 this year and wanted to sent > you the re-based patch. IIRC the quoated webnetmd code did not apply > due to some code changes over the years: >=20 > Fix audible noise every ~47s, GH#39: NetMD SP Transfer results in > audible 'pop' on packet boundary. Tested on Sony MZ-RH1. >=20 > --- linux-minidisc/libnetmd/secure.c.vanilla 2025-02-22 = 18:33:21.819516328 +0100 > +++ linux-minidisc/libnetmd/secure.c 2025-02-22 20:09:42.859406102 = +0100 > @@ -5,6 +5,7 @@ > * > * Copyright (C) 2004 Bertrik Sikken > * Copyright (C) 2011 Alexander Sulfrian > + * Copyright (C) 2025 Ren=C3=A9 Rebe > * > * This library is free software; you can redistribute it and/or > * modify it under the terms of the GNU Lesser General Public > @@ -485,7 +486,7 @@ > gcry_cipher_setkey(data_handle, rand, sizeof(rand)); > gcry_cipher_encrypt(data_handle, next->data, chunksize, data + = position, packet_data_length); > /* set last encrypted block as iv for the next packet */ > - memcpy(iv, data + position + packet_data_length - 8, 8); > + memcpy(iv, next->data + chunksize - 8, 8); >=20 > /* next packet */ > position =3D position + chunksize; >=20 >=20 > --=20 > Ren=C3=A9 Rebe, ExactCODE GmbH, Berlin, Germany > https://exactcode.com | https://t2linux.com | https://rene.rebe.de >=20 > _______________________________________________ > linux-minidisc mailing list > linux-minidisc@lists.fu-berlin.de > https://lists.fu-berlin.de/listinfo/linux-minidisc