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/mpegplayer | |
parent | c0d9084d6a5182460da0472a4e88d6d078adb86e (diff) | |
download | rockbox-2fbf09752d385af861279af195d68f920859202d.tar.gz rockbox-2fbf09752d385af861279af195d68f920859202d.zip |
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/mpegplayer')
-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 |
3 files changed, 5 insertions, 4 deletions
diff --git a/apps/plugins/mpegplayer/alloc.c b/apps/plugins/mpegplayer/alloc.c index c4f936ee14..6b50b8f24c 100644 --- a/apps/plugins/mpegplayer/alloc.c +++ b/apps/plugins/mpegplayer/alloc.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include "plugin.h" | 28 | #include "plugin.h" |
29 | #include "mpegplayer.h" | 29 | #include "mpegplayer.h" |
30 | #include <system.h> | ||
30 | 31 | ||
31 | /* Main allocator */ | 32 | /* Main allocator */ |
32 | static off_t mem_ptr; | 33 | static off_t mem_ptr; |
@@ -132,8 +133,8 @@ bool mpeg_alloc_init(unsigned char *buf, size_t mallocsize) | |||
132 | mem_ptr = 0; | 133 | mem_ptr = 0; |
133 | /* Cache-align buffer or 4-byte align */ | 134 | /* Cache-align buffer or 4-byte align */ |
134 | mallocbuf = buf; | 135 | mallocbuf = buf; |
135 | bufsize = align_buffer(PUN_PTR(void **, &mallocbuf), | 136 | bufsize = mallocsize; |
136 | mallocsize, CACHEALIGN_UP(4)); | 137 | ALIGN_BUFFER(mallocbuf, bufsize, CACHEALIGN_UP(4)); |
137 | 138 | ||
138 | /* Separate allocator for video */ | 139 | /* Separate allocator for video */ |
139 | mpeg2_mem_ptr = 0; | 140 | mpeg2_mem_ptr = 0; |
diff --git a/apps/plugins/mpegplayer/disk_buf.c b/apps/plugins/mpegplayer/disk_buf.c index c008139356..defd8ef81d 100644 --- a/apps/plugins/mpegplayer/disk_buf.c +++ b/apps/plugins/mpegplayer/disk_buf.c | |||
@@ -22,6 +22,7 @@ | |||
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "plugin.h" | 23 | #include "plugin.h" |
24 | #include "mpegplayer.h" | 24 | #include "mpegplayer.h" |
25 | #include <system.h> | ||
25 | 26 | ||
26 | static struct mutex disk_buf_mtx SHAREDBSS_ATTR; | 27 | static struct mutex disk_buf_mtx SHAREDBSS_ATTR; |
27 | static struct event_queue disk_buf_queue SHAREDBSS_ATTR; | 28 | static struct event_queue disk_buf_queue SHAREDBSS_ATTR; |
@@ -859,7 +860,7 @@ bool disk_buf_init(void) | |||
859 | return false; | 860 | return false; |
860 | 861 | ||
861 | #ifdef PROC_NEEDS_CACHEALIGN | 862 | #ifdef PROC_NEEDS_CACHEALIGN |
862 | disk_buf.size = CACHEALIGN_BUFFER(&disk_buf.start, disk_buf.size); | 863 | CACHEALIGN_BUFFER(disk_buf.start, disk_buf.size); |
863 | disk_buf.start = UNCACHED_ADDR(disk_buf.start); | 864 | disk_buf.start = UNCACHED_ADDR(disk_buf.start); |
864 | #endif | 865 | #endif |
865 | disk_buf.size -= DISK_GUARDBUF_SIZE; | 866 | disk_buf.size -= DISK_GUARDBUF_SIZE; |
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index cb5d4edb76..0b5bb518fe 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c | |||
@@ -283,7 +283,6 @@ CONFIG_KEYPAD == SANSA_M200_PAD | |||
283 | const struct plugin_api* rb; | 283 | const struct plugin_api* rb; |
284 | 284 | ||
285 | CACHE_FUNCTION_WRAPPERS(rb); | 285 | CACHE_FUNCTION_WRAPPERS(rb); |
286 | ALIGN_BUFFER_WRAPPER(rb); | ||
287 | 286 | ||
288 | /* One thing we can do here for targets with remotes is having a display | 287 | /* One thing we can do here for targets with remotes is having a display |
289 | * always on the remote instead of always forcing a popup on the main display */ | 288 | * always on the remote instead of always forcing a popup on the main display */ |