pause on AC

Posted by: thinfourth2

pause on AC - 14/12/2001 18:24

could we have a wee option in the int script so that the player automatically pauses or goes onto standby on AC power as mine goes into its dock when at home and then lives on the network then when it returns to the car it can be a few hours further throught the playlist if i forget to pause it at home.

I don't want a permant pause or standby as i often is called into duty driving the stereo
Posted by: tonyc

Re: pause on AC - 15/12/2001 00:22

It's my belief that this could be accomplished with hijack. I went through a bit of an explanation on how this would be done over in the Programming forum earlier this evening... Basically, the player gets its status (including standby mode and whether it's paused or playing) from the flash. The kernel can give the player phony state data at any time and the player won't be the wiser. So on bootup, Hijack could in theory supply certain values from config.ini instead of the ones from the real flash block. In your case, you would want to define either pause or standby in your config.ini and then hijack would pass that along when booting up. The only caveat would be you want it to only happen on AC power, but since Hijack knows what power source it's on, that shouldn't be a big deal.
Posted by: Dava

Re: pause on AC - 17/12/2001 05:16

I agree that this would be an option that I would want but I would go one step further. The player has a different personality at home and in the car, I never turn mine off in the car but always when I have finished at home.

It is anoying when:

I plug it in at home after being in the car and it starts playing.
Put it in the car and it is off.

IMO, the unit should remember its last state on a particular power source and revert to it.

The empeg is fantasic in that it works differently at home rather than in the car and I think most people use a home and car player very diferently to one another. Therefore this should be one of the differences covered by the personalities.
Posted by: thinfourth2

Re: pause on AC - 17/12/2001 05:41

Hopefully this would be where we will end up as the radio modules can identify different cars and now that it looks like the backup is ending up in the girlfriends car i would like to see the personnalities enabled
Posted by: tonyc

Re: pause on AC - 17/12/2001 11:07

Most of what you're suggesting can definitely be done with Hijack pretty easily. Play/pause status is by default global (same for home and car) but with some creative tweaking I think at least the startup play/pause behavior for each source could be specified. As for actually remembering your state for that source, that can be done, but would take a little extra work (and borrowing another bit from the flash.) Then as the player writes its pause status, the kernel would decide which bit to write that value to (maybe the current pause bit becomes the "home" pause bit, and an unused bit elsewhere becomes the "car" pause bit.) It could definitely be done. Drop it as a suggestion to Mark once some of the startup behavior hacking makes its way into the Hijack kernel.
Posted by: tfabris

Re: pause on AC - 17/12/2001 11:13

Based on various bugs/fixes in the 2.0 software that I've seen, I'm thinking that mucking about with the play/pause behavior might be tricky.
Posted by: tonyc

Re: pause on AC - 17/12/2001 11:18

Can you explain a little more what you mean?
Posted by: tfabris

Re: pause on AC - 17/12/2001 11:24

I mean that, it was tough even for the Empeg guys to get the player and radio to properly pause/unpause at boot-up time, even when they wrote the player software.

Remember that when the player goes into Standby mode, it's simply paused with the display shut off. It's doing something fancy under the hood to get itself back into the proper state at power-up, and it might be tough for you guys to know what's going on "from the outside", as it were.
Posted by: tonyc

Re: pause on AC - 17/12/2001 11:27

Hmm... Well, that's all true. However, the approximate methodology I would see would be to make the player software think it's supposed to start up in (play, pause, standby) mode by changing what it gets when it does a state_read(). Then the player itself can do what it normally does (blanking the display, pausing or playing the songs, etc.) There is definitely a bit in the flash for standby, and for pause... So we as the kernel would stay out of the blanking, pausing, whatever business and just make the player think that the power-save behavior was something different than it actually was..

Does that change your opinion a bit? It seems you're worried about us having to do complex manual operations, when in reality, we're just tricking the player, at least in theory....
Posted by: tfabris

Re: pause on AC - 17/12/2001 11:31

Actually, I'm more concerned about what happens at shutdown time.
Posted by: tonyc

Re: pause on AC - 17/12/2001 11:44

Ohh... um... Not sure what the concern is... The first step I see is allowing startup behaviors to be defined in config.ini, which doesn't involve changing any of the shutdown/power fail stuff, as far as I can tell. Even with the play/pause behavior described above, it seems all that's needed is to see if we're in AC or DC mode (already available to the kernel) and change the way we save the state accordingly, possibly saving one bit in a different location than is currently done. State isn't just written at power fail time, it's also written once per second, so I don't see how shutdowns would hurt us.

I guess you're privy to more of the details and troubles the Empeg team went through, so any specific guidance you could give would be helpful.