summaryrefslogtreecommitdiff
path: root/firmware/common
AgeCommit message (Collapse)Author
2011-12-25rbpaths: Add new special dir HOME_DIR for RaaA.Thomas Martitz
HOME_DIR is intended for not-so-advanced files which shall be user visible, and thus not in /.rockbox. Therefore HOME_DIR is translated to $HOME on RaaA, /sdcard on android, the internal memory on ypr0 and "/" on native targets. ROCKBOX_DIR ("/.rockbox") already existed as special and is translated to whatever the real rockbox dir is on the target (e.g. /sdcard/rockbox on android), but it's not suitable for some files we generate (e.g. battery-bench.txt). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31430 a1c6a512-1295-4272-9138-f99709370657
2011-12-24Initial commit of the Samsung YP-R0 port.Thomas Martitz
This port is a hybrid native/RaaA port. It runs on a embedded linux system, but is the only application. It therefore can implement lots of stuff that native targets also implement, while leveraging the underlying linux kernel. The port is quite advanced. User interface, audio playback, plugins work mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page). Included in utils/ypr0tools are scripts and programs required to generate a patched firmware. The patched firmware has the rootfs modified to load Rockbox. It includes a early/safe USB mode. This port needs a new toolchain, one that includes glibc headers and libraries. rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may also work. Most of the initial effort is done by Lorenzo Miori and others (on ABI), including reverse engineering and patching of the original firmware, initial drivers, and more. Big thanks to you. Flyspray: FS#12348 Author: Lorenzo Miori, myself Merry christmas to ypr0 owners! :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
2011-12-19disk: fix sector multiplier init, also remove a test which has became obsoleteAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31356 a1c6a512-1295-4272-9138-f99709370657
2011-12-16Remove USB time sync code when there's no RTC.Boris Gjenero
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
2011-12-15Remove conditional added around set_day_of_week in r31301.Boris Gjenero
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31305 a1c6a512-1295-4272-9138-f99709370657
2011-12-15Add conditionals around functions that are only needed when RTC is present.Boris Gjenero
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31301 a1c6a512-1295-4272-9138-f99709370657
2011-12-15Really fix redAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31273 a1c6a512-1295-4272-9138-f99709370657
2011-12-15Fix redAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31272 a1c6a512-1295-4272-9138-f99709370657
2011-12-15Add support for for per-drive logical sector size. This allows targets to ↵Amaury Pouly
have a different logical sector size for the internal storage and the sd card, like on the fuze+ for example. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31270 a1c6a512-1295-4272-9138-f99709370657
2011-12-05Try $RBROOT before $HOME when looking for the sdl apps rockbox root dirJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31151 a1c6a512-1295-4272-9138-f99709370657
2011-12-04Compile fix for mingw-w64Rafaël Carré
Don't build str(n)casecmp as functions if they are already defined by preprocessor git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31147 a1c6a512-1295-4272-9138-f99709370657
2011-11-19Update some missed pointers when moving the dircache allocationFred Bauer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31028 a1c6a512-1295-4272-9138-f99709370657
2011-11-17Simulate usb plugging on the sim better using sim_tasks.Thomas Martitz
Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
2011-10-28Fix FS#12325 - screen corruption on early usb.Thomas Martitz
When booting with USB inserted, the dircache build can get interrupted by the usb connection, in which case the dircache buffer is freed. Due to a bug the re-creation of dircache used the old freed buffer and overwrite new allocs (causing screen corruption). Set allocated_size to 0 to make it not take the code path that assumes an existing buffer, and bring that and freeing together in the code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30845 a1c6a512-1295-4272-9138-f99709370657
2011-10-21fix sign errorFred Bauer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30812 a1c6a512-1295-4272-9138-f99709370657
2011-10-02revert r30566 and r30567 to fix FS#12294 (superfloppy not mounting)Robert Kukla
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30632 a1c6a512-1295-4272-9138-f99709370657
2011-09-17Also remove the fat_partition_types array.Torne Wuff
If we aren't going to check for the partition type, we don't need the array of known FAT partition types. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30567 a1c6a512-1295-4272-9138-f99709370657
2011-09-17Allow any partition type, not just known FAT types.Torne Wuff
Instead of only mounting partitions with a FAT partition type, try any partition that isn't type 0 (unallocated) or 5 (extended). This makes it easier to reformat SDXC cards which have the exFAT partition type, and also brings us in line with pretty much every other OS at this point. Anything with a valid-looking FAT superblock will get mounted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30566 a1c6a512-1295-4272-9138-f99709370657
2011-08-30Dircache: Allow dircache to be enabled without reboot.Thomas Martitz
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
2011-08-30GSoC/Buflib: Enable compaction in buflib.Thomas Martitz
This enables the ability to allocate (and free) memory dynamically without fragmentation, through compaction. This means allocations can move and fragmentation be reduced. Most changes are preparing Rockbox for this, which many times means adding a move callback which can temporarily disable movement when the corresponding code is in a critical section. For now, the audio buffer allocation has a central role, because it's the one having allocated most. This buffer is able to shrink itself, for which it needs to stop playback for a very short moment. For this, audio_buffer_available() returns the size of the audio buffer which can possibly be used by other allocations because the audio buffer can shrink. lastfm scrobbling and timestretch can now be toggled at runtime without requiring a reboot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
2011-08-30GSoC/Buflib: Add buflib memory alocator to the core.Thomas Martitz
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
2011-08-16Dircache: Fix memory leak (and recently panic).Thomas Martitz
If the dircache was interrupted during generation (e.g. through USB insertion), then the allocated buffer was leaked and a new one was allocated for the second cache generation. This causes a panic since r30308 since playback holds the control over the audiobuffer at that time. The fix is to simply check allocated_size instead of dircache_size which is reset to 0 upon cancellation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30321 a1c6a512-1295-4272-9138-f99709370657
2011-08-15Dircache: Fix bug introduced in r30308.Thomas Martitz
dircache_root wasn't initialized at all and the giving allocated_size passed to buffer_release_buffer() didn't account for alignment padding. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30318 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-08-04format/*printf: Add simple support for %p format specifier.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30249 a1c6a512-1295-4272-9138-f99709370657
2011-07-30Dircache: Fix 2 nasty bugs introduced with the reworks starting with r30032.Thomas Martitz
The first is an off-by-one that leads to miscalculation of the dircache size. The format string size was used but dircache size was incremented by the snprintf() result which is smaller. The other forgot to update the location of the "." and ".." strings upon compaction, so that new folders got assigned orphaned pointers for those directory entires. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30224 a1c6a512-1295-4272-9138-f99709370657
2011-07-18Revert "Introduce bsearch() and use it in tagtree.c."Thomas Martitz
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
2011-07-18Introduce bsearch() and use it in tagtree.c.Thomas Martitz
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
2011-07-04Initialize the d_names_start pointer correctly in dircache. This shouldMiika Pekkarinen
prevent d_names data from being overwritten (likely causing garbage in file browser and other strange symptoms). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30122 a1c6a512-1295-4272-9138-f99709370657
2011-07-01Fixed incorrect dircache reallocation during tagcache commit.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30108 a1c6a512-1295-4272-9138-f99709370657
2011-06-22Fix loading dircache stat on h100. Relocating the data was broken due to ↵Thomas Martitz
struct alignment problems. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30051 a1c6a512-1295-4272-9138-f99709370657
2011-06-20Use ALIGN_UP() macro for alignment, in a more correct way also.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30041 a1c6a512-1295-4272-9138-f99709370657
2011-06-20Dircache: A bit of follow-up code cleanup suggested by Amaury Pouly.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30040 a1c6a512-1295-4272-9138-f99709370657
2011-06-20Optimize new dircache_copy_path so that the helper (strlcat) doesn't need to ↵Thomas Martitz
walk through the entire string repeatedly. Also fix a off-by-one. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30039 a1c6a512-1295-4272-9138-f99709370657
2011-06-20Dircache: Don't expose struct dircache_entry and pointers into the cache, ↵Thomas Martitz
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
2011-06-20Dircache: Move struct maindata declaration to dircache.c and actually check ↵Thomas Martitz
for DIRCACHE_MAGIC when loading from disk. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30037 a1c6a512-1295-4272-9138-f99709370657
2011-06-20Dircache: Change internal cache layout.Thomas Martitz
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
2011-06-20Fix dircache_size calculation bug introcuced 3 revisions ago.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30035 a1c6a512-1295-4272-9138-f99709370657
2011-06-20Dircache: Return the size of the result string in dircache_copy_path() so ↵Thomas Martitz
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
2011-06-20Dircache: Rework and simplify dircache_copy_path().Thomas Martitz
Use a recursive helper function with strlcat to build up the path backwards. This way the tree doesn't need to be walked twice and no extraneous size calculation is needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30033 a1c6a512-1295-4272-9138-f99709370657
2011-06-20Dircache: Remove dircache_entry::name_len.Thomas Martitz
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
2011-05-08Fix a bunch of 'variable set but not used' warnings reported from GCC 4.6.0.Andree Buschmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29841 a1c6a512-1295-4272-9138-f99709370657
2011-03-08Return -1 for not implemented RTC functions.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29546 a1c6a512-1295-4272-9138-f99709370657
2011-03-02RaaA: Fix write locations of pluginsThomas Jarosch
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29506 a1c6a512-1295-4272-9138-f99709370657
2011-02-27RaaA: Add initial Pandora supportThomas Jarosch
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
2011-02-27Fix yellowMichael Sparmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29449 a1c6a512-1295-4272-9138-f99709370657
2011-02-27iPod Classic CE-ATA Support (Part 3 of 4: Introduce STORAGE_NEEDS_ALIGN, ↵Michael Sparmann
which ensures that no unaligned storage accesses are performed through file.c) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29447 a1c6a512-1295-4272-9138-f99709370657
2011-02-27iPod Classic CE-ATA Support (Part 2 of 4: Remove on-stack sector buffers, ↵Michael Sparmann
and replace them with a single statically allocated sector buffer that's arbitrated amongst users) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29445 a1c6a512-1295-4272-9138-f99709370657
2011-02-27iPod Classic CE-ATA Support (Part 1 of 4: Cacheline align some statically ↵Michael Sparmann
allocated sector buffers) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29444 a1c6a512-1295-4272-9138-f99709370657
2011-02-25RaaA: Create full config directory tree during initializationThomas Jarosch
Also robustify against unset HOME environment var. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29397 a1c6a512-1295-4272-9138-f99709370657