summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
AgeCommit message (Collapse)Author
2007-01-08Hxxx battery voltage level for forced shutdown was little too low.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11948 a1c6a512-1295-4272-9138-f99709370657
2006-12-29merge a big part of the unofficial gigabeat cvs back. Includes working ↵Marcoen Hirschberg
bootloader and rockbox with audio. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11850 a1c6a512-1295-4272-9138-f99709370657
2006-12-20fix typo, noticed by Steve GotthardtMarcoen Hirschberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11822 a1c6a512-1295-4272-9138-f99709370657
2006-12-19Convert queues to use intptr_t for event data and return values as most of ↵Michael Sevakis
the time pointer are not passed and it should make some things a bit cleaner. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11818 a1c6a512-1295-4272-9138-f99709370657
2006-12-07Oops, that'll just keep resetting the timeout to 20s every time sys_poweroff ↵Michael Sevakis
is called and won't add the 8s recording margin. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11686 a1c6a512-1295-4272-9138-f99709370657
2006-12-07SWCODEC Recording: 1) Fix minor bug of not subtracting line aligment ↵Michael Sevakis
adjustment from buffer size. 2) Handle stop and pause better and let pcmrec thread lock the DMA as that could cause prerecording to get disabled internally 3) Make sure to snapshot DMA write index to ensure compiler doesn't perform multiple access when calculating available data (probably just paranoia on my part) 4) Handle USB connect in recording thread a little better by resetting hardware to defaults after closing 5) Make power managment stop recording properly when powering off (ie. no yield() from interrupt handler! :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11685 a1c6a512-1295-4272-9138-f99709370657
2006-12-07Small delay before cutting off power to allow all hardware (especiallyMiika Pekkarinen
eeprom chip) to flush. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11682 a1c6a512-1295-4272-9138-f99709370657
2006-12-06Fix for FS#6328. Simulator battery level now goes down in roughly 1% ↵Dan Everton
increments roughly every second. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11673 a1c6a512-1295-4272-9138-f99709370657
2006-12-06first step in audio driver unification: renaming the functions to audio_*Marcoen Hirschberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11670 a1c6a512-1295-4272-9138-f99709370657
2006-11-15Fix FS#6322. Battery level gets updated again as it should.Barry Wardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11534 a1c6a512-1295-4272-9138-f99709370657
2006-11-14Removed anachronisms introduced with low battery shutdown patch.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11524 a1c6a512-1295-4272-9138-f99709370657
2006-11-11Improved power management (FS#3001). Shutdown rockbox when the battery gets ↵Barry Wardell
to a level where the device doesn't function properly. Calculate remaining charging time while charging (rather than remaining running time). Show "Low Battery" and "Battery Empty" warnings. Also fixes FS#4786. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11507 a1c6a512-1295-4272-9138-f99709370657
2006-11-08* changes to ata.c - idle callbacks are called after 2 sec of real idle,Jonathan Gordon
and shutdown and usb (it makes sense here). ata_sleep doesnt get broken by callbacks. * allow ata_sleep() at the end of buffering again * config block uses ata_idle instead of delayed sector when saving * remove delayed sector code from ata_mmc.c (idle callbacks are not yet implemented for ata_mmc.c tho) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11461 a1c6a512-1295-4272-9138-f99709370657
2006-10-30Fix the sim errors in battery_read_info.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11397 a1c6a512-1295-4272-9138-f99709370657
2006-10-30General: changed local adc to voltage conversions in several places to use ↵Michael Sevakis
battery_voltage. Added battery_read_info function for unfiltered battery information. x5: removed adc_read as a distinct function. Removed adc tick task. adc_init is empty inline. Adjusted battery scale, voltage to level array and read 10 bits from the ADC for battery since 255 levels is not enough for true centivolt resolution. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11396 a1c6a512-1295-4272-9138-f99709370657
2006-10-25Moved pcf50606 stuff to target directory.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11348 a1c6a512-1295-4272-9138-f99709370657
2006-10-12Add calibrated battery readings for H10.Barry Wardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11202 a1c6a512-1295-4272-9138-f99709370657
2006-10-05Move all iPod targets into the target tree. FS#5890Barry Wardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11129 a1c6a512-1295-4272-9138-f99709370657
2006-09-23Add ADC to I/O ports debug menu on H10. Fix battery level reading empty when ↵Barry Wardell
starting up on H10. Calibrated battery for H10 20GB. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11036 a1c6a512-1295-4272-9138-f99709370657
2006-09-16New scheduler, with priorities for swcodec platforms. Frequent taskMiika Pekkarinen
switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
2006-09-12Fixed the x5 sim build error I hope.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10933 a1c6a512-1295-4272-9138-f99709370657
2006-09-12Improved handling of the ONKEY1S interrupt. Off for the remote must be ↵Michael Sevakis
explicitly mapped now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10932 a1c6a512-1295-4272-9138-f99709370657
2006-08-28Fixed the pwermgmt.c error for FMMichael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10791 a1c6a512-1295-4272-9138-f99709370657
2006-08-28Added FS#2939 Encoder Codec Interface + Codecs by Antonius Hellmann with ↵Michael Sevakis
additional FM Recording support and my modifications git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10789 a1c6a512-1295-4272-9138-f99709370657
2006-08-19Iriver iFP7xx battery support (1xAA).Tomasz Malesinski
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10659 a1c6a512-1295-4272-9138-f99709370657
2006-08-08Accepted FS #5772 by Michael SevakisRani Hod
1. X5 lcd sleep 2. #define HAVE_LCD_ENABLE 3. add "backlight (on hold switch)" setting, adapted from FS #5735 Note that the while(1) yield ==> asm("halt") part is NOT commited here, I prefer it would be discussed separately. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10489 a1c6a512-1295-4272-9138-f99709370657
2006-08-05Initial support and use for EEPROM memory on H120 & H140 players whenMiika Pekkarinen
Rockbox firmware has been flashed over original firmware (not yet possible to do). Dircache & tagcache serialization for fast bootup without the need to scan disk when Rockbox is in flash. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10464 a1c6a512-1295-4272-9138-f99709370657
2006-07-31Applied FS#5734 by Michael Sevakis (X5 LCD contrast bugfix andRani Hod
some #define fixup). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10388 a1c6a512-1295-4272-9138-f99709370657
2006-06-06Work-in-progress rework of charging status reading & display: * Changed ↵Jens Arnold
several charging related HAVE_* macros into one multi-value CONFIG_CHARGING. * Always use proper macros for charging states. * Battery symbol charging animation now starts from current level on all targets with charging. Two-colour animation kept for non-b&w targets. Round down fill level while charging as before, but round to nearest pixel value for discharging on all targets. * Charging anim fixed on player. * Some code cleanup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10080 a1c6a512-1295-4272-9138-f99709370657
2006-04-16Commit tagcache in background when possible (at least dircache enabled).Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9686 a1c6a512-1295-4272-9138-f99709370657
2006-04-15Also add a config-specific 'Default' value, this should fix the sim builds.Zakk Roberts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9680 a1c6a512-1295-4272-9138-f99709370657
2006-04-04Disable backlight fade out for shutdownBrandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9500 a1c6a512-1295-4272-9138-f99709370657
2006-03-27Even better LCD clearing for ipod color displays, clear to white, but after ↵Brandon Low
backlight off git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9293 a1c6a512-1295-4272-9138-f99709370657
2006-03-27Clear the display in a less intrusive way to the user's selected background ↵Brandon Low
_color_ (solid color ghosting is hard to detect) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9288 a1c6a512-1295-4272-9138-f99709370657
2006-03-27Patch 4819 from Robert Keevil to shutdown the codec and clear the LCD on ↵Brandon Low
ipod shutdown git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9286 a1c6a512-1295-4272-9138-f99709370657
2006-03-25Add simulated battery drain to the simulator. Patch from Matthias Mohr (task ↵Dan Everton
4886). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9247 a1c6a512-1295-4272-9138-f99709370657
2006-03-16Fix red and yello build tableBrandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9062 a1c6a512-1295-4272-9138-f99709370657
2006-03-16Proper charger input, usb and charger activity detection/reporting for ipod ↵Brandon Low
video git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9061 a1c6a512-1295-4272-9138-f99709370657
2006-03-13Charging state reporting for iriver players. Values calibrated withMiika Pekkarinen
1900 mAh Ionity battery; might need recalibration with the stock battery. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9030 a1c6a512-1295-4272-9138-f99709370657
2006-03-04Archos V1 recorder charging path #2927 by Alun ThomasJörg Hohensohn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8898 a1c6a512-1295-4272-9138-f99709370657
2006-03-02Improved battery status reporting for units which support usb power / chargeBrandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8886 a1c6a512-1295-4272-9138-f99709370657
2006-02-04iAudio X5: various fixes to make the bootloader compileLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8560 a1c6a512-1295-4272-9138-f99709370657
2006-01-25Fix all the simulator builds I brokeBrandon Low
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8456 a1c6a512-1295-4272-9138-f99709370657
2006-01-25New "battery benchmark" plugin by Alexander Spyridakis, modified a bit by meHristo Kovachev
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8451 a1c6a512-1295-4272-9138-f99709370657
2006-01-19Charging state reporting on H3x0Brandon Low
Don't read the GPIO every refresh of statusbar or gwps for plugged state, use a variable exported from powermgmt instead. Allow Custom WPS to access %bc for battery charge state on targets that support this. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8383 a1c6a512-1295-4272-9138-f99709370657
2006-01-18Part of patch #1407541 to improve battery smoothing by absorbing extra ↵Brandon Low
precision from the battery scale factor git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8372 a1c6a512-1295-4272-9138-f99709370657
2005-12-06waiting is over: initial unicode commitMarcoen Hirschberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8169 a1c6a512-1295-4272-9138-f99709370657
2005-11-23Replaced the booolean 'Backlight On When Plugged' setting with a complete ↵Jens Arnold
alternative 'Backlight When Plugged' timeout setting. * Yield during poweroff to make backlight_off() work. * Bumped config version, save your settings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8053 a1c6a512-1295-4272-9138-f99709370657
2005-11-21Backlight handling: * Added 'Caption Backlight' and 'Backlight On When ↵Jens Arnold
Charging' for the iriver remote LCD. * Enabled the backlight code for the simulator, and prepared backlight simulation. It's only a stub atm, writing messages to the console window. * Added tick task handling to the simulators for this to work. * Code cleanup in backlight.c, less dead code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8034 a1c6a512-1295-4272-9138-f99709370657
2005-11-19refactored radio status codeAnton Oleynikov
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7999 a1c6a512-1295-4272-9138-f99709370657