Commit graph

364 commits

Author SHA1 Message Date
Boris Gjenero
5cd8aec39a Fix FS#7631 : Archos V2 and FM Recorder charging screen problems
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-12-31 18:31:47 +00:00
Jonathan Gordon
0ca4b38b1b skinengine: Rework skin loading so skins can be un/loaded individually. This 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-21 10:02:23 +00:00
Thomas Martitz
71d73fd470 Remove sim_tasks from the sdl application build.
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-17 19:52:59 +00:00
Jonathan Gordon
be716c0be8 Finally commit FS#5111 - piezo clicker for ipods!
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-16 10:25:43 +00:00
Jonathan Gordon
101693fd30 FS#12251 - User shortcuts in the main menu.
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-11-15 13:22:02 +00:00
Thomas Martitz
d3c21023e0 Add pcm_rec_init() to the sim's init.
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-26 18:28:45 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its 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-15 19:35:02 +00:00
Thomas Martitz
6efb3f0760 Revert r30599 "Check for the magic file "/.rockbox/skin_buffer_size.txt" [...]"
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-10-05 17:43:51 +00:00
Fred Bauer
a1d3a1d143 Delay settings_reset() until after font_init(). Fixes boot crash on Fuze(v1) and probably others.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30613 a1c6a512-1295-4272-9138-f99709370657
2011-09-27 21:06:12 +00:00
Jonathan Gordon
f7c2978cc4 Check for the magic file "/.rockbox/skin_buffer_size.txt" on bootup which 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-25 12:55:40 +00:00
Jonathan Gordon
b71c66ec56 Fix the build errors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30590 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:29:21 +00:00
Jonathan Gordon
aa0f4a4bbe FS#12273 - use buflib for font storage. thanks to the testers :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:19:34 +00:00
Thomas Martitz
baa070cca6 GSoC/Buflib: Enable compaction in buflib.
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-30 14:01:45 +00:00
Thomas Martitz
d0b72e2590 GSoC/Buflib: Add buflib memory alocator to the core.
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-30 14:01:33 +00:00
Thomas Martitz
d1322b7159 GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.
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-14 15:13:00 +00:00
Thomas Jarosch
15a358099c Introduce "power" thread for RaaA
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-03-02 19:12:55 +00:00
Dave Chapman
793eab19b9 Remove a redundant part of a #if
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29461 a1c6a512-1295-4272-9138-f99709370657
2011-02-28 12:05:22 +00:00
Thomas Jarosch
6e9e6a7571 RaaA: Add initial Pandora support
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-27 23:42:37 +00:00
Thomas Martitz
95e24dd7a5 Android:
* 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-23 01:10:54 +00:00
Thomas Jarosch
5f037ac015 Initial maemo platform support
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-08 20:05:25 +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
Michael Sparmann
886e97221b Fix an ugly-looking comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28945 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 22:22:51 +00:00
Thomas Martitz
f5a461d182 Android: Rework notification and change icon sizes to better meet the 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-10 18:41:09 +00:00
Thomas Martitz
2c2416094f Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:26:31 +00:00
Frank Gevaerts
c8c40c5291 Add a "early_usb" argument to gui_usb_screen_run(), and don't do skin 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-10-10 13:17:39 +00:00
Frank Gevaerts
f366090562 Make disabling HAVE_PITCHSCREEN actually work without breaking the build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28102 a1c6a512-1295-4272-9138-f99709370657
2010-09-17 20:28:47 +00:00
Jonathan Gordon
71379cafb1 fix errors, warnings, tabs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28075 a1c6a512-1295-4272-9138-f99709370657
2010-09-14 12:21:56 +00:00
Jonathan Gordon
9928e3418f Another major skin backend update/hopefully bugfix:
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-14 11:56:50 +00:00
Thomas Martitz
c00fbc4d06 Android: Don't compile sim_tasks.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27973 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 22:09:43 +00:00
Frank Gevaerts
a1cf4ced83 Unify 32mb and 64mb ipod video builds - FS#11580
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-31 19:06:04 +00:00
Thomas Martitz
0e2286f226 Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this 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-12 13:38:25 +00:00
Thomas Martitz
9c0b2479f7 Rockbox as an application: add get_user_file_path().
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-08-01 16:15:27 +00:00
Jonathan Gordon
2d31d77a8b FS#11470 - new skin code, finally svn uses the new parser from the theme 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-29 12:37:48 +00:00
Thomas Martitz
4e8ef93509 Rockbox as an application: Fix a few yellows
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27558 a1c6a512-1295-4272-9138-f99709370657
2010-07-25 17:07:56 +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
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
Michael Sevakis
2b640ba4b8 Switch iPod 3G to use EABI toolchain. Make necessary threading changes to 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-17 20:15:58 +00:00
Frank Gevaerts
a1a9084160 Don't initialise disk_* for the sim, and make sure disk.c isn't built at all
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26630 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:40:40 +00:00
Frank Gevaerts
9c43b2ce17 Remove card_enable_monitoring() and use a mutex instead. The 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-06-06 13:20:47 +00:00
Rafaël Carré
5d236b2bfd Generate C file / header for svn version string
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-27 09:41:46 +00:00
Thomas Martitz
3d0cee8abb - Move uisimulator/sdl/*.[ch] into the target tree, under 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-15 21:02:47 +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
Torne Wuff
59463ba1e9 Fix typo in a bootchart message
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25504 a1c6a512-1295-4272-9138-f99709370657
2010-04-06 23:07:18 +00:00
Torne Wuff
52e528e057 Boot charting support.
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-04-01 16:27:21 +00:00
Andree Buschmann
b6c12a129e Submit FS#11065. Introduce a new system setting for en-/disabling the 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-20 15:02:29 +00:00
Jonathan Gordon
792f7335af revert part of r25042 so boot error splashes are localised, and so there 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-07 03:20:34 +00:00
Magnus Holmgren
a14f4acb0c Restore the 'read_disk' flag for settings_apply that was removed in r24922. 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-06 12:14:12 +00:00
Thomas Martitz
a62eced78a Add a few warning comments about the INIT_ATTR stuff.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25024 a1c6a512-1295-4272-9138-f99709370657
2010-03-04 17:44:57 +00:00
Thomas Martitz
ed6c143d26 Don't forget to initialize the wps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25021 a1c6a512-1295-4272-9138-f99709370657
2010-03-04 01:04:43 +00:00
Thomas Martitz
f8edc32589 FS#10756 - Free unused init code
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
2010-03-03 23:20:32 +00:00