summaryrefslogtreecommitdiff
path: root/firmware/buffer.c (unfollow)
Commit message (Collapse)Author
2011-11-29FS#12412 : Delete old buffer allocation code which has been replaced by ↵Boris Gjenero
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
2011-08-14Fix errors and warnings.Thomas Martitz
The buffer_offset paramter of audio_init_recording() is removed as it was unused in both implementations. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30310 a1c6a512-1295-4272-9138-f99709370657
2011-08-14GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.Thomas Martitz
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
2011-06-21Workaround/fix (I'm not sure!) for buffer_alloc() returning unaligned ↵Frank Gevaerts
addresses in case other parts of the code increase audiobuf behind buffer.c's back. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30049 a1c6a512-1295-4272-9138-f99709370657
2011-02-02Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM ↵Andree Buschmann
(code), use the already defined MEMORYSIZE instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
2010-09-26If BUFFER_ALLOC_DEBUG is defined, make buffer_alloc() not actually allocate ↵Frank Gevaerts
anything if size==0, so code that uses buffer_alloc(0) to find out what address it would get keeps working git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28174 a1c6a512-1295-4272-9138-f99709370657
2010-09-26Add optional (define BUFFER_ALLOC_DEBUG to enable it) code to check for code ↵Frank Gevaerts
overflowing buffer_alloc()-allocated buffers. Also add a panicf() if buffer_alloc() doesn't have enough space left to allocate a requested buffer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28173 a1c6a512-1295-4272-9138-f99709370657
2010-06-21Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz
#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
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2006-09-16New scheduler, with priorities for swcodec platforms. Frequent taskMiika Pekkarinen
switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
2006-08-01Always align allocated buffers on 32-bit boundariesLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10391 a1c6a512-1295-4272-9138-f99709370657
2005-04-05mp3buf renamed to audiobufLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6252 a1c6a512-1295-4272-9138-f99709370657
2005-02-11Simulators: Made the mp3 buffer size depend on the MEMORYSIZE setting for ↵Jens Arnold
better simulation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5922 a1c6a512-1295-4272-9138-f99709370657
2004-01-13Increased the mp3 buffer for the simulator, to avoid crash when running the ↵Linus Nielsen Feltzing
Xing header generator git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4223 a1c6a512-1295-4272-9138-f99709370657
2003-10-14More linker safe MP3 buffer handling in the simulatorLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3972 a1c6a512-1295-4272-9138-f99709370657
2003-05-09Configurable dir browser file buffer size. No more 400-file limit. No more ↵Linus Nielsen Feltzing
whining. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3661 a1c6a512-1295-4272-9138-f99709370657
2003-02-07Include File Cleanup And Move-Around Party 2003.Daniel Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3213 a1c6a512-1295-4272-9138-f99709370657
2002-12-09Corrected ATA_ADDRESS macroLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2966 a1c6a512-1295-4272-9138-f99709370657
2002-10-15Norm build fixLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2663 a1c6a512-1295-4272-9138-f99709370657
2002-10-15Sim build fixLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2662 a1c6a512-1295-4272-9138-f99709370657
2002-10-15The player firmware now autodetects the LCD type. No need for two player ↵Linus Nielsen Feltzing
versions anymore git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2658 a1c6a512-1295-4272-9138-f99709370657
2002-10-15Hardware compatibility functionsLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2650 a1c6a512-1295-4272-9138-f99709370657
2002-08-07Made battery_level() use the power history table to get an average battery ↵Heikki Hannikainen
level over the last 3 minutes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1585 a1c6a512-1295-4272-9138-f99709370657
2002-08-06Added battery charger code for the recorder and battery voltage statistics ↵Heikki Hannikainen
keeping for all platforms. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1546 a1c6a512-1295-4272-9138-f99709370657
2002-07-28Added battery_level_safe() functionLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1480 a1c6a512-1295-4272-9138-f99709370657
2002-07-26New voltage levels for full and empty batteryLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1457 a1c6a512-1295-4272-9138-f99709370657
2002-07-22Slightly different battery level rangeLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1396 a1c6a512-1295-4272-9138-f99709370657
2002-07-05Added power_off() and lowered the FULL limitLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1337 a1c6a512-1295-4272-9138-f99709370657
2002-07-04First versionLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1333 a1c6a512-1295-4272-9138-f99709370657
2002-07-02debug_ports()Linus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1303 a1c6a512-1295-4272-9138-f99709370657
2002-06-04output debugf() nicely for simulator builds tooDaniel Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@895 a1c6a512-1295-4272-9138-f99709370657
2002-05-17Added gdb stub serial port setupBjörn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@625 a1c6a512-1295-4272-9138-f99709370657
2002-05-14Changed from gcc extension to C99 varargs macrosBjörn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@576 a1c6a512-1295-4272-9138-f99709370657
2002-05-06missing #define for VC++Stefan Meyer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@471 a1c6a512-1295-4272-9138-f99709370657
2002-05-02Changed debug to DEBUGF and panic to panicf.Björn Stenberg
Also some linking changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@383 a1c6a512-1295-4272-9138-f99709370657
2002-04-20First commitLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@156 a1c6a512-1295-4272-9138-f99709370657
2002-04-15First check inBjörn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@93 a1c6a512-1295-4272-9138-f99709370657
2002-04-11firmware typedefs. only bool so farDaniel Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@76 a1c6a512-1295-4272-9138-f99709370657
2002-03-26updatesDaniel Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26 a1c6a512-1295-4272-9138-f99709370657
2002-03-26lcd_update() works for X11 now...Daniel Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15 a1c6a512-1295-4272-9138-f99709370657
2002-03-26generic and specific LCD functionsDaniel Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14 a1c6a512-1295-4272-9138-f99709370657