From ac5df54aa3ef10dfa2a6204166b5c3073132ee6c Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Sun, 24 Aug 2025 18:58:33 +0530 Subject: [PATCH 01/10] topic/RDKEMW6161 Notification Interface devicesettings --- ds/host.cpp | 142 +++++++++++++++++++++++++++- ds/include/host.hpp | 223 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 360 insertions(+), 5 deletions(-) diff --git a/ds/host.cpp b/ds/host.cpp index d621e479..af63b132 100644 --- a/ds/host.cpp +++ b/ds/host.cpp @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE file the * following copyright and licenses apply: * - * Copyright 2016 RDK Management + * Copyright 2025 RDK Management * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -241,7 +241,6 @@ namespace device } } - /** * @fn bool Host::setPowerMode(int mode) * @brief This API is used to change the power mode of the device. @@ -913,6 +912,145 @@ namespace device printf ("%s:%d - Set Audio Mixer levels for audio input: %d with volume = %d\n", __PRETTY_FUNCTION__, __LINE__,aInput, volume); } +/** + * @fn void Host::Register(IHDMIInEvent *listener) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t Host::Register(IHDMIInEvent *listener) +{ + return 0; +} + + +/** + * @fn void Host::UnRegister(IHDMIInEvent *listener) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t Host::UnRegister(IHDMIInEvent *listener) +{ + return 0; +} + +/** + * @fn void Host::Register(ICompositeInEvent *Evtnotification) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t Host::Register(ICompositeInEvent *listener) +{ + return 0; +} + +/** + * @fn void Host::UnRegister(ICompositeInEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t Host::UnRegister(ICompositeInEvent *listener) +{ + return 0; +} + +/** + * @fn void Host::UnRegister(IDisplayHDMIHotPlugEvent *Evtnotification) + * @brief This API is used to Register the Events + * + * @return unint32_t + */ +uint32_t Host::Register(IDisplayHDMIHotPlugEvent *listener) +{ + return 0; +} + + +/** + * @fn void Host::UnRegister(IDisplayHDMIHotPlugEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t Host::UnRegister(IDisplayHDMIHotPlugEvent *listener) +{ + return 0; +} + +/** + * @fn void Host::UnRegister(IDisplayEvent *Evtnotification) + * @brief This API is used to Register the Events + * + * @return unint32_t + */ +uint32_t Host::Register(IDisplayEvent *listener) +{ + return 0; +} + + +/** + * @fn void Host::UnRegister(IDisplayEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t Host::UnRegister(IDisplayEvent *listener) +{ + return 0; +} + +/** + * @fn void Host::Register(IAudioOutputPortEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t Host::Register(IAudioOutputPortEvent *listener) +{ + return 0; +} + + +/** + * @fn void Host::UnRegister(IAudioOutputPortEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t Host::UnRegister(IAudioOutputPortEvent *listener) +{ + return 0; +} + + +/** + * @fn void Host::Register(IVideoDeviceEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t Host::Register(IVideoDeviceEvent *listener) +{ + return 0; +} + + +/** + * @fn void Host::UnRegister(IVideoDeviceEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t Host::UnRegister(IVideoDeviceEvent *listener) +{ + return 0; +} + + } diff --git a/ds/include/host.hpp b/ds/include/host.hpp index d14d42dc..f7997f55 100644 --- a/ds/include/host.hpp +++ b/ds/include/host.hpp @@ -2,7 +2,7 @@ * If not stated otherwise in this file or this component's LICENSE file the * following copyright and licenses apply: * - * Copyright 2016 RDK Management + * Copyright 2025 RDK Management * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,6 @@ * limitations under the License. */ - - /** * @defgroup devicesettings * @{ @@ -38,6 +36,9 @@ #include "videoDevice.hpp" #include "sleepMode.hpp" #include "list.hpp" +#include "dsMgr.h" +#include "dsTypes.h" +#include "dsDisplay.h" #include #include @@ -59,6 +60,222 @@ namespace device { */ class Host { public: + + struct IHDMIInEvent { + + // @brief HDMI Event Hot Plug + // @text onHDMIInEventHotPlug + // @param port: port 0 or 1 et al + // @param isConnected: is it connected (true) or not (false) + virtual void OnHDMIInEventHotPlug(dsHdmiInPort_t port, bool isConnected) { }; + + // @brief HDMI Event Signal status + // @text OnHDMIInEventSignalStatus + // @param port: port 0 or 1 et al + // @param signalStatus: Signal Status + virtual void OnHDMIInEventSignalStatus(dsHdmiInPort_t port, dsHdmiInSignalStatus_t signalStatus) { }; + + // @brief HDMI Event Signal status + // @text onHDMIInEventStatus + // @param activePort: port 0 or 1 et al + // @param isPresented: is it presented or not + virtual void OnHDMIInEventStatus(dsHdmiInPort_t activePort, bool isPresented) { }; + + // @brief HDMI Video Mode update + // @text onHDMInVideoModeUpdate + // @param port: port 0 or 1 et al + // @param videoPortResolution: Video port resolution + virtual void OnHDMInVideoModeUpdate(dsHdmiInPort_t port, const dsVideoPortResolution_t& videoPortResolution) { }; + + // @brief HDMI ALLM (Auto Low Latency Mode) status + // @text onHDMInAllmStatus + // @param port: port 0 or 1 et al + // @param allmStatus: allm status + virtual void OnHDMInAllmStatus(dsHdmiInPort_t port, bool allmStatus) { }; + + // @brief HDMI Event AVI content type + // @text OnHDMInAVIContentType + // @param port: port 0 or 1 et al + // @param aviContentType: AVI content type + virtual void OnHDMInAVIContentType(dsHdmiInPort_t port, dsAviContentType_t aviContentType) { }; + + // @brief HDMI VRR status + // @text OnHDMInVRRStatus + // @param port: port 0 or 1 et al + // @param vrrType: VRR type + virtual void OnHDMInVRRStatus(dsHdmiInPort_t port, dsVRRType_t vrrType) { }; + + // @brief Zoom settings changed + // @text OnZoomSettingsChanged + // @param zoomSetting: Currently applied zoom setting + virtual void OnZoomSettingsChanged(dsVideoZoom_t zoomSetting) { }; + }; + + uint32_t Register(IHDMIInEvent *listener); + uint32_t UnRegister(IHDMIInEvent *listener); + + + struct ICompositeInEvent { + // @brief Composite In Hotplug event + // @text onCompositeInHotPlug + // @param port: Port of the hotplug + // @param isConnected: Is it connected (true) or not(false) + virtual void OnCompositeInHotPlug(dsCompositeInPort_t port, bool isConnected) { }; + + // @brief Composite In Signal status + // @text onCompositeInSignalStatus + // @param port: Port of the hotplug + // @param signalStatus: Signal status + virtual void OnCompositeInSignalStatus(dsCompositeInPort_t port, dsCompInSignalStatus_t signalStatus) { }; + + // @brief Composite In status + // @text onCompositeInStatus + // @param activePort: Active port + // @param isPresented: is it presented to user + virtual void OnCompositeInStatus(dsCompositeInPort_t activePort, bool isPresented) { }; + + + // @brief Composite In Video Mode Update + // @text OnCompositeInVideoModeUpdate + // @param activePort: Active port + // @param videoResolution: See DisplayVideoPortResolution + virtual void OnCompositeInVideoModeUpdate(dsCompositeInPort_t activePort, dsVideoPortResolution_t videoResolution) { }; + }; + + uint32_t Register(ICompositeInEvent *listener); + uint32_t UnRegister(ICompositeInEvent *listener); + + + struct IDisplayHDMIHotPlugEvent{ + + // @brief Display HDMI Hot plug event + // @text onDisplayHDMIHotPlug + // @param displayEvent: DS_DISPLAY_EVENT_CONNECTED or DS_DISPLAY_EVENT_DISCONNECTED + virtual void OnDisplayHDMIHotPlug(dsDisplayEvent_t displayEvent) { }; + }; + + uint32_t Register(IDisplayHDMIHotPlugEvent*listener); + uint32_t UnRegister(IDisplayHDMIHotPlugEvent *listener); + + + + struct IDisplayEvent{ + + // @brief Display RX Sense event + // @text onDisplayRxSense + // @param displayEvent: DS_DISPLAY_RXSENSE_ON or DS_DISPLAY_RXSENSE_OFF + virtual void OnDisplayRxSense(dsDisplayEvent_t displayEvent) { }; + + // @brief Display HDCP Status + // @text OnDisplayHDCPStatus + virtual void OnDisplayHDCPStatus() { }; + }; + + uint32_t Register(IDisplayEvent *listener); + uint32_t UnRegister(IDisplayEvent *listener); + + + struct IAudioOutputPortEvent{ + + // @brief Associated Audio mixing changed + // @text onAssociatedAudioMixingChanged + // @param mixing: true or false + virtual void OnAssociatedAudioMixingChanged(bool mixing) { }; + + // @brief Audio Fader balance changed + // @text onAudioFaderControlChanged + // @param mixerBalance: applied mixer balance value + virtual void OnAudioFaderControlChanged(int mixerBalance) { }; + + // @brief Primary language for Audio changed + // @text onAudioPrimaryLanguageChanged + // @param primaryLanguage: current primary language for audio + virtual void OnAudioPrimaryLanguageChanged(const std::string& primaryLanguage) { }; + + // @brief Secondary language for Audio changed + // @text onAudioSecondaryLanguageChanged + // @param secondaryLanguage: current secondary language for audio + virtual void OnAudioSecondaryLanguageChanged(const std::string& secondaryLanguage) { }; + + // @brief Audio output hot plug event + // @text onAudioOutHotPlug + // @param portType: Type of audio port see AudioPortType + // @param uiPortNumber: The port number assigned by UI + // @param isPortConnected: true (connected) or false (not connected) + virtual void OnAudioOutHotPlug(dsAudioPortType_t audioPortType, int uiPortNumber, bool isPortConnected) { }; + + + // @brief Dolby Atmos capabilities changed + // @text onDolbyAtmosCapabilitiesChanged + // @param atmosCapability: the dolby atmos capability + // @param status: true (available) or false (not available) + virtual void OnDolbyAtmosCapabilitiesChanged(dsATMOSCapability_t atmosCapability, bool status) { }; + + // @brief Audio port state changed + // @text onAudioPortStateChanged + // @param audioPortState: audio port state + virtual void OnAudioPortStateChanged(dsAudioPortState_t audioPortState) { }; + + // @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 audioStereoMode + virtual void OnAudioModeEvent(dsAudioPortType_t audioPortType, dsAudioStereoMode_t audioMode) { }; + + // @brief Audio Output format changed + // @text onAudioFormatUpdate + // @param audioFormat: Type of audio format see AudioFormat + virtual void OnAudioFormatUpdate(dsAudioFormat_t audioFormat) { }; + + }; + + uint32_t Register(IAudioOutputPortEvent *listener); + uint32_t UnRegister(IAudioOutputPortEvent *listener); + + + struct IVideoDeviceEvent { + // @brief Display Framerate Pre-change + // @text OnDisplayFrameratePreChange + // @param frameRate: PreChange framerate + virtual void OnDisplayFrameratePreChange(const std::string& frameRate) { }; + + // @brief Display Framerate Post-change + // @text OnDisplayFrameratePostChange + // @param frameRate: framerate post change + virtual void OnDisplayFrameratePostChange(const std::string& frameRate) { }; + }; + + uint32_t Register(IVideoDeviceEvent *listener); + uint32_t UnRegister(IVideoDeviceEvent *listener); + + + struct IVideoOutputPortEvent { + + // @brief On Resolution Pre changed + // @text OnResolutionPreChange + // @param resolution: resolution + virtual void OnResolutionPreChange(const int width, const int height) { }; + + // @brief On Resolution Post change + // @text onResolutionPostChange + // @param resolution: resolution + virtual void OnResolutionPostChange(const int width, const int height) { }; + + // @brief On HDCP Status change + // @text OnHDCPStatusChange + // @param hdcpStatus: HDCP Status + virtual void OnHDCPStatusChange(dsHdcpStatus_t hdcpStatus) { }; + + // @brief On Video Format update + // @text OnVideoFormatUpdate + // @param videoFormatHDR: Video format HDR standard + virtual void OnVideoFormatUpdate(dsHDRStandard_t videoFormatHDR) { }; + }; + + uint32_t Register(IVideoOutputPortEvent *listener); + uint32_t UnRegister(IVideoOutputPortEvent *listener); + + static const int kPowerOn; static const int kPowerOff; static const int kPowerStandby; From c4d4919471528f7507b8395da635e0bfea1c840e Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Sun, 24 Aug 2025 18:59:04 +0530 Subject: [PATCH 02/10] topic/RDKEMW6161 To fix native bulid failure --- build_dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_dependencies.sh b/build_dependencies.sh index 090f105a..566fca25 100644 --- a/build_dependencies.sh +++ b/build_dependencies.sh @@ -47,7 +47,7 @@ cd rfc autoreconf -i ./configure --enable-rfctool=yes --enable-tr181set=yes cd rfcapi -make librfcapi_la_CPPFLAGS="-I/usr/include/cjson" +make CXXFLAGS="-DUSE_IARMBUS" librfcapi_la_CPPFLAGS="-I/usr/include/cjson" make install export RFC_PATH=$ROOT/rfc From bf228ab392555d52432596fa6489cf59ba7dec69 Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Tue, 26 Aug 2025 10:24:14 +0530 Subject: [PATCH 03/10] topic/RDKEMW6161- Remove dependency od dsMgr --- ds/include/host.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/ds/include/host.hpp b/ds/include/host.hpp index f7997f55..0df549c8 100644 --- a/ds/include/host.hpp +++ b/ds/include/host.hpp @@ -36,7 +36,6 @@ #include "videoDevice.hpp" #include "sleepMode.hpp" #include "list.hpp" -#include "dsMgr.h" #include "dsTypes.h" #include "dsDisplay.h" From e95d8e3373964c55c91cf6be58205c51a377b73c Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Tue, 26 Aug 2025 11:20:00 +0530 Subject: [PATCH 04/10] topic/RDKEMW6161- Updated comments of zoom AVI and audio level --- ds/host.cpp | 72 ++++++++++++++++++++++++++++++--------------- ds/include/host.hpp | 67 +++++++++++++++++++++++------------------ 2 files changed, 87 insertions(+), 52 deletions(-) diff --git a/ds/host.cpp b/ds/host.cpp index af63b132..30f9dc99 100644 --- a/ds/host.cpp +++ b/ds/host.cpp @@ -913,103 +913,103 @@ namespace device } /** - * @fn void Host::Register(IHDMIInEvent *listener) + * @fn void Host::Register(IHDMIInEvents *listener) * @brief This API is used to register the Events * * @return unint32_t */ -uint32_t Host::Register(IHDMIInEvent *listener) +uint32_t Host::Register(IHDMIInEvents *listener) { return 0; } /** - * @fn void Host::UnRegister(IHDMIInEvent *listener) + * @fn void Host::UnRegister(IHDMIInEvents *listener) * @brief This API is used to UnRegister the Events * * @return unint32_t */ -uint32_t Host::UnRegister(IHDMIInEvent *listener) +uint32_t Host::UnRegister(IHDMIInEvents *listener) { return 0; } /** - * @fn void Host::Register(ICompositeInEvent *Evtnotification) + * @fn void Host::Register(ICompositeInEvents *Evtnotification) * @brief This API is used to register the Events * * @return unint32_t */ -uint32_t Host::Register(ICompositeInEvent *listener) +uint32_t Host::Register(ICompositeInEvents *listener) { return 0; } /** - * @fn void Host::UnRegister(ICompositeInEvent *Evtnotification) + * @fn void Host::UnRegister(ICompositeInEvents *Evtnotification) * @brief This API is used to UnRegister the Events * * @return unint32_t */ -uint32_t Host::UnRegister(ICompositeInEvent *listener) +uint32_t Host::UnRegister(ICompositeInEvents *listener) { return 0; } /** - * @fn void Host::UnRegister(IDisplayHDMIHotPlugEvent *Evtnotification) + * @fn void Host::UnRegister(IDisplayHDMIHotPlugEvents *Evtnotification) * @brief This API is used to Register the Events * * @return unint32_t */ -uint32_t Host::Register(IDisplayHDMIHotPlugEvent *listener) +uint32_t Host::Register(IDisplayHDMIHotPlugEvents *listener) { return 0; } /** - * @fn void Host::UnRegister(IDisplayHDMIHotPlugEvent *Evtnotification) + * @fn void Host::UnRegister(IDisplayHDMIHotPlugEvents *Evtnotification) * @brief This API is used to UnRegister the Events * * @return unint32_t */ -uint32_t Host::UnRegister(IDisplayHDMIHotPlugEvent *listener) +uint32_t Host::UnRegister(IDisplayHDMIHotPlugEvents *listener) { return 0; } /** - * @fn void Host::UnRegister(IDisplayEvent *Evtnotification) + * @fn void Host::UnRegister(IDisplayEvents *Evtnotification) * @brief This API is used to Register the Events * * @return unint32_t */ -uint32_t Host::Register(IDisplayEvent *listener) +uint32_t Host::Register(IDisplayEvents *listener) { return 0; } /** - * @fn void Host::UnRegister(IDisplayEvent *Evtnotification) + * @fn void Host::UnRegister(IDisplayEvents *Evtnotification) * @brief This API is used to UnRegister the Events * * @return unint32_t */ -uint32_t Host::UnRegister(IDisplayEvent *listener) +uint32_t Host::UnRegister(IDisplayEvents *listener) { return 0; } /** - * @fn void Host::Register(IAudioOutputPortEvent *Evtnotification) - * @brief This API is used to UnRegister the Events + * @fn void Host::Register(IAudioOutputPortEvents *Evtnotification) + * @brief This API is used to Register the Events * * @return unint32_t */ -uint32_t Host::Register(IAudioOutputPortEvent *listener) +uint32_t Host::Register(IAudioOutputPortEvents *listener) { return 0; } @@ -1021,31 +1021,55 @@ uint32_t Host::Register(IAudioOutputPortEvent *listener) * * @return unint32_t */ -uint32_t Host::UnRegister(IAudioOutputPortEvent *listener) +uint32_t Host::UnRegister(IAudioOutputPortEvents *listener) { return 0; } +/** + * @fn void Host::Register(IVideoOutputPortEvents *Evtnotification) + * @brief This API is used to Register the Events + * + * @return unint32_t + */ +uint32_t Host::Register(IVideoOutputPortEvents *listener) +{ + return 0; +} + /** - * @fn void Host::Register(IVideoDeviceEvent *Evtnotification) + * @fn void Host::UnRegister(IVideoOutputPortEvents *Evtnotification) * @brief This API is used to UnRegister the Events * * @return unint32_t */ -uint32_t Host::Register(IVideoDeviceEvent *listener) +uint32_t Host::UnRegister(IVideoOutputPortEvents *listener) +{ + return 0; +} + + + +/** + * @fn void Host::Register(IVideoDeviceEvents *Evtnotification) + * @brief This API is used to Register the Events + * + * @return unint32_t + */ +uint32_t Host::Register(IVideoDeviceEvents *listener) { return 0; } /** - * @fn void Host::UnRegister(IVideoDeviceEvent *Evtnotification) + * @fn void Host::UnRegister(IVideoDeviceEvents *Evtnotification) * @brief This API is used to UnRegister the Events * * @return unint32_t */ -uint32_t Host::UnRegister(IVideoDeviceEvent *listener) +uint32_t Host::UnRegister(IVideoDeviceEvents *listener) { return 0; } diff --git a/ds/include/host.hpp b/ds/include/host.hpp index 0df549c8..9622412a 100644 --- a/ds/include/host.hpp +++ b/ds/include/host.hpp @@ -27,7 +27,8 @@ #ifndef _DS_HOST_HPP_ #define _DS_HOST_HPP_ - +#include +#include #include #include "powerModeChangeListener.hpp" #include "displayConnectionChangeListener.hpp" @@ -36,11 +37,10 @@ #include "videoDevice.hpp" #include "sleepMode.hpp" #include "list.hpp" +#include "dsMgr.h" #include "dsTypes.h" #include "dsDisplay.h" -#include -#include /** @@ -60,7 +60,7 @@ namespace device { class Host { public: - struct IHDMIInEvent { + struct IHDMIInEvents { // @brief HDMI Event Hot Plug // @text onHDMIInEventHotPlug @@ -104,17 +104,19 @@ class Host { // @param vrrType: VRR type virtual void OnHDMInVRRStatus(dsHdmiInPort_t port, dsVRRType_t vrrType) { }; - // @brief Zoom settings changed - // @text OnZoomSettingsChanged - // @param zoomSetting: Currently applied zoom setting - virtual void OnZoomSettingsChanged(dsVideoZoom_t zoomSetting) { }; + // @brief HDMI Event AV Latency + // @text OnHDMInAVLatency + // @param audioDelay: audio delay (in millisecs) + // @param videoDelay: video delay (in millisecs) + virtual void OnHDMInAVLatency(int audioDelay, int videoDelay) { }; + }; - uint32_t Register(IHDMIInEvent *listener); - uint32_t UnRegister(IHDMIInEvent *listener); + uint32_t Register(IHDMIInEvents *listener); + uint32_t UnRegister(IHDMIInEvents *listener); - struct ICompositeInEvent { + struct ICompositeInEvents { // @brief Composite In Hotplug event // @text onCompositeInHotPlug // @param port: Port of the hotplug @@ -141,11 +143,11 @@ class Host { virtual void OnCompositeInVideoModeUpdate(dsCompositeInPort_t activePort, dsVideoPortResolution_t videoResolution) { }; }; - uint32_t Register(ICompositeInEvent *listener); - uint32_t UnRegister(ICompositeInEvent *listener); + uint32_t Register(ICompositeInEvents *listener); + uint32_t UnRegister(ICompositeInEvents *listener); - struct IDisplayHDMIHotPlugEvent{ + struct IDisplayHDMIHotPlugEvents{ // @brief Display HDMI Hot plug event // @text onDisplayHDMIHotPlug @@ -153,12 +155,12 @@ class Host { virtual void OnDisplayHDMIHotPlug(dsDisplayEvent_t displayEvent) { }; }; - uint32_t Register(IDisplayHDMIHotPlugEvent*listener); - uint32_t UnRegister(IDisplayHDMIHotPlugEvent *listener); + uint32_t Register(IDisplayHDMIHotPlugEvents *listener); + uint32_t UnRegister(IDisplayHDMIHotPlugEvents *listener); - struct IDisplayEvent{ + struct IDisplayEvents{ // @brief Display RX Sense event // @text onDisplayRxSense @@ -170,11 +172,11 @@ class Host { virtual void OnDisplayHDCPStatus() { }; }; - uint32_t Register(IDisplayEvent *listener); - uint32_t UnRegister(IDisplayEvent *listener); + uint32_t Register(IDisplayEvents *listener); + uint32_t UnRegister(IDisplayEvents *listener); - struct IAudioOutputPortEvent{ + struct IAudioOutputPortEvents{ // @brief Associated Audio mixing changed // @text onAssociatedAudioMixingChanged @@ -226,13 +228,17 @@ class Host { // @param audioFormat: Type of audio format see AudioFormat virtual void OnAudioFormatUpdate(dsAudioFormat_t audioFormat) { }; + // @brief Audio level changed + // @text OnAudioLevelChangedEvent + // @param audioiLevel: audio level value + virtual void OnAudioLevelChangedEvent(int audioLevel) { }; }; - uint32_t Register(IAudioOutputPortEvent *listener); - uint32_t UnRegister(IAudioOutputPortEvent *listener); + uint32_t Register(IAudioOutputPortEvents *listener); + uint32_t UnRegister(IAudioOutputPortEvents *listener); - struct IVideoDeviceEvent { + struct IVideoDeviceEvents { // @brief Display Framerate Pre-change // @text OnDisplayFrameratePreChange // @param frameRate: PreChange framerate @@ -242,13 +248,18 @@ class Host { // @text OnDisplayFrameratePostChange // @param frameRate: framerate post change virtual void OnDisplayFrameratePostChange(const std::string& frameRate) { }; + + // @brief Zoom settings changed + // @text OnZoomSettingsChanged + // @param zoomSetting: Currently applied zoom setting + virtual void OnZoomSettingsChanged(dsVideoZoom_t zoomSetting) { }; }; - uint32_t Register(IVideoDeviceEvent *listener); - uint32_t UnRegister(IVideoDeviceEvent *listener); + uint32_t Register(IVideoDeviceEvents *listener); + uint32_t UnRegister(IVideoDeviceEvents *listener); - struct IVideoOutputPortEvent { + struct IVideoOutputPortEvents { // @brief On Resolution Pre changed // @text OnResolutionPreChange @@ -271,8 +282,8 @@ class Host { virtual void OnVideoFormatUpdate(dsHDRStandard_t videoFormatHDR) { }; }; - uint32_t Register(IVideoOutputPortEvent *listener); - uint32_t UnRegister(IVideoOutputPortEvent *listener); + uint32_t Register(IVideoOutputPortEvents *listener); + uint32_t UnRegister(IVideoOutputPortEvents *listener); static const int kPowerOn; From e6a876bb9b55396013361aafeeaf23638f9df2c4 Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Tue, 26 Aug 2025 17:01:01 +0530 Subject: [PATCH 05/10] topic/RDKEMW6161- Updated HDMI and Display --- ds/host.cpp | 8 ++++---- ds/include/host.hpp | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ds/host.cpp b/ds/host.cpp index 30f9dc99..1f798a4b 100644 --- a/ds/host.cpp +++ b/ds/host.cpp @@ -958,24 +958,24 @@ uint32_t Host::UnRegister(ICompositeInEvents *listener) } /** - * @fn void Host::UnRegister(IDisplayHDMIHotPlugEvents *Evtnotification) + * @fn void Host::UnRegister(IDisplayDeviceEvents *Evtnotification) * @brief This API is used to Register the Events * * @return unint32_t */ -uint32_t Host::Register(IDisplayHDMIHotPlugEvents *listener) +uint32_t Host::Register(IDisplayDeviceEvents *listener) { return 0; } /** - * @fn void Host::UnRegister(IDisplayHDMIHotPlugEvents *Evtnotification) + * @fn void Host::UnRegister(IDisplayDeviceEvents *Evtnotification) * @brief This API is used to UnRegister the Events * * @return unint32_t */ -uint32_t Host::UnRegister(IDisplayHDMIHotPlugEvents *listener) +uint32_t Host::UnRegister(IDisplayDeviceEvents *listener) { return 0; } diff --git a/ds/include/host.hpp b/ds/include/host.hpp index 9622412a..7567ba37 100644 --- a/ds/include/host.hpp +++ b/ds/include/host.hpp @@ -81,34 +81,34 @@ class Host { virtual void OnHDMIInEventStatus(dsHdmiInPort_t activePort, bool isPresented) { }; // @brief HDMI Video Mode update - // @text onHDMInVideoModeUpdate + // @text onHDMIInVideoModeUpdate // @param port: port 0 or 1 et al // @param videoPortResolution: Video port resolution - virtual void OnHDMInVideoModeUpdate(dsHdmiInPort_t port, const dsVideoPortResolution_t& videoPortResolution) { }; + virtual void OnHDMIInVideoModeUpdate(dsHdmiInPort_t port, const dsVideoPortResolution_t& videoPortResolution) { }; // @brief HDMI ALLM (Auto Low Latency Mode) status - // @text onHDMInAllmStatus + // @text onHDMIInAllmStatus // @param port: port 0 or 1 et al // @param allmStatus: allm status - virtual void OnHDMInAllmStatus(dsHdmiInPort_t port, bool allmStatus) { }; + virtual void OnHDMIInAllmStatus(dsHdmiInPort_t port, bool allmStatus) { }; // @brief HDMI Event AVI content type - // @text OnHDMInAVIContentType + // @text OnHDMIInAVIContentType // @param port: port 0 or 1 et al // @param aviContentType: AVI content type - virtual void OnHDMInAVIContentType(dsHdmiInPort_t port, dsAviContentType_t aviContentType) { }; + virtual void OnHDMIInAVIContentType(dsHdmiInPort_t port, dsAviContentType_t aviContentType) { }; // @brief HDMI VRR status - // @text OnHDMInVRRStatus + // @text OnHDMIInVRRStatus // @param port: port 0 or 1 et al // @param vrrType: VRR type - virtual void OnHDMInVRRStatus(dsHdmiInPort_t port, dsVRRType_t vrrType) { }; + virtual void OnHDMIInVRRStatus(dsHdmiInPort_t port, dsVRRType_t vrrType) { }; // @brief HDMI Event AV Latency - // @text OnHDMInAVLatency + // @text OnHDMIInAVLatency // @param audioDelay: audio delay (in millisecs) // @param videoDelay: video delay (in millisecs) - virtual void OnHDMInAVLatency(int audioDelay, int videoDelay) { }; + virtual void OnHDMIInAVLatency(int audioDelay, int videoDelay) { }; }; @@ -147,7 +147,7 @@ class Host { uint32_t UnRegister(ICompositeInEvents *listener); - struct IDisplayHDMIHotPlugEvents{ + struct IDisplayDeviceEvents{ // @brief Display HDMI Hot plug event // @text onDisplayHDMIHotPlug @@ -155,8 +155,8 @@ class Host { virtual void OnDisplayHDMIHotPlug(dsDisplayEvent_t displayEvent) { }; }; - uint32_t Register(IDisplayHDMIHotPlugEvents *listener); - uint32_t UnRegister(IDisplayHDMIHotPlugEvents *listener); + uint32_t Register(IDisplayDeviceEvents *listener); + uint32_t UnRegister(IDisplayDeviceEvents *listener); From 290259ab03c9f89f45e834c976c37922339fe5e0 Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Thu, 28 Aug 2025 20:22:51 +0530 Subject: [PATCH 06/10] topic/RDKEMW6161- Some more Updates to Interfaces --- ds/host.cpp | 303 +++++++++++++++++++++++++------------- ds/include/host.hpp | 348 ++++++++++++++++++++++---------------------- 2 files changed, 374 insertions(+), 277 deletions(-) diff --git a/ds/host.cpp b/ds/host.cpp index 1f798a4b..36a256eb 100644 --- a/ds/host.cpp +++ b/ds/host.cpp @@ -912,164 +912,257 @@ namespace device printf ("%s:%d - Set Audio Mixer levels for audio input: %d with volume = %d\n", __PRETTY_FUNCTION__, __LINE__,aInput, volume); } -/** - * @fn void Host::Register(IHDMIInEvents *listener) - * @brief This API is used to register the Events - * - * @return unint32_t - */ -uint32_t Host::Register(IHDMIInEvents *listener) +/* virtual */ void Host::IHDMIInEvents::OnHDMIInEventHotPlug(dsHdmiInPort_t port, bool isConnected) { - return 0; + /* If client needs to handle this event, they should override this method */ +INT_WARN("Base impl of OnHDMIInEventHotPlug called. port: %d isConnected %d", port, isConnected); } +/* virtual */ void Host::IHDMIInEvents::OnHDMIInEventSignalStatus(dsHdmiInPort_t port, dsHdmiInSignalStatus_t signalStatus) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnHDMIInEventSignalStatus called. activePort: %d signalStatus %d", activePort, signalStatus); +} -/** - * @fn void Host::UnRegister(IHDMIInEvents *listener) - * @brief This API is used to UnRegister the Events - * - * @return unint32_t - */ -uint32_t Host::UnRegister(IHDMIInEvents *listener) +/* virtual */ void Host::IHDMIInEvents::OnHDMIInEventStatus(dsHdmiInPort_t activePort, bool isPresented) { - return 0; + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnHDMIInEventStatus called. activePort: %d isPresented %d", activePort, isPresented); } -/** - * @fn void Host::Register(ICompositeInEvents *Evtnotification) - * @brief This API is used to register the Events - * - * @return unint32_t - */ -uint32_t Host::Register(ICompositeInEvents *listener) +/* virtual */ void Host::IHDMIInEvents::OnHDMIInVideoModeUpdate(dsHdmiInPort_t port, const dsVideoPortResolution_t& videoPortResolution) { - return 0; + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnHDMIInVideoModeUpdate called. port: %d videoResolution:pixelresol %d", port, videoResolution.pixelResolution); } -/** - * @fn void Host::UnRegister(ICompositeInEvents *Evtnotification) - * @brief This API is used to UnRegister the Events - * - * @return unint32_t - */ -uint32_t Host::UnRegister(ICompositeInEvents *listener) +/* virtual */ void Host::IHDMIInEvents::OnHDMIInAllmStatus(dsHdmiInPort_t port, bool allmStatus) { - return 0; + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnHDMIInAllmStatus called. port %d allmStatus: %d", port, allmStatus); } -/** - * @fn void Host::UnRegister(IDisplayDeviceEvents *Evtnotification) - * @brief This API is used to Register the Events - * - * @return unint32_t - */ -uint32_t Host::Register(IDisplayDeviceEvents *listener) +/* virtual */ void Host::IHDMIInEvents::OnHDMIInAVIContentType(dsHdmiInPort_t port, dsAviContentType_t aviContentType) { - return 0; + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnHDMIInAVIContentType called. port %d aviContentType: %d", port, aviContentType); } +/* virtual */ void Host::IHDMIInEvents::OnHDMIInVRRStatus(dsHdmiInPort_t port, dsVRRType_t vrrType) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnHDMIInVRRStatus called. port %d vrrType: %d", port, vrrType); +} -/** - * @fn void Host::UnRegister(IDisplayDeviceEvents *Evtnotification) - * @brief This API is used to UnRegister the Events - * - * @return unint32_t - */ -uint32_t Host::UnRegister(IDisplayDeviceEvents *listener) +/* virtual */ void Host::IHDMIInEvents::OnHDMIInAVLatency(int audioDelay, int videoDelay) { - return 0; + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnHDMIInAVLatency called. audioDelay: %d videoDelay %d", audioDelay, videoDelay); } -/** - * @fn void Host::UnRegister(IDisplayEvents *Evtnotification) - * @brief This API is used to Register the Events - * - * @return unint32_t - */ -uint32_t Host::Register(IDisplayEvents *listener) +/* virtual */ void Host::IVideoDeviceEvents::OnDisplayFrameratePreChange(const std::string& frameRate) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnDisplayFrameratePreChange called. frameRate: %s", frameRate.c_str()); +} + +/* virtual */ void Host::IVideoDeviceEvents::OnDisplayFrameratePostChange(const std::string& frameRate) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnDisplayFrameratePostChange called. frameRate: %s", frameRate.c_str()); +} + +/* virtual */ void Host::IVideoDeviceEvents::OnZoomSettingsChanged(dsVideoZoom_t zoomSetting) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnZoomSettingsChanged called. zoomSetting: %d", zoomSetting); +} + +/* virtual */ void Host::IVideoOutputPortEvents::OnResolutionPreChange(int width, int height) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnResolutionPreChange called. width: %d, height: %d", width, height); +} + +/* virtual */ void Host::IVideoOutputPortEvents::OnResolutionPostChange(int width, int height) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnResolutionPostChange called. width: %d, height: %d", width, height); +} + +/* virtual */ void Host::IVideoOutputPortEvents::OnHDCPStatusChange(dsHdcpStatus_t hdcpStatus) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnHDCPStatusChange called. hdcpStatus: %d", hdcpStatus); +} + +/* virtual */ void Host::IVideoOutputPortEvents::OnVideoFormatUpdate(dsHDRStandard_t videoFormatHDR) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnVideoFormatUpdate called. videoFormatHDR: %d", videoFormatHDR); +} + +/* virtual */ void Host::IAudioOutputPortEvents::OnAssociatedAudioMixingChanged(bool mixing) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnAssociatedAudioMixingChanged called. mixing: %d", mixing); +} +/* virtual */ void Host::IAudioOutputPortEvents::OnAudioFaderControlChanged(int mixerBalance) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnAudioFaderControlChanged called. mixerBalance: %d", mixerBalance); +} +/* virtual */ void Host::IAudioOutputPortEvents::OnAudioPrimaryLanguageChanged(const std::string& primaryLanguage) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnAudioPrimaryLanguageChanged called. primaryLanguage: %s", primaryLanguage.c_str()); +} + +/* virtual */ void Host::IAudioOutputPortEvents::OnAudioSecondaryLanguageChanged(const std::string& secondaryLanguage) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnAudioSecondaryLanguageChanged called. secondaryLanguage: %s", secondaryLanguage.c_str()); +} + +/* virtual */ void Host::IAudioOutputPortEvents::OnAudioOutHotPlug(dsAudioPortType_t portType, uint32_t uiPortNumber, bool isPortConnected) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnAudioOutHotPlug called. portType: %d, uiPortNumber: %d, isPortConnected: %d", portType, uiPortNumber, isPortConnected); +} + +/* virtual */ void Host::IAudioOutputPortEvents::OnDolbyAtmosCapabilitiesChanged(dsATMOSCapability_t atmosCapability, bool status) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnDolbyAtmosCapabilitiesChanged called. atmosCapability: %d, status: %d", atmosCapability, status); +} + +// TODO: requires dsMgr.h header include ?? +// void Host::IAudioOutputPortEvents::OnAudioPortStateChanged(dsAudioPortState_t audioPortState) { } + +/* virtual */ void Host::IAudioOutputPortEvents::OnAudioModeEvent(dsAudioPortType_t audioPortType, dsAudioStereoMode_t audioStereoMode) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnAudioModeEvent called. audioPortType: %d, audioStereoMode: %d", audioPortType, audioStereoMode); +} + +/* virtual */ void Host::IAudioOutputPortEvents::OnAudioLevelChangedEvent(int audioLevel) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnAudioLevelChangedEvent called. audioLevel: %d", audioLevel); +} + +/* virtual */ void Host::IAudioOutputPortEvents::OnAudioFormatUpdate(dsAudioFormat_t audioFormat) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnAudioFormatUpdate called. audioFormat: %d", audioFormat); +} + +/* virtual */ void Host::IDisplayDeviceEvents::OnDisplayHDMIHotPlug(dsDisplayEvent_t displayEvent) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnDisplayHDMIHotPlug called. displayEvent: %d", displayEvent); +} +/* virtual */ void Host::ICompositeInEvents::OnCompositeInHotPlug(dsCompositeInPort_t port, bool isConnected) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnCompositeInHotPlug called. port: %d isConnected %d", port, isConnected); +} + +/* virtual */ void Host::ICompositeInEvents::OnCompositeInSignalStatus(dsCompositeInPort_t port, dsCompInSignalStatus_t signalStatus) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnCompositeInSignalStatus called. port: %d signalStatus %d", port, signalStatus); +} + +/* virtual */ void Host::ICompositeInEvents::OnCompositeInStatus(dsCompositeInPort_t activePort, bool isPresented) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnCompositeInStatus called. activePort: %d isPresented %d", activePort, isPresented); +} +/* virtual */ void Host::ICompositeInEvents::OnCompositeInVideoModeUpdate(dsCompositeInPort_t activePort, dsVideoPortResolution_t videoResolution) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnCompositeInVideoModeUpdate called. activePort: %d videoResolution %d", activePort, videoResolution.pixelResolution); +} + +/* virtual */ void Host::IDisplayEvents::OnDisplayRxSense(dsDisplayEvent_t displayEvent) +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnDisplayRxSense called. displayEvent: %d ", displayEvent); +} +/* virtual */ void Host::IDisplayEvents::OnDisplayHDCPStatus() +{ + /* If client needs to handle this event, they should override this method */ + INT_WARN("Base impl of OnDisplayHDCPStatus called. "); +} + + +dsError_t Host::Register(IHDMIInEvents *listener) { return 0; } +dsError_t Host::UnRegister(IHDMIInEvents *listener) +{ + return 0; +} -/** - * @fn void Host::UnRegister(IDisplayEvents *Evtnotification) - * @brief This API is used to UnRegister the Events - * - * @return unint32_t - */ -uint32_t Host::UnRegister(IDisplayEvents *listener) +dsError_t Host::Register(ICompositeInEvents *listener) { return 0; } -/** - * @fn void Host::Register(IAudioOutputPortEvents *Evtnotification) - * @brief This API is used to Register the Events - * - * @return unint32_t - */ -uint32_t Host::Register(IAudioOutputPortEvents *listener) +dsError_t Host::UnRegister(ICompositeInEvents *listener) { return 0; } +dsError_t Host::Register(IDisplayEvents *listener) +{ + return 0; +} -/** - * @fn void Host::UnRegister(IAudioOutputPortEvent *Evtnotification) - * @brief This API is used to UnRegister the Events - * - * @return unint32_t - */ -uint32_t Host::UnRegister(IAudioOutputPortEvents *listener) +dsError_t Host::UnRegister(IDisplayEvents *listener) { return 0; } -/** - * @fn void Host::Register(IVideoOutputPortEvents *Evtnotification) - * @brief This API is used to Register the Events - * - * @return unint32_t - */ -uint32_t Host::Register(IVideoOutputPortEvents *listener) +dsError_t Host::Register(IVideoDeviceEvents* listener) { - return 0; + return 0; } +dsError_t Host::UnRegister(IVideoDeviceEvents* listener) +{ + return 0; +} -/** - * @fn void Host::UnRegister(IVideoOutputPortEvents *Evtnotification) - * @brief This API is used to UnRegister the Events - * - * @return unint32_t - */ -uint32_t Host::UnRegister(IVideoOutputPortEvents *listener) +dsError_t Host::Register(IVideoOutputPortEvents* listener) { return 0; } +dsError_t Host::UnRegister(IVideoOutputPortEvents* listener) +{ + return 0; +} +dsError_t Host::Register(IAudioOutputPortEvents* listener) +{ + return 0; +} -/** - * @fn void Host::Register(IVideoDeviceEvents *Evtnotification) - * @brief This API is used to Register the Events - * - * @return unint32_t - */ -uint32_t Host::Register(IVideoDeviceEvents *listener) +dsError_t Host::UnRegister(IAudioOutputPortEvents* listener) { return 0; } +dsError_t Host::Register(IDisplayDeviceEvents* listener) { +{ + return 0; +} -/** - * @fn void Host::UnRegister(IVideoDeviceEvents *Evtnotification) - * @brief This API is used to UnRegister the Events - * - * @return unint32_t - */ -uint32_t Host::UnRegister(IVideoDeviceEvents *listener) +dsError_t Host::UnRegister(IDisplayDeviceEvents* listener) { return 0; } diff --git a/ds/include/host.hpp b/ds/include/host.hpp index 7567ba37..4c43bc8b 100644 --- a/ds/include/host.hpp +++ b/ds/include/host.hpp @@ -61,230 +61,234 @@ class Host { public: struct IHDMIInEvents { - - // @brief HDMI Event Hot Plug - // @text onHDMIInEventHotPlug + virtual ~IHDMIInEvents() = default; + // @brief HDMI Event Hot Plug // @param port: port 0 or 1 et al // @param isConnected: is it connected (true) or not (false) - virtual void OnHDMIInEventHotPlug(dsHdmiInPort_t port, bool isConnected) { }; - + virtual void OnHDMIInEventHotPlug(dsHdmiInPort_t port, bool isConnected); + // @brief HDMI Event Signal status - // @text OnHDMIInEventSignalStatus // @param port: port 0 or 1 et al // @param signalStatus: Signal Status - virtual void OnHDMIInEventSignalStatus(dsHdmiInPort_t port, dsHdmiInSignalStatus_t signalStatus) { }; - + virtual void OnHDMIInEventSignalStatus(dsHdmiInPort_t port, dsHdmiInSignalStatus_t signalStatus); + // @brief HDMI Event Signal status - // @text onHDMIInEventStatus // @param activePort: port 0 or 1 et al // @param isPresented: is it presented or not - virtual void OnHDMIInEventStatus(dsHdmiInPort_t activePort, bool isPresented) { }; - + virtual void OnHDMIInEventStatus(dsHdmiInPort_t activePort, bool isPresented); + // @brief HDMI Video Mode update - // @text onHDMIInVideoModeUpdate // @param port: port 0 or 1 et al // @param videoPortResolution: Video port resolution - virtual void OnHDMIInVideoModeUpdate(dsHdmiInPort_t port, const dsVideoPortResolution_t& videoPortResolution) { }; - + virtual void OnHDMIInVideoModeUpdate(dsHdmiInPort_t port, const dsVideoPortResolution_t& videoPortResolution); + // @brief HDMI ALLM (Auto Low Latency Mode) status - // @text onHDMIInAllmStatus // @param port: port 0 or 1 et al // @param allmStatus: allm status - virtual void OnHDMIInAllmStatus(dsHdmiInPort_t port, bool allmStatus) { }; - + virtual void OnHDMIInAllmStatus(dsHdmiInPort_t port, bool allmStatus); + // @brief HDMI Event AVI content type - // @text OnHDMIInAVIContentType // @param port: port 0 or 1 et al // @param aviContentType: AVI content type - virtual void OnHDMIInAVIContentType(dsHdmiInPort_t port, dsAviContentType_t aviContentType) { }; - + virtual void OnHDMIInAVIContentType(dsHdmiInPort_t port, dsAviContentType_t aviContentType); + // @brief HDMI VRR status - // @text OnHDMIInVRRStatus // @param port: port 0 or 1 et al // @param vrrType: VRR type - virtual void OnHDMIInVRRStatus(dsHdmiInPort_t port, dsVRRType_t vrrType) { }; + virtual void OnHDMIInVRRStatus(dsHdmiInPort_t port, dsVRRType_t vrrType); // @brief HDMI Event AV Latency - // @text OnHDMIInAVLatency // @param audioDelay: audio delay (in millisecs) // @param videoDelay: video delay (in millisecs) - virtual void OnHDMIInAVLatency(int audioDelay, int videoDelay) { }; + virtual void OnHDMIInAVLatency(int audioDelay, int videoDelay); }; - uint32_t Register(IHDMIInEvents *listener); - uint32_t UnRegister(IHDMIInEvents *listener); + // @brief Register a listener for HDMI device events + // @param listener: class object implementing the listener + dsError_t Register(IHDMIInEvents *listener); + // @brief UnRegister a listener for HDMI device events + // @param listener: class object implementing the listener + dsError_t UnRegister(IHDMIInEvents *listener); struct ICompositeInEvents { - // @brief Composite In Hotplug event - // @text onCompositeInHotPlug - // @param port: Port of the hotplug - // @param isConnected: Is it connected (true) or not(false) - virtual void OnCompositeInHotPlug(dsCompositeInPort_t port, bool isConnected) { }; - - // @brief Composite In Signal status - // @text onCompositeInSignalStatus - // @param port: Port of the hotplug - // @param signalStatus: Signal status - virtual void OnCompositeInSignalStatus(dsCompositeInPort_t port, dsCompInSignalStatus_t signalStatus) { }; - - // @brief Composite In status - // @text onCompositeInStatus - // @param activePort: Active port - // @param isPresented: is it presented to user - virtual void OnCompositeInStatus(dsCompositeInPort_t activePort, bool isPresented) { }; - - - // @brief Composite In Video Mode Update - // @text OnCompositeInVideoModeUpdate - // @param activePort: Active port - // @param videoResolution: See DisplayVideoPortResolution - virtual void OnCompositeInVideoModeUpdate(dsCompositeInPort_t activePort, dsVideoPortResolution_t videoResolution) { }; + virtual ~ICompositeInEvents() = default; + // @brief Composite In Hotplug event + // @param port: Port of the hotplug + // @param isConnected: Is it connected (true) or not(false) + virtual void OnCompositeInHotPlug(dsCompositeInPort_t port, bool isConnected); + + // @brief Composite In Signal status + // @param port: Port of the hotplug + // @param signalStatus: Signal status + virtual void OnCompositeInSignalStatus(dsCompositeInPort_t port, dsCompInSignalStatus_t signalStatus); + + // @brief Composite In status + // @param activePort: Active port + // @param isPresented: is it presented to user + virtual void OnCompositeInStatus(dsCompositeInPort_t activePort, bool isPresented); + + // @brief Composite In Video Mode Update + // @param activePort: Active port + // @param videoResolution: See DisplayVideoPortResolution + virtual void OnCompositeInVideoModeUpdate(dsCompositeInPort_t activePort, dsVideoPortResolution_t videoResolution); }; - uint32_t Register(ICompositeInEvents *listener); - uint32_t UnRegister(ICompositeInEvents *listener); + // @brief Register a listener for composite events + // @param listener: class object implementing the listener + dsError_t Register(ICompositeInEvents *listener); + // @brief UnRegister a listener for composite events + // @param listener: class object implementing the listener + dsError_t UnRegister(ICompositeInEvents *listener); - struct IDisplayDeviceEvents{ + struct IDisplayEvents { + virtual ~IDisplayEvents() = default; - // @brief Display HDMI Hot plug event - // @text onDisplayHDMIHotPlug - // @param displayEvent: DS_DISPLAY_EVENT_CONNECTED or DS_DISPLAY_EVENT_DISCONNECTED - virtual void OnDisplayHDMIHotPlug(dsDisplayEvent_t displayEvent) { }; + // @brief Display RX Sense event + // @param displayEvent: DS_DISPLAY_RXSENSE_ON or DS_DISPLAY_RXSENSE_OFF + virtual void OnDisplayRxSense(dsDisplayEvent_t displayEvent); + + // @brief Display HDCP Status + virtual void OnDisplayHDCPStatus(); }; - uint32_t Register(IDisplayDeviceEvents *listener); - uint32_t UnRegister(IDisplayDeviceEvents *listener); + // @brief Register a listener for display events + // @param listener: class object implementing the listener + dsError_t Register(IDisplayEvents *listener); + + // @brief UnRegister a listener for display events + // @param listener: class object implementing the listener + dsError_t UnRegister(IDisplayEvents *listener); + struct IVideoDeviceEvents { + virtual ~IVideoDeviceEvents() = default; - struct IDisplayEvents{ + // @brief Display Frame rate Pre-change notification + // @param frameRate: new framerate + virtual void OnDisplayFrameratePreChange(const std::string& frameRate); - // @brief Display RX Sense event - // @text onDisplayRxSense - // @param displayEvent: DS_DISPLAY_RXSENSE_ON or DS_DISPLAY_RXSENSE_OFF - virtual void OnDisplayRxSense(dsDisplayEvent_t displayEvent) { }; - - // @brief Display HDCP Status - // @text OnDisplayHDCPStatus - virtual void OnDisplayHDCPStatus() { }; + // @brief Display Frame rate Post-change notification + // @param frameRate: new framerate + virtual void OnDisplayFrameratePostChange(const std::string& frameRate); + + // @brief Zoom settings changed + // @param zoomSetting: Currently applied zoom setting + virtual void OnZoomSettingsChanged(dsVideoZoom_t zoomSetting); }; - - uint32_t Register(IDisplayEvents *listener); - uint32_t UnRegister(IDisplayEvents *listener); + // @brief Register a listener for video device events + // @param listener: class object implementing the listener + dsError_t Register(IVideoDeviceEvents* listener); - struct IAudioOutputPortEvents{ + // @brief UnRegister a listener for video device events + // @param listener: class object implementing the listener + dsError_t UnRegister(IVideoDeviceEvents* listener); - // @brief Associated Audio mixing changed - // @text onAssociatedAudioMixingChanged - // @param mixing: true or false - virtual void OnAssociatedAudioMixingChanged(bool mixing) { }; - - // @brief Audio Fader balance changed - // @text onAudioFaderControlChanged - // @param mixerBalance: applied mixer balance value - virtual void OnAudioFaderControlChanged(int mixerBalance) { }; - - // @brief Primary language for Audio changed - // @text onAudioPrimaryLanguageChanged - // @param primaryLanguage: current primary language for audio - virtual void OnAudioPrimaryLanguageChanged(const std::string& primaryLanguage) { }; - - // @brief Secondary language for Audio changed - // @text onAudioSecondaryLanguageChanged - // @param secondaryLanguage: current secondary language for audio - virtual void OnAudioSecondaryLanguageChanged(const std::string& secondaryLanguage) { }; - - // @brief Audio output hot plug event - // @text onAudioOutHotPlug - // @param portType: Type of audio port see AudioPortType - // @param uiPortNumber: The port number assigned by UI - // @param isPortConnected: true (connected) or false (not connected) - virtual void OnAudioOutHotPlug(dsAudioPortType_t audioPortType, int uiPortNumber, bool isPortConnected) { }; - - - // @brief Dolby Atmos capabilities changed - // @text onDolbyAtmosCapabilitiesChanged - // @param atmosCapability: the dolby atmos capability - // @param status: true (available) or false (not available) - virtual void OnDolbyAtmosCapabilitiesChanged(dsATMOSCapability_t atmosCapability, bool status) { }; - - // @brief Audio port state changed - // @text onAudioPortStateChanged - // @param audioPortState: audio port state - virtual void OnAudioPortStateChanged(dsAudioPortState_t audioPortState) { }; - - // @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 audioStereoMode - virtual void OnAudioModeEvent(dsAudioPortType_t audioPortType, dsAudioStereoMode_t audioMode) { }; - - // @brief Audio Output format changed - // @text onAudioFormatUpdate - // @param audioFormat: Type of audio format see AudioFormat - virtual void OnAudioFormatUpdate(dsAudioFormat_t audioFormat) { }; - - // @brief Audio level changed - // @text OnAudioLevelChangedEvent - // @param audioiLevel: audio level value - virtual void OnAudioLevelChangedEvent(int audioLevel) { }; + struct IVideoOutputPortEvents { + virtual ~IVideoOutputPortEvents() = default; + + // @brief On Resolution Pre changed + // @param width: width of the resolution + // @param height: height of the resolution + virtual void OnResolutionPreChange(int width, int height); + + // @brief On Resolution Post change + // @param width: width of the resolution + // @param height: height of the resolution + virtual void OnResolutionPostChange(int width, int height); + + // @brief On HDCP Status change + // @param hdcpStatus: HDCP Status + virtual void OnHDCPStatusChange(dsHdcpStatus_t hdcpStatus); + + // @brief On Video Format update + // @param videoFormatHDR: Video format HDR standard + virtual void OnVideoFormatUpdate(dsHDRStandard_t videoFormatHDR); }; - uint32_t Register(IAudioOutputPortEvents *listener); - uint32_t UnRegister(IAudioOutputPortEvents *listener); + // @brief Register a listener for video port events + // @param listener: class object implementing the listener + dsError_t Register(IVideoOutputPortEvents* listener); + + // @brief UnRegister a listener for video port events + // @param listener: class object implementing the listener + dsError_t UnRegister(IVideoOutputPortEvents* listener); + + struct IAudioOutputPortEvents { + virtual ~IAudioOutputPortEvents() = default; + + // @brief Associated Audio mixing changed + // @param mixing: true or false + virtual void OnAssociatedAudioMixingChanged(bool mixing); + + // @brief Audio Fader balance changed + // @param mixerBalance: applied mixer balance value + virtual void OnAudioFaderControlChanged(int mixerBalance); + + // @brief Primary language for Audio changed + // @param primaryLanguage: current primary language for audio + virtual void OnAudioPrimaryLanguageChanged(const std::string& primaryLanguage); + + // @brief Secondary language for Audio changed + // @param secondaryLanguage: current secondary language for audio + virtual void OnAudioSecondaryLanguageChanged(const std::string& secondaryLanguage); + + // @brief Audio output hot plug event + // @param portType: Type of audio port see AudioPortType + // @param uiPortNumber: The port number assigned by UI + // @param isPortConnected: true (connected) or false (not connected) + virtual void OnAudioOutHotPlug(dsAudioPortType_t portType, uint32_t uiPortNumber, bool isPortConnected); + + // @brief Dolby Atmos capabilities changed + // @param atmosCapability: the Dolby Atmos capability + // @param status: true (available) or false (not available) + virtual void OnDolbyAtmosCapabilitiesChanged(dsATMOSCapability_t atmosCapability, bool status); + + // @brief Audio port state changed + // @param audioPortState: audio port state + // TODO: requires dsMgr.h header include ?? + // virtual void OnAudioPortStateChanged(dsAudioPortState_t audioPortState); + + // @brief Audio mode for the respective audio port - raised for every type of port + // @param audioPortType: audio port type see dsAudioPortType_t + // @param audioStereoMode: audio stereo mode - see dsAudioStereoMode_t + virtual void OnAudioModeEvent(dsAudioPortType_t audioPortType, dsAudioStereoMode_t audioStereoMode); + + // @brief Audio level changed + // @param audioiLevel: audio level value + virtual void OnAudioLevelChangedEvent(int audioLevel); + + // @brief Audio Output format changed + // @param audioFormat: Type of audio format see AudioFormat + virtual void OnAudioFormatUpdate(dsAudioFormat_t audioFormat); + }; + // @brief Register a listener for audio port events + // @param listener: class object implementing the listener + dsError_t Register(IAudioOutputPortEvents* listener); - struct IVideoDeviceEvents { - // @brief Display Framerate Pre-change - // @text OnDisplayFrameratePreChange - // @param frameRate: PreChange framerate - virtual void OnDisplayFrameratePreChange(const std::string& frameRate) { }; - - // @brief Display Framerate Post-change - // @text OnDisplayFrameratePostChange - // @param frameRate: framerate post change - virtual void OnDisplayFrameratePostChange(const std::string& frameRate) { }; - - // @brief Zoom settings changed - // @text OnZoomSettingsChanged - // @param zoomSetting: Currently applied zoom setting - virtual void OnZoomSettingsChanged(dsVideoZoom_t zoomSetting) { }; - }; - - uint32_t Register(IVideoDeviceEvents *listener); - uint32_t UnRegister(IVideoDeviceEvents *listener); - - - struct IVideoOutputPortEvents { - - // @brief On Resolution Pre changed - // @text OnResolutionPreChange - // @param resolution: resolution - virtual void OnResolutionPreChange(const int width, const int height) { }; - - // @brief On Resolution Post change - // @text onResolutionPostChange - // @param resolution: resolution - virtual void OnResolutionPostChange(const int width, const int height) { }; - - // @brief On HDCP Status change - // @text OnHDCPStatusChange - // @param hdcpStatus: HDCP Status - virtual void OnHDCPStatusChange(dsHdcpStatus_t hdcpStatus) { }; - - // @brief On Video Format update - // @text OnVideoFormatUpdate - // @param videoFormatHDR: Video format HDR standard - virtual void OnVideoFormatUpdate(dsHDRStandard_t videoFormatHDR) { }; + // @brief UnRegister a listener for audio port events + // @param listener: class object implementing the listener + dsError_t UnRegister(IAudioOutputPortEvents* listener); + + struct IDisplayDeviceEvents { + virtual ~IDisplayDeviceEvents() = default; + + // @brief Display HDMI (out) Hot plug event + // @param displayEvent: display event type see dsDisplayEvent_t + virtual void OnDisplayHDMIHotPlug(dsDisplayEvent_t displayEvent); }; - uint32_t Register(IVideoOutputPortEvents *listener); - uint32_t UnRegister(IVideoOutputPortEvents *listener); + // @brief Register a listener for display device events + // @param listener: class object implementing the listener + dsError_t Register(IDisplayDeviceEvents* listener); + // @brief UnRegister a listener for display device events + // @param listener: class object implementing the listener + dsError_t UnRegister(IDisplayDeviceEvents* listener); static const int kPowerOn; static const int kPowerOff; From 54e5da5373a75d9b02d2b6ba53e023e0fc4aee0c Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Thu, 28 Aug 2025 20:28:55 +0530 Subject: [PATCH 07/10] topic/RDKEMW6161- Some more Updates to Interfaces --- ds/host.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ds/host.cpp b/ds/host.cpp index 36a256eb..e6498521 100644 --- a/ds/host.cpp +++ b/ds/host.cpp @@ -1157,7 +1157,7 @@ dsError_t Host::UnRegister(IAudioOutputPortEvents* listener) return 0; } -dsError_t Host::Register(IDisplayDeviceEvents* listener) { +dsError_t Host::Register(IDisplayDeviceEvents* listener) { return 0; } @@ -1168,11 +1168,11 @@ dsError_t Host::UnRegister(IDisplayDeviceEvents* listener) } +/** @} */ } -/** @} */ /** @} */ /** @} */ From c83274e21de1a600188b54907d9e358e65ef2c13 Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Thu, 28 Aug 2025 20:36:52 +0530 Subject: [PATCH 08/10] topic/RDKEMW6161- Some more Updates to Interfaces --- ds/host.cpp | 28 ++++++++++++++-------------- ds/include/host.hpp | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ds/host.cpp b/ds/host.cpp index e6498521..4308d750 100644 --- a/ds/host.cpp +++ b/ds/host.cpp @@ -1099,72 +1099,72 @@ INT_WARN("Base impl of OnHDMIInEventHotPlug called. port: %d isConnected %d", po dsError_t Host::Register(IHDMIInEvents *listener) { - return 0; + return dsERR_NONE; } dsError_t Host::UnRegister(IHDMIInEvents *listener) { - return 0; + return dsERR_NONE; } dsError_t Host::Register(ICompositeInEvents *listener) { - return 0; + return dsERR_NONE; } dsError_t Host::UnRegister(ICompositeInEvents *listener) { - return 0; + return dsERR_NONE; } dsError_t Host::Register(IDisplayEvents *listener) { - return 0; + return dsERR_NONE; } dsError_t Host::UnRegister(IDisplayEvents *listener) { - return 0; + return dsERR_NONE; } dsError_t Host::Register(IVideoDeviceEvents* listener) { - return 0; + return dsERR_NONE; } dsError_t Host::UnRegister(IVideoDeviceEvents* listener) { - return 0; + return dsERR_NONE; } dsError_t Host::Register(IVideoOutputPortEvents* listener) { - return 0; + return dsERR_NONE; } dsError_t Host::UnRegister(IVideoOutputPortEvents* listener) { - return 0; + return dsERR_NONE; } dsError_t Host::Register(IAudioOutputPortEvents* listener) { - return 0; + return dsERR_NONE; } dsError_t Host::UnRegister(IAudioOutputPortEvents* listener) { - return 0; + return dsERR_NONE; } dsError_t Host::Register(IDisplayDeviceEvents* listener) { - return 0; + return dsERR_NONE; } dsError_t Host::UnRegister(IDisplayDeviceEvents* listener) { - return 0; + return dsERR_NONE; } diff --git a/ds/include/host.hpp b/ds/include/host.hpp index 4c43bc8b..4c83e9a9 100644 --- a/ds/include/host.hpp +++ b/ds/include/host.hpp @@ -40,7 +40,7 @@ #include "dsMgr.h" #include "dsTypes.h" #include "dsDisplay.h" - +#include "dsError.h" /** From 127dfeacbf6286ba56c56940ab4f3abb02d5591c Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Thu, 28 Aug 2025 20:41:14 +0530 Subject: [PATCH 09/10] topic/RDKEMW6161- Some more Updates to Interfaces --- ds/host.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ds/host.cpp b/ds/host.cpp index 4308d750..021b8a97 100644 --- a/ds/host.cpp +++ b/ds/host.cpp @@ -921,7 +921,7 @@ INT_WARN("Base impl of OnHDMIInEventHotPlug called. port: %d isConnected %d", po /* virtual */ void Host::IHDMIInEvents::OnHDMIInEventSignalStatus(dsHdmiInPort_t port, dsHdmiInSignalStatus_t signalStatus) { /* If client needs to handle this event, they should override this method */ - INT_WARN("Base impl of OnHDMIInEventSignalStatus called. activePort: %d signalStatus %d", activePort, signalStatus); + INT_WARN("Base impl of OnHDMIInEventSignalStatus called. port: %d signalStatus %d", port, signalStatus); } /* virtual */ void Host::IHDMIInEvents::OnHDMIInEventStatus(dsHdmiInPort_t activePort, bool isPresented) From 8867dcd09e18e1b1dbb21b876d13676786cc5cae Mon Sep 17 00:00:00 2001 From: Ramesh Babu H Date: Thu, 28 Aug 2025 20:42:30 +0530 Subject: [PATCH 10/10] topic/RDKEMW6161- Some more Updates to Interfaces --- ds/host.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ds/host.cpp b/ds/host.cpp index 021b8a97..6bd99723 100644 --- a/ds/host.cpp +++ b/ds/host.cpp @@ -933,7 +933,8 @@ INT_WARN("Base impl of OnHDMIInEventHotPlug called. port: %d isConnected %d", po /* virtual */ void Host::IHDMIInEvents::OnHDMIInVideoModeUpdate(dsHdmiInPort_t port, const dsVideoPortResolution_t& videoPortResolution) { /* If client needs to handle this event, they should override this method */ - INT_WARN("Base impl of OnHDMIInVideoModeUpdate called. port: %d videoResolution:pixelresol %d", port, videoResolution.pixelResolution); + INT_WARN("Base impl of OnHDMIInVideoModeUpdate called. port: %d videoPortResolution.pixelresolution %d", + port, videoPortResolution.pixelResolution); } /* virtual */ void Host::IHDMIInEvents::OnHDMIInAllmStatus(dsHdmiInPort_t port, bool allmStatus)