I don't think that was the problem, but the only way that I can see to initialise the tone controls at boot so that the player doesn't overwrite them again is to hijack the ioctls for writing the eq completely, but that wouldn't allow users to tweak f or q settings through the eq, which currently works. In the long run, I would hope to crack the register format for f and q, so that these could be tweaked through config.ini, so this isn't earth-shattering. If I did this, I could create a store of what the player thinks it has set the eq too, and return it in the read ioctl.
But I don't think that this was the real cause of the issue with the player bombing out. I discovered that a bug in my code was setting one of the register words to 0, and I think that this was causing the problem.
I do know that the tone controls work great after they are initialized through the hijack menu, and that I am able to switch between tweaking tone and eq without killing the player. Of course, the hex codes that I am using for the f and q are the same as those generated by the player eq, so it may be that the player uses a LUT to generate these values and does a reverse lookup for it's display, and that this could cause a problem if the register value doesn't match the LUT. But I'm guessing that a LUT for this would be huge, and direct calcuation is the way it is done, and maybe I caused an overflow with the bad setting. This argument would be reinforced by my experiences with the gain setting, as I have coded 0.5dB increments, whereas the player eq only allows integer increments, yet my code works.
But before I hack around the eq ioctls, do have a suggestion for where to place a tone_init call, that occurs after the player starts?
I looked quickly at the idea of placing a trap in the ir_translate code, so that the first keypress would init the tone controls, but there's several issues with doing that.
I noticed hijack_player_started in hijack_notify.c, but I don't understand that code very well. Is somewhere in there a good place to call a tone_init function?
Oh, I've found the quick and easy solution. Set another fake button to call the init function, and use an initial= feature of ir_translate.
_________________________
Mk2a 60GB Blue. Serial 030102962
sig.mp3: File Format not Valid.