summaryrefslogtreecommitdiff
path: root/firmware/include (follow)
Commit message (Collapse)AuthorAge
...
* Add more INIT_ATTR and add config.h includes to header files with INIT_ATTR.Boris Gjenero2011-12-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31370 a1c6a512-1295-4272-9138-f99709370657
* Remove USB time sync code when there's no RTC.Boris Gjenero2011-12-16
| | | | | | | | | Without an RTC, Rockbox doesn't keep time. In that situation, USB time sync previously did nothing but reported success. After this change, the USB time sync request won't be recognized on those targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31319 a1c6a512-1295-4272-9138-f99709370657
* Remove conditional added around set_day_of_week in r31301.Boris Gjenero2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31305 a1c6a512-1295-4272-9138-f99709370657
* Add conditionals around functions that are only needed when RTC is present.Boris Gjenero2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31301 a1c6a512-1295-4272-9138-f99709370657
* Introduce USED_ATTR wrapper for __attribute__((used)).Boris Gjenero2011-12-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31188 a1c6a512-1295-4272-9138-f99709370657
* FS#12412 : Delete old buffer allocation code which has been replaced by ↵Boris Gjenero2011-11-29
| | | | | | core_alloc, and move buffer setup code to core_alloc.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31088 a1c6a512-1295-4272-9138-f99709370657
* Finish r30818 revertFred Bauer2011-10-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30822 a1c6a512-1295-4272-9138-f99709370657
* Change lru from double to single linked list. Only the font cache uses LRU ↵Fred Bauer2011-10-21
| | | | | | and it never searches in reverse. Saves 2 bytes per glyph. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30818 a1c6a512-1295-4272-9138-f99709370657
* font_cache.c: Optimize and simplify cache search. ~25% font rendering boostFred Bauer2011-10-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30763 a1c6a512-1295-4272-9138-f99709370657
* core_alloc: Provide a tiny test allocation, which can be freed for debug ↵Thomas Martitz2011-10-05
| | | | | | | | | | purposes. This allocation can be freed in the buflib debug menu (select it to free). Doing a another allocation, e.g. by selecting another item in this debug menu will cause compaction (all allocs move). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30719 a1c6a512-1295-4272-9138-f99709370657
* FS#12273 - use buflib for font storage. thanks to the testers :)Jonathan Gordon2011-09-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
* Buflib: Stop caching the first unallocated block. It has little benefit but ↵Thomas Martitz2011-09-09
| | | | | | is complicated to keep up-to-date. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30487 a1c6a512-1295-4272-9138-f99709370657
* Buflib: Clarification about invalid handlesThomas Martitz2011-09-07
| | | | | | | | * Enhance allocation function comments to better state the return value and what an invalid value is * Change clients to check for "< 0" instead of "<= 0" or "== 0" * Return -1 or -2 depending on the exact failure in buflib_alloc_ex. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30469 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Allow dircache to be enabled without reboot.Thomas Martitz2011-08-30
| | | | | | | Also add two dircache function, one of which does what dircache_disable() did previously as this now also frees the dircache buffer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30393 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Add buflib memory alocator to the core.Thomas Martitz2011-08-30
| | | | | | | | | | | | | | | | | The buflib memory allocator is handle based and can free and compact, move or resize memory on demand. This allows to effeciently allocate memory dynamically without an MMU, by avoiding fragmentation through memory compaction. This patch adds the buflib library to the core, along with convinience wrappers to omit the context parameter. Compaction is not yet enabled, but will be in a later patch. Therefore, this acts as a replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug menu. See buflib.h for some API documentation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.Thomas Martitz2011-08-14
| | | | | | | | | | | | | | | | | | | | | | | Namely, introduce buffer_get_buffer() and buffer_release_buffer(). buffer_get_buffer() aquires all available and grabs a lock, attempting to call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause a panicf() (doesn't actually happen, but is for debugging purpose). buffer_release_buffer() unlocks that lock and can additionally increment the audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was used temporarily only. buffer_available() is a replacement function to query audiobuflen, i.e. what's left in the buffer. Buffer init is moved up in the init chain and handles ipodvideo64mb internally. Further changes happened to mp3data.c and talk.c as to not call the above API functions, but get the buffer from callers. The caller is the audio system which has the buffer lock while mp3data.c and talk mess with the buffer. mpeg.c now implements some buffer related functions of playback.h, especially audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit. audiobuf and audiobufend are local to buffer.c now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
* Revert "Introduce bsearch() and use it in tagtree.c."Thomas Martitz2011-07-18
| | | | | | It was committed by accident (it's on FS still). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30157 a1c6a512-1295-4272-9138-f99709370657
* Introduce bsearch() and use it in tagtree.c.Thomas Martitz2011-07-18
| | | | | | | | | | | | bsearch() is a general purpose binary search function for arrays. It's supposedly faster than looping over arrays. The array needs to be sorted in ascending order under the provided comparison function. If the key and array element are of the same kind, then the same compare function can be used for qsort() and bsearch(). Code taken from glibc. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30155 a1c6a512-1295-4272-9138-f99709370657
* Try to handle dircache rebuild event properly. Playlist should nowMiika Pekkarinen2011-06-21
| | | | | | | | | cache new pointers to dircache items when dircache goes offline and comes back onlineagain (during tagcache commit). This should prevent wrong filenames to appear in playlist. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30047 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Don't expose struct dircache_entry and pointers into the cache, ↵Thomas Martitz2011-06-20
| | | | | | | | | use IDs instead. Only integer IDs are exposed from dircache with this. This way the cache is isolated from other modules. This is needed for my buflib gsoc project. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30038 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Move struct maindata declaration to dircache.c and actually check ↵Thomas Martitz2011-06-20
| | | | | | for DIRCACHE_MAGIC when loading from disk. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30037 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Change internal cache layout.Thomas Martitz2011-06-20
| | | | | | | | | The dircache_entry structs are now allocated subsequently from the front, allowing to treat them as an array. The d_names are allocated from the back (in reverse order, growing downwards). This allows the cache to be moved around (needed for my buflib gsoc project). It is utilized when loading the cache from disk (on the h100), now the pointer to the cache begin doesn't need to be the same across reboots anymore. This should save a bit memory usage, since there's no need for aligning padding bytes after d_names anymore. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30036 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Return the size of the result string in dircache_copy_path() so ↵Thomas Martitz2011-06-20
| | | | | | that callers don't need to call strlen on it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30034 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Remove dircache_entry::name_len.Thomas Martitz2011-06-20
| | | | | | It's reduntant, and enlarges the dircache unnecessarily. Saves 4 byte per file in the whole filesystem. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30032 a1c6a512-1295-4272-9138-f99709370657
* Move buffer.h to firmware/include.h to replace a useless malloc header.Thomas Martitz2011-06-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30026 a1c6a512-1295-4272-9138-f99709370657
* FS#12120. Convert FRACMUL macros into inline functions and fix typecasting ↵Nils Wallménius2011-05-24
| | | | | | for 64 bit platforms so that sims produce the same results as targets. Tweak the cf inline asm to not require an immediate value but add a FORCE_INLINE attribute to one of the cf functions to make sure it gets inlined as that saves both codesize and cycles. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29921 a1c6a512-1295-4272-9138-f99709370657
* Fix tabs in .c and .h files in firmware/ Bertrik Sikken2011-05-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29832 a1c6a512-1295-4272-9138-f99709370657
* RaaA: Add initial Pandora supportThomas Jarosch2011-02-27
| | | | | | | | | | | | More information: www.openpandora.org Possible things to implement: - Special button mappings - Battery monitoring - ALSA audio backend - Automate creation of "pnd" (=binary) file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29451 a1c6a512-1295-4272-9138-f99709370657
* iPod Classic CE-ATA Support (Part 1 of 4: Cacheline align some statically ↵Michael Sparmann2011-02-27
| | | | | | allocated sector buffers) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29444 a1c6a512-1295-4272-9138-f99709370657
* Initial maemo platform supportThomas Jarosch2011-02-08
| | | | | | | | | | | | | | | | | | Adds Nokia N900, N810 and N800 support. Features: - Introduce maemo specific platform defines - Play audio in silent mode - Stop playback on incoming calls - Battery level readout - Bluetooth headset support - Save CPU by disabling screen updates if the display is off or the app doesn't have input focus - N900: GStreamer audio backend Kudos to kugel for the code review. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29248 a1c6a512-1295-4272-9138-f99709370657
* Also PREFIX() other filesystem functions. I hope I got them all now...Frank Gevaerts2010-12-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28929 a1c6a512-1295-4272-9138-f99709370657
* RaaA: Improve tagcache search to make the database built.Thomas Martitz2010-12-23
| | | | | | | | | | First, it add the ability to tagcache to walk through multiple search roots. Second, it adds symlinks targets to the search roots if they're are not inside any of the current search roots, otherwise the symlink is ignored (unless it's a file). The default search root is still /, so no search root will be actually added. But the tagcache now isn't trapped by recursive symlinks anymore and successfully builds, and it's prepared for a future music directory setting. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28884 a1c6a512-1295-4272-9138-f99709370657
* Get rid of get_user_file_path and do the path handling in wrappers for ↵Thomas Martitz2010-12-06
| | | | | | open() and friends. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
* format() (and its alias vuprintf) return values are uncheck -> voidRafaël Carré2010-09-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28119 a1c6a512-1295-4272-9138-f99709370657
* Fix sdl application buildThomas Martitz2010-09-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28004 a1c6a512-1295-4272-9138-f99709370657
* struct DIR -> DIR, should fix most if not all reds.Thomas Martitz2010-09-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27970 a1c6a512-1295-4272-9138-f99709370657
* Ged rid of uisimulator/common/io.c for android builds.Thomas Martitz2010-09-01
| | | | | | | | | | | Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants. Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know). For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one, the values can be retrieved via the new dir_get_info(). Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
* Fix checkwps.Thomas Martitz2010-08-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27905 a1c6a512-1295-4272-9138-f99709370657
* Use system headers a bit more: use host's fcntl.h for O_RDONLY etc.Thomas Martitz2010-08-27
| | | | | | | | Removes the need to fix up those in the simulator. Also work around some posix-mingw incompatibilities (e.g. getcwd()). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27904 a1c6a512-1295-4272-9138-f99709370657
* Move memset6() declaration to string-extra.h, kills a warning compiling for ↵Thomas Martitz2010-08-12
| | | | | | android since it ships a memory.h. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27789 a1c6a512-1295-4272-9138-f99709370657
* Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this ↵Thomas Martitz2010-08-12
| | | | | | and a bit further cleanup in main gets rid of a warning when compiling for android. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27788 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: add get_user_file_path().Thomas Martitz2010-08-01
| | | | | | | | | | | For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox). This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local. On the DAPs it's a no-op, returing /.rockbox directly. Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
* strncpy.c / assert.h : need to include _ansi.hRafaël Carré2010-07-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27549 a1c6a512-1295-4272-9138-f99709370657
* Move some gcc extensions to new gcc_extensions.h headerRafaël Carré2010-07-25
| | | | | | | | | | | | - Move ATTRIBUTE_PRINTF/ATTRIBUTE_SCANF from _ansi.h They are not related at all to this file, and this broke compilation with Code Sourcery GCC which ships its own _ansi.h - Move LIKELY/UNLIKELY from system.h There is likely a lot more GCC extensions used everywhere in the source, conditionally on __GNUC__ or unconditionally git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27548 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
* Make the sim buildable with mingw againFrank Gevaerts2010-05-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26037 a1c6a512-1295-4272-9138-f99709370657
* Move include/sys along with libc/, so hosted (sim/RaaA) builds use the ↵Frank Gevaerts2010-05-14
| | | | | | proper files for their OS git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26030 a1c6a512-1295-4272-9138-f99709370657
* Move math.h to firmware/libc/include/ and fix slight incompatibilities ↵Thomas Martitz2010-05-14
| | | | | | between our and the host's math.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26020 a1c6a512-1295-4272-9138-f99709370657
* Remove stray function prototype used only for long-ago-removed codec ↵Michael Sevakis2010-05-07
| | | | | | swapping. Function definition was removed when adding internal voice codec. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25868 a1c6a512-1295-4272-9138-f99709370657
* Revert r25854 which was bad for the database tool (I forgot it still needs ↵Thomas Martitz2010-05-06
| | | | | | the wrappers from uisimulator/common/io.c). Fix it so it works for both. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25856 a1c6a512-1295-4272-9138-f99709370657