Skip to content

gh#164 Update description of APIs from HDMI and Composite - #188

Open
Dhivyailangovan wants to merge 2 commits into
developfrom
feature/issue-164-hdmi-composite
Open

gh#164 Update description of APIs from HDMI and Composite#188
Dhivyailangovan wants to merge 2 commits into
developfrom
feature/issue-164-hdmi-composite

Conversation

@Dhivyailangovan

@Dhivyailangovan Dhivyailangovan commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Need to update the description of APIs from HDMI( dsHdmiInGetStatus and dsHdmiInSelectPort) and Composite(dsCompositeInGetStatus and dsCompositeInSelectPort) to explain below points
activePort and isPresented will be updated asynchronously in a separate thread, and will be communicated through the (hdmiInStatusChangeCB/dsCompositeInStatusChangeCB) callback.
Fixes #164

Copilot AI review requested due to automatic review settings March 2, 2026 09:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the public header documentation for HDMI-In and Composite-In APIs to describe asynchronous status updates and the use of status-change callbacks, aligning consumer expectations when reading status immediately after state-changing operations.

Changes:

  • Add notes about waiting for status-change callbacks after operations that affect input status.
  • Clarify isPresented update behavior on port selection and add callback-related notes in the select-port docs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
include/dsHdmiIn.h Adds/adjusts Doxygen notes about asynchronous status updates and callback delivery for HDMI-In status.
include/dsCompositeIn.h Adds/adjusts Doxygen notes about asynchronous status updates and callback delivery for Composite-In status.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/dsCompositeIn.h Outdated
Comment thread include/dsHdmiIn.h Outdated
Comment thread include/dsHdmiIn.h Outdated
Comment thread include/dsCompositeIn.h Outdated
@Dhivyailangovan Dhivyailangovan changed the title gh #164 Update description of APIs from HDMI and Composite gh#164 Update description of APIs from HDMI and Composite Mar 2, 2026
@kanjoe24

kanjoe24 commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Can you check if copilot comments are relevant? if not please resolve it.

@Dhivyailangovan
Dhivyailangovan force-pushed the feature/issue-164-hdmi-composite branch from 70c76e8 to 187b426 Compare March 19, 2026 09:56
@Dhivyailangovan

Copy link
Copy Markdown
Contributor Author

Can you check if copilot comments are relevant? if not please resolve it.

Addressed Copilot Comments.

kanjoe24
kanjoe24 previously approved these changes Mar 23, 2026

@kanjoe24 kanjoe24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Comment thread include/dsHdmiIn.h
*
* @warning This API is Not thread safe.
* After any operation that may change ::dsHdmiInStatus_t, dsHdmiInGetStatus()
* may return stale values until ::dsHdmiInStatusChangeCB_t is received.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a SoC limitation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s not really a limitation. On Amlogic, there is a short delay (about 2–3 seconds) before mirroring starts. During this time, dsHdmiInGetStatus() may return old values. Once the callback is received, the status will be correct(For any SOC).

Comment thread include/dsCompositeIn.h Outdated
* @retval dsERR_GENERAL - Underlying undefined platform error
*
* @warning This API is Not thread safe.
* After any operation that may change ::dsHdmiInStatus_t, dsHdmiInGetStatus()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dhivyailangovan , why is HDMI status relevant here for Composite module?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected the lines

@kanjoe24
kanjoe24 self-requested a review March 25, 2026 16:25
Comment thread include/dsHdmiIn.h
@@ -213,7 +216,9 @@ dsError_t dsHdmiInGetStatus (dsHdmiInStatus_t *pStatus);
* @pre dsHdmiInInit() must be called before calling this API.
*
* @note When a port is selected, activePort should be set to true in Please refer ::dsHdmiInStatus_t for that port

@srinivasgtl srinivasgtl Mar 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when a port is selected, activePort should be set to true in? The sentence looks to be incomplete.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing this out. I haven’t modified this line or its logic in this PR.
The sentence means that when a port is selected, activePort should be set to true in dsHdmiInStatus_t (please refer to ::dsHdmiInStatus_t for more details).
If you’d like changes or clarification for this part, may we track it separately so it doesn’t block this PR?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if its a small clarification, let's push it here please

