Rockbox General > Rockbox General Discussion
Rockbox wont idle powerdown if music is paused and sleep-timer is set
edfardos:
We should probably fix this bug, or change the manual:
http://anythingbutipod.com/forum/showthread.php?p=644078#post644078
I posted fix to the source in the third post.
thanks,
-edfardos
saratoga:
1) Does this apply to the current source or just 3.13 ?
2) Can you post a patch of your changes rather then just those lines?
edfardos:
Sorry, i was having trouble with the bugtracker, but here's a git formatted patch. I did some extensive testing, with all possible combinations and permutations of idle/sleep timers, and play/pause audio status. This patch was against the 3.13 tree, sorry, but I don't track the master personally. I figured just a couple of lines would be easy to tweak.
thanks,
-edfardos
---
firmware/powermgmt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index b6d4b9f..7f4432d 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -963,8 +963,10 @@ void handle_auto_poweroff(void)
#endif
!usb_inserted() &&
(audio_stat == 0 ||
- (audio_stat == (AUDIO_STATUS_PLAY | AUDIO_STATUS_PAUSE) &&
- !sleeptimer_active))) {
+//edfardos (audio_stat == (AUDIO_STATUS_PLAY | AUDIO_STATUS_PAUSE) &&
+//edfardos !sleeptimer_active))) {
+ audio_stat == (AUDIO_STATUS_PLAY | AUDIO_STATUS_PAUSE)
+ )) {
if (TIME_AFTER(tick, last_event_tick + timeout)
#if !(CONFIG_PLATFORM & PLATFORM_HOSTED)
--
1.7.9.5
wodz:
Looking at the code your patch is incorrect. The line you changed says originally that if sleeptimer_active is true the control is passed to handle_sleep_timer() which in turn calls sys_poweroff() when sleeptimer expires. With your change this codepath is completely omitted. My understanding of the code is that if sleep timer is set it should prevail. So the actual question is if this makes sense and if this is what manual says.
edfardos:
If the unit is paused, idle-powerdown should take effect. There is no dependency on the sleep timer according to the manual. I found the behavior objectionable, so I did some google searches, and others indicated this "bug" emerged in the 3.12 timeframe. This begs the question if the sleep timer was designed to keep the unit awake for the prescribed period, or strictly to power down the device if it ever hits the time limit.
..................................
8.6.2 Idle Poweroff
Rockbox can be configured to turn off power after the unit has been idle for a defined number of minutes. The player is idle when playback is stopped or paused. It is not idle while the USB or charger is connected , or while recording. Settings are either Off or 1 to 10 minutes in 1 minute steps. Then 15, 30, 45 or 60 minutes are available.
8.6.3 Sleep Timer
The Sleep Timer powers off your player after a given time, whether playing or not.
Navigation
[0] Message Index
[#] Next page
Go to full version