summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2023-01-18 17:49:23 +0000
committerAidan MacDonald <amachronic@protonmail.com>2023-01-18 17:52:55 +0000
commit969e1ef6cda10aaf1affb07a953ec1b597de24e0 (patch)
tree4767ad4a7ec4b979a9cfed01d6d1f52f4e58055f
parentaae34b2e7faead258e99e42bd199b329475eb17c (diff)
downloadrockbox-969e1ef6cda10aaf1affb07a953ec1b597de24e0.tar.gz
rockbox-969e1ef6cda10aaf1affb07a953ec1b597de24e0.zip
Bump codec API version, remove dummy configure loop in dsp_init()
It turns out removing DSP_INIT broke the codec ABI and caused old codecs to crash; the loop and mdelay() was a red herring. This reverts commit 541960a11061213f682d67bb036f861b2605f9d3. Change-Id: I020d826e7b4beb006d093d9c3d4f45fa5eaac717
-rw-r--r--lib/rbcodec/codecs/codecs.h4
-rw-r--r--lib/rbcodec/dsp/dsp_core.c10
-rw-r--r--lib/rbcodec/dsp/dsp_core.h1
3 files changed, 2 insertions, 13 deletions
diff --git a/lib/rbcodec/codecs/codecs.h b/lib/rbcodec/codecs/codecs.h
index 6048e5012c..fd19dcb6b5 100644
--- a/lib/rbcodec/codecs/codecs.h
+++ b/lib/rbcodec/codecs/codecs.h
@@ -72,12 +72,12 @@
72#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */ 72#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */
73 73
74/* increase this every time the api struct changes */ 74/* increase this every time the api struct changes */
75#define CODEC_API_VERSION 48 75#define CODEC_API_VERSION 49
76 76
77/* update this to latest version if a change to the api struct breaks 77/* update this to latest version if a change to the api struct breaks
78 backwards compatibility (and please take the opportunity to sort in any 78 backwards compatibility (and please take the opportunity to sort in any
79 new function which are "waiting" at the end of the function table) */ 79 new function which are "waiting" at the end of the function table) */
80#define CODEC_MIN_API_VERSION 48 80#define CODEC_MIN_API_VERSION 49
81 81
82/* reasons for calling codec main entrypoint */ 82/* reasons for calling codec main entrypoint */
83enum codec_entry_call_reason { 83enum codec_entry_call_reason {
diff --git a/lib/rbcodec/dsp/dsp_core.c b/lib/rbcodec/dsp/dsp_core.c
index c15e4342ae..5108c9ef47 100644
--- a/lib/rbcodec/dsp/dsp_core.c
+++ b/lib/rbcodec/dsp/dsp_core.c
@@ -535,16 +535,6 @@ void dsp_init(void)
535 for (unsigned int j = 0; j < ARRAYLEN(dsp_init_fn); ++j) 535 for (unsigned int j = 0; j < ARRAYLEN(dsp_init_fn); ++j)
536 dsp_init_fn[j](dsp, i); 536 dsp_init_fn[j](dsp, i);
537 537
538 /*
539 * FIXME: This is a no-op and should not be needed, but it
540 * appears there is a race condition here that causes
541 * prefetch abort panics on the Clip+. See FS#13386.
542 * Replacing the loop with mdelay(1) also suppresses
543 * the crash.
544 */
545 for (unsigned int j = 0; j < DSP_NUM_PROC_STAGES; j++)
546 dsp_proc_database[j]->configure(NULL, dsp, DSP_INIT, i);
547
548 dsp_configure(dsp, DSP_RESET, 0); 538 dsp_configure(dsp, DSP_RESET, 0);
549 } 539 }
550} 540}
diff --git a/lib/rbcodec/dsp/dsp_core.h b/lib/rbcodec/dsp/dsp_core.h
index 2fc26161fa..9b09d981cc 100644
--- a/lib/rbcodec/dsp/dsp_core.h
+++ b/lib/rbcodec/dsp/dsp_core.h
@@ -32,7 +32,6 @@ enum dsp_ids
32 32
33enum dsp_settings 33enum dsp_settings
34{ 34{
35 DSP_INIT,
36 DSP_RESET, 35 DSP_RESET,
37 DSP_SET_FREQUENCY, 36 DSP_SET_FREQUENCY,
38 DSP_SET_SAMPLE_DEPTH, 37 DSP_SET_SAMPLE_DEPTH,