tweakradje wrote:If only he knew of the existence of irfake.
Well, now "he" knows
Thanks for pointing me to irfake, as this is exactly the kind of utility I was looking for!
Basically, the way I was planning to implement cecd, with regards to forwarding HDMI-CEC remote control commands was:
- The cecd configuration file (typically /etc/cecd.conf) would contain a list of the HDMI-CEC codes that the end user wants to support (as per table 27 of the HDMI-CEC specs), with the value they want to translate them to. Now that I've seen how irfake does it, it looks like we basically had the same idea, though I hadn't thought of supporting sequence of commands (great idea!!), and wasn't too sure about codes that should translate to actual commands, such as shutdown, etc.
- it would also contain the location of a file or device that can be fed these commands. My understanding is that I can use /dev/venus_irrp directly (which seems to be what irfake does, after it moves it to shadow_irrp). So you'd have "target /dev/venu_irrp" (or "target /dev/shadow_irrp" if irfake is also in use) line in the conf as well.
There is definitely a great deal of irfake that I could reuse, so I have to ask:
1.
Is the source available? Haven't be able to locate it so far...
2. Would it be possible to break irfake into the part that does code/sequence conversion, according to the content of a .conf file, and the part that actually reads IR data. Obviously, I pretty much need everything from irfake apart from the creation of the shadow_irrp device and the IR reader, since I'm going to use HDMI-CEC here. If irfake could be split into the part that provides decoding/writing and the rest, then I could just reuse that.