summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-04-05 19:18:15 +0000
committerThomas Martitz <kugel@rockbox.org>2010-04-05 19:18:15 +0000
commit02afc271c92c9138a51c22ff723872c7a430f74e (patch)
treefa6e2487cfd351d684d28b36f392040a27654b5e /firmware/target/arm
parent527a2e64ab23fee104bf447e06fdefb38c211418 (diff)
downloadrockbox-02afc271c92c9138a51c22ff723872c7a430f74e.tar.gz
rockbox-02afc271c92c9138a51c22ff723872c7a430f74e.zip
as3525v2: Move codec into iram freeing 1MB for the audio buffer and also a small decoding speedup (iram seems to be 50% faster than dram when boosted and the same when unboosed). 32k is still reserved for the core and can be readjusted if needed. Codecs don't appear to ever need the 1MB (usually <350k only).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25491 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/as3525/app.lds12
1 files changed, 7 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/app.lds b/firmware/target/arm/as3525/app.lds
index 56a4b20fa6..f9d070e60d 100644
--- a/firmware/target/arm/as3525/app.lds
+++ b/firmware/target/arm/as3525/app.lds
@@ -23,8 +23,10 @@ STARTUP(target/arm/crt0.o)
23/* End of the audio buffer, where the codec buffer starts */ 23/* End of the audio buffer, where the codec buffer starts */
24#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) 24#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
25 25
26#define CODEC_BUFFER_FILLS_IRAM defined(AMS_LOWMEM) || (CONFIG_CPU == AS3525v2)
26 27
27#ifdef AMS_LOWMEM 28#if CODEC_BUFFER_FILLS_IRAM
29/* Entire codec buffer in IRAM */
28#define DRAMSIZE (DRAM_SIZE - STUBOFFSET - PLUGINSIZE - TTB_SIZE) 30#define DRAMSIZE (DRAM_SIZE - STUBOFFSET - PLUGINSIZE - TTB_SIZE)
29#define CODECORIG (IRAMORIG + (IRAM_SIZE - CODEC_SIZE)) 31#define CODECORIG (IRAMORIG + (IRAM_SIZE - CODEC_SIZE))
30#define IRAMSIZE (IRAM_SIZE - CODEC_SIZE) 32#define IRAMSIZE (IRAM_SIZE - CODEC_SIZE)
@@ -36,7 +38,7 @@ STARTUP(target/arm/crt0.o)
36 38
37 39
38/* Where the codec buffer ends, and the plugin buffer starts */ 40/* Where the codec buffer ends, and the plugin buffer starts */
39#ifdef AMS_LOWMEM 41#if CODEC_BUFFER_FILLS_IRAM
40#define ENDADDR (ENDAUDIOADDR) 42#define ENDADDR (ENDAUDIOADDR)
41#else 43#else
42#define ENDADDR (ENDAUDIOADDR + CODECSIZE) 44#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
@@ -44,7 +46,7 @@ STARTUP(target/arm/crt0.o)
44 46
45MEMORY 47MEMORY
46{ 48{
47#ifdef AMS_LOWMEM 49#if CODEC_BUFFER_FILLS_IRAM
48 CODEC_IRAM : ORIGIN = CODECORIG, LENGTH = CODEC_SIZE 50 CODEC_IRAM : ORIGIN = CODECORIG, LENGTH = CODEC_SIZE
49#endif 51#endif
50 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE 52 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
@@ -110,7 +112,7 @@ SECTIONS
110 _iend = .; 112 _iend = .;
111 } > IRAM 113 } > IRAM
112 114
113 .init CODECORIG : 115 .init ENDADDR :
114 { 116 {
115 . = ALIGN(4); 117 . = ALIGN(4);
116 _initstart = .; 118 _initstart = .;
@@ -154,7 +156,7 @@ SECTIONS
154 { 156 {
155 codecbuf = .; 157 codecbuf = .;
156 _codecbuf = .; 158 _codecbuf = .;
157#ifdef AMS_LOWMEM 159#if CODEC_BUFFER_FILLS_IRAM
158 } > CODEC_IRAM 160 } > CODEC_IRAM
159#else 161#else
160 } > DRAM 162 } > DRAM