From ed27dac4322362c7524ce6631f210a28465ff095 Mon Sep 17 00:00:00 2001 From: "roman.artiukhin" Date: Mon, 1 Jan 2024 12:38:10 +0200 Subject: 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 --- firmware/export/config.h | 13 +++++++++---- 1 file 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 -- cgit v1.2.3