virtual hdmi analyzer changes#215
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the framework’s HDMI analyser support to enable HDMI output–related event injection by adding new analyser backends (virtual + manual) and wiring them into the existing HDMIAnalyserController facade and testController.
Changes:
- Expose
hdmiAnalyserControllerontestControllerfor easier access in tests. - Add
virtualHdmiControllerandmanualHdmiControllerbackends and register them inHDMIAnalyserController. - Add YAML command templates for HDMI output events (EDID read, frame-rate change, HDCP status, hotplug state).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/core/testControl.py | Exposes self.hdmiAnalyserController from the DUT. |
| framework/core/hdmiAnalyserModules/virtualHdmiController.py | New virtual controller that sends HDMI output events to utPlaneController. |
| framework/core/hdmiAnalyserModules/manualHdmiController.py | New manual controller intended for interactive hotplug handling. |
| framework/core/hdmiAnalyserModules/commands/hdmioutput_hotplug_state.yaml | Adds YAML template for hotplug state event. |
| framework/core/hdmiAnalyserModules/commands/hdmioutput_hdcp_status.yaml | Adds YAML template for HDCP status event. |
| framework/core/hdmiAnalyserModules/commands/hdmioutput_frame_rate_changed.yaml | Adds YAML template for frame-rate changed event. |
| framework/core/hdmiAnalyserModules/commands/hdmioutput_edid_read.yaml | Adds YAML template for EDID read event. |
| framework/core/hdmiAnalyserController.py | Registers new backend types and adds HDMI-output event facade methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
| def setHDCPStatus(self, port: int, status: str, version: str): | ||
| if self.analyserdevice == "sink": | ||
| with open(HDMIOUT_HDCP_STATUS_CMD_TEMPLATE, 'r') as f: | ||
| msg = yaml.safe_load(f) | ||
| msg['hdmioutput']['params']['port'] = port | ||
| msg['hdmioutput']['params']['status'] = status | ||
| msg['hdmioutput']['params']['version'] = version | ||
| elif self.analyserdevice == "source": | ||
| with open(HDCP_STATUS_CMD_TEMPLATE, 'r') as f: | ||
| msg = yaml.safe_load(f) | ||
| msg['hdmiinput']['params']['port'] = port | ||
| msg['hdmiinput']['params']['state'] = status | ||
| msg['hdmiinput']['params']['version'] = version | ||
| yaml_str = yaml.dump(msg) | ||
| return self.utPlaneController.sendMessage(yaml_str) |
| def setHotplugState(self, port: int, connected: bool, version: str): | ||
| if self.analyserdevice == "sink": | ||
| with open(HPD_STATUS_CMD_TEMPLATE, 'r') as f: | ||
| msg = yaml.safe_load(f) | ||
| msg['hdmioutput']['params']['port'] = port | ||
| msg['hdmioutput']['params']['connected'] = connected | ||
| elif self.analyserdevice == "source": | ||
| with open(CONNECTION_STATUS_CMD_TEMPLATE, 'r') as f: | ||
| msg = yaml.safe_load(f) | ||
| msg['hdmiinput']['params']['port'] = port | ||
| msg['hdmiinput']['params']['connected'] = connected | ||
| yaml_str = yaml.dump(msg) | ||
| return self.utPlaneController.sendMessage(yaml_str) |
| def connect(self): | ||
| return True | ||
|
|
||
| def disconnect(self): | ||
| return True |
| print(f"Validate EDID for HDMI input port {port} with expected data {expected_edid} Done") | ||
| return True |
| print(f"SetHDCP version '{hdcp_version}' for HDMI input port {port} Done") | ||
| return True |
| password: "secret" | ||
| prompt: "~#" | ||
| device: "hdmi" # used to resolve <device>_control_port | ||
| source_control_port: 8080 # optional, defaults to 8080 | ||
| sink_control_port: 8081 |
| elif self.controllerType == "manual-hdmi-controller": | ||
| #if self.controllerType == "manual-hdmi-controller": | ||
| self.hdmiAnalyser = manualHdmiController(self._log, |
| def sendEDIDRead(self, port: int, data: list): | ||
| """ | ||
| Send an EDID read event for the HDMI output port. | ||
|
|
||
| Args: | ||
| port (int): HDMI output port number. | ||
| data (list): EDID data bytes. | ||
|
|
||
| Returns: | ||
| bool: True if message/event handled successfully. | ||
| """ | ||
| return self.hdmiAnalyser.sendEDIDRead(port, data) |
|
This isn't correct, you can't merge feature branches into feature branches. This needs to wait until #212 is merged. Then this will need to be rebased on develop. Before it can be reviewed and merged. |
There was a problem hiding this comment.
I don't think we can name this just virtualHDMIController. Since it is specific to the RDK Vdevice.
| def start(self): | ||
| """ | ||
| Start the HDMI controller. | ||
|
|
||
| Returns: | ||
| None | ||
| """ | ||
| return self.hdmiAnalyser.start() | ||
|
|
||
| def stop(self): | ||
| """ | ||
| Stop the HDMI controller. | ||
|
|
||
| Returns: | ||
| None | ||
| """ | ||
| return self.hdmiAnalyser.stop() No newline at end of file |
There was a problem hiding this comment.
This is unnecessary. Neither of the new controllers do anything when you run the start and stop and the m42h doesn't have start and stop. The controllers can't have more methods than the interface, that just means it'll break when we swap to different equipment.
Updated the hdmi controller related changes for hdmi output