Skip to content

RDKEMW-6311: Devicesettings plugin interface.#703

Open
santoshcomcast wants to merge 4 commits intodevelopfrom
feature/RDKEMW-6311-devicesettings-interface
Open

RDKEMW-6311: Devicesettings plugin interface.#703
santoshcomcast wants to merge 4 commits intodevelopfrom
feature/RDKEMW-6311-devicesettings-interface

Conversation

@santoshcomcast
Copy link

Reason for change: Add Devicesettings plugin interface. Test Procedure: refer RDKEMW-6311
Risks: High
Signed-off-by:gsanto722 grandhi_santoshkumar@comcast.com

@santoshcomcast santoshcomcast requested a review from a team as a code owner January 8, 2026 09:16
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Documentation Auto-Generated

Documentation has been automatically generated for the changed plugins and committed to this PR branch.

The generated documentation files have been added to the PR for review.

santoshcomcast and others added 4 commits January 23, 2026 11:02
Reason for change: Add Devicesettings plugin interface.
Test Procedure: refer RDKEMW-6311
Risks: High
Signed-off-by:gsanto722 <grandhi_santoshkumar@comcast.com>
Copilot AI review requested due to automatic review settings January 23, 2026 05:32
@santoshcomcast santoshcomcast force-pushed the feature/RDKEMW-6311-devicesettings-interface branch from 6d8adb2 to 67f016a Compare January 23, 2026 05:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new UserPlugin API and a comprehensive DeviceSettingsManager interface set, along with corresponding documentation and ID registrations, to expose device power, volume, and low‑level device settings via COM/JSON-RPC.

Changes:

  • Added IUserPlugin interface (with power state and volume level APIs) and its generated UserPlugin API documentation, and linked it into the docs sidebar.
  • Extended Ids.h with IDs for ID_USER_PLUGIN and multiple ID_DEVICESETTINGS_MANAGER_* interfaces and iterators.
  • Introduced IDeviceSettingsManager.h defining audio, composite-in, display, front panel display, HDMI-in, host, video device, and video port manager interfaces, plus their notification sub‑interfaces and data structures.

Reviewed changes

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

Show a summary per file
File Description
docs/apis/UserPlugin.md New auto-generated API reference for the UserPlugin plugin (methods getDevicePowerState and getVolumeLevel).
docs/_sidebar.md Adds a sidebar entry for the new UserPlugin documentation so it appears in the API reference navigation.
apis/UserPlugin/IUserPlugin.h Defines the IUserPlugin COM/JSON-RPC interface for device power state and volume level retrieval.
apis/Ids.h Allocates unique IDs for ID_USER_PLUGIN and the various IDeviceSettingsManager* interfaces and iterators.
apis/DeviceSettingsManager/IDeviceSettingsManager.h Introduces the IDeviceSettingsManager* family of interfaces and notifications covering audio, composite-in, display, FPD, HDMI-in, host, video device, and video port settings.

- [TextTrack](apis/TextTrack.md)
- [USBDevice](apis/USBDevice.md)
- [USBMassStorage](apis/USBMassStorage.md)
- [User<sup>@</sup>](apis/UserPlugin.md)
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The sidebar entry label User does not match the actual plugin name UserPlugin used in the generated API documentation (UserPlugin Plugin) and the callsign (org.rdk.UserPlugin). To avoid confusion and to stay consistent with other plugin entries (e.g. DisplaySettings, VoiceControl), this entry should be renamed to UserPlugin<sup>@</sup> while keeping the same link target.

Suggested change
- [User<sup>@</sup>](apis/UserPlugin.md)
- [UserPlugin<sup>@</sup>](apis/UserPlugin.md)

Copilot uses AI. Check for mistakes.
Comment on lines +253 to +263
// @brief Audio mode for the respective audio port - raised for every type of port
// @text onAudioModeEvent
// @param audioPortType: audio port type see AudioPortType
// @param audioMode: audio mode - see StereoMode
virtual void OnAudioModeEvent(AudioPortType audioPortType, StereoMode audioMode) { };

