This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#8187 - Charging from USB breaks sleep timer
Attached to Project:
Rockbox
Opened by PaulJam (PaulJam) - Monday, 19 November 2007, 15:03 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Sunday, 29 June 2008, 11:44 GMT+2
Opened by PaulJam (PaulJam) - Monday, 19 November 2007, 15:03 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Sunday, 29 June 2008, 11:44 GMT+2
|
DetailsWhen the sleep timer is set and the device is charging via USB then nothing happens when the countdown reaches 0:00. Playback continues and the timer continues to count down (the %bs WPS tag returns negative values like -12:-34).
As soon as the USB calble gets disconnected the device shuts down. While charging from the normal A/C adapter everything works (more or less*) as expected: When the countdown is over playback stops and the backlight/screen turns off. The problem was reported on IRC for an Ipod (no exact model mentioned) and was reproduceable on an H300 with r15682. * - There is a delay between the timer reaching 0:00 and the device actually shutting down (i experienced ~30 seconds delay with a 2 hour sleep timer) but this is not a big issue. |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Sunday, 29 June 2008, 11:44 GMT+2
Reason for closing: Fixed
Additional comments about closing: patch worked... commited
Sunday, 29 June 2008, 11:44 GMT+2
Reason for closing: Fixed
Additional comments about closing: patch worked... commited
The issue seems to be at line 545 of current SVN's (r16309) firmware/powermgmt.c:
if(sleeptimer_active && !usb_inserted())
Removing the usb_inserted() condition allows the sleep timer to trigger and stop the audio (I believe pp502x devices should stay powered on while the charger is inserted).
I'm definitely not very familiar with rockbox code or all the platforms it supports, so I don't know (and rather doubt) that removing that usb_inserted() condition is the correct solution, or whether the logic within the function itself leads to the endless countdown.
Me, I'm more worried about the battery over charging.