From e27fb9a9f08e57f3d20601dc1548a0c1d4320b6c Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Tue, 6 Oct 2026 21:50:09 -0400 Subject: [PATCH] test_codec: add checksum runs with the DSP "Checksum with DSP" and "Checksum folder with DSP" give the CRC32 of the DSP's 16-bit output for a file or a folder, as "Checksum" does for the codec's output. That lets the DSP of a device, with its settings, be checked against a reference for several files in one run; "Write WAV with DSP" writes one file, /test.wav. Co-Authored-By: Claude Opus 5.5 --- apps/plugins/test_codec.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c index b38ae221e0..0a54cacc41 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c @@ -918,6 +918,8 @@ enum plugin_status plugin_start(const void* parameter) WRITE_WAV_WITH_DSP, CHECKSUM, CHECKSUM_DIR, + CHECKSUM_WITH_DSP, + CHECKSUM_DIR_WITH_DSP, QUIT, #ifdef HAVE_ADJUSTABLE_CPU_FREQ BOOST, @@ -934,6 +936,8 @@ enum plugin_status plugin_start(const void* parameter) "Write WAV with DSP", "Checksum", "Checksum folder", + "Checksum with DSP", + "Checksum folder with DSP", "Quit", #ifdef HAVE_ADJUSTABLE_CPU_FREQ "Boosting", @@ -967,6 +971,13 @@ menu: scandir = 0; + /* Map checksum runs with DSP to CHECKSUM and CHECKSUM_DIR: the + * checksum is then that of the DSP's output. */ + bool dsp_checksum = (result == CHECKSUM_WITH_DSP || + result == CHECKSUM_DIR_WITH_DSP); + if (dsp_checksum) + result -= 2; + /* Map test runs with checksum calcualtion to standard runs * SPEED_TEST and SPEED_TEST_DIR and set the 'checksum' flag. */ if ((checksum = (result == CHECKSUM || @@ -978,6 +989,8 @@ menu: if ((use_dsp = (result >= SPEED_TEST_WITH_DSP && result <= WRITE_WAV_WITH_DSP))) result -= 3; + else + use_dsp = dsp_checksum; if (result == SPEED_TEST) { wavinfo.fd = -1;