HDMI DDC and CEC are completely separate solutions to essentially the same problem. DDC is the older one, and hails from a time when it was computers talking to monitors. DDC can, in principle, do a lot of things but the most well-supported feature is power management.

DDC operates over i2c using a pair of lines in the HDMI cable. This project will implement an i2c slave to watch for the power management stuff going by. Rather than interrupt the DDC bus or anything like that, it will be a simple hardware pass-through with the local controller spying. This ought to be fine - if DDC actually worked on the TV, we wouldn't need this project in the first place.

CEC is a one-wire PWM system with very strict timing. Each bit is a specific width and the difference between a 0 and a 1 is in the percentage of the bit period that's asserted. Like i2c, CEC is an open-drain bus, so a bit can be "stretched" by another device on the bus, in principle.

The dongle here is just going to be a pair of HDMI jacks wired straight through one to the other, but with local taps on the 3 pins providing the DDC and CEC busses and 5 volt power. For the first version, I'm going to do this with an ATXmega32E5 just because I like them a lot. If the firmware turns out to be a lot easier, I might try backing down to an ATTiny or something like that.

To do the open-drain thing for CEC, the plan is to bit-bang the data-direction register bit for the pin in question, keeping the output set low and then using it as an input both to make it high impedance and to be able to test for bit stretching.

Since the XMega supports i2c natively, it ought to be rather simple to implement an i2c slave in it.