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 diff --git a/cov_build.sh b/cov_build.sh index 22e8d7d4..712e7ae0 100644 --- a/cov_build.sh +++ b/cov_build.sh @@ -70,4 +70,4 @@ find $WORKDIR -iname "*.o" -exec rm -v {} \; find $WORKDIR -iname "*.so*" -exec rm -v {} \; echo "##### Triggering make" -make CFLAGS+='-fPIC -DDSMGR_LOGGER_ENABLED=ON -DRDK_DSHAL_NAME=\"libdshal.so\" -I${DS_IF_PATH}/include -I${DS_HAL_PATH} -I${DS_MGRS}/stubs -I${IARMBUS_PATH}/core -I${IARMBUS_PATH}/core/include -I${IARM_MGRS}/sysmgr/include -I${DS_MGRS}/ds/include -I${DS_MGRS}/rpc/include -I${POWER_IF_PATH}/include/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I${IARM_MGRS}/mfr/include/ -I${IARM_MGRS}/mfr/common -I${DEEPSLEEP_IF_PATH}/include -I${IARM_MGRS}/hal/include -I${IARM_MGRS}/power -I${IARM_MGRS}/power/include' LDFLAGS="-L/usr/lib/x86_64-linux-gnu/ -L/usr/local/include -lglib-2.0 -lIARMBus -lWPEFrameworkPowerController -ldshal" \ No newline at end of file +make CFLAGS+='-fPIC -DDSMGR_LOGGER_ENABLED=ON -DDS_ENABLE_IARM_PATH -DRDK_DSHAL_NAME=\"libdshal.so\" -I${DS_IF_PATH}/include -I${DS_HAL_PATH} -I${DS_MGRS}/stubs -I${IARMBUS_PATH}/core -I${IARMBUS_PATH}/core/include -I${IARM_MGRS}/sysmgr/include -I${DS_MGRS}/ds/include -I${DS_MGRS}/ds/include/iarm -I${DS_MGRS}/rpc/include -I${POWER_IF_PATH}/include/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I${IARM_MGRS}/mfr/include/ -I${IARM_MGRS}/mfr/common -I${DEEPSLEEP_IF_PATH}/include -I${IARM_MGRS}/hal/include -I${IARM_MGRS}/power -I${IARM_MGRS}/power/include' LDFLAGS="-L/usr/lib/x86_64-linux-gnu/ -L/usr/local/include -lglib-2.0 -lIARMBus -lWPEFrameworkPowerController -ldshal" diff --git a/ds/Makefile b/ds/Makefile index e7c41ddd..96e8f087 100644 --- a/ds/Makefile +++ b/ds/Makefile @@ -33,7 +33,8 @@ INCLUDE := -I$(PWD) \ -I$(PWD)/hal/src \ -I$(PWD)/ds \ -I$(PWD)/rpc/include \ - -I$(PWD)/ds/include + -I$(PWD)/ds/include \ + -I$(PWD)/ds/include/iarm else INCLUDE := -I$(PWD) \ -I$(LOG4C_INSTALL_DIR)/include \ @@ -41,7 +42,8 @@ INCLUDE := -I$(PWD) \ -I$(PWD)/hal/include \ -I$(PWD)/ds \ -I$(PWD)/rpc/include \ - -I$(PWD)/ds/include + -I$(PWD)/ds/include \ + -I$(PWD)/ds/include/iarm endif diff --git a/ds/Makefile.am b/ds/Makefile.am index 90c9bea4..6b9f3842 100644 --- a/ds/Makefile.am +++ b/ds/Makefile.am @@ -63,3 +63,11 @@ libds_la_SOURCES = aspectRatio.cpp \ host.cpp \ manager.cpp \ videoDFC.cpp + +# DS_ENABLE_IARM_PATH to be defined from the config.ac file +if DS_ENABLE_IARM_PATH +libds_la_SOURCES += iarm/iarmCompositeIn.cpp +else +# plugin files of future +endif + diff --git a/ds/audioOutputPort.cpp b/ds/audioOutputPort.cpp index e5c8fabc..1af09018 100644 --- a/ds/audioOutputPort.cpp +++ b/ds/audioOutputPort.cpp @@ -27,6 +27,7 @@ **/ + #include "audioEncoding.hpp" #include "audioCompression.hpp" #include "audioStereoMode.hpp" @@ -2001,9 +2002,30 @@ void AudioOutputPort::getHdmiArcPortId(int *portId) } +/** + * @fn void AudioOutputPort::Register(IEvent *listener) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t AudioOutputPort::Register(IEvent *listener) +{ + return 0; +} + +/** + * @fn void AudioOutputPort::UnRegister(IEvent *listener) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t AudioOutputPort::UnRegister(IEvent *listener) +{ + return 0; } +} /** @} */ /** @} */ diff --git a/ds/compositeIn.cpp b/ds/compositeIn.cpp index b126f3d3..bb4e0f2f 100644 --- a/ds/compositeIn.cpp +++ b/ds/compositeIn.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. @@ -62,7 +62,7 @@ #include "dsTypes.h" #include "dsCompositeIn.h" #include "dsUtl.h" - +//#include "iarmCompositeIn.hpp" namespace device { @@ -78,6 +78,7 @@ namespace device * @callergraph */ CompositeInput::CompositeInput() + : implComposite(std::unique_ptr(new IarmCompositeInput())) { dsCompositeInInit(); } @@ -94,6 +95,7 @@ CompositeInput::CompositeInput() CompositeInput::~CompositeInput() { dsCompositeInTerm(); + implComposite.reset(); } /** @@ -270,6 +272,56 @@ void CompositeInput::scaleVideo (int32_t x, int32_t y, int32_t width, int32_t he } } + +/** + * @fn void CompositeInput::Register(IEvent *listener) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t CompositeInput::Register(IEvent *listener) +{ + uint32_t retStatus=FAIL; + + INT_INFO("CompositeInput::Register Entry \n"); + if(implComposite) + { + retStatus = implComposite->Register(listener); + } + else + { + INT_INFO("CompositeInput::Register impl is null\n"); + } + return retStatus; +} + + +/** + * @fn void CompositeInput::UnRegister(IEvent *listener) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t CompositeInput::UnRegister(IEvent *listener) +{ + uint32_t retStatus=FAIL; + + INT_INFO("CompositeInput::UnRegister Entry \n"); + if(implComposite) + { + retStatus = implComposite->UnRegister(listener); + } + else + { + INT_INFO("CompositeInput::UnRegister impl is null\n"); + } + return retStatus; +} + + + + + } diff --git a/ds/frontPanelConfig.cpp b/ds/frontPanelConfig.cpp index e20b0321..1c7a2cd8 100644 --- a/ds/frontPanelConfig.cpp +++ b/ds/frontPanelConfig.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. @@ -264,6 +264,29 @@ FrontPanelTextDisplay &FrontPanelConfig::getTextDisplay(const string &name) } +/** + * @fn void FrontPanelTextDisplay::Register(IEvent *listener) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t FrontPanelTextDisplay::Register(IEvent *listener) +{ + return 0; +} + + +/** + * @fn void FrontPanelTextDisplay::UnRegister(IEvent *listener) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t FrontPanelTextDisplay::UnRegister(IEvent *listener) +{ + return 0; +} + /** * @fn FrontPanelConfig::getColors() * @brief This API gets the list of colors supported by front panel indicators. diff --git a/ds/hdmiIn.cpp b/ds/hdmiIn.cpp index 18b2ac97..7badf4fb 100755 --- a/ds/hdmiIn.cpp +++ b/ds/hdmiIn.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. @@ -678,6 +678,31 @@ void HdmiInput::getHdmiVersion (int iHdmiPort, dsHdmiMaxCapabilityVersion_t *cap printf ("%s:%d - HDMI Compatibility Version = %d\n", __PRETTY_FUNCTION__, __LINE__, *capversion); } + +/** + * @fn void HdmiInput::Register(IEvent *listener) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t HdmiInput::Register(IEvent *listener) +{ + return 0; +} + + +/** + * @fn void HdmiInput::UnRegister(IEvent *listener) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t HdmiInput::UnRegister(IEvent *listener) +{ + return 0; +} + + } diff --git a/ds/host.cpp b/ds/host.cpp index d621e479..9dc2e0a9 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,73 @@ 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(IEvent *listener) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t Host::Register(IEvent *listener) +{ + return 0; +} + + +/** + * @fn void Host::UnRegister(IEvent *listener) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t Host::UnRegister(IEvent *listener) +{ + return 0; +} + +/** + * @fn void DisplayConnectionChangeListener::Register(IEvent *Evtnotification) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t DisplayConnectionChangeListener::Register(IEvent *listener) +{ + return 0; +} + +/** + * @fn void DisplayConnectionChangeListener::UnRegister(IEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t DisplayConnectionChangeListener::UnRegister(IEvent *listener) +{ + return 0; +} + +/** + * @fn void DisplayConnectionChangeListener::UnRegister(IDisplayHDMIHotPlugEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t DisplayConnectionChangeListener::Register(IDisplayHDMIHotPlugEvent *listener) +{ + return 0; +} + + +/** + * @fn void DisplayConnectionChangeListener::UnRegister(IEvent *Evtnotification) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t DisplayConnectionChangeListener::UnRegister(IDisplayHDMIHotPlugEvent *listener) +{ + return 0; +} } diff --git a/ds/iarm/iarmCompositeIn.cpp b/ds/iarm/iarmCompositeIn.cpp new file mode 100755 index 00000000..3d956bf7 --- /dev/null +++ b/ds/iarm/iarmCompositeIn.cpp @@ -0,0 +1,170 @@ +/* + * If not stated otherwise in this file or this component's LICENSE file the + * following copyright and licenses apply: + * + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/** + * @file iarmCompositeIn.cpp + * @brief Configuration of COMPOSITE Input + */ + +/** +* @defgroup devicesettings +* @{ +* @defgroup ds +* @{ +**/ + + +#include +#include +#include +#include +#include "compositeIn.hpp" +#include "illegalArgumentException.hpp" +#include "host.hpp" +#include "dslogger.h" +#include "dsError.h" +#include "dsTypes.h" +#include "dsCompositeIn.h" +#include "dsUtl.h" + +#include "utils.h" // for Utils::IARM and IARM_CHECK + + +#include "iarmCompositeIn.hpp" +#include +#include + +// Static data definitions +std::mutex IarmCompositeInput::s_mutex; +std::vector IarmCompositeInput::compInListener; + +constexpr IarmCompositeInput::EventHandlerMapping IarmCompositeInput::eventHandlers[] = { + { IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_HOTPLUG, IarmCompositeInput::OnCompositeInHotPlugHandler }, + { IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_SIGNAL_STATUS, IarmCompositeInput::OnCompositeInSignalStatusHandler }, + { IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_STATUS, IarmCompositeInput::OnCompositeInStatusHandler }, + { IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_VIDEO_MODE_UPDATE, IarmCompositeInput::OnCompositeInVideoModeUpdateHandler }, +}; + +const char* IarmCompositeInput::OWNER_NAME = IARM_BUS_DSMGR_NAME; + +IarmCompositeInput::IarmCompositeInput() {} +IarmCompositeInput::~IarmCompositeInput() {} + + +uint32_t IarmCompositeInput::Register(device::CompositeInput::IEvent* listener) { + std::lock_guard lock(s_mutex); + + // First listener, register all handlers + if (compInListener.empty()) { + for (auto& eh : eventHandlers) { + IARM_Bus_RegisterEventHandler(OWNER_NAME, eh.eventId, eh.handler); + } + } + + // Add to listener list if not already present + if (std::find(compInListener.begin(), compInListener.end(), listener) == compInListener.end()) { + compInListener.push_back(listener); + } + + return 0; // Success +} + +// Unregister a listener and remove IARM handlers if last listener +uint32_t IarmCompositeInput::UnRegister(device::CompositeInput::IEvent* listener) { + std::lock_guard lock(s_mutex); + + auto it = std::remove(compInListener.begin(), compInListener.end(), listener); + if (it != compInListener.end()) { + compInListener.erase(it, compInListener.end()); + } + + // If no more listeners, unregister all handlers + if (compInListener.empty()) { + for (auto& eh : eventHandlers) { + IARM_Bus_UnRegisterEventHandler(OWNER_NAME, eh.eventId); + } + } + + return 0; // Success +} + + + +template + +void IarmCompositeInput::Dispatch(F&& fn) { + std::lock_guard lock(s_mutex); + for (auto* listener : compInListener) { + fn(listener); + } +} + +// ====== Handlers ====== + +void IarmCompositeInput::OnCompositeInHotPlugHandler(const char* owner, IARM_EventId_t, void* data, size_t) { + auto* eventData = static_cast(data); + dsCompositeInPort_t dsPort = static_cast( + eventData->data.composite_in_connect.port + ); + CompositeInPort compPort = static_cast(dsPort); + bool isConnected = eventData->data.composite_in_connect.isPortConnected; + + Dispatch([&](device::CompositeInput::IEvent* l) { l->OnCompositeInHotPlug(compPort, isConnected); }); +} + +void IarmCompositeInput::OnCompositeInSignalStatusHandler(const char* owner, IARM_EventId_t, void* data, size_t) { + auto* eventData = static_cast(data); + CompositeInPort compPort = static_cast( + static_cast(eventData->data.composite_in_sig_status.port) + ); + CompositeInSignalStatus compStatus = static_cast( + static_cast(eventData->data.composite_in_sig_status.status) + ); + + Dispatch([&](IEvent* l) { l->OnCompositeInSignalStatus(compPort, compStatus); }); +} + +void IarmCompositeInput::OnCompositeInStatusHandler(const char* owner, IARM_EventId_t, void* data, size_t) { + auto* eventData = static_cast(data); + CompositeInPort compPort = static_cast( + static_cast(eventData->data.composite_in_status.port) + ); + bool isPresented = eventData->data.composite_in_status.isPresented; + + Dispatch([&](IEvent* l) { l->OnCompositeInStatus(compPort, isPresented); }); +} + +void IarmCompositeInput::OnCompositeInVideoModeUpdateHandler(const char* owner, IARM_EventId_t, void* data, size_t) { + auto* eventData = static_cast(data); + CompositeInPort compPort = static_cast( + static_cast(eventData->data.composite_in_video_mode.port) + ); + + DisplayVideoPortResolution compResolution {}; + compResolution.pixelResolution = static_cast( + eventData->data.composite_in_video_mode.resolution.pixelResolution + ); + compResolution.interlaced = eventData->data.composite_in_video_mode.resolution.interlaced; + compResolution.frameRate = static_cast( + eventData->data.composite_in_video_mode.resolution.frameRate + ); + + Dispatch([&](IEvent* l) { l->OnCompositeInVideoModeUpdate(compPort, compResolution); }); +} diff --git a/ds/include/audioOutputPort.hpp b/ds/include/audioOutputPort.hpp index 9dec5126..fad7b58b 100644 --- a/ds/include/audioOutputPort.hpp +++ b/ds/include/audioOutputPort.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. @@ -35,9 +35,8 @@ #include "list.hpp" #include "enumerable.hpp" #include "dsTypes.h" - #include "dsError.h" - +#include "dsMgrNtf.h" #include #include @@ -52,6 +51,9 @@ class AudioOutputPortType; class AudioOutputPortConfig; + + + /** * @class AudioOutputPort * @brief Class extending Enumerable to implement the audiooutputport interface. @@ -82,8 +84,73 @@ class AudioOutputPort : public Enumerable { bool _muted; //!< Method variable to check whether audio is muted or not. + + + public: + struct IEvent{ + + // @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(AudioPortType portType, 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(DolbyAtmosCapability atmosCapability, bool status) { }; + + // @brief Audio port state changed + // @text onAudioPortStateChanged + // @param audioPortState: audio port state + virtual void OnAudioPortStateChanged(AudioPortState 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(AudioPortType audioPortType, AudioStereoMode audioStereoMode) { }; + + // @brief Audio level changed + // @text OnAudioLevelChangedEvent + // @param audioiLevel: audio level value + virtual void OnAudioLevelChangedEvent(int audioLevel) { }; + + // @brief Audio Output format changed + // @text onAudioFormatUpdate + // @param audioFormat: Type of audio format see AudioFormat + virtual void OnAudioFormatUpdate(AudioFormat audioFormat) { }; + + }; + + uint32_t Register(IEvent *listener); + uint32_t UnRegister(IEvent *listener); + static AudioOutputPort & getInstance(int id); static AudioOutputPort & getInstance(const std::string &name); diff --git a/ds/include/compositeIn.hpp b/ds/include/compositeIn.hpp index c0565658..c3a358fb 100644 --- a/ds/include/compositeIn.hpp +++ b/ds/include/compositeIn.hpp @@ -1,8 +1,9 @@ + /* * 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. @@ -49,6 +50,14 @@ #define _DS_COMPOSITEIN_HPP_ #include +#include +#include "dsMgrNtf.h" +#ifdef DS_ENABLE_IARM_PATH +class IarmCompositeInput; //Forward Declaration +#else +//include the plugin class +#endif + /** * @file compositeIn.hpp @@ -58,6 +67,9 @@ static const int8_t COMPOSITE_IN_PORT_NONE = -1; +#define SUCCESS (0) +#define FAIL (1) + namespace device { @@ -69,7 +81,44 @@ namespace device class CompositeInput { +#ifdef DS_ENABLE_IARM_PATH + using DefaultImpl = IarmCompositeInput; +#else + //include the plugin file class as the DefaultImpl +#endif + + public: + struct IEvent { + // @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(CompositeInPort port, bool isConnected) { }; + + // @brief Composite In Signal status + // @text onCompositeInSignalStatus + // @param port: Port of the hotplug + // @param signalStatus: Signal status + virtual void OnCompositeInSignalStatus(CompositeInPort port, CompositeInSignalStatus signalStatus) { }; + + // @brief Composite In status + // @text onCompositeInStatus + // @param activePort: Active port + // @param isPresented: is it presented to user + virtual void OnCompositeInStatus(CompositeInPort activePort, bool isPresented) { }; + + + // @brief Composite In Video Mode Update + // @text OnCompositeInVideoModeUpdate + // @param activePort: Active port + // @param videoResolution: See DisplayVideoPortResolution + virtual void OnCompositeInVideoModeUpdate(CompositeInPort activePort, DisplayVideoPortResolution videoResolution) { }; + }; + + virtual uint32_t Register(IEvent *listener); + virtual uint32_t UnRegister(IEvent *listener); + static CompositeInput & getInstance(); uint8_t getNumberOfInputs () const; @@ -79,10 +128,10 @@ class CompositeInput bool isPortConnected (int8_t Port) const; void selectPort (int8_t Port) const; void scaleVideo (int32_t x, int32_t y, int32_t width, int32_t height) const; - private: - CompositeInput (); /* default constructor */ - virtual ~CompositeInput (); /* destructor */ + CompositeInput (); + ~CompositeInput (); + std::unique_ptr implComposite; }; diff --git a/ds/include/displayConnectionChangeListener.hpp b/ds/include/displayConnectionChangeListener.hpp index 736cfd04..15aaa650 100644 --- a/ds/include/displayConnectionChangeListener.hpp +++ b/ds/include/displayConnectionChangeListener.hpp @@ -1,8 +1,9 @@ + /* * 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 +18,6 @@ * limitations under the License. */ - - /** * @defgroup devicesettings @@ -32,14 +31,47 @@ #define _DS_DISPLAYCONNECTIONCHANGELISTENER_H_ #include "videoOutputPort.hpp" +#include "dsMgrNtf.h" namespace device { class DisplayConnectionChangeListener { public: + + struct IDisplayHDMIHotPlugEvent{ + + // @brief Display HDMI Hot plug event + // @text onDisplayHDMIHotPlug + // @param displayEvent: DS_DISPLAY_EVENT_CONNECTED or DS_DISPLAY_EVENT_DISCONNECTED + virtual void OnDisplayHDMIHotPlug(DisplayEvent displayEvent) = 0; + }; + + uint32_t Register(IDisplayHDMIHotPlugEvent*listener); + uint32_t UnRegister(IDisplayHDMIHotPlugEvent *listener); + + + + struct IEvent{ + + // @brief Display RX Sense event + // @text onDisplayRxSense + // @param displayEvent: DS_DISPLAY_RXSENSE_ON or DS_DISPLAY_RXSENSE_OFF + virtual void OnDisplayRxSense(DisplayEvent displayEvent) = 0; + + // @brief Display HDCP Status + // @text OnDisplayHDCPStatus + virtual void OnDisplayHDCPStatus() = 0; + + }; + + uint32_t Register(IEvent *listener); + uint32_t UnRegister(IEvent *listener); + + DisplayConnectionChangeListener() {} virtual ~DisplayConnectionChangeListener() {} - virtual void displayConnectionChanged(VideoOutputPort &port, int newConnectionStatus) = 0; + virtual void displayConnectionChanged(VideoOutputPort &port, int newConnectionStatus) = 0; + }; } diff --git a/ds/include/frontPanelTextDisplay.hpp b/ds/include/frontPanelTextDisplay.hpp index 588a3352..4b9d015e 100644 --- a/ds/include/frontPanelTextDisplay.hpp +++ b/ds/include/frontPanelTextDisplay.hpp @@ -1,8 +1,9 @@ + /* * 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. @@ -32,6 +33,7 @@ #include "dsConstant.hpp" #include "list" #include "frontPanelIndicator.hpp" +#include "dsMgrNtf.h" /** @@ -131,6 +133,18 @@ class FrontPanelTextDisplay : public FrontPanelIndicator { static const char * kPropertyBrightness; public: + + struct IEvent { + + // @brief On Front Panel display time format changed + // @text OnFPDTimeFormatChanged + // @param timeFormat: current time format 12 or 24 hour + virtual void OnFPDTimeFormatChanged(FPDTimeFormat timeFormat) { }; + }; + + uint32_t Register(IEvent *listener); + uint32_t UnRegister(IEvent *listener); + static const int kModeClock12Hr; //!< Indicates 12 hour time format. static const int kModeClock24Hr; //!< Indicates 24 hour time format. static const int kModeString; //!< Indicates text string. diff --git a/ds/include/hdmiIn.hpp b/ds/include/hdmiIn.hpp index eb2da3dc..e217fe18 100755 --- a/ds/include/hdmiIn.hpp +++ b/ds/include/hdmiIn.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. @@ -52,7 +52,7 @@ #include #include "dsTypes.h" - +#include "dsMgrNtf.h" /** * @file hdmiIn.hpp @@ -74,6 +74,67 @@ class HdmiInput { public: + + + struct IEvent { + + // @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(HDMIInPort 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(HDMIInPort port, HDMIInSignalStatus 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(HDMIInPort 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(HDMIInPort port, const HDMIVideoPortResolution& 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(HDMIInPort 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(HDMIInPort port, HDMIInAviContentType aviContentType) { }; + + // @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) { }; + + // @brief HDMI VRR status + // @text OnHDMInVRRStatus + // @param port: port 0 or 1 et al + // @param vrrType: VRR type + virtual void OnHDMInVRRStatus(HDMIInPort port, HDMIInVRRType vrrType) { }; + + // @brief Zoom settings changed + // @text OnZoomSettingsChanged + // @param zoomSetting: Currently applied zoom setting + virtual void OnZoomSettingsChanged(VideoZoom zoomSetting) { }; + }; + + uint32_t Register(IEvent *listener); + uint32_t UnRegister(IEvent *listener); + static HdmiInput & getInstance(); uint8_t getNumberOfInputs () const; diff --git a/ds/include/host.hpp b/ds/include/host.hpp index d14d42dc..bf5332fb 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,7 @@ #include "videoDevice.hpp" #include "sleepMode.hpp" #include "list.hpp" +#include "dsMgrNtf.h" #include #include @@ -59,6 +58,20 @@ namespace device { */ class Host { public: + + struct IEvent{ + + // @brief Sleep mode changed + // @text onSleepModeChanged + // @param sleepMode: see SleepMode + virtual void OnSleepModeChanged(SleepMode sleepMode) { }; + + + }; + + uint32_t Register(IEvent *listener); + uint32_t UnRegister(IEvent *listener); + static const int kPowerOn; static const int kPowerOff; static const int kPowerStandby; diff --git a/ds/include/iarm/iarmCompositeIn.hpp b/ds/include/iarm/iarmCompositeIn.hpp new file mode 100755 index 00000000..3da18640 --- /dev/null +++ b/ds/include/iarm/iarmCompositeIn.hpp @@ -0,0 +1,79 @@ + +/* + * If not stated otherwise in this file or this component's LICENSE file the + * following copyright and licenses apply: + * + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + +/** +* @defgroup devicesettings +* @{ +* @defgroup ds +* @{ +**/ + + +#ifndef _DS_IARM_COMPOSITEIN_HPP_ +#define _DS_IARM_COMPOSITEIN_HPP_ + +#include +#include "dsTypes.h" +#include + + +#pragma once +#include "compositeIn.hpp" +#include "dsMgr.h" +#include "libIARM.h" +#include "libIBus.h" +#include +#include + +class IarmCompositeInput { +public: + IarmCompositeInput(); + ~IarmCompositeInput(); + + uint32_t Register(device::CompositeInput::IEvent* listener); + uint32_t UnRegister(device::CompositeInput::IEvent* listener); + +private: + // Event Handlers + static void OnCompositeInHotPlugHandler(const char* owner, IARM_EventId_t eventId, void *data, size_t len); + static void OnCompositeInSignalStatusHandler(const char* owner, IARM_EventId_t eventId, void *data, size_t len); + static void OnCompositeInStatusHandler(const char* owner, IARM_EventId_t eventId, void *data, size_t len); + static void OnCompositeInVideoModeUpdateHandler(const char* owner, IARM_EventId_t eventId, void *data, size_t len); + + template + static void Dispatch(F&& fn); + + struct EventHandlerMapping { + IARM_EventId_t eventId; + IARM_EventHandler_t handler; + }; + + static const EventHandlerMapping eventHandlers[]; + static const char* OWNER_NAME; + + static std::mutex s_mutex; + static std::vector compInListener; +}; + +#endif /* _DS_IARM_COMPOSITEIN_HPP_ */ + + +/** @} */ +/** @} */ diff --git a/ds/include/videoDevice.hpp b/ds/include/videoDevice.hpp index 61ec375d..506ad337 100644 --- a/ds/include/videoDevice.hpp +++ b/ds/include/videoDevice.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. @@ -18,7 +18,6 @@ */ - /** * @defgroup devicesettings * @{ @@ -36,6 +35,7 @@ #include "list.hpp" #include #include +#include "dsMgrNtf.h" /** @@ -60,6 +60,22 @@ class VideoDevice : public DSConstant { static const char * kPropertyDFC; public: + + struct IEvent { + // @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(IEvent *listener); + uint32_t UnRegister(IEvent *listener); + static VideoDevice & getInstance(int id); static VideoDevice & getInstance(const std::string &name); diff --git a/ds/include/videoOutputPort.hpp b/ds/include/videoOutputPort.hpp index a9b71ade..c0fcba68 100644 --- a/ds/include/videoOutputPort.hpp +++ b/ds/include/videoOutputPort.hpp @@ -1,8 +1,9 @@ + /* * 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. @@ -38,6 +39,7 @@ #include #include "dsTypes.h" +#include "dsMgrNtf.h" /** * @file videoOutputPort.hpp @@ -77,6 +79,43 @@ class VideoOutputPort : public Enumerable { public: + struct ResolutionChange { + uint32_t width; + uint32_t height; + }; + + struct IEvent { + + // @brief On Resolution Pre changed + // @text OnResolutionPreChange + // @param resolution: resolution + virtual void OnResolutionPreChange(const ResolutionChange& resolution) { }; + + // @brief On Resolution Post change + // @text onResolutionPostChange + // @param resolution: resolution + virtual void OnResolutionPostChange(const ResolutionChange& resolution) { }; + + // @brief On HDCP Status change + // @text OnHDCPStatusChange + // @param hdcpStatus: HDCP Status + virtual void OnHDCPStatusChange(HDCPStatus hdcpStatus) { }; + + // @brief On Video Format update + // @text OnVideoFormatUpdate + // @param videoFormatHDR: Video format HDR standard + virtual void OnVideoFormatUpdate(HDRStandard videoFormatHDR) { }; + + // @brief HDCP Protocol version change + // @text OnHDCPProtocolChangeStatus + virtual void OnHDCPProtocolChangeStatus() { }; + + }; + + uint32_t Register(IEvent *listener); + uint32_t UnRegister(IEvent *listener); + + class Display { friend class VideoOutputPort; intptr_t _handle; diff --git a/ds/videoDevice.cpp b/ds/videoDevice.cpp index 37452a0c..8cee04c2 100644 --- a/ds/videoDevice.cpp +++ b/ds/videoDevice.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. @@ -332,6 +332,30 @@ int VideoDevice::getCurrentDisframerate(char *framerate) const return 0; } + +/** + * @fn void VideoDevice::Register(IEvent *listener) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t VideoDevice::Register(IEvent *listener) +{ + return 0; +} + + +/** + * @fn void VideoDevice::UnRegister(IEvent *listener) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t VideoDevice::UnRegister(IEvent *listener) +{ + return 0; +} + } /** @} */ diff --git a/ds/videoOutputPort.cpp b/ds/videoOutputPort.cpp index 5445e0dd..02924c2e 100644 --- a/ds/videoOutputPort.cpp +++ b/ds/videoOutputPort.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. @@ -949,6 +949,32 @@ void VideoOutputPort::Display::setAVIScanInformation(dsAVIScanInformation_t scan } } + +/** + * @fn void VideoOutputPort::Register(IEvent *listener) + * @brief This API is used to register the Events + * + * @return unint32_t + */ +uint32_t VideoOutputPort::Register(IEvent *listener) +{ + return 0; +} + + +/** + * @fn void VideoOutputPort::UnRegister(IEvent *listener) + * @brief This API is used to UnRegister the Events + * + * @return unint32_t + */ +uint32_t VideoOutputPort::UnRegister(IEvent *listener) +{ + return 0; +} + + + } /** @} */ //End of Doxygen tag diff --git a/rpc/include/dsMgrNtf.h b/rpc/include/dsMgrNtf.h new file mode 100755 index 00000000..dd5170b9 --- /dev/null +++ b/rpc/include/dsMgrNtf.h @@ -0,0 +1,345 @@ +/* + * If not stated otherwise in this file or this component's LICENSE file the + * following copyright and licenses apply: + * + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ + + + +/** +* @defgroup devicesettings +* @{ +* @defgroup rpc +* @{ +**/ + + +#ifndef RPDSMGRNTF_H_ +#define RPDSMGRNTF_H_ + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef enum _AudioPortState { + AUDIO_PORT_STATE_UNKNOWN = 0, + AUDIO_PORT_STATE_UNINITIALIZED = 1, + AUDIO_PORT_STATE_INITIALIZED = 2 +}AudioPortState; + + +typedef enum _AudioPortType { + AUDIO_PORT_TYPE_LR = 0, + AUDIO_PORT_TYPE_HDMI = 1, + AUDIO_PORT_TYPE_SPDIF = 2, + AUDIO_PORT_TYPE_SPEAKER = 3, + AUDIO_PORT_TYPE_HDMIARC = 4, + AUDIO_PORT_TYPE_HEADPHONE = 5, + AUDIO_PORT_TYPE_MAX = 6 + }AudioPortType; + +typedef enum _DolbyAtmosCapability { + AUDIO_DOLBYATMOS_NOT_SUPPORTED = 0, + AUDIO_DOLBYATMOS_DDPLUS_STREAM = 1, + AUDIO_DOLBYATMOS_ATMOS_METADATA = 2, + AUDIO_DOLBYATMOS_MAX = 3 + }DolbyAtmosCapability; + + +typedef enum _AudioStereoMode { + AUDIO_STEREO_UNKNOWN = 0, + AUDIO_STEREO_MONO = 1, + AUDIO_STEREO_STEREO = 2, + AUDIO_STEREO_SURROUND = 3, + AUDIO_STEREO_PASSTHROUGH = 4, + AUDIO_STEREO_DD = 5, + AUDIO_STEREO_DDPLUS = 6, + AUDIO_STEREO_MAX = 7 + }AudioStereoMode; + +typedef enum _AudioFormat { + AUDIO_FORMAT_NONE = 0, + AUDIO_FORMAT_PCM = 1, + AUDIO_FORMAT_DOLBY_AC3 = 2, + AUDIO_FORMAT_DOLBY_EAC3 = 3, + AUDIO_FORMAT_DOLBY_AC4 = 4, + AUDIO_FORMAT_DOLBY_MAT = 5, + AUDIO_FORMAT_DOLBY_TRUEHD = 6, + AUDIO_FORMAT_DOLBY_EAC3_ATMOS = 7, + AUDIO_FORMAT_DOLBY_TRUEHD_ATMOS = 8, + AUDIO_FORMAT_DOLBY_MAT_ATMOS = 9, + AUDIO_FORMAT_DOLBY_AC4_ATMOS = 10, + AUDIO_FORMAT_AAC = 11, + AUDIO_FORMAT_VORBIS = 12, + AUDIO_FORMAT_WMA = 13, + AUDIO_FORMAT_UNKNOWN = 14, + AUDIO_FORMAT_MAX = 15 + }AudioFormat; + + +typedef enum _HDMIInPort { + DS_HDMI_IN_PORT_NONE = -1, + DS_HDMI_IN_PORT_0 = 0, + DS_HDMI_IN_PORT_1 = 1, + DS_HDMI_IN_PORT_2 = 2, + DS_HDMI_IN_PORT_3 = 3, + DS_HDMI_IN_PORT_4 = 4, + DS_HDMI_IN_PORT_MAX = 5 + }HDMIInPort; + + + typedef enum _VideoZoom{ + DS_VIDEO_DEVICE_ZOOM_UNKNOWN = -1, + DS_VIDEO_DEVICE_ZOOM_NONE = 0, + DS_VIDEO_DEVICE_ZOOM_FULL = 1, + DS_VIDEO_DEVICE_ZOOM_LB_16_9 = 2, + DS_VIDEO_DEVICE_ZOOM_LB_14_9 = 3, + DS_VIDEO_DEVICE_ZOOM_CCO = 4, + DS_VIDEO_DEVICE_ZOOM_PAN_SCAN = 5, + DS_VIDEO_DEVICE_ZOOM_LB_2_21_1_ON_4_3 = 6, + DS_VIDEO_DEVICE_ZOOM_LB_2_21_1_ON_16_9 = 7, + DS_VIDEO_DEVICE_ZOOM_PLATFORM = 8, + DS_VIDEO_DEVICE_ZOOM_16_9_ZOOM = 9, + DS_VIDEO_DEVICE_ZOOM_PILLARBOX_4_3 = 10, + DS_VIDEO_DEVICE_ZOOM_WIDE_4_3 = 11, + DS_VIDEO_DEVICE_ZOOM_MAX = 12 + }VideoZoom; + + +typedef enum _HDMIInVRRType{ + DS_HDMIIN_VRR_NONE = 0, + DS_HDMIIN_HDMI_VRR = 1, + DS_HDMIIN_AMD_FREESYNC = 2, + DS_HDMIIN_AMD_FREESYNC_PREMIUM = 3, + DS_HDMIIN_AMD_FREESYNC_PREMIUM_PRO = 4 + }HDMIInVRRType; + +typedef enum _HDMIInAviContentType { + DS_HDMIIN_AVICONTENT_TYPE_GRAPHICS =0, + DS_HDMIIN_AVICONTENT_TYPE_PHOTO =1, + DS_HDMIIN_AVICONTENT_TYPE_CINEMA =2, + DS_HDMIIN_AVICONTENT_TYPE_GAME =3, + DS_HDMIIN_AVICONTENT_TYPE_NOT_SIGNALLED =4, + DS_HDMIIN_AVICONTENT_TYPE_MAX =5 + }HDMIInAviContentType; + + +typedef enum _HDMIInTVResolution { + DS_HDMIIN_RESOLUTION_480I = 0x000001, + DS_HDMIIN_RESOLUTION_480P = 0x000002, + DS_HDMIIN_RESOLUTION_576I = 0x000004, + DS_HDMIIN_RESOLUTION_576P = 0x000008, + DS_HDMIIN_RESOLUTION_576P50 = 0x000010, + DS_HDMIIN_RESOLUTION_720P = 0x000020, + DS_HDMIIN_RESOLUTION_720P50 = 0x000040, + DS_HDMIIN_RESOLUTION_1080I = 0x000080, + DS_HDMIIN_RESOLUTION_1080P = 0x000100, + DS_HDMIIN_RESOLUTION_1080P24 = 0x000200, + DS_HDMIIN_RESOLUTION_1080I25 = 0x000400, + DS_HDMIIN_RESOLUTION_1080P30 = 0x001000, + DS_HDMIIN_RESOLUTION_1080I50 = 0x002000, + DS_HDMIIN_RESOLUTION_1080P50 = 0x004000, + DS_HDMIIN_RESOLUTION_1080P60 = 0x008000, + DS_HDMIIN_RESOLUTION_2160P24 = 0x010000, + DS_HDMIIN_RESOLUTION_2160P25 = 0x020000, + DS_HDMIIN_RESOLUTION_2160P30 = 0x040000, + DS_HDMIIN_RESOLUTION_2160P50 = 0x080000, + DS_HDMIIN_RESOLUTION_2160P60 = 0x100000 + }HDMIInTVResolution; + +typedef enum _HDMIVideoAspectRatio { + DS_HDMIIN_ASPECT_RATIO_UNKNOWN = 0 /* @text Video Aspect Ratio UNKNOWN */, + DS_HDMIIN_ASPECT_RATIO_4X3 = 1 /* @text Video Aspect Ratio 4X3 */, + DS_HDMIIN_ASPECT_RATIO_16x9 = 2 /* @text Video Aspect Ratio 16x9 */ + }HDMIVideoAspectRatio; + +typedef enum _HDMIInVideoStereoScopicMode{ + DS_HDMIIN_SSMODE_UNKNOWN = 0, + DS_HDMIIN_SSMODE_2D = 1, + DS_HDMIIN_SSMODE_3D_SIDE_BY_SIDE = 2, + DS_HDMIIN_SSMODE_3D_TOP_AND_BOTTOM = 3 + }HDMIInVideoStereoScopicMode; + + typedef enum HDMIInVideoFrameRate { + DS_HDMIIN_FRAMERATE_UNKNOWN = 0, + DS_HDMIIN_FRAMERATE_24 = 1, + DS_HDMIIN_FRAMERATE_25 = 2, + DS_HDMIIN_FRAMERATE_30 = 3, + DS_HDMIIN_FRAMERATE_60 = 4, + DS_HDMIIN_FRAMERATE_23_98 = 5, + DS_HDMIIN_FRAMERATE_29_97 = 6, + DS_HDMIIN_FRAMERATE_50 = 7, + DS_HDMIIN_FRAMERATE_59_94 = 8 + }HDMIInVideoFrameRate; + +typedef struct _HDMIVideoPortResolution { + std::string name; + HDMIInTVResolution pixelResolution; + HDMIVideoAspectRatio aspectRatio; + HDMIInVideoStereoScopicMode stereoScopicMode; + HDMIInVideoFrameRate frameRate; + bool interlaced; + }HDMIVideoPortResolution; + + +typedef enum _HDMIInSignalStatus{ + DS_HDMI_IN_SIGNAL_STATUS_NONE = -1, + DS_HDMI_IN_SIGNAL_STATUS_NOSIGNAL = 0, + DS_HDMI_IN_SIGNAL_STATUS_UNSTABLE = 1, + DS_HDMI_IN_SIGNAL_STATUS_NOTSUPPORTED = 2, + DS_HDMI_IN_SIGNAL_STATUS_STABLE = 3, + DS_HDMI_IN_SIGNAL_STATUS_MAX = 4 + }HDMIInSignalStatus; + + + typedef enum _SleepMode { + DS_HOST_SLEEPMODE_LIGHT = 0, + DS_HOST_SLEEPMODE_DEEP = 1, + DS_HOST_SLEEPMODE_MAX = 2 + }SleepMode; + + + typedef enum _CompositeInPort{ + DS_COMPOSITE_IN_PORT_NONE = -1 /* @text UNKNOWN */, + DS_COMPOSITE_IN_PORT_0 = 0 /* @text CompositeIn Port 0 */, + DS_COMPOSITE_IN_PORT_1 = 1 /* @text CompositeIn Port 1 */, + DS_COMPOSITE_IN_PORT_MAX = 2 /* @text CompositeIn Port MAX */, + }CompositeInPort; + + +typedef enum _CompositeInSignalStatus{ + DS_COMPOSITE_IN_SIGNAL_STATUS_NONE = -1 /* @text Signal Status None */, + DS_COMPOSITE_IN_SIGNAL_STATUS_NOSIGNAL = 0 /* @text Signal Status No Signal */, + DS_COMPOSITE_IN_SIGNAL_STATUS_UNSTABLE = 1 /* @text Signal Status Unstable */, + DS_COMPOSITE_IN_SIGNAL_STATUS_NOTSUPPORTED = 2 /* @text Signal Status Not supported */, + DS_COMPOSITE_IN_SIGNAL_STATUS_STABLE = 3 /* @text Signal Status Stable */, + DS_COMPOSITE_IN_SIGNAL_STATUS_MAX = 4 /* @text Signal Status MAX */ + }CompositeInSignalStatus; + +typedef enum _DisplayTVResolution{ + DS_DISPLAY_RESOLUTION_480I = 0x000001, + DS_DISPLAY_RESOLUTION_480P = 0x000002, + DS_DISPLAY_RESOLUTION_576I = 0x000004, + DS_DISPLAY_RESOLUTION_576P = 0x000008, + DS_DISPLAY_RESOLUTION_576P50 = 0x000010, + DS_DISPLAY_RESOLUTION_720P = 0x000020, + DS_DISPLAY_RESOLUTION_720P50 = 0x000040, + DS_DISPLAY_RESOLUTION_1080I = 0x000080, + DS_DISPLAY_RESOLUTION_1080P = 0x000100, + DS_DISPLAY_RESOLUTION_1080P24 = 0x000200, + DS_DISPLAY_RESOLUTION_1080I25 = 0x000400, + DS_DISPLAY_RESOLUTION_1080P30 = 0x001000, + DS_DISPLAY_RESOLUTION_1080I50 = 0x002000, + DS_DISPLAY_RESOLUTION_1080P50 = 0x004000, + DS_DISPLAY_RESOLUTION_1080P60 = 0x008000, + DS_DISPLAY_RESOLUTION_2160P24 = 0x010000, + DS_DISPLAY_RESOLUTION_2160P25 = 0x020000, + DS_DISPLAY_RESOLUTION_2160P30 = 0x040000, + DS_DISPLAY_RESOLUTION_2160P50 = 0x080000, + DS_DISPLAY_RESOLUTION_2160P60 = 0x100000 + }DisplayTVResolution; + + +typedef enum _DisplayVideoAspectRatio{ + DS_DISPLAY_ASPECT_RATIO_UNKNOWN = 0 /* @text Video Aspect Ratio UNKNOWN */, + DS_DISPLAY_ASPECT_RATIO_4X3 = 1 /* @text Video Aspect Ratio 4X3 */, + DS_DISPLAY_ASPECT_RATIO_16x9 = 2 /* @text Video Aspect Ratio 16x9 */ + }DisplayVideoAspectRatio; + +typedef enum _DisplayInVideoStereoScopicMode{ + DS_DISPLAY_SSMODE_UNKNOWN = 0, + DS_DISPLAY_SSMODE_2D = 1, + DS_DISPLAY_SSMODE_3D_SIDE_BY_SIDE = 2, + DS_DISPLAY_SSMODE_3D_TOP_AND_BOTTOM = 3 + }DisplayInVideoStereoScopicMode; + + typedef enum _DisplayInVideoFrameRate { + DS_DISPLAY_FRAMERATE_UNKNOWN = 0, + DS_DISPLAY_FRAMERATE_24 = 1, + DS_DISPLAY_FRAMERATE_25 = 2, + DS_DISPLAY_FRAMERATE_30 = 3, + DS_DISPLAY_FRAMERATE_60 = 4, + DS_DISPLAY_FRAMERATE_23_98 = 5, + DS_DISPLAY_FRAMERATE_29_97 = 6, + DS_DISPLAY_FRAMERATE_50 = 7, + DS_DISPLAY_FRAMERATE_59_94 = 8, + DS_DISPLAY_FRAMERATE_100 = 9, + DS_DISPLAY_FRAMERATE_119_88 = 10, + DS_DISPLAY_FRAMERATE_120 = 11, + DS_DISPLAY_FRAMERATE_200 = 12, + DS_DISPLAY_FRAMERATE_239_76 = 13, + DS_DISPLAY_FRAMERATE_240 = 14, + DS_DISPLAY_FRAMERATE_MAX = 15 + }DisplayInVideoFrameRate; + + typedef struct _DisplayVideoPortResolution { + std::string name; + DisplayTVResolution pixelResolution; + DisplayVideoAspectRatio aspectRatio; + DisplayInVideoStereoScopicMode stereoScopicMode; + DisplayInVideoFrameRate frameRate; + bool interlaced; + }DisplayVideoPortResolution; + + + typedef enum _DisplayEvent { + DS_DISPLAY_EVENT_CONNECTED =0, ///< Display connected event + DS_DISPLAY_EVENT_DISCONNECTED =1, ///< Display disconnected event + DS_DISPLAY_RXSENSE_ON =2, ///< Rx Sense ON event + DS_DISPLAY_RXSENSE_OFF =3, ///< Rx Sense OFF event + DS_DISPLAY_HDCPPROTOCOL_CHANGE=4, ///< HDCP Protocol Version Change event + DS_DISPLAY_EVENT_MAX ///< Display max event + }DisplayEvent; + + + typedef enum _FPDTimeFormat{ + DS_FPD_TIMEFORMAT_12_HOUR = 0, + DS_FPD_TIMEFORMAT_24_HOUR = 1, + DS_FPD_TIMEFORMAT_MAX = 2 + }FPDTimeFormat; + + typedef enum _HDCPStatus{ + DS_HDCP_STATUS_UNPOWERED = 0, + DS_HDCP_STATUS_UNAUTHENTICATED = 1, + DS_HDCP_STATUS_AUTHENTICATED = 2, + DS_HDCP_STATUS_AUTHENTICATIONFAILURE = 3, + DS_HDCP_STATUS_INPROGRESS = 4, + DS_HDCP_STATUS_PORTDISABLED = 5, + DS_HDCP_STATUS_MAX = 6 + }HDCPStatus; + + typedef enum _HDRStandard{ + DS_HDRSTANDARD_NONE = 0x0, + DS_HDRSTANDARD_HDR10 = 0x01, + DS_HDRSTANDARD_HLG = 0x02, + DS_HDRSTANDARD_DOLBYVISION = 0x04, + DS_HDRSTANDARD_TECHNICOLORPRIME = 0x08, + DS_HDRSTANDARD_HDR10PLUS = 0x10, + DS_HDRSTANDARD_SDR = 0x20, + DS_HDRSTANDARD_INVALID = 0x80 + }HDRStandard; + + +#ifdef __cplusplus +} +#endif + +#endif /* RPDSMGRNTF_H_ */ + + +/** @} */ +/** @} */