Telling the empeg to save its state?

Posted by: tfabris

Telling the empeg to save its state? - 24/10/2000 11:51

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
Posted by: andy

Re: Telling the empeg to save its state? - 25/10/2000 01:32

Perhaps if you send a "restart player" command and then a "reboot unit" command ?

__
Unit serial number 47 (was 330 in the queue)...
Posted by: tfabris

Re: Telling the empeg to save its state? - 25/10/2000 07:41

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
Posted by: andy

Re: Telling the empeg to save its state? - 25/10/2000 09:52

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)...
Posted by: Roger

Re: Telling the empeg to save its state? - 25/10/2000 11:17

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
Posted by: tfabris

Re: Telling the empeg to save its state? - 25/10/2000 11:28

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
Posted by: fvgestel

Re: Telling the empeg to save its state? - 26/10/2000 15:21

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
Posted by: altman

Re: Telling the empeg to save its state? - 26/10/2000 16:02

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