After being fed up with dilemma - charge phone while driving or listen to music ( sound quality at reduced power is not really acceptable ) i decided to fix the problem, after doing some research I've came up with couple ideas:
- script that would keep power level constantly at 113 ( or more )
- modify kernel driver to keep power at high level all the time and ignore changes
- modify fmtxd binary
I've decided to go with modifying fmtxd binary ( script would require additional cpu cycles, and power level would go down occasionaly untill script would fix it, kernel modification seemed to be good idea but i've decided that it would be nice to be able to easy go back to normal power levels )
After disassembling it in my favorite disassembler i've noticed that it wouldn't be a problem to disable "feature" of headphone detection as well so modified binary will keep fmtx running at high power regardless of headphones and usb cable.
So, here is the modified fmtxd binary http://maemo.jacekowski.org/binary/fmtxd1.2 http://maemo.jacekowski.org/binary/fmtxd1.3
It's provided as is and without any instructions how to install it.
It still leaves the problem of GUI checking headphones status so you can't enable fmtx from GUI with headphones connected ( fmtx_client can enable it ) but fmtx will keep working after headphones are plugged in.