5

I am very new to HDMI-CEC. I have a Pi3 and a Pi2 connected to a TV's two HDMI ports. If I run:

echo scan | cec-client -s -d 1`

I get the following output:

OpenELEC:~ # echo scan | cec-client -s -d 1
opening a connection to the CEC adapter...
requesting CEC bus information ...
CEC bus information
===================
device #0: TV
address:       0.0.0.0
active source: no
vendor:        Toshiba
osd string:    TV
CEC version:   1.4
power status:  on
language:      eng


device #1: Recorder 1
address:       1.0.0.0
active source: no
vendor:        Toshiba
osd string:    CECTester
CEC version:   1.4
power status:  on
language:      eng


currently active source: unknown (-1)
OpenELEC:~ # 

Two questions:

  1. Why can't CEC detect what is the currently active input?
  2. Why isn't the second Pi being detected (which I would expect to be 2.0.0.0)?
  • I have the exact same issue. I was messing with it this morning trying to figure out how to hack a way to infer the active source. I could not figure it out. My TV is a magnavox, for what that’s worth. – hepcat72 Apr 1 '19 at 15:06
2

Answer

The currently active source is unknown, because none of the devices on the CEC bus are flagged as the active source (i.e. active source: no on each device in your output above).

You can run echo as | cec-client -s -d 1 to set your Raspberry Pi as the active source.

Explanation

There are a few ways to get into this state:

TL;DR; It is up to the TV when and if it designates a source as active in certain scenarios. It is also up to the Raspberry Pi to conform to all of the CEC standards. The 'Active' state won't change unless prompted, so it could just not have been updated depending on how/when it became inactive.

  1. You turned on the TV and switch input to a previously inactive device that did not honor the TV's request to set itself as active.
    From the HDMI Specification:

    The user may select a device to view via the TV user interface. In contrast to the <Active Source> message (which is sent by the current active source to the TV), the <Set Stream Path> is sent by the TV to the source device to request it to broadcast its path using an <Active Source> message.
    [. . .]
    A CEC device at the location specified by the <Set Stream Path> message should come out of the Standby state (if necessary). If and when it has stable video to display, it shall broadcast an <Active Source> message and begin streaming its output.

  2. A device (the Raspberry Pi in your case) did not send an Active Source message, or at some point sent an Inactive Source message (e.g. when the device is powered off).
    From the HDMI Specification (emphasis added):

    When the user has specifically sent the currently active device only to the Standby state (e.g. as the result of a user action using the device's local control, such as its own remote controller), it should send an <Inactive Source> message with its own Physical Address as an operand. It is a manufacturer decision to decide the TV's response: it may, for example, display its own internal tuner, or select another device for display. In these cases, the TV should send a new <Active Source> message with its own Physical Address (0.0.0.0, when displaying its own internal tuner [or another non-HDMI source]), or send a <Set Stream Path> to a new device for display. Note that an <Inactive Source> message can also be sent when the Source Device has no video to be presented to the user, even if the device is not in the Standby state.

  3. You activated another source and unplugged it, or manually sent an <Inactive Source> message from the Pi.
    From the HDMI Specification:

    Whenever a device becomes the new active source it shall broadcast an <Active Source> message. The currently active source shall lose its active source status on receiving an <Active Source> message from another device.

I don't know for sure whether the Raspberry Pi will correctly use CEC to specify itself as the Active Source in these scenarios without cec-client running, but I would think it should. If I had an extra Pi, I'd do some testing to figure it out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.