Is there a file to watch to get HDMI input state

I’m using a hdmi/csi frame grabber and want to know if there is a file to watch that would contains the HDMI state.
The chip is the tc358743. I can use v4l2-ctrl to get the status but would like to use inotify and wait for the file that contains the status information to change. I would like to receive an event and not poll if at all possible. Thanks in advance.

hello Tom_Bond,

it’s a HDMI2CSI bridge, you should see sysfs node, /dev/videoX created, you may launch camera app to access the stream.
I’m not quite understand your request. what exactly you’re asking for. could you please describe the use-case.
thanks

Hi Jerry,

I really just want to know when there is and isn’t an HDMI source available(much like what is provided by file /sys/devices/virtual/switch/hdmi/state for HDMI output state) that feeds the HDMI frame grabber so I can take appropriate action. I would just like to watch a file using inotify to know when these 2 states occur.

Thanks.

hello Tom_Bond,

there’s a node to indicate whether the streaming is outputting. i.e. /sys/kernel/debug/camera-video0/streaming
however, there should be TPG if the sources disconnected for some of the HDMI2CSI bridges. in this case, you’ll need to check the status register to confirm the existence of HDMI sources.

Hi Jerry,

No such file.What is TPG? Do you mean I can use the i2c bus to get register info for the frame grabber?

it’s a test-pattern-generator. it usually a color bar for sending to CSI.

yes, you’ll need to dig into sensor spec for the status register.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.