diff --git a/components/spotify/patches/bell/0003-tremor-psram.patch b/components/spotify/patches/bell/0003-tremor-psram.patch new file mode 100644 index 0000000..861ac9c --- /dev/null +++ b/components/spotify/patches/bell/0003-tremor-psram.patch @@ -0,0 +1,24 @@ +diff --git a/external/tremor/os_types.h b/external/tremor/os_types.h +index 8d444d6..857f340 100644 +--- a/external/tremor/os_types.h ++++ b/external/tremor/os_types.h +@@ -27,10 +27,19 @@ + + /* make it easy on the folks that want to compile the libs with a + different malloc than stdlib */ ++#ifdef ESP_PLATFORM ++/* decoder state and codebooks in PSRAM: keeps internal RAM free */ ++#include "esp_heap_caps.h" ++#define _ogg_malloc(s) heap_caps_malloc((s), MALLOC_CAP_SPIRAM) ++#define _ogg_calloc(n, s) heap_caps_calloc((n), (s), MALLOC_CAP_SPIRAM) ++#define _ogg_realloc(p, s) heap_caps_realloc((p), (s), MALLOC_CAP_SPIRAM) ++#define _ogg_free free ++#else + #define _ogg_malloc malloc + #define _ogg_calloc calloc + #define _ogg_realloc realloc + #define _ogg_free free ++#endif + + #ifdef _WIN32 +