Comment thread include/dsHdmiIn.h
* @note When a port is selected, activePort should be set to true in Please refer ::dsHdmiInStatus_t for that port
* Also, if thT port has an active connection, it should update isPresented to true as well.
* Also, if the port has an active connection, it should update isPresented to true as well.
* Changes to ::dsHdmiInStatus_t are communicated asynchronously via the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this signify?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line means that any updates to ::dsHdmiInStatus_t will be reported asynchronously to the application through the ::dsHdmiInStatusChangeCB_t callback function.

This change addresses https://ccp.sys.comcast.net/browse/RDKEVD-456. Currently, dsHdmiInGetStatus is called immediately after dsHdmiInSelectPort in the "L2_VerifyHdmiInputPortStatus" flow, which causes failures because the status may not be updated yet. By adding this explanation, we highlight that the VTS script should wait for the dsHdmiInStatusChangeCB_t callback before checking the status after selecting a port

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/dsHdmiIn.h
Comment on lines +187 to +188
* may return stale values until ::dsHdmiInStatusChangeCB_t is received.
* After the callback is received, dsHdmiInGetStatus() will return the updated status.

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording "until ::dsHdmiInStatusChangeCB_t is received" is ambiguous/misleading because dsHdmiInStatusChangeCB_t is a callback type, not something that is "received". Consider rephrasing to say the registered status-change callback is invoked/called (and optionally that it's delivered asynchronously).

Suggested change
* may return stale values until ::dsHdmiInStatusChangeCB_t is received.
* After the callback is received, dsHdmiInGetStatus() will return the updated status.
* may return stale values until the ::dsHdmiInStatusChangeCB_t callback has been invoked.
* After the callback has been invoked, dsHdmiInGetStatus() will return the updated status.

Copilot uses AI. Check for mistakes.
Comment thread include/dsHdmiIn.h
Comment on lines 218 to +220
* @note When a port is selected, activePort should be set to true in Please refer ::dsHdmiInStatus_t for that port
* Also, if thT port has an active connection, it should update isPresented to true as well.
* Also, if the port has an active connection, it should update isPresented to true as well.
* Changes to ::dsHdmiInStatus_t are communicated asynchronously via the

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This note sentence is grammatically incomplete: "activePort should be set to true in Please refer ::dsHdmiInStatus_t for that port". It reads like two sentences merged together and makes it unclear where activePort is set. Please rewrite for clarity (e.g., explicitly state activePort is set in the corresponding dsHdmiInStatus_t entry for the selected port).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These updates to say that a status info will be stale until there is a update callback are largely unnecessary.

What is the purpose of the change, why do it?

There is always going to be a race condition where a call to get a status can be different to the callback. This is normal. The callback is asynchronous. The call to get status may just miss the update of the status change and so will be wrong at the time of reading.

The purpose of the callback is to avoid polling of a getStatus() function and so the getStatus() function is allowed to be "stale". At the time of calling the status may not of updated. So what? A callback will eventually arrive with the update and a new read of the status will reflect the callback status unless it coincides with a status change.

Much more important is that get status functions reflects the last callback reported status.

The user should never have to subscribe to a callback for the getstatus functions to get updated. I hope that is the case.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having read more deeply I can now see the problem.
The callback is not the issue.

The issue is that the original dsHdmiInGetStatus() function description is ambiguous.
It should state exactly what the status should be immediately after the call to dsHdmiInSelectPort().
There should probably be a status of "unknown" that can be returned when the status has not updated on select port. Or state that it must wait for the status to be internally updated if ok to block.
Or we could state that after a call to dsHdmiInSelectPort() the status will be "not connected" until detected as connected. Many way it could of been defined.
This is the problem.
The implementation does not know what to do.
If it can make a call to HW and get it immediately then it is OK.
But if it is dependent (internally) on an asynchronous CB to update its internal state then there is no defined way of handling it.

In light of the fact that we do not want to change everything now as a result of a fundamental change to the interface definition to remove the ambiguity then I see that changing the documentation to say until the callback has been received the status may be "stale". But rather than "stale" the correct word is "wrong".

Else we have to fix all implementations, test and release.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, overall, let's not modify the interface for now. Let's handle this from the VTS side, and we will upgrade to tests to wait for the CB before we check the status.

Comment thread include/dsCompositeIn.h
Comment on lines 206 to +210
* @note When a port is selected that port should be set as activePort in ::dsCompositeInStatus_t.
* Also, if there is a signal (ie isPortConnected[that port ID] is true), once active, isPresented should be set to true as well.
*
* Changes to ::dsCompositeInStatus_t are communicated asynchronously via the
* ::dsCompositeInStatusChangeCB_t callback.
*

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description/issue mention that activePort and isPresented are updated "asynchronously in a separate thread" and communicated via the status-change callback. The updated docs mention asynchronous callback delivery, but they don't mention the separate-thread aspect or explicitly call out activePort/isPresented. If that detail is required for API consumers, please reflect it here to match the PR description/issue requirements.

Copilot uses AI. Check for mistakes.

@outdooruseonly outdooruseonly left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having read more deeply I can now see the problem.
The callback is not the issue.

The issue is that the original dsHdmiInGetStatus() function description is ambiguous.
It should state exactly what the status should be immediately after the call to dsHdmiInSelectPort().
There should probably be a status of "unknown" that can be returned when the status has not updated on select port. Or state that it must wait for the status to be internally updated if ok to block.
Or we could state that after a call to dsHdmiInSelectPort() the status will be "not connected" until detected as connected. Many way it could of been defined.
This is the problem.
The implementation does not know what to do.
If it can make a call to HW and get it immediately then it is OK.
But if it is dependent (internally) on an asynchronous CB to update its internal state then there is no defined way of handling it.

In light of the fact that we do not want to change everything now as a result of a fundamental change to the interface definition to remove the ambiguity then I see that changing the documentation to say until the callback has been received the status may be "stale". But rather than "stale" the correct word is "wrong".

Else we have to fix all implementations, test and release.

Comment thread include/dsHdmiIn.h
Comment on lines 218 to +220
* @note When a port is selected, activePort should be set to true in Please refer ::dsHdmiInStatus_t for that port
* Also, if thT port has an active connection, it should update isPresented to true as well.
* Also, if the port has an active connection, it should update isPresented to true as well.
* Changes to ::dsHdmiInStatus_t are communicated asynchronously via the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having read more deeply I can now see the problem.
The callback is not the issue.

The issue is that the original dsHdmiInGetStatus() function description is ambiguous.
It should state exactly what the status should be immediately after the call to dsHdmiInSelectPort().
There should probably be a status of "unknown" that can be returned when the status has not updated on select port. Or state that it must wait for the status to be internally updated if ok to block.
Or we could state that after a call to dsHdmiInSelectPort() the status will be "not connected" until detected as connected. Many way it could of been defined.
This is the problem.
The implementation does not know what to do.
If it can make a call to HW and get it immediately then it is OK.
But if it is dependent (internally) on an asynchronous CB to update its internal state then there is no defined way of handling it.

In light of the fact that we do not want to change everything now as a result of a fundamental change to the interface definition to remove the ambiguity then I see that changing the documentation to say until the callback has been received the status may be "stale". But rather than "stale" the correct word is "wrong".

Else we have to fix all implementations, test and release.

@Ulrond

Ulrond commented Jun 5, 2026

Copy link
Copy Markdown

Triage note (#188, ~95 days old, last activity ~65 days ago, BLOCKED):

This PR for #164 (Update description of APIs from HDMI and Composite) is doc-only and moderate staleness. Status: BLOCKED.

Suggested next step: author check-in. Doc-only PRs tend to slip; a ping from the reviewer side could shake it loose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants