Rockbox

Tasklist

FS#9087 - The wake-up alarm on ipods starts rockbox even if hold is on

Attached to Project: Rockbox
Opened by Johan Swetzén (jswetzen) - Wednesday, 11 June 2008, 21:31 GMT
Task Type Patches
Category Plugins
Status Unconfirmed
Assigned To No-one
Operating System iPod 5G
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

When the wake-up alarm starts up the iPod, you wouldn't want it to boot the OF, but it will do so if hold is on. This patch makes the bootloader check if the alarm is active and start rockbox regardless of the hold state if it is. Also, if the hold switch is on during start up rockbox would normally reset all settings, but this is inactivated if rockbox was started by the alarm.

Applying the patch:
Besides building the firmware, you will need to build and upload the bootloader to your ipod using ipodpatcher.

Limitations:
The bootloader doesn't check if the alarm started ipod, it only checks if the alarm is active. If you have set the alarm you will have to use the MENU button to start the OF.

I don't know if this works on any other iPods than the iPod video, but it will probably work on all of them.
This task depends upon

Comment by Linus Nielsen Feltzing (linusnielsen) - Thursday, 12 June 2008, 06:01 GMT
You can check if the alarm is triggered by checking the ALARM bit in the INT1 register:

if ((button_was_held && (pcf50605_read(0x02) & 0x80)) || (btn==BUTTON_MENU)) {

Comment by Johan Swetzén (jswetzen) - Thursday, 12 June 2008, 10:30 GMT
I'm afraid this doesn't work, (pcf50605_read(0x02) & 0x80) always seems to be true. But luckily the rtc_check_alarm_started(false) function in rtc.h did the trick. There is another problem though, because it seems like the alarm is disabled if you start up the apple firmware.
Comment by Johan Swetzén (jswetzen) - Friday, 20 June 2008, 17:21 GMT
I think this is about as good as it gets, and after a bit of testing maybe this could be ready for svn inclusion?
Comment by Adam West (xxbatman94xx) - Wednesday, 25 June 2008, 02:44 GMT
hmm if the hold is on wouldnt it start the apple firmware instead of rockbox?

just shut down your ipod and dont put the hold switch on
Comment by Johan Swetzén (jswetzen) - Sunday, 29 June 2008, 10:05 GMT
Adam West: Yes, but why would I want to start the apple firmware when I have set the wake-up alarm? There have been times when I forgot to leave the hold switch off (I usually switch it on without thinking), and the alarm had no effect. The patch makes sure that this won't happen.
I can't really see the use of starting the apple firmware with the wake-up alarm, can you?
Comment by Adam West (xxbatman94xx) - Sunday, 06 July 2008, 18:48 GMT
Yea i definently want this once they make a stable version for my ipod photo
one question is this like a permanent change or is it only in effect when u have an alarm set
Comment by Johan Swetzén (jswetzen) - Sunday, 06 July 2008, 20:23 GMT
It's not permanent, this takes effect only if the alarm caused the ipod to start.
Comment by Rosso Maltese (asettico) - Saturday, 17 October 2009, 09:13 GMT
Sync to r23221.

Loading...