summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroman.artiukhin <bahusdrive@gmail.com>2024-01-01 12:38:10 +0200
committerAidan MacDonald <amachronic@protonmail.com>2024-01-02 10:05:17 -0500
commited27dac4322362c7524ce6631f210a28465ff095 (patch)
tree83dc15b706198f5f07e29a9d404d147e5f5ba96c
parent8cc7476735dd3f9f9e3f5b1356eadc4ef40c23b4 (diff)
downloadrockbox-ed27dac432.tar.gz
rockbox-ed27dac432.zip
Fix CODEC_AAC_SBR_DEC check with undefined CONFIG_CPU
Define CONFIG_CPU if not defined This fix makes sure that AAC-LC decoding is used both on device and simulator. It's important for testing purposes as proper AAC-LC decoding requires changes both in decoder and in metadata handling. Fixup for 4cd65b9d9. Change-Id: Idef88825458761fffa3f5c5f4f221b555c509d89
-rw-r--r--firmware/export/config.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 74be1f9711..26ed7395ff 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -601,6 +601,15 @@ Lyre prototype 1 */
//#error "unknown hwardware platform!"
#endif
+#ifndef CONFIG_CPU
+#define CONFIG_CPU 0
+#endif
+
+// NOTE: should be placed before sim.h (where CONFIG_CPU is undefined)
+#if !(CONFIG_CPU >= PP5002 && CONFIG_CPU <= PP5022) && CODEC_SIZE >= 0x80000
+#define CODEC_AAC_SBR_DEC
+#endif
+
#ifdef __PCTOOL__
#undef CONFIG_CPU
#define CONFIG_CPU 0
@@ -681,10 +690,6 @@ Lyre prototype 1 */
/* now set any CONFIG_ defines correctly if they are not used,
No need to do this on CONFIG_'s which are compulsory (e.g CONFIG_CODEC ) */
-#if !(CONFIG_CPU >= PP5002 && CONFIG_CPU <= PP5022) && CODEC_SIZE >= 0x80000
-#define CODEC_AAC_SBR_DEC
-#endif
-
#if !defined(CONFIG_BACKLIGHT_FADING)
#define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
#endif