// @brief Audio mode for the respective audio port - raised for every type of port
// @text onAudioModeEvent
// @param audioPortType: audio port type see AudioPortType
// @param audioMode: audio mode - see StereoMode
virtual void OnAudioLevelChangedEvent(int32_t audioLevel) { };
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The notification OnAudioLevelChangedEvent has @text and @param documentation copied from OnAudioModeEvent (referring to onAudioModeEvent, audioPortType, and audioMode), which no longer match the method signature that only takes an audioLevel. This will generate an incorrect JSON-RPC event name and misleading documentation; please update the @text tag to a distinct camelCase name (for example onAudioLevelChangedEvent) and adjust the @brief/@param tags to describe the actual audioLevel parameter.

Refer: https://github.com/rdkcentral/entservices-apis/blob/develop/.github/instructions/api_headers_notifications.instructions.md#notification-name-formatting

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +373 to +378
/** Get Audio Level */
// @text GetAudioDucking
// @brief Get Audio Level
// @param handle: handle returned in GetAudioPort()
// @param audioLevel: Audio level
virtual Core::hresult GetAudioLevel(const int32_t handle , float &audioLevel /* @out */) = 0;
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

For the GetAudioLevel API, the JSON-RPC name tag // @text GetAudioDucking is both misnamed (it refers to ducking rather than level) and not in the required camelCase form. This should be updated to a camelCase name that reflects the method, such as getAudioLevel, so that the generated JSON-RPC API surface matches the C++ method purpose.

Refer: https://github.com/rdkcentral/entservices-apis/blob/develop/.github/instructions/api_headers.instructions.md#api--notification-naming-for-interface-and-json-rpc

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +1525 to +1532
/** Select HDMIIn Port. */
// @text selectHDMIInPort
// @brief Get HDMIIn Status
// @param port: Port to select
// @param requestAudioMix: Should audio be mixed on this port
// @param topMostPlane: Should this be on top for display
// @param videoPlaneType: Primary or secondary
virtual Core::hresult SelectHDMIInPort(const HDMIInPort port , const bool requestAudioMix , const bool topMostPlane , const HDMIVideoPlaneType videoPlaneType ) = 0;
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The SelectHDMIInPort API has a @brief Get HDMIIn Status description that is inconsistent with the method name and parameters, which clearly indicate that it selects an HDMI input and configures audio mixing and plane placement. Please update the brief to accurately describe that this method selects an HDMI input port and its presentation options.

Refer: https://github.com/rdkcentral/entservices-apis/blob/develop/.github/instructions/api_headers.instructions.md#documentation-tags-guidelines

Copilot uses AI. Check for mistakes.
Comment on lines +1059 to +1061
// @brief Display HDCP Status
// @text OnDisplayHDCPStatus
virtual void OnDisplayHDCPStatus() {};
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The Display notification OnDisplayHDCPStatus uses a JSON-RPC name tag @text OnDisplayHDCPStatus starting with an uppercase O, which violates the requirement that JSON-RPC names be camelCase. Please change this to a camelCase event name (for example onDisplayHDCPStatus) to align with the other notifications in this interface.

Refer: https://github.com/rdkcentral/entservices-apis/blob/develop/.github/instructions/api_headers_notifications.instructions.md#notification-naming-for-interface-and-json-rpc

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +28 to +29
// @json @text:keep
struct EXTERNAL IUserPlugin : virtual public Core::IUnknown {
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

This interface is marked as JSON-RPC but the @json annotation here is missing a version and uses line comment syntax, which violates the JSON-RPC tagging guidelines and is inconsistent with newer headers like IUserSettings that use /* @json 1.0.0 @text:keep */. Please switch this to a block comment with an explicit version (for example /* @json 1.0.0 @text:keep */) so tooling and docs can correctly version this API.

Refer: https://github.com/rdkcentral/entservices-apis/blob/develop/.github/instructions/api_headers.instructions.md#json-rpc-tagging

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +606 to +618
/** Set Audio Surroud Virtualizer */
// @text setAudioSurroudVirtualizer
// @brief Set Audio Surroud Virtualizer
// @param handle: handle returned in GetAudioPort()
// @param surroundVirtualizer: virtualizer
virtual Core::hresult SetAudioSurroudVirtualizer(const int32_t handle , const SurroundVirtualizer surroundVirtualizer ) = 0;

/** Get Audio Surroud Virtualizer */
// @text getAudioSurroudVirtualizer
// @brief Get Audio Surroud Virtualizer
// @param handle: handle returned in GetAudioPort()
// @param surroundVirtualizer: virtualizer
virtual Core::hresult GetAudioSurroudVirtualizer(const int32_t handle , SurroundVirtualizer &surroundVirtualizer /* @out */) = 0;
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

"Surroud" is misspelled in several related APIs and their JSON-RPC names (EnableAudioSurroudDecoder, IsAudioSurroudDecoderEnabled, setAudioSurroudVirtualizer, getAudioSurroudVirtualizer), which will expose the typo in both C++ and JSON-RPC interfaces and in the generated documentation. Consider correcting these to use the proper spelling "Surround" in both method names and @text tags (for example EnableAudioSurroundDecoder, setAudioSurroundVirtualizer, etc.) to keep the public API surface professional and self-explanatory.

Refer: https://github.com/rdkcentral/entservices-apis/blob/develop/.github/instructions/api_headers.instructions.md#documentation-tags-guidelines

Suggested change
/** Set Audio Surroud Virtualizer */
// @text setAudioSurroudVirtualizer
// @brief Set Audio Surroud Virtualizer
// @param handle: handle returned in GetAudioPort()
// @param surroundVirtualizer: virtualizer
virtual Core::hresult SetAudioSurroudVirtualizer(const int32_t handle , const SurroundVirtualizer surroundVirtualizer ) = 0;
/** Get Audio Surroud Virtualizer */
// @text getAudioSurroudVirtualizer
// @brief Get Audio Surroud Virtualizer
// @param handle: handle returned in GetAudioPort()
// @param surroundVirtualizer: virtualizer
virtual Core::hresult GetAudioSurroudVirtualizer(const int32_t handle , SurroundVirtualizer &surroundVirtualizer /* @out */) = 0;
/** Set Audio Surround Virtualizer */
// @text setAudioSurroundVirtualizer
// @brief Set Audio Surround Virtualizer
// @param handle: handle returned in GetAudioPort()
// @param surroundVirtualizer: virtualizer
virtual Core::hresult SetAudioSurroundVirtualizer(const int32_t handle , const SurroundVirtualizer surroundVirtualizer ) = 0;
/** Get Audio Surround Virtualizer */
// @text getAudioSurroundVirtualizer
// @brief Get Audio Surround Virtualizer
// @param handle: handle returned in GetAudioPort()
// @param surroundVirtualizer: virtualizer
virtual Core::hresult GetAudioSurroundVirtualizer(const int32_t handle , SurroundVirtualizer &surroundVirtualizer /* @out */) = 0;

Copilot uses AI. Check for mistakes.
Comment on lines +1514 to +1517
// @text getHDMIInNumbefOfInputs
// @brief Get Number of HDMI Inputs in the platform
// @param count: number of inputs
virtual Core::hresult GetHDMIInNumbefOfInputs(int32_t &count /* @out */) = 0;
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Both the method name and JSON-RPC tag for GetHDMIInNumbefOfInputs contain a typo (Numbef instead of Number), which will leak into the public API surface and documentation. Please correct the spelling to GetHDMIInNumberOfInputs (and @text getHDMIInNumberOfInputs) so the API name is clear and professional.

Refer: https://github.com/rdkcentral/entservices-apis/blob/develop/.github/instructions/api_headers.instructions.md#documentation-tags-guidelines

Suggested change
// @text getHDMIInNumbefOfInputs
// @brief Get Number of HDMI Inputs in the platform
// @param count: number of inputs
virtual Core::hresult GetHDMIInNumbefOfInputs(int32_t &count /* @out */) = 0;
// @text getHDMIInNumberOfInputs
// @brief Get Number of HDMI Inputs in the platform
// @param count: number of inputs
virtual Core::hresult GetHDMIInNumberOfInputs(int32_t &count /* @out */) = 0;

Copilot uses AI. Check for mistakes.
Comment on lines +2066 to +2079
// @brief On Resolution Pre changed
// @text OnResolutionPreChange
// @param resolution: resolution
virtual void OnResolutionPreChange(const ResolutionChange resolution) {};

// @brief On HDCP Status change
// @text OnHDCPStatusChange
// @param hdcpStatus: HDCP Status
virtual void OnHDCPStatusChange(const HDCPStatus hdcpStatus) {};

// @brief On Video Format update
// @text OnVideoFormatUpdate
// @param videoFormatHDR: Video format HDR standard
virtual void OnVideoFormatUpdate(const HDRStandard videoFormatHDR) {};
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

Several VideoPort notifications use @text tags that are not camelCase (for example OnResolutionPreChange, OnHDCPStatusChange, OnVideoFormatUpdate), even though the JSON-RPC convention is to start names with a lowercase letter. Please update these JSON-RPC event names to camelCase (e.g. onResolutionPreChange, onHDCPStatusChange, onVideoFormatUpdate) so they are consistent with the rest of the API surface.

Refer: https://github.com/rdkcentral/entservices-apis/blob/develop/.github/instructions/api_headers_notifications.instructions.md#notification-naming-for-interface-and-json-rpc

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +594 to +603
// @brief Set Audio Bass Enhancer
// @param handle: handle returned in GetAudioPort()
// @param drcMode: mode
virtual Core::hresult SetAudioDRCMode(const int32_t handle , const int32_t drcMode ) = 0;

/** Get Audio DRC mode */
// @text getAudioDRCMode
// @brief Get Audio Bass Enhancer
// @param handle: handle returned in GetAudioPort()
// @param drcMode: mode
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The SetAudioDRCMode and GetAudioDRCMode APIs have @brief descriptions that still refer to "Audio Bass Enhancer", which does not match the method names or parameters and will confuse consumers. Please update both brief descriptions to explain that these APIs set and get the Dynamic Range Control (DRC) mode rather than the bass enhancer.

Refer: https://github.com/rdkcentral/entservices-apis/blob/develop/.github/instructions/api_headers.instructions.md#documentation-tags-guidelines

Suggested change
// @brief Set Audio Bass Enhancer
// @param handle: handle returned in GetAudioPort()
// @param drcMode: mode
virtual Core::hresult SetAudioDRCMode(const int32_t handle , const int32_t drcMode ) = 0;
/** Get Audio DRC mode */
// @text getAudioDRCMode
// @brief Get Audio Bass Enhancer
// @param handle: handle returned in GetAudioPort()
// @param drcMode: mode
// @brief Set the audio Dynamic Range Control (DRC) mode for the specified port
// @param handle: handle returned in GetAudioPort()
// @param drcMode: Dynamic Range Control (DRC) mode value to be applied
virtual Core::hresult SetAudioDRCMode(const int32_t handle , const int32_t drcMode ) = 0;
/** Get Audio DRC mode */
// @text getAudioDRCMode
// @brief Get the current audio Dynamic Range Control (DRC) mode for the specified port
// @param handle: handle returned in GetAudioPort()
// @param drcMode: Dynamic Range Control (DRC) mode value currently in use

Copilot uses AI. Check for mistakes.
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.

3 participants