FS#2266 - Safe poweroff

Attached to Project: Rockbox
Opened by Linus Nielsen Feltzing (linusnielsen) - Monday, 12 July 2004, 13:51 GMT
Last edited by Linus Nielsen Feltzing (linusnielsen) - Saturday, 24 July 2004, 21:27 GMT
Task Type Patches
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


A proposal on how to implement a "safe" poweroff
function. Of you press OFF/STOP in the browser when no
music is playing, you will get a dialog saying "Press
OFF to shut off". If you press OFF again, it will save
the settings, spin down the hard disk and then shut off.
This task depends upon

Closed by  Linus Nielsen Feltzing (linusnielsen)
Saturday, 24 July 2004, 21:27 GMT
Reason for closing:  Accepted
Comment by Blue Chip (bluechip) - Saturday, 17 July 2004, 00:30 GMT

Just some feedback to show appreciation.

o If you do not press "off" a second time, the splash
screen is not removed

o Does not fade volume

o When you press off 2nd time, there is no notice ...
maybe "shutting down now" would be nice?
Comment by Linus Nielsen Feltzing (linusnielsen) - Monday, 19 July 2004, 09:50 GMT

New version.


- "Shutting off..." text
- Mutes the MAS
- Refreshes the screen when cancelling
- Added a menu option, "Shut off". This is now the only way
of shutting off the Player
- You can now shut off even if music is playing
- Saves the settings to disk, spinning up the disk if necessary
Comment by Nicolas GIF (salokyn) - Monday, 19 July 2004, 10:34 GMT

[on REC V1]
Still a little refresh bug when a line is scrolling under
the confirmation message. Except this, it's perfect :-)
Comment by Jan Gajdos (trotso) - Monday, 19 July 2004, 15:01 GMT

Really nice one. Like it a lot.
1. It would be logical if, when browsing through WPS (with ON), the first
press of OFF would just stop the playback, and then the shutdown procedure
activated (two presses). This way: {Not playing = two presses; Playing =
three presses}
2. Also, couldn't we do without the confirmation when choosing to shutdown
from the menu? (Kind of "Don't do the crime if you can't do the time"... :^)
3. If there is an inverted scrolling bar under the dialog, the dialog still gets
Comment by Linus Nielsen Feltzing (linusnielsen) - Tuesday, 20 July 2004, 05:54 GMT

New version:

- Stops the scrolling when the dialog is shown
- No dialog when shutting off from the menu
- OFF now stops the music if it's playing, else displays the
Comment by Nicolas GIF (salokyn) - Tuesday, 20 July 2004, 10:43 GMT

It seems ready to be added to Rockbox now !
Comment by Jan Gajdos (trotso) - Tuesday, 20 July 2004, 21:41 GMT

Thanks for the excellent fixes,
1. when playing, and OFF is pressed quickly three times, sometimes the disk
spins up immediately, which seems to cause one of the OFFs to get lost, and
thereby the unit can stay on even if one might think it's off. (Thought there was
a keyboard buffer to take care of this.)
2. when DC is plugged in, the safe poweroff causes complete silence while
playing (at least on digital out) when it starts up again. (I know - who in his
right mind would want to power off the unit when it's connected to DC? Maybe
this could reveal something missing in the startup code, though...)
Comment by Linus Nielsen Feltzing (linusnielsen) - Wednesday, 21 July 2004, 05:27 GMT

New version:

- Doesn't mute the MAS if we can't power off for real
- Doesn't clear the button queue in the confirmation dialog
Comment by Linus Nielsen Feltzing (linusnielsen) - Saturday, 24 July 2004, 21:14 GMT

New version:

- Doesn't show the shutdown dialog if the charger is attached