Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#8187 - Charging from USB breaks sleep timer

Attached to Project: Rockbox
Opened by PaulJam (PaulJam) - Monday, 19 November 2007, 15:03 GMT+1
Last edited by Jonathan Gordon (jdgordon) - Sunday, 29 June 2008, 11:44 GMT+1
Task Type Bugs
Category Battery/Charging
Status Closed
Assigned To No-one
Player type All players
Severity Low
Priority Normal
Reported Version current build
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

When 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+1
Reason for closing:  Fixed
Additional comments about closing:  patch worked... commited
Comment by Bryan Stine (Battousai) - Thursday, 14 February 2008, 09:01 GMT+1
I can confirm this behavior on e200 as well.

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.
Comment by carl (locketine) - Saturday, 16 February 2008, 21:08 GMT+1
they obviously had a reason to put that there so maybe that check needs to be expanded to include a device check for those players that can't be shut off while charging. I also noticed that I can't turn off my e200 while it's plugged into usb; is this caused by that same line of code as well?
Comment by Nathan Hartley (TreeStryder) - Monday, 25 February 2008, 04:15 GMT+1
If it matters, the wife of this e200 owner would like the sleep timer to at least stop playback.

Me, I'm more worried about the battery over charging.
Comment by Jonathan Gordon (jdgordon) - Sunday, 29 June 2008, 10:26 GMT+1
this should fix it... please test it out

Loading...