Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#21035 - 24/10/2000 11:51 Telling the empeg to save its state?
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
When I use a software command to reboot the empeg (now that I've figured out how to do that), it doesn't remember its playlist position.

For example, let's say I plug in the empeg, and it starts playing at song number 30 in the playlist. I let it play for five songs so that it's now playing song number 35. Then I send it the software command to reboot. After the reboot is done, it goes back to song number 30 again, not 35.

If I yank the power instead of telling the software to reboot, it saves the current state to NVRAM just fine and it restarts in the right place.

My question: Is there a software command to tell it to save its state? Something I can send over the serial port (now that I've figured out how to send packets)?

There's a "BuildAndSaveDatabase" command in packets.cpp, but that's probably not it, though, right? Any hints?

___________
Tony Fabris
_________________________
Tony Fabris

Top
#21036 - 25/10/2000 01:32 Re: Telling the empeg to save its state? [Re: tfabris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Perhaps if you send a "restart player" command and then a "reboot unit" command ?

__
Unit serial number 47 (was 330 in the queue)...
_________________________
Remind me to change my signature to something more interesting someday

Top
#21037 - 25/10/2000 07:41 Re: Telling the empeg to save its state? [Re: andy]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Perhaps if you send a "restart player" command and then a "reboot unit" command ?

Nope, those are both "soft" boots which don't trigger the power control PIC to tell the unit to save the state to NVRAM. I'm pretty sure that this is either (a) not do-able, or (b) if it is do-able, it requires a specific command to be sent to the player, a command whose sole purpose is to tell it to save its state.

Keep in mind that the behavior I'm trying to work-around is standard behavior- Even EmpegUpgrade.exe induces this behavior.

___________
Tony Fabris
_________________________
Tony Fabris

Top
#21038 - 25/10/2000 09:52 Re: Telling the empeg to save its state? [Re: tfabris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Keep in mind that the behavior I'm trying to work-around is standard behavior- Even EmpegUpgrade.exe induces this behavior.

Ah, I see. I hadn't noticed that feature...


__
Unit serial number 47 (was 330 in the queue)...
_________________________
Remind me to change my signature to something more interesting someday

Top
#21039 - 25/10/2000 11:17 Re: Telling the empeg to save its state? [Re: andy]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5680
Loc: London, UK
If empegUpgrade fails to save the player state, then it's a bug (or at least a missing feature). Forward a description to [email protected], please.


Roger - not necessarily speaking for empeg
_________________________
-- roger

Top
#21040 - 25/10/2000 11:28 Re: Telling the empeg to save its state? [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31565
Loc: Seattle, WA
Forward a description to [email protected], please.

Done. Thanks.

Is there any available serial command I can send to get the job done in the meantime, or is this just going to be a "bug will be fixed in 1.1" situation?

___________
Tony Fabris
_________________________
Tony Fabris

Top
#21041 - 26/10/2000 15:21 Re: Telling the empeg to save its state? [Re: Roger]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
If the empeg loses power, is the state saved through some kernel-code, is it in hardware, or is a signal sent to /sbin/init ? I know a lot of people have replaced their init...

Frank van Gestel
_________________________
Frank van Gestel

Top
#21042 - 26/10/2000 16:02 Re: Telling the empeg to save its state? [Re: fvgestel]
altman
carpal tunnel

Registered: 19/05/1999
Posts: 3457
Loc: Palo Alto, CA
If the empeg loses power, the state is saved in kernel; if the empeg is instructed to power off (when in car with the accessory line low) by issuing the power off ioctl to /dev/empeg_power, the state is saved.

The state *is not* saved if you do a soft reboot, though. This is a bug, and really needs fixing at kernel level - I'll sort this out for 1.1.

There's an ioctl on /dev/empeg_state which will "clean" the in-memory buffer (ie, flush it to flash).

Hugo



Top