OK I have got my in car detection work around working... which has resulting in a few small programs and a kernel patch... I haven't got around to building it into an upgrade file yet... that will come...

Probably not much use as is to anyone who isn't having problems with their empeg not knowing whether it is in-car or not... but people might want to do something with the tuner test code... or maybe people have another use for the power source override...

Files are available from http://www.ned.dem.csiro.au/CovilKim/empeg/ again... I am happy for these to go to riocar.org... but am not exactly sure where the programs should go...?

Cheers

Kim

Excerpt:

powersource ioctl kernel patch

Patch to allow the power source detected via the external power connector to be overridden by an ioctl call. User space may now set the power source shown in /proc/empeg_power irrespective of what is detected internally. This is part of a work around for faulty detection hardware.


setpowersource

A small program to call the ioctl provided in the powersource-ioctl patch. Takes one integer command line parameter of 0, 1 or 2 and passes it through to the ioctl. 0 = don't override autodetection, 1 = set power source to show DC (Battery), 2 = set power source to show mains (AC)

tunertest

A small program to send a test packet to /dev/ttyS0 and see whether a tuner is attached and will respond. Exits with a status of 0 if it finds a tuner attached <0 if it fails to find a tuner. It should print the id of the tuner it finds if it finds one.

car-detect

A combination of tunertest and setpowersource to work around faulty power source detection hardware not allowing the player to differentiate between in car and in house use. The program looks for a tuner and if it finds one overrides the power detection to show in car use.