Okay, I found the code that takes care of this stuff. Normally, the player application will see that ACC (ACCessory) power went away, and then call into the empeg_power driver with ioctl(fd,EMPEG_POWER_TURNOFF) to turn things off.

So I suppose what we could do, is have Hijack poll the ACC power status (only when on DC power), and do a timed power off as a failsafe. Say, allow 30 seconds or something for the player to do it normally, and force it off if that time limit expires.

Isn't there a setting somewhere for how long to keep the power on after ACC goes off? Hijack could use that value, plus a little, as its timeout.

Edit: Yes, there is such a setting in config.ini:

[power]
off_timeout=3000

I'll implement this later today. Remind me if I forget though!


Edited by mlord (31/05/2014 16:28)