Skip to content

Commit

Permalink
Merge pull request #208 from rdkcentral/patch/hdmi-select
Browse files Browse the repository at this point in the history
feat: Patch/hdmi select
  • Loading branch information
jlacivita authored Dec 11, 2023
2 parents 9915d7b + 840b96a commit 4066770
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 1 deletion.
27 changes: 26 additions & 1 deletion requirements/specifications/hardware/hdmi-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL
- [8.2. Auto Low Latency Mode Signalled](#82-auto-low-latency-mode-signalled)
- [8.3. Port Auto Low Latency Mode Capable](#83-port-auto-low-latency-mode-capable)
- [8.3.1. Port Auto Low Latency Mode Capable Changed Notification](#831-port-auto-low-latency-mode-capable-changed-notification)

- [9. HDMI Port managing active source](#9-hdmi-port-managing-active-source)
## 3. All Ports
The `HDMIInput` module **MUST** have a `ports` method that lists all physical HDMI input ports on the device.

Expand Down Expand Up @@ -286,3 +286,28 @@ HDMIInput.autoLowLatencyModeCapableChanged((data) => {
`port` - the HDMI port that had an E-EDID ALLM advertisement change.

The `onAutoLowLatencyModeCapableChanged` API requires `use` access to the `xrn:firebolt:capability:inputs:hdmi` capability.


## 9. HDMI Port managing active source

The `HDMIInput` module **MUST** have `open` and `close` method(s) that manages the active source of on a single HDMI port.

The `HDMIInput.open` **MUST** include a `portId` field complying to the schema of `HDMIPortId`

The `HdmiInput.open` and `HDMIInput.close` API(s) **MUST** return an `empty` object for a successful operation, if there was an error the response **Must** contain the details of the error.

The `HdmiInput.open` and `HDMIInput.close` API requires `manage` access to the `xrn:firebolt:capability:inputs:hdmi` capability.

Below is an example for opening a given HDMIPort.
```javascript
HDMIInput.open('HDMI1').then(() => {
console.log("Successfully opened HDMI1 port");
})
```

Below is an example for closing last active source.
```javascript
HDMIInput.close().then(() => {
console.log("Successfully closed HDMI1 port");
})
```
72 changes: 72 additions & 0 deletions src/openrpc/hdmi-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,78 @@
}
]
},
{
"name": "open",
"tags": [
{
"name": "capabilities",
"x-manages": [
"xrn:firebolt:capability:inputs:hdmi"
]
}
],
"summary": "Opens the HDMI Port allowing it to be the active source device. Incase there is a different HDMI portId already set as the active source, this call would stop the older portId before opening the given portId.",
"params": [
{
"name": "portId",
"schema": {
"$ref": "#/components/schemas/HDMIPortId"
},
"required": true
}
],
"result": {
"name": "port",
"schema": {
"const": null
}
},
"examples": [
{
"name": "Default Example for open",
"params": [
{
"name": "portId",
"value": "HDMI1"
}
],
"result": {
"name": "port",
"value": null
}
}
]
},
{
"name": "close",
"tags": [
{
"name": "capabilities",
"x-manages": [
"xrn:firebolt:capability:inputs:hdmi"
]
}
],
"summary": "Closes the given HDMI Port if it is the current active source for HDMI Input. If there was no active source, then there would no action taken on the device.",
"params": [],
"result": {
"name": "port",
"schema": {
"const": null
}
},
"examples": [
{
"name": "Default Example for stop",
"params": [
],
"result": {
"name": "port",
"value": null
}
}
]
},
{
"name": "onConnectionChanged",
"tags": [
Expand Down

0 comments on commit 4066770

Please sign in to comment.