summaryrefslogtreecommitdiff
path: root/apps/main.c
AgeCommit message (Collapse)Author
2011-12-31Fix FS#7631 : Archos V2 and FM Recorder charging screen problemsBoris Gjenero
ATA power is off in the charging screen to avoid problems when the battery is deeply discharged. Without ATA power, Archos FM and V2 Recorders measure battery voltage as 0V, leading to an unwanted low battery shutdown. This change delays powermgmt_init() on those targets until after ATA power is turned on by storage_init(). The charging screen displays input current, so there is some visible feedback on charging progress. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31484 a1c6a512-1295-4272-9138-f99709370657
2011-11-21skinengine: Rework skin loading so skins can be un/loaded individually. This ↵Jonathan Gordon
also means that loading a .cfg which doesnt change themes shouldnt have them reloaded git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31037 a1c6a512-1295-4272-9138-f99709370657
2011-11-17Remove sim_tasks from the sdl application build.Thomas Martitz
This unfortunately removes the screendump feature, but usually there are better desktop apps for that. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31011 a1c6a512-1295-4272-9138-f99709370657
2011-11-16Finally commit FS#5111 - piezo clicker for ipods!Jonathan Gordon
Origional implementation by Robert Keevil with contributions from Frederik Vestre, Stoyan Stratev, Craig Elliott, Michael Sparmann, Thomas Schott, Rosso Maltese, and syncs from a bunch of other people! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30995 a1c6a512-1295-4272-9138-f99709370657
2011-11-15FS#12251 - User shortcuts in the main menu.Jonathan Gordon
Custom shortcuts which give the user fast access to regularly used files/folders/settings/whatever. Thanks to Alexander Levin for the manual part of the patch git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30990 a1c6a512-1295-4272-9138-f99709370657
2011-10-26Add pcm_rec_init() to the sim's init.Thomas Martitz
It makes sim behavior a little more target-like and enables to reproduce FS#12241. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30839 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg
own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-05Revert r30599 "Check for the magic file "/.rockbox/skin_buffer_size.txt" [...]"Thomas Martitz
It's not clear whether a user setting is the right/accepted fix for the skin buffer. But even if it is, this implementation of it is considered bad, even by the author. See http://www.rockbox.org/mail/archive/rockbox-dev-archive-2011-09/0054.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30718 a1c6a512-1295-4272-9138-f99709370657
2011-09-27Delay settings_reset() until after font_init(). Fixes boot crash on Fuze(v1) ↵Fred Bauer
and probably others. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30613 a1c6a512-1295-4272-9138-f99709370657
2011-09-25Check for the magic file "/.rockbox/skin_buffer_size.txt" on bootup which ↵Jonathan Gordon
can have a number which is the amount of kilobytes to allocate for the skin buffer. This is only checked on boot so if you need to change it you must reboot to enable. Currently the default size is 80KB on colour targets which can be way too much or not enough for users. The format of the /.rockbox/skin_buffer_size.txt file is simply a number (so 120 if you want 120 kilobytes), NO trainling spaces or text of any kind git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30599 a1c6a512-1295-4272-9138-f99709370657
2011-09-24Fix the build errorsJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30590 a1c6a512-1295-4272-9138-f99709370657
2011-09-24FS#12273 - use buflib for font storage. thanks to the testers :)Jonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 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-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-03-02Introduce "power" thread for RaaAThomas Jarosch
I tried to move the #ifdefs and the code in firmware/powermgmt.c around and it was still a big mess for hosted applications (RaaA/sim builds). Create our own "power" thread as recently discussed on IRC. Fixes the sleep timer for RaaA. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29501 a1c6a512-1295-4272-9138-f99709370657
2011-02-28Remove a redundant part of a #ifDave Chapman
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29461 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-23Android:Thomas Martitz
* Re-create RockboxFramebuffer instance with every time there's a new Activity. * Also, allow Rockbox to be started via multimedia buttons, immediately starting playback if wanted. We don't need to keep the fb instance around when it backround, and it makes us less depending on it and the activity (less race conditions). And this is how you usually do it in Android apps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29384 a1c6a512-1295-4272-9138-f99709370657
2011-02-08Initial maemo platform supportThomas Jarosch
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
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
2011-01-02Fix an ugly-looking commentMichael Sparmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28945 a1c6a512-1295-4272-9138-f99709370657
2010-12-10Android: Rework notification and change icon sizes to better meet the ↵Thomas Martitz
systems' standard. The notification now announces the new track on track change, and the the area in the scrolled down notification area shows track infos (title, artist, album). Someone should check if it looks good on hdpi and ldpi screens as I can't verify it right now (emulator crashes). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28785 a1c6a512-1295-4272-9138-f99709370657
2010-12-06Get rid of get_user_file_path and do the path handling in wrappers for ↵Thomas Martitz
open() and friends. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-10-10Add a "early_usb" argument to gui_usb_screen_run(), and don't do skin ↵Frank Gevaerts
unloading/reloading in gui_usb_screen_run() in the early usb case. Fixes the crash part of FS#11589 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28229 a1c6a512-1295-4272-9138-f99709370657
2010-09-17Make disabling HAVE_PITCHSCREEN actually work without breaking the buildFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28102 a1c6a512-1295-4272-9138-f99709370657
2010-09-14fix errors, warnings, tabsJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28075 a1c6a512-1295-4272-9138-f99709370657
2010-09-14Another major skin backend update/hopefully bugfix:Jonathan Gordon
Skins are now more self contained in the skin manager which in the future might allow on demand skin loading (i.e smaller skin buffers) Skin backdrops are also managed more intelegently (fixes a bug where you can get a crazy backdrop loaded if a .sbs fails to load) the rockbox_default rescue theme is now called rockbox_failsafe to better express what it actually is. This commit hopefully/maybe fixes the heavily reported data aborts, so please check if you are getting them git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28073 a1c6a512-1295-4272-9138-f99709370657
2010-09-01Android: Don't compile sim_tasks.cThomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27973 a1c6a512-1295-4272-9138-f99709370657
2010-08-31Unify 32mb and 64mb ipod video builds - FS#11580Frank Gevaerts
Since memory on 32mb ipod videos is mapped twice, a 64mb build still has codecs and plugins mapped in a usable area. This means that all that needs to be done to support 32mb and 64mb boards with the same build is to adjust audiobufend to avoid using more than the actually present RAM. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27960 a1c6a512-1295-4272-9138-f99709370657
2010-08-12Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this ↵Thomas Martitz
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
2010-08-01Rockbox as an application: add get_user_file_path().Thomas Martitz
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
2010-07-29FS#11470 - new skin code, finally svn uses the new parser from the theme ↵Jonathan Gordon
editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657
2010-07-25Rockbox as an application: Fix a few yellowsThomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27558 a1c6a512-1295-4272-9138-f99709370657
2010-06-29Remove some redundant #include'sBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27183 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
2010-06-17Switch iPod 3G to use EABI toolchain. Make necessary threading changes to ↵Michael Sevakis
avoid use of stack after switching to idle stack. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26898 a1c6a512-1295-4272-9138-f99709370657
2010-06-06Don't initialise disk_* for the sim, and make sure disk.c isn't built at allFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26630 a1c6a512-1295-4272-9138-f99709370657
2010-06-06Remove card_enable_monitoring() and use a mutex instead. The ↵Frank Gevaerts
card_enable_monitoring() method actually didn't eliminate the possible race conditions it was meant to fix. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657
2010-05-27Generate C file / header for svn version stringRafaël Carré
It's now easier to force rebuild of files depending on the svn revision version.c/version.h are generated once with new tools/genversion.sh Changes in the VCS are still not auto detected, so you'll have to remove builddir/version.* if you want to change the string in your binaries APPSVERSION is now called RBVERSION and is defined in the generated header instead of being defined by the Makefiles appsversion is now called rbversion (the plugin api number didn't change since old modules are still binary compatible) Change some bootloaders to use knwon-at-buildtime RBVERSION instead of "%s" + rbversion You'll need to run make clean to regenerate dependencies after the removal of apps/version.h To build binaries with a different version string, hand-edit tools/version.sh or tools/genversion.sh (which calls the former) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26320 a1c6a512-1295-4272-9138-f99709370657
2010-05-15- Move uisimulator/sdl/*.[ch] into the target tree, under ↵Thomas Martitz
firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c. - Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization). This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz
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-04-06Fix typo in a bootchart messageTorne Wuff
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25504 a1c6a512-1295-4272-9138-f99709370657
2010-04-01Boot charting support.Torne Wuff
Select (B)ootchart in advanced options in configure, and logf will record timings for various stages of boot, for performance comparisons. Format logged is: BC:>function_name,123,80 where 123 is the line number, 80 is the number of ticks since boot. This can be loaded as CSV into a spreadsheet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25426 a1c6a512-1295-4272-9138-f99709370657
2010-03-20Submit FS#11065. Introduce a new system setting for en-/disabling the ↵Andree Buschmann
Line-out. For now only implemented on iPod Video. This allows to save power if the user does not use the player's Line-out. On iPod 5G the saving is ~0.5 mA. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25257 a1c6a512-1295-4272-9138-f99709370657
2010-03-07revert part of r25042 so boot error splashes are localised, and so there ↵Jonathan Gordon
isnt a boot slowdown (which was the origional reason for r24922) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25050 a1c6a512-1295-4272-9138-f99709370657
2010-03-06Restore the 'read_disk' flag for settings_apply that was removed in r24922. ↵Magnus Holmgren
It is still needed to prevent uncessary disk I/O for fonts etc. Should fix FS#11071 (I haven't tested it on a HD-based player). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25042 a1c6a512-1295-4272-9138-f99709370657
2010-03-04Add a few warning comments about the INIT_ATTR stuff.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25024 a1c6a512-1295-4272-9138-f99709370657
2010-03-04Don't forget to initialize the wps.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25021 a1c6a512-1295-4272-9138-f99709370657
2010-03-03FS#10756 - Free unused init codeThomas Martitz
Introduce a new .init section for initialisation code, so that it can be copied to an area which is later overwritten before calling. The stack/bss can then overwrite that code, effectively freeing the code size that the initialisation routines need. Gives a few kB ram usage back. Only implemented for PP and as3525 so far. More targets could be added, as well as more functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25013 a1c6a512-1295-4272-9138-f99709370657