Rockbox

Tasklist

FS#2105 - Power-On-Boot in car_adapter_mode

Attached to Project: Rockbox
Opened by Ivo Burkart (ivoburkart) - Thursday, 25 March 2004, 23:27 GMT
Last edited by Linus Nielsen Feltzing (linusnielsen) - Wednesday, 14 July 2004, 10:44 GMT
Task Type Patches
Category
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

Details

As requested:

Rockbox powers on and starts to play, if external power
is connected.

WARNING: Rockbox looses ability to save Flip-Display-
Setting, if this patch is applied.
This task depends upon

Closed by  Linus Nielsen Feltzing (linusnielsen)
Wednesday, 14 July 2004, 10:44 GMT
Reason for closing:  Accepted
Additional comments about closing:  Logged In: YES
user_id=259137

Thanks, this is now implemented in CVS.
Comment by Björn Stenberg (zagor) - Friday, 26 March 2004, 08:42 GMT

You are loading the settings before initializing the disk,
which works due to blind luck! (fat_startsector() returns 0
since it's not yet initialized)

You should make this more controlled, for instance by adding
a bool parameter to settings_load() which controls if it
tries to load settings from disk or only from rtc ram.
Comment by Ivo Burkart (ivoburkart) - Friday, 26 March 2004, 17:54 GMT

Yor right. This is only a short-time-solution (it kills flip-display
too), until this feature is implemented into cvs (which i can't
do)
We should store the car-adapter-bool in RTC additional to
flip-display. My problem: I didn't really understand the storage
of setting in RTC nor the amount of Memory available, so i
can't determine, if there is room for another bool/bit.
Comment by Carsten Tschach (tschach) - Thursday, 10 June 2004, 22:12 GMT

I did look into the patch and did a total redesign...

The car_adapter_mode is now stored on a free place in the
RTC. When initializing I only load the car_adapter_mode-
setting from RTC and only if RTC is present. So no RTC, no
automaticly power-on on plugging in the dc connector.

This code must be flashed in the device to work, as it is
initialized in a very early state which - on non rockbox-flashed
devices - is taken over by the original Archos Firmware.

You need to have a device with an RTC, but as I remember
only Studio-Devices doesn't have an RTC, but the also can't
be flashed...so this is a way we can go...

I'll checkout the problem with a totaly empty battery. Maybe
we have to request the battery-status and stay in charging-
mode for a while until automaticly boot...

I would love to hear feedback....

Comment by Carsten Tschach (tschach) - Thursday, 10 June 2004, 22:21 GMT

Well, I don't know how to attach a file here, so I put the diff
on my webserver:

http://www.tschach.de/car_power_on.patch

Comment by Linus Nielsen Feltzing (linusnielsen) - Wednesday, 14 July 2004, 10:44 GMT

Thanks, this is now implemented in CVS.

Loading...