Re: [linux-minidisc] [PATCH] NetMD SP Transfer results in audible 'pop' on packet boundary


Hi,

A similar patch has already been applied to minidisc-ffwd here:
https://github.com/thp/linux-minidisc/commit/048d61cbbd3b1ed8f5a9cf07028dd30238f4db8d 

This comes from vuori’s 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 


Thanks,
Thomas

> On 02.09.2025, at 19:22, Rene Rebe <rene@exactcode.de> wrote:
> 
> 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.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é 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 = position + chunksize;
> 
> 
> -- 
>  René Rebe, ExactCODE GmbH, Berlin, Germany
>  https://exactcode.com | https://t2linux.com | https://rene.rebe.de
> 
> _______________________________________________
> linux-minidisc mailing list
> linux-minidisc@lists.fu-berlin.de
> https://lists.fu-berlin.de/listinfo/linux-minidisc