Live data from Hacker News

Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

johnlian.net

141–147 of 147 posts

Re: Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

#141
post #110

Earlier quoted context omitted.

You’ve either been meeting the wrong women or you need more rooms. One room where people can sit and talk to each other and a completely different room where people can sit and listen to music or watch a screen. Ideally if you want music in that first room you would put a piano in there, because playing the piano (and singing along) is a social activity that people can actually do together. Neither of these activitie…

So many problems and more money could solve every one of them!

> You’ve either been meeting the wrong women or you need more rooms.

> So many problems and more money could solve every one of them!

More money isn't going to bring him the right woman. They'll more likely attract an even worse type of woman.

Re: Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

#142
post #63

Earlier quoted context omitted.

Much like i2c, any message put on the bus is transmitted to everything on the bus. Version 1.0 and later of the HDMI spec even mandate that you have to connect those pins across all HDMI ports on your device even if you don't do anything with them.

Okay, now I’m curious. If the pins are just connected across all ports, how does the AVR tell which CEC-speaking device is on which port? Chip select or similar pins?

Every device has a logical address that is included in messages.

Re: Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

#143
post #141

Earlier quoted context omitted.

So many problems and more money could solve every one of them!

> You’ve either been meeting the wrong women or you need more rooms. > So many problems and more money could solve every one of them! More money isn't going to bring him the right woman. They'll more likely attract an even worse type of woman.

Well, even a gold digger can amicably agree to split the responsibilities for decorating the rooms of the house, if you have enough of them to specialize a little bit.

Re: Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

#144
post #63

Earlier quoted context omitted.

Much like i2c, any message put on the bus is transmitted to everything on the bus. Version 1.0 and later of the HDMI spec even mandate that you have to connect those pins across all HDMI ports on your device even if you don't do anything with them.

Okay, now I’m curious. If the pins are just connected across all ports, how does the AVR tell which CEC-speaking device is on which port? Chip select or similar pins?

Answering my own question: CEC is electrically unrelated to DDC/EDID. The EDID data tells each source its physical address, and then the devices negotiate over CEC to choose logical addresses and announce their physical addresses. This is one way to design a network, but it’s not what I would have done.

I wonder if a malfunction in this process is responsible for my AVR sometimes auto-switching to the wrong source.

Re: Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

#145
post #28

Earlier quoted context omitted.

> How am I supposed to get the audio to the speakers without a bulky expensive receiver box? You can get a small ARC/eARC audio extractor with RCA or S/PDIF output and use your favorite amplifier or DAC with it.

Correct answer, HDMI audio extractor. Personally I use an eARC extractor to run S/PDIF to an audio interface (MOTU Ultralite Mk5) and an RPi running camilladsp handles room correction and active crossovers. Overkill at the moment for just a few studio monitors and a sub, but it'll be a great solution when I get around to building some custom speakers.

The MOTU Ultralite Mk5 is a nice piece of hardware and is even at a great price point if you use more than a tiny fraction of its capabilities, but it also costs quite a few times the entire cost of the rest of this system :)

If you just want to get the eARC data, any S/PDIF input (USB or I2S-via-hat) would work just as well at 1/20 of the price :)

I want someone to fudge up a multiple shairplay setup (presumably by claiming multiple IP addresses, as AirPlay 2.0 apparently can’t handle multiple sinks at the same address) that can use a single multichannel interface like the Ultralite Mk5. This would make an excellent multizone audio setup at an entirely reasonable price.

Re: Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

#146

A side note: I am very sad that HDMI-CEC apparently can only support like 3 "console-like" devices. I have an Apple TV, Nintendo Switch 2, Sound Bar (eARC) and PS5 hooked up, but only 3 can really interact with CEC. It took me a long time to diagnose why it seemingly wouldn't work with my Nintendo Switch 2. I ended up disabling it on my PS5 because I never use the darn thing, but it kind of stinks since most TV's hav…

Yes I actually run into the same issue and put it down as a footnote on the post

https://johnlian.net/posts/hdmi-cec/#fn:3

Where I talk about the craziness that happens when more than 3 playback devices are on in my system:

> ...if the one playback device (e.g. PS5) was on, changing input to another playback device (e.g. Xbox) was impossible, I'd get a quick black screen and the input snaps back to PS5. This is wild, but fortunately I only use one console at a time so it’s not a big deal.

I remember when I wad losing my mind diagnosing this, I ended up asking ChatGPT for help with deciphering the HDMI-CEC frames when this was happening. It told me about the 3 device limit being the culprit with the line "You’re not crazy, HDMI-CEC is."

Re: Fix HDMI-CEC weirdness with a Raspberry Pi and a $7 cable

#147
post #3

Assuming you’re ok with connecting your receiver to the network, you should be able to wake the receiver if you detect the tv is on without any cables at all - if your tv is also on the network (I’ve got a home assistant automation doing exactly that) or you can use a $10 smart plug with power metering. That said props for actually using HDMI-CEC! And it’s cheaper than most smart plugs (and probably safer, too)

This was actually the first route I considered. Unfortunately the latency was too much.

> My first instinct was to lean on traditional automation stacks: HomeKit scenes to chain “TV on” into “receiver on” or wattage triggers via an Eve Energy plug. This kind of worked, but every extra layer added 30 seconds of lag or more.

Post reply on HN