Michael Sparmann
f0a96580ae
Core changes to allow storage drivers to do cleanup on shutdown, and iPod Nano 2G shutdown code rework (FS#10668)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23057 a1c6a512-1295-4272-9138-f99709370657
2009-10-09 20:36:09 +00:00
Rob Purchase
c6309633a1
Re-work D2 power off behaviour.
...
* Inhibit PCF timeout during shutdown and while charging
* Power off the player using the same mechanism as the OF (GPIO)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22056 a1c6a512-1295-4272-9138-f99709370657
2009-07-26 19:41:24 +00:00
Maurus Cuelenaere
87978d4ee8
Jz4732: add hack to fix stack overflow in the power thread (fixes USB on non-bootloader)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20867 a1c6a512-1295-4272-9138-f99709370657
2009-05-07 14:05:42 +00:00
Michael Sevakis
7d7969114d
c200v1/e200v1: Add battery charging. This should be usable on v2 players but those should be evaluated for current, endpoint voltage and whether or not accurate battery readings may always be obtained (which determines algorithm setup and behavior).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19748 a1c6a512-1295-4272-9138-f99709370657
2009-01-11 10:07:22 +00:00
Michael Sevakis
9b8f56f35c
Oops. Fix precompiler condition to be for all CONFIG_CHARGING != 0 (as it should be).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19581 a1c6a512-1295-4272-9138-f99709370657
2008-12-24 17:42:07 +00:00
Michael Sevakis
24e2d8671d
Fix red and yellow.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19580 a1c6a512-1295-4272-9138-f99709370657
2008-12-24 17:28:01 +00:00
Michael Sevakis
3157e13956
Simplify powermgmt thread loops so it calls functions turn (no more power_thread_sleep). Do other target-friendly simplifications, generic battery switch handling and split sim-specific code. Whoever can, please verify charging on the Archos Recorder (due to change in the charger duty cycle code).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19579 a1c6a512-1295-4272-9138-f99709370657
2008-12-24 16:58:41 +00:00
Michael Sevakis
f6789a7d73
Fix red. Remove stale comment.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19548 a1c6a512-1295-4272-9138-f99709370657
2008-12-21 18:27:59 +00:00
Michael Sevakis
5667682dd2
Gigabeat S: Implement charging and power control to charge from AC or USB. Hold MENU while plugging USB cable to charge from USB without connecting. Under Windows, plugging USB for charging only but not connecting still needs to be properly handled (driver popup issue) but it will charge when connected normally-- no issue under Linux. Some accomodating changes made to powermgmt.c will soon be made nicer.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19547 a1c6a512-1295-4272-9138-f99709370657
2008-12-21 18:10:36 +00:00
Michael Sevakis
4ae9de5490
Color LCDs shouldn't have to have contrast set to 0 before shutdown. If contrast is implemented, then it can cause it to flash a bit before poweroff.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19369 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 01:33:01 +00:00
Michael Sevakis
bc963c34ae
Hopefully mop-up remaining red.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19317 a1c6a512-1295-4272-9138-f99709370657
2008-12-03 21:15:44 +00:00
Michael Sevakis
58eb784a5d
Straighten out some powermanagement stuff. Give target complete control over how power inputs are sensed. Clean SIMULATOR stuff out of target files. Get rid of USB charging option on targets that don't support it or don't implement it yet. Menu string remains to avoid language incompatibility but should be removed on next cleanup for targets not using it (notice in english.lang). global_settings becomes incompatible for some builds and so plugin API version is incremented.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19315 a1c6a512-1295-4272-9138-f99709370657
2008-12-03 19:54:25 +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
Frank Gevaerts
19d1cacb1a
cleanup storage defines
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18950 a1c6a512-1295-4272-9138-f99709370657
2008-10-31 21:25:04 +00:00
Björn Stenberg
9558c4956d
Moved pcm_record from firmware to apps. Cleaned up some. Now all code using struct mp3entry is in apps.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18807 a1c6a512-1295-4272-9138-f99709370657
2008-10-14 11:12:20 +00:00
Jens Arnold
0f933f6210
Bootloaders don't need special handling in sys_poweroff() for recording targets.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18780 a1c6a512-1295-4272-9138-f99709370657
2008-10-12 12:28:41 +00:00
Jonathan Gordon
5cb85a81d2
fix the sleeptimer which got broken in r17872
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18006 a1c6a512-1295-4272-9138-f99709370657
2008-07-10 02:33:00 +00:00
Jonathan Gordon
6f6fcfc3a8
fix FS#8187 - charging breaks sleep timer. Now if the timer goes off and the player is charging or connected to USB it will turn off the audio, but stay on
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17872 a1c6a512-1295-4272-9138-f99709370657
2008-06-29 09:44:07 +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
Michael Sevakis
cb1b388a57
Get a good start on cleaning up powermgmt.c
...
1) Consolidate charging types' code as much as possible at the moment.
2) Remove the iRiver code for the moment. It so happens that it isn't being
compiled anyway so it's just noise. Grab it out of the revision history
when needed again.
3) A small fix to CHARGING_CONTROL where changing of #defines somewhere in
earlier revisions actually ended up having it use the wrong battery filter
constant. A few state variables that were locals but stay in scope for
the life of the power thread get static storage to help separate algorithms.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17580 a1c6a512-1295-4272-9138-f99709370657
2008-05-19 03:59:52 +00:00
Andree Buschmann
5f28b469b2
fix red and remove tabs
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17196 a1c6a512-1295-4272-9138-f99709370657
2008-04-20 19:00:52 +00:00
Nils Wallménius
02eb1d83a7
FS#8871 by Tomasz Wasilczyk, avoid negative runtime estimation (that would later be cast to an unsigned giving huge values
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17080 a1c6a512-1295-4272-9138-f99709370657
2008-04-12 07:14:13 +00:00
Robert Kukla
6a6c820f5f
m:robe 100 - remove ugly workaround for false initial voltage readings and wait until readings have settled instead
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16626 a1c6a512-1295-4272-9138-f99709370657
2008-03-11 09:38:12 +00:00
Michael Sevakis
c21180fb06
Delay reading the first battery level for at least 1 tick. Seems to fix the low battery shutdown problem on 3g. Reenable the low battery shutdown on 3g.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15857 a1c6a512-1295-4272-9138-f99709370657
2007-11-30 10:55:09 +00:00
Jens Arnold
e54244480d
Convert 2 more settings to table settings. * Fix duplicate value display if the first value is selected in a table setting.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15805 a1c6a512-1295-4272-9138-f99709370657
2007-11-25 20:05:04 +00:00
Nils Wallménius
da8f854d61
No need to have this variable for targets that don't use it
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15534 a1c6a512-1295-4272-9138-f99709370657
2007-11-08 15:37:39 +00:00
Stéphane Doyon
194a66ef83
Trigger an additional battery level announcement when the level
...
reaches 5% (FS#8112).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15522 a1c6a512-1295-4272-9138-f99709370657
2007-11-08 01:18:13 +00:00
Steve Bavin
4d822319e9
Little tidy-up on previous commit.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15433 a1c6a512-1295-4272-9138-f99709370657
2007-11-03 13:45:12 +00:00
Steve Bavin
8d03282f91
Fix recursion-stack overflow on simulator, also unify some variable names and make battery level changes more realistic.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15432 a1c6a512-1295-4272-9138-f99709370657
2007-11-03 13:21:40 +00:00
Stéphane Doyon
da93299865
Accept FS#7910: spontaneously speak out the battery level when it falls
...
under 50%, 30% and 15%. Guarded by an option under voice settings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15422 a1c6a512-1295-4272-9138-f99709370657
2007-11-03 05:00:49 +00:00
Michael Sevakis
a9b2fb5ee3
Finally full multicore support for PortalPlayer 502x targets with an eye towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
2007-10-16 01:25:17 +00:00
Nicolas Pennequin
f548336e27
Fix the LCD line remaining active after shutdown on grayscale ipods (FS#5199). Original patch by Tomasz Mon, modified by me.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14907 a1c6a512-1295-4272-9138-f99709370657
2007-09-29 20:56:07 +00:00
Jens Arnold
0fac492c3d
First step of powermanagement rework: * Move target specific stuff into target tree, starting with battery voltage tables and voltage reading. (This revealed some incorrect percent_to_voltage_charging mappings). * Voltage reading on 1st gen ipods is now correct. * Clean up obsolete config #defines.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14375 a1c6a512-1295-4272-9138-f99709370657
2007-08-17 06:45:18 +00:00
Jens Arnold
2a258eac6b
Fix signedness bug in trickle charge proportional adjustment which became visible due to the changed calculation.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14371 a1c6a512-1295-4272-9138-f99709370657
2007-08-16 17:34:55 +00:00
Jens Arnold
1d1d9a8491
Switch to using millivolt for battery voltage and other internal voltages. * Fix debug voltage history display. * Some code cleanup.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14364 a1c6a512-1295-4272-9138-f99709370657
2007-08-15 23:57:27 +00:00
Jens Arnold
b03ffacda9
Don't let the shutdown code mess with the backlight anymore on most targets. The backlight thread decides what to do on shutdown.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14340 a1c6a512-1295-4272-9138-f99709370657
2007-08-14 19:29:17 +00:00
Nils Wallménius
f14a492c6b
Save a few bytes and make types more consistent
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14301 a1c6a512-1295-4272-9138-f99709370657
2007-08-12 20:22:08 +00:00
Nils Wallménius
f28da1a35a
Enable a lot more features for simulators and add stubs where necessary, simulators should now work with identical lng and voice files as the respective target
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14299 a1c6a512-1295-4272-9138-f99709370657
2007-08-12 19:49:03 +00:00
Jens Arnold
671f5d4412
Removed special X5 backlight handling, and replaced it with a generic system that makes the backlight light up on shutdown and not time out unless it's completely disabled in the current player state.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14292 a1c6a512-1295-4272-9138-f99709370657
2007-08-12 11:18:52 +00:00
Peter D'Hoye
74ad216ad3
More battery updates, this time for gigabeat. FS #7433 from Johnathon Mihalop
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13891 a1c6a512-1295-4272-9138-f99709370657
2007-07-14 15:24:01 +00:00
Peter D'Hoye
7ade14776f
Correction for ipod video and nano battery type. FS #7216 by Andree Buschmann
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13885 a1c6a512-1295-4272-9138-f99709370657
2007-07-14 14:46:52 +00:00
Michael Sevakis
1bbd58e2d8
e200 lcd mashup: 1) Enable flipped and inverted mode. 2) Fully enable all power options so that LCD driver IC's visible display is shut down with backlight and make the Sleep option available 3) Better framebuffer copy routine in assembly that confines updates to the specified rectangle _and_ is faster than memcpy 4) Some other offhand changes out of preference.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13818 a1c6a512-1295-4272-9138-f99709370657
2007-07-08 13:02:52 +00:00
Jens Arnold
da5910eac0
Shutdown and powermanagement cleanup: * Use the proper function for determining whether the battery level is safe, and get rid of the extra one. Low battery warning now appears at 10% or less. * Don't delay shutdown artificially by 3 seconds due to low/critical battery warning. * Shutdown at critical battery level: Skip all disk-hitting housekeeping, make sure dircache stops, and don't mark disk as clean in eeprom.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13734 a1c6a512-1295-4272-9138-f99709370657
2007-06-29 19:01:24 +00:00
Michael Sevakis
d989f19eda
No more ear doctor visits after powering/unpowering the Gigabeat. Cleanup a little too.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13312 a1c6a512-1295-4272-9138-f99709370657
2007-05-03 18:08:00 +00:00
Jens Arnold
47bf6c5a5a
Moved archos backlight code to target tree. Changed old mutlivalue CONFIG_BACKLIGHT to a simple HAVE_BACKLIGHT.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13136 a1c6a512-1295-4272-9138-f99709370657
2007-04-12 22:12:13 +00:00
Jens Arnold
7a8326e283
Calibrated (discharge) battery percentage table for iAudio X5(L) and M5(L). Runcurrent values and hence runtime estimation is still off, but battery percentage should be ok now.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13024 a1c6a512-1295-4272-9138-f99709370657
2007-04-05 00:20:35 +00:00
Barry Wardell
74b9ec0bbe
FS#6860 - Battery calibration for Sansa. Thanks to Matthias Wientapper.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12898 a1c6a512-1295-4272-9138-f99709370657
2007-03-23 10:59:01 +00:00
Jens Arnold
85a226d4e7
Rename some macros to account for the recently added M5 port. No code changes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12809 a1c6a512-1295-4272-9138-f99709370657
2007-03-16 23:02:39 +00:00
Michael Sevakis
68f9e1ad57
Guess there were more changes to it.:) Odd that mine built until a make clean.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12694 a1c6a512-1295-4272-9138-f99709370657
2007-03-09 12:51:25 +00:00
Jens Arnold
8d0cd9f303
Some more M5 adjustments.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12616 a1c6a512-1295-4272-9138-f99709370657
2007-03-05 01:31:26 +00:00