diff options
| author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-13 13:48:26 +0000 |
|---|---|---|
| committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-13 13:48:26 +0000 |
| commit | 2fbf09752d385af861279af195d68f920859202d (patch) | |
| tree | 98bf09ebc24217d122b61c2a079337b793c35d9b /apps/plugins | |
| parent | c0d9084d6a5182460da0472a4e88d6d078adb86e (diff) | |
| download | rockbox-2fbf09752d385af861279af195d68f920859202d.zip rockbox-2fbf09752d385af861279af195d68f920859202d.tar.gz rockbox-2fbf09752d385af861279af195d68f920859202d.tar.bz2 rockbox-2fbf09752d385af861279af195d68f920859202d.tar.xz | |
remove align_buffer from firmare/general.c, replacing with ALIGN_BUFFER macro, and replace all uses of it (only resize.c in core, and pictureflow and mpegplayer plugins), remove it from plugin_api,
and remove wrapper for it from plugin.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19758 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/lib/wrappers.h | 3 | ||||
| -rw-r--r-- | apps/plugins/mpegplayer/alloc.c | 5 | ||||
| -rw-r--r-- | apps/plugins/mpegplayer/disk_buf.c | 3 | ||||
| -rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 1 | ||||
| -rw-r--r-- | apps/plugins/pictureflow.c | 3 |
5 files changed, 6 insertions, 9 deletions
diff --git a/apps/plugins/lib/wrappers.h b/apps/plugins/lib/wrappers.h index 2eb4ea0..385cd5d 100644 --- a/apps/plugins/lib/wrappers.h +++ b/apps/plugins/lib/wrappers.h @@ -36,9 +36,6 @@ #define cpu_boost rb->cpu_boost #endif #define yield rb->yield -#if CONFIG_CODEC == SWCODEC -#define align_buffer rb->align_buffer -#endif #endif diff --git a/apps/plugins/mpegplayer/alloc.c b/apps/plugins/mpegplayer/alloc.c index c4f936e..6b50b8f 100644 --- a/apps/plugins/mpegplayer/alloc.c +++ b/apps/plugins/mpegplayer/alloc.c @@ -27,6 +27,7 @@ #include "plugin.h" #include "mpegplayer.h" +#include <system.h> /* Main allocator */ static off_t mem_ptr; @@ -132,8 +133,8 @@ bool mpeg_alloc_init(unsigned char *buf, size_t mallocsize) mem_ptr = 0; /* Cache-align buffer or 4-byte align */ mallocbuf = buf; - bufsize = align_buffer(PUN_PTR(void **, &mallocbuf), - mallocsize, CACHEALIGN_UP(4)); + bufsize = mallocsize; + ALIGN_BUFFER(mallocbuf, bufsize, CACHEALIGN_UP(4)); /* Separate allocator for video */ mpeg2_mem_ptr = 0; diff --git a/apps/plugins/mpegplayer/disk_buf.c b/apps/plugins/mpegplayer/disk_buf.c index c008139..defd8ef 100644 --- a/apps/plugins/mpegplayer/disk_buf.c +++ b/apps/plugins/mpegplayer/disk_buf.c @@ -22,6 +22,7 @@ ****************************************************************************/ #include "plugin.h" #include "mpegplayer.h" +#include <system.h> static struct mutex disk_buf_mtx SHAREDBSS_ATTR; static struct event_queue disk_buf_queue SHAREDBSS_ATTR; @@ -859,7 +860,7 @@ bool disk_buf_init(void) return false; #ifdef PROC_NEEDS_CACHEALIGN - disk_buf.size = CACHEALIGN_BUFFER(&disk_buf.start, disk_buf.size); + CACHEALIGN_BUFFER(disk_buf.start, disk_buf.size); disk_buf.start = UNCACHED_ADDR(disk_buf.start); #endif disk_buf.size -= DISK_GUARDBUF_SIZE; diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index cb5d4ed..0b5bb51 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -283,7 +283,6 @@ CONFIG_KEYPAD == SANSA_M200_PAD const struct plugin_api* rb; CACHE_FUNCTION_WRAPPERS(rb); -ALIGN_BUFFER_WRAPPER(rb); /* One thing we can do here for targets with remotes is having a display * always on the remote instead of always forcing a popup on the main display */ diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c index 83ab1dd..a355283 100644 --- a/apps/plugins/pictureflow.c +++ b/apps/plugins/pictureflow.c @@ -2144,8 +2144,7 @@ enum plugin_status plugin_start(const struct plugin_api *api, rb->cpu_boost(true); #endif plugin_buf = rb->plugin_get_buffer(&plugin_buf_size); - plugin_buf_size = rb->align_buffer(PUN_PTR(void**,&plugin_buf), - plugin_buf_size, 4); + ALIGN_BUFFER(plugin_buf, plugin_buf_size, 4); ret = main(); #ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost(false); |