From acc29d95be85c9cfd0d8f74dda813d7d1082e2ec Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 18 Nov 2006 02:18:29 +0000 Subject: SWCODEC/IRAM: Save voice IRAM when a plugin initializes its IRAM. Defines two macros for declaring and initializing IRAM. Plugins should use these instead. See mp3_encoder, doom, etc. for details. Further tweaks in buffer restoration after other use. Hiding of some interfaces that should only be used by buffer management. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11544 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/audio.h | 5 +++++ firmware/export/config.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'firmware') diff --git a/firmware/export/audio.h b/firmware/export/audio.h index 42d94a9158..573252e938 100644 --- a/firmware/export/audio.h +++ b/firmware/export/audio.h @@ -101,7 +101,12 @@ void audio_error_clear(void); int audio_get_file_pos(void); void audio_beep(int duration); void audio_init_playback(void); +/* Required call when audio buffer is require for some other purpose */ unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size); +#ifdef USE_IRAM +/* Required call when codec IRAM is needed for some other purpose */ +void audio_iram_steal(void); +#endif /* channel modes */ enum rec_channel_modes diff --git a/firmware/export/config.h b/firmware/export/config.h index 440c0faef3..74c7e924ff 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -283,6 +283,9 @@ #define IDATA_ATTR __attribute__ ((section(".idata"))) #define IBSS_ATTR __attribute__ ((section(".ibss"))) #define USE_IRAM +#if CONFIG_CPU != SH7034 +#define IRAM_STEAL +#endif #else #define ICODE_ATTR #define ICONST_ATTR -- cgit v1.2.3