-
Notifications
You must be signed in to change notification settings - Fork 6
virtual hdmi analyzer changes #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thanushreevani
wants to merge
7
commits into
feature/gh177-hdmianalyzer
Choose a base branch
from
feature/issue214_virtual_hdmianalyser
base: feature/gh177-hdmianalyzer
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
152c430
gh #214 add hdmi controller changes for hdmi output
thanushreevani 1f30ff3
gh #214 uodate changes
thanushreevani 055b22d
gh #214 added HdmiInput changes
f73c362
gh #214 minor changes
thanushreevani 7464893
gh #214 update hdmiinput minor change
7188138
gh #214 addressed copilot comments
thanushreevani 594dd7d
gh #214 updated minor change
thanushreevani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,8 @@ | |
|
|
||
| from framework.core.logModule import logModule | ||
| from framework.core.hdmiAnalyserModules.m42h import M42hController | ||
| from framework.core.hdmiAnalyserModules.virtualHdmiController import virtualHdmiController | ||
| from framework.core.hdmiAnalyserModules.manualHdmiController import manualHdmiController | ||
|
|
||
|
|
||
| class HDMIAnalyserController(): | ||
|
thanushreevani marked this conversation as resolved.
|
||
|
|
@@ -43,8 +45,12 @@ class HDMIAnalyserController(): | |
|
|
||
| Supported types: | ||
| ``m42h`` – Teledyne LeCroy Quantumdata M42h 96G Video Analyser/Generator. | ||
| ``manual-hdmi-controller`` – SSH-based controller for manual HDMI device | ||
| interaction via a control port. | ||
| ``virtual-hdmi-controller`` – SSH-based controller for virtual HDMI device | ||
| interaction via a control port (used in simulation/test environments). | ||
|
|
||
| Rack-config example:: | ||
| Rack-config example (m42h):: | ||
|
|
||
| hdmiAnalyserController: | ||
| type: "m42h" | ||
|
|
@@ -53,12 +59,26 @@ class HDMIAnalyserController(): | |
| user: "qd" # optional, defaults to "qd" | ||
| passwd: "qd" # optional, defaults to "qd" | ||
| card: 4 # optional card number | ||
|
|
||
| Rack-config example (manual-hdmi-controller / virtual-hdmi-controller):: | ||
|
|
||
| hdmiAnalyserController: | ||
| type: "manual-hdmi-controller" # or "virtual-hdmi-controller" | ||
| address: "192.168.0.51" | ||
| port: 22 | ||
| username: "admin" | ||
| password: "secret" | ||
| prompt: "~#" | ||
| device: "hdmi" # used to resolve <device>_control_port | ||
| source_control_port: 8080 # optional, defaults to 8080 | ||
| sink_control_port: 8081 | ||
|
Comment on lines
+70
to
+74
|
||
| """ | ||
|
|
||
| def __init__(self, log: logModule, config: dict): | ||
| self._log = log | ||
| self.controllerType = config.get("type") | ||
| self.host = config.get("host") | ||
| self.devicetype=config.get("device", "") | ||
|
|
||
| if self.controllerType == "m42h": | ||
| self.hdmiAnalyser = M42hController( | ||
|
|
@@ -68,6 +88,27 @@ def __init__(self, log: logModule, config: dict): | |
| passwd=config.get("passwd", "qd"), | ||
| card=config.get("card"), | ||
| ) | ||
| elif self.controllerType == "manual-hdmi-controller": | ||
| #if self.controllerType == "manual-hdmi-controller": | ||
|
thanushreevani marked this conversation as resolved.
thanushreevani marked this conversation as resolved.
|
||
| self.hdmiAnalyser = manualHdmiController(self._log, | ||
|
thanushreevani marked this conversation as resolved.
Comment on lines
+91
to
+93
|
||
| host=config.get("address", ""), | ||
| port=config.get("port", 22), | ||
|
thanushreevani marked this conversation as resolved.
|
||
| user=config.get("username", ""), | ||
| passwd=config.get("password", ""), | ||
| prompt=config.get('prompt', '~#'), | ||
| control_port=config.get(f'{self.devicetype}_control_port', 8080), | ||
| device=self.devicetype, | ||
| ) | ||
| elif self.controllerType == "virtual-hdmi-controller": | ||
| self.hdmiAnalyser = virtualHdmiController(self._log, | ||
| host=config.get("address", ""), | ||
| port=config.get("port", 22), | ||
| user=config.get("username", ""), | ||
| passwd=config.get("password", ""), | ||
| prompt=config.get('prompt', '~#'), | ||
| control_port=config.get(f'{self.devicetype}_control_port', 8080), | ||
| device=self.devicetype, | ||
| ) | ||
| else: | ||
| raise ValueError( | ||
| f"Unsupported hdmiAnalyserController type: '{self.controllerType}'" | ||
|
|
@@ -191,3 +232,207 @@ def set_hdcp_mode(self, mode: str): | |
| def snapshot(self) -> dict: | ||
| self._log.info("Taking analyser snapshot") | ||
| return self.hdmiAnalyser.snapshot() | ||
|
|
||
| # ── HDMI output ───────────────────────────────────────────────────── | ||
|
|
||
| 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) | ||
|
thanushreevani marked this conversation as resolved.
Comment on lines
+238
to
+249
|
||
|
|
||
| def sendFrameRateChanged(self, port: int): | ||
| """ | ||
| Send a frame rate changed event for the HDMI output port. | ||
|
|
||
| Args: | ||
| port (int): HDMI output port number. | ||
|
|
||
| Returns: | ||
| bool: True if message/event handled successfully. | ||
| """ | ||
| return self.hdmiAnalyser.sendFrameRateChanged(port) | ||
|
thanushreevani marked this conversation as resolved.
|
||
|
|
||
| def setHDCPStatus(self, port: int, status: str, version: str): | ||
| """ | ||
| Set HDCP status for the HDMI output port. | ||
|
|
||
| Args: | ||
| port (int): HDMI output port number. | ||
| status (str): HDCP status string. | ||
| version (str): HDCP version string. | ||
|
|
||
| Returns: | ||
| bool: True if message/event handled successfully. | ||
| """ | ||
| return self.hdmiAnalyser.setHDCPStatus(port, status, version) | ||
|
thanushreevani marked this conversation as resolved.
|
||
|
|
||
| def setHotplugState(self, port: int, connected: bool, version: str = "VERSION_2_X"): | ||
| """ | ||
| Set hotplug state for the HDMI output port. | ||
|
|
||
| Args: | ||
| port (int): HDMI output port number. | ||
| connected (bool): True if connected, False if disconnected. | ||
| version (str): HDCP version string. Defaults to "VERSION_2_X". | ||
|
|
||
| Returns: | ||
| bool: True if message/event handled successfully. | ||
| """ | ||
| return self.hdmiAnalyser.setHotplugState(port, connected, version) | ||
|
|
||
| def setHDCPVersion(self, port: int, hdcp_version: str): | ||
| """ | ||
| Set the HDCP version for the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| hdcp_version (str): HDCP version string. (VERSION_1_X, VERSION_2_X, UNDEFINED) | ||
| Returns: | ||
| bool: True if HDCP version set successfully. | ||
| """ | ||
| return self.hdmiAnalyser.setHDCPVersion(port, hdcp_version) | ||
|
|
||
| def validateEdid(self, port: int, expected_edid: list): | ||
| """ | ||
| Validate the EDID data for the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| expected_edid (list): Expected EDID data bytes. | ||
| Returns: | ||
| bool: True if EDID data matches expected values. | ||
| """ | ||
| return self.hdmiAnalyser.validateEdid(port, expected_edid) | ||
|
|
||
| def sendAudioInfoFrame(self, port: int, data: list): | ||
| """ | ||
| Send an Audio Info Frame message to the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| data (list): Audio info frame data bytes. | ||
|
|
||
| Returns: | ||
| bool: True if message sent successfully. | ||
| """ | ||
| return self.hdmiAnalyser.sendAudioInfoFrame(port, data) | ||
|
|
||
| def sendAVIInfoFrame(self, port: int, data: list): | ||
| """ | ||
| Send an AVI Info Frame message to the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| data (list): AVI info frame data bytes. | ||
|
|
||
| Returns: | ||
| bool: True if message sent successfully. | ||
| """ | ||
| return self.hdmiAnalyser.sendAVIInfoFrame(port, data) | ||
|
|
||
| def sendDRMInfoFrame(self, port: int, data: list): | ||
| """ | ||
| Send a DRM Info Frame message to the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| data (list): DRM info frame data bytes. | ||
|
|
||
| Returns: | ||
| bool: True if message sent successfully. | ||
| """ | ||
| return self.hdmiAnalyser.sendDRMInfoFrame(port, data) | ||
|
|
||
| def setSignalStatus(self, port: int, signal_state: str): | ||
| """ | ||
| Set the signal status for the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| signal_state (str): Signal state string (e.g., 'LOCKED', 'NO_SIGNAL'). | ||
|
|
||
| Returns: | ||
| bool: True if message sent successfully. | ||
| """ | ||
| return self.hdmiAnalyser.setSignalStatus(port, signal_state) | ||
|
|
||
| def sendSPDInfoFrame(self, port: int, data: list): | ||
| """ | ||
| Send an SPD Info Frame message to the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| data (list): SPD info frame data bytes. | ||
|
|
||
| Returns: | ||
| bool: True if message sent successfully. | ||
| """ | ||
| return self.hdmiAnalyser.sendSPDInfoFrame(port, data) | ||
|
|
||
| def sendVSIFInfoFrame(self, port: int, data: list): | ||
| """ | ||
| Send a Vendor Specific Info Frame message to the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| data (list): Vendor specific info frame data bytes. | ||
|
|
||
| Returns: | ||
| bool: True if message sent successfully. | ||
| """ | ||
| return self.hdmiAnalyser.sendVSIFInfoFrame(port, data) | ||
|
|
||
| def SetVIC(self, port: int, vic: str): | ||
| """ | ||
| Set the Video Identification Code (VIC) for the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| vic (str): Video Identification Code string. | ||
|
|
||
| Returns: | ||
| bool: True if message sent successfully. | ||
| """ | ||
| return self.hdmiAnalyser.SetVIC(port, vic) | ||
|
|
||
| def setVRRStatus(self, port: int, vrrActive: bool,M_CONST: bool, fastVActive: bool, frameRate: float): | ||
| """ | ||
| Abstract method to set the Variable Refresh Rate (VRR) status for the HDMI input port. | ||
|
|
||
| Args: | ||
| port (int): HDMI input port number. | ||
| vrrActive (bool): VRR enabled status. | ||
| M_CONST (bool): M_CONST status. | ||
| fastVActive (bool): Fast V Active status. | ||
| frameRate (float): Frame rate value. | ||
|
|
||
| Returns: | ||
| bool: True if message sent successfully. | ||
| """ | ||
| return self.hdmiAnalyser.setVRRStatus(port, vrrActive, M_CONST, fastVActive, frameRate) | ||
|
|
||
| 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() | ||
|
Comment on lines
+422
to
+438
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
28 changes: 28 additions & 0 deletions
28
framework/core/hdmiAnalyserModules/commands/hdmiinput_audioinfo_frame.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #** ***************************************************************************** | ||
| # * | ||
| # * If not stated otherwise in this file or this component's LICENSE file the | ||
| # * following copyright and licenses apply: | ||
| # * | ||
| # * Copyright 2026 RDK Management | ||
| # * | ||
| # * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # * you may not use this file except in compliance with the License. | ||
| # * You may obtain a copy of the License at | ||
| # * | ||
| # * | ||
| # * http://www.apache.org/licenses/LICENSE-2.0 | ||
| # * | ||
| # * Unless required by applicable law or agreed to in writing, software | ||
| # * distributed under the License is distributed on an "AS IS" BASIS, | ||
| # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # * See the License for the specific language governing permissions and | ||
| # * limitations under the License. | ||
| # * | ||
| #** ****************************************************************************** | ||
|
|
||
| hdmiinput: | ||
| command: audioinfo_frame | ||
| description: Sends the audioinfo frame to HDMI input ports | ||
| params: | ||
| port: 0 | ||
| data: [0x84, 0x01, 0x0A, 0x70, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] |
28 changes: 28 additions & 0 deletions
28
framework/core/hdmiAnalyserModules/commands/hdmiinput_aviinfo_frame.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #** ***************************************************************************** | ||
| # * | ||
| # * If not stated otherwise in this file or this component's LICENSE file the | ||
| # * following copyright and licenses apply: | ||
| # * | ||
| # * Copyright 2026 RDK Management | ||
| # * | ||
| # * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # * you may not use this file except in compliance with the License. | ||
| # * You may obtain a copy of the License at | ||
| # * | ||
| # * | ||
| # * http://www.apache.org/licenses/LICENSE-2.0 | ||
| # * | ||
| # * Unless required by applicable law or agreed to in writing, software | ||
| # * distributed under the License is distributed on an "AS IS" BASIS, | ||
| # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # * See the License for the specific language governing permissions and | ||
| # * limitations under the License. | ||
| # * | ||
| #** ****************************************************************************** | ||
|
|
||
| hdmiinput: | ||
| command: aviinfo_frame | ||
| description: Sends the AV InfoFrame to HDMI input ports | ||
| params: | ||
| port: 0 | ||
| data: [0x82, 0x02, 0x0D, 0x6F, 0x10, 0x18, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] |
28 changes: 28 additions & 0 deletions
28
framework/core/hdmiAnalyserModules/commands/hdmiinput_connection_status.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #** ***************************************************************************** | ||
| # * | ||
| # * If not stated otherwise in this file or this component's LICENSE file the | ||
| # * following copyright and licenses apply: | ||
| # * | ||
| # * Copyright 2026 RDK Management | ||
| # * | ||
| # * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # * you may not use this file except in compliance with the License. | ||
| # * You may obtain a copy of the License at | ||
| # * | ||
| # * | ||
| # * http://www.apache.org/licenses/LICENSE-2.0 | ||
| # * | ||
| # * Unless required by applicable law or agreed to in writing, software | ||
| # * distributed under the License is distributed on an "AS IS" BASIS, | ||
| # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # * See the License for the specific language governing permissions and | ||
| # * limitations under the License. | ||
| # * | ||
| #** ****************************************************************************** | ||
|
|
||
| hdmiinput: | ||
| command: connection_status | ||
| description: Sends the connection status of HDMI input ports. | ||
| params: | ||
| port: 0 | ||
| connected: true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.