diff options
| author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-23 09:51:26 +0000 |
|---|---|---|
| committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-23 09:51:26 +0000 |
| commit | 44554e60756288e99bf664ea87f86dc482006eff (patch) | |
| tree | d51b47610bf3c5b58b4a548af8fed1b2728cbb27 /apps/codecs | |
| parent | 44f88585cb79a6decae347954e4a5d80e33a001e (diff) | |
| download | rockbox-44554e60756288e99bf664ea87f86dc482006eff.zip rockbox-44554e60756288e99bf664ea87f86dc482006eff.tar.gz rockbox-44554e60756288e99bf664ea87f86dc482006eff.tar.bz2 rockbox-44554e60756288e99bf664ea87f86dc482006eff.tar.xz | |
initialize the codecs API in the codec loader, using the same method as used in the plugin loader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19824 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
| -rw-r--r-- | apps/codecs/codec_crt0.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/codecs/codec_crt0.c b/apps/codecs/codec_crt0.c index 84e4762..167a91e 100644 --- a/apps/codecs/codec_crt0.c +++ b/apps/codecs/codec_crt0.c @@ -22,7 +22,7 @@ #include "config.h" #include "codeclib.h" -struct codec_api *ci; +struct codec_api *ci __attribute__ ((section (".data"))); extern unsigned char iramcopy[]; extern unsigned char iramstart[]; @@ -36,16 +36,15 @@ extern enum codec_status codec_main(void); CACHE_FUNCTION_WRAPPERS(ci); -enum codec_status codec_start(struct codec_api *api) +enum codec_status codec_start(void) { #ifndef SIMULATOR #ifdef USE_IRAM - api->memcpy(iramstart, iramcopy, iramend - iramstart); - api->memset(iedata, 0, iend - iedata); + ci->memcpy(iramstart, iramcopy, iramend - iramstart); + ci->memset(iedata, 0, iend - iedata); #endif - api->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start); + ci->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start); #endif - ci = api; #if NUM_CORES > 1 /* writeback cleared iedata and bss areas */ flush_icache(); |