Michael Sevakis
19ea72ff63
buffering: Fix a case that could allow widx to fully wrap to ridx and overflow the ringbuffer.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29257 a1c6a512-1295-4272-9138-f99709370657
2011-02-09 08:44:37 +00:00
Andree Buschmann
6b476e7bec
Roll back unintentionally submitted file.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29200 a1c6a512-1295-4272-9138-f99709370657
2011-02-03 08:36:34 +00:00
Andree Buschmann
7345ac124e
Submit FS#11918: Add 2 more codec types to be able to differentiate between AAC / AAC-HE and MPC SV7 / SV8. Additionally handle ATARI soundfiles in get_codec_base_type() as intended.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29199 a1c6a512-1295-4272-9138-f99709370657
2011-02-03 08:28:23 +00:00
Andree Buschmann
5d849a963e
Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM (code), use the already defined MEMORYSIZE instead.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 17:43:32 +00:00
Andree Buschmann
9c00d1a643
Fix FS#11586. Corrects rebuffering behaviour which did not allow to play several m4a files. Thanks to Magnus Holmgren.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27950 a1c6a512-1295-4272-9138-f99709370657
2010-08-30 22:35:32 +00:00
Thomas Martitz
ed033c0a2a
Oops, committed before finishing the removal of "#include "memory.h""
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27790 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 14:01:28 +00:00
Bertrik Sikken
5565a28c7d
Remove some redundant #include's
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27183 a1c6a512-1295-4272-9138-f99709370657
2010-06-29 20:13:22 +00:00
Rafaël Carré
2494afccc4
playback.c: don't assume cacheline size is 16 bytes
...
ideally all targets should define CACHEALIGN_BITS, for now we default it
to 16 bytes if it's not specified
Since the buffer is already aligned in playback.c no need to align it
again in buffering.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27073 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 04:34:18 +00:00
Thomas Martitz
35e8b1429a
Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #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
2010-06-21 16:53:00 +00:00
Yoshihisa Uchida
9c13b6e7c6
fix: when move_handle() is successful, the return value
...
corrects valid type.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26249 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 10:49:36 +00:00
Jonathan Gordon
7d5e0d7375
FS#11263 - Radio Art support! %C and %Cl tags work in the radio screen and Base Skin when the radio is running.
...
put your station images in .rockbox/fmpresets/<preset name>.bmp or .jpg. Must be in preset mode and the preset name must match the filename
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26078 a1c6a512-1295-4272-9138-f99709370657
2010-05-16 11:13:42 +00:00
Jeffrey Goode
6ef04a7f0e
Eliminate %zd tag in printf format strings, replace them with %ld. The %z formatter kept generating type mismatch warnings.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26040 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 03:34:31 +00:00
Frank Gevaerts
759cfece4b
Hopefully the last warning
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26036 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 22:24:38 +00:00
Frank Gevaerts
ed566826f5
Fix various size_t related warnings and errors
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26035 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 22:19:45 +00:00
Rafaël Carré
84cd3763bd
cast ssize_t to long
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26033 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 22:12:57 +00:00
Thomas Martitz
50a6ca39ad
Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
...
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Rafaël Carré
a8d1690ffe
Make storage alignement use cache alignement macros
...
Introduce STORAGE_ALIGN_DOWN, STORAGE_PAD (using new CACHE_PAD) and
STORAGE_OVERLAP (using new CACHE_OVERLAP), make them useful only when
PROC_NEEDS_CACHEALIGN and STORAGE_NEEDS_ALIGN are defined
Modify PP and nano2g system-target.h accordingly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25336 a1c6a512-1295-4272-9138-f99709370657
2010-03-25 23:01:56 +00:00
Thomas Martitz
abb3dd4ec2
Use a helpfer function to avoid ugly casting and correct some data types (no functional change).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24790 a1c6a512-1295-4272-9138-f99709370657
2010-02-20 15:13:53 +00:00
Thomas Martitz
4c78ecaa5e
Hopefully fix yellow now, I don't understand why %ld works for ssize_t but %lu not for size_t (and still no warnings on my system).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24757 a1c6a512-1295-4272-9138-f99709370657
2010-02-18 17:43:55 +00:00
Thomas Martitz
81187d88fd
Fix yellow caused by signedness.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24756 a1c6a512-1295-4272-9138-f99709370657
2010-02-18 17:19:10 +00:00
Thomas Martitz
df79ac2f9d
Fix FS#11004 - Buffering crashes when skipping back from end of song.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24755 a1c6a512-1295-4272-9138-f99709370657
2010-02-18 15:38:30 +00:00
Thomas Martitz
b11c819ddd
Convert RINGBUF_* macros to inline functions, saving binsize and improving type safety.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24618 a1c6a512-1295-4272-9138-f99709370657
2010-02-12 13:12:59 +00:00
Torne Wuff
c4e051bed7
Align addresses in the buffering code to STORAGE_ALIGN_MASK if the target has one.
...
The PP502x DMA controller can only deal with doing DMA to 16-byte-aligned
addresses because we have inadequate control over the cache to prevent
interference. Other targets may also *prefer* cacheline aligned DMAs to
reduce the number of cache operations required. Almost all disk reads in
buffering.c will now be suitably aligned, allowing DMA to be used on PP502x.
Original change from FS#9708 by Boris Gjenero (dreamlayers).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24440 a1c6a512-1295-4272-9138-f99709370657
2010-02-01 17:16:39 +00:00
Rafaël Carré
f620103925
buffering.c: cosmetics
...
remove tabs, remove trailing spaces, indentation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23697 a1c6a512-1295-4272-9138-f99709370657
2009-11-22 13:51:25 +00:00
Michael Giacomelli
ecd9bcf3cb
Commit FS#10605 - stable playback on low memory swcodec targets by Matthias Schneider. Should allow stable playback on targets with less then 4MB of RAM and sofware decoding such as the Sandisk Clip, c200v2, m200v4 and probably others. Fixes several problems in buffering that occured when the files to be buffered weren't much smaller then the ring buffer size. Fixes a bug where move_handle would corrupt the audio buffer when trying to copy a handle that both wrapped around the highest address in the ring buffer and overlapped part of the source and desination ranges. Moves the decision in playback.c about when to update the current track handle from audio_check_new_track to after the metadata has been buffered. Corrects several other minor pieces of code. I've logged about 100 hours without a crash on various players with this patch but its possible it breaks some combination of players and features I haven't thought to test.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23680 a1c6a512-1295-4272-9138-f99709370657
2009-11-21 17:00:38 +00:00
Jeffrey Goode
59dd433ccd
Removed unneeded includes
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23578 a1c6a512-1295-4272-9138-f99709370657
2009-11-09 05:46:08 +00:00
Rafaël Carré
f3944cb694
buffering: leave a comment to explain what is broken in the code and link to FS#10605
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23344 a1c6a512-1295-4272-9138-f99709370657
2009-10-25 11:03:59 +00:00
Thomas Martitz
e9c10189e9
Rework albumart buffering internally to allow for mutliple albumart sizes.
...
Playback now has a few albumart slots. Anything (most importantly: skins) can obtain such a slot.
The slot has fields for the size which is passed to bufopen then to image_load to buffer the albumart with the proper size.
Currently there's 1 slot. We can increase it for remotes if we want. Custom statusbar will increase it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23209 a1c6a512-1295-4272-9138-f99709370657
2009-10-16 19:14:41 +00:00
Nils Wallménius
3d4701a6e4
FS#10080
...
* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-07-14 13:57:45 +00:00
Andrew Mahone
00d6cfd389
Fix yellow when building with HAVE_ALBUMART, without HAVE_JPEG/HAVE_BMP_SCALING.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21092 a1c6a512-1295-4272-9138-f99709370657
2009-05-26 20:26:05 +00:00
Andrew Mahone
216424a27f
Fix the lock contention stall during cover art load, by adding a separate modify mutex for the buffer. Operations that modify contents of a buffer entry can still proceed, but ones that add or remove buffer entries, or move them
...
in memory, will still block. Some members of struct memory_handle also need an earlier init in bufopen to make sure that buffer stats aren't trashed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20932 a1c6a512-1295-4272-9138-f99709370657
2009-05-15 00:14:38 +00:00
Andrew Mahone
20f76d61ae
Make JPEG and BMP scaler optional with HAVE_JPEG and HAVE_BMP_SCALING, both defined for all targets that have HAVE_ALBUMART. Disable JPEG in PictureFlow and pluginlib album art search with 32KiB plugin buffer until PictureFlow
...
gets overlay support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20851 a1c6a512-1295-4272-9138-f99709370657
2009-05-04 15:46:41 +00:00
Andrew Mahone
54e6eb3bda
Search for, and load, JPEG album art files.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20837 a1c6a512-1295-4272-9138-f99709370657
2009-05-01 23:31:43 +00:00
Bertrik Sikken
66cf3a3329
Clean up some #includes
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20238 a1c6a512-1295-4272-9138-f99709370657
2009-03-08 16:10:40 +00:00
Thomas Martitz
fcbfef8175
Show the watermark in the "Show buffering thread" screen (in bytes).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20096 a1c6a512-1295-4272-9138-f99709370657
2009-02-23 22:55:48 +00:00
Antonius Hellmann
0055f13707
This should fix the occasional data aborts mainly in conjunction with AlbumArt on PP targets. See FS#9827 for details.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20081 a1c6a512-1295-4272-9138-f99709370657
2009-02-22 10:12:34 +00:00
Björn Stenberg
6427d127aa
Calculate watermark from bitrate and harddisk spinup time.
...
Use a smaller PCM buffer on targets with 2MB or less ram.
(FS#9703)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19743 a1c6a512-1295-4272-9138-f99709370657
2009-01-10 21:10:56 +00:00
Andrew Mahone
9058620849
Make scaler output truly pluggable, add an 8-bit greyscale output to
...
pluginlib for use with greylib, and add source for a test scaled bmp
viewer using greylib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19593 a1c6a512-1295-4272-9138-f99709370657
2008-12-26 07:05:13 +00:00
Michael Sevakis
8cfbd3604f
Use cookies for thread identification instead of pointers directly which gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
2008-12-10 08:57:10 +00:00
Andrew Mahone
781421afa2
resize-on-load for bitmap files on 2bpp and color targets
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19374 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 23:07:59 +00:00
Nicolas Pennequin
3625be4803
Fix FS#9319 and its (probably) duplicate, FS#9576. They both describe the boost remaining active after a change of the dynamic playlist, an issue added in r17109.
...
The fix is to notify the buffering thread whenever an ID3 handle is created via bufopen (as is done in the other cases of bufopen).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19304 a1c6a512-1295-4272-9138-f99709370657
2008-12-02 21:07:12 +00:00
Frank Gevaerts
2f8a0081c6
Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*.
...
This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 16:14:28 +00:00
Jonathan Gordon
71898e5c54
Accept FS#9480 - centralise and organise the events in the apps/ layer.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18819 a1c6a512-1295-4272-9138-f99709370657
2008-10-16 10:38:03 +00:00
Jonathan Gordon
f397c25acf
Fix a possible deadlock if the album art loading fails
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18711 a1c6a512-1295-4272-9138-f99709370657
2008-10-05 09:17:05 +00:00
Nicolas Pennequin
cf369575bc
Add handle values to the buffering LOGFQUEUE messages for easier debugging.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18092 a1c6a512-1295-4272-9138-f99709370657
2008-07-18 23:42:47 +00:00
Nicolas Pennequin
929d5e9399
Fix FS#9137 and FS#8194 (the end of a track is cut off after rebuffering): the cause was a confusion between regular subtraction and subtraction in a ring-buffer.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18090 a1c6a512-1295-4272-9138-f99709370657
2008-07-18 23:26:35 +00:00
Magnus Holmgren
7c84ede378
Hopefully fix FS #9153 , as well as another bug (in fill_buffer) that could cause problems when rebuffering.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18009 a1c6a512-1295-4272-9138-f99709370657
2008-07-11 12:44:27 +00:00
Nicolas Pennequin
a2191b93af
Fix FS#8964 (CPU remains boosted after buffering). 'filling' needs to be set to false when there's nothing left to buffer.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17923 a1c6a512-1295-4272-9138-f99709370657
2008-07-02 21:50:42 +00:00
Daniel Stenberg
2acc0ac542
Updated our source code header to explicitly mention that we are GPL v2 or
...
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
2008-06-28 18:10:04 +00:00
Nicolas Pennequin
f7e0e6bb1c
Lock the linked list mutex when accessing the memory handles. This should fix the invalid values appearing for short times in the buffering debug screen.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17497 a1c6a512-1295-4272-9138-f99709370657
2008-05-13 20:51:06 +00:00