diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2006-11-18 02:18:29 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2006-11-18 02:18:29 +0000 |
commit | acc29d95be85c9cfd0d8f74dda813d7d1082e2ec (patch) | |
tree | 81fdd154d122b393d6254968cba5bc90b63e4741 /firmware/export | |
parent | e2a262ee258769136eadc58c2bc8e3aa53db1a71 (diff) | |
download | rockbox-acc29d95be85c9cfd0d8f74dda813d7d1082e2ec.tar.gz rockbox-acc29d95be85c9cfd0d8f74dda813d7d1082e2ec.zip |
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
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/audio.h | 5 | ||||
-rw-r--r-- | firmware/export/config.h | 3 |
2 files changed, 8 insertions, 0 deletions
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); | |||
101 | int audio_get_file_pos(void); | 101 | int audio_get_file_pos(void); |
102 | void audio_beep(int duration); | 102 | void audio_beep(int duration); |
103 | void audio_init_playback(void); | 103 | void audio_init_playback(void); |
104 | /* Required call when audio buffer is require for some other purpose */ | ||
104 | unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size); | 105 | unsigned char *audio_get_buffer(bool talk_buf, size_t *buffer_size); |
106 | #ifdef USE_IRAM | ||
107 | /* Required call when codec IRAM is needed for some other purpose */ | ||
108 | void audio_iram_steal(void); | ||
109 | #endif | ||
105 | 110 | ||
106 | /* channel modes */ | 111 | /* channel modes */ |
107 | enum rec_channel_modes | 112 | 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 @@ | |||
283 | #define IDATA_ATTR __attribute__ ((section(".idata"))) | 283 | #define IDATA_ATTR __attribute__ ((section(".idata"))) |
284 | #define IBSS_ATTR __attribute__ ((section(".ibss"))) | 284 | #define IBSS_ATTR __attribute__ ((section(".ibss"))) |
285 | #define USE_IRAM | 285 | #define USE_IRAM |
286 | #if CONFIG_CPU != SH7034 | ||
287 | #define IRAM_STEAL | ||
288 | #endif | ||
286 | #else | 289 | #else |
287 | #define ICODE_ATTR | 290 | #define ICODE_ATTR |
288 | #define ICONST_ATTR | 291 | #define ICONST_ATTR |