Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions ds/hdmiIn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#include "dsHdmiIn.h"
#include "dsUtl.h"
#include "edid-parser.hpp"
#include "dsInternal.h"


namespace device
Expand Down Expand Up @@ -547,6 +548,34 @@ void HdmiInput::getEdidVersion (int iHdmiPort, int *iEdidVersion) {
printf ("%s:%d - EDID Version = %d\n", __PRETTY_FUNCTION__, __LINE__, *iEdidVersion);
}

void HdmiInput::setVRRSupport(int iHdmiPort, bool vrrSupport)
{
dsError_t ret = dsHdmiInSetVRRSupport (static_cast<dsHdmiInPort_t>(iHdmiPort), vrrSupport);
if (ret != dsERR_NONE)
{
throw Exception(ret);
}
printf ("%s:%d - Set VRR Support = %d\n", __PRETTY_FUNCTION__, __LINE__, vrrSupport);
}

void HdmiInput::getVRRSupport (int iHdmiPort, bool *vrrSupport) {
dsError_t ret = dsHdmiInGetVRRSupport (static_cast<dsHdmiInPort_t>(iHdmiPort), vrrSupport);
if (ret != dsERR_NONE)
{
throw Exception(ret);
}
printf ("%s:%d - EDID VRR Support = %d\n", __PRETTY_FUNCTION__, __LINE__, *vrrSupport);
}

void HdmiInput::getVRRStatus (int iHdmiPort, dsVRRType_t *vrrStatus) {
dsError_t ret = dsHdmiInGetVRRStatus (static_cast<dsHdmiInPort_t>(iHdmiPort), vrrStatus);
if (ret != dsERR_NONE)
{
throw Exception(ret);
}
printf ("%s:%d - VRR Status = %d\n", __FUNCTION__, __LINE__, *vrrStatus);
}

void HdmiInput::getHdmiALLMStatus (int iHdmiPort, bool *allmStatus) {
printf ("HdmiInput::getHdmiALLMStatus \r\n");
dsError_t ret = dsGetAllmStatus (static_cast<dsHdmiInPort_t>(iHdmiPort), allmStatus);
Expand Down
3 changes: 3 additions & 0 deletions ds/include/hdmiIn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ class HdmiInput
void getAVLatency(int *audio_latency,int *video_latency);
void setEdid2AllmSupport(int iHdmiPort,bool allm_suppport);
void getEdid2AllmSupport(int iHdmiPort, bool *allm_support);
void setVRRSupport (int iHdmiPort, bool vrr_suppport);
void getVRRSupport (int iHdmiPort, bool *vrr_suppport);
void getVRRStatus (int iHdmiPort, dsVRRType_t *vrrStatus);
void getHdmiVersion (int iHdmiPort, dsHdmiMaxCapabilityVersion_t *capversion);
private:
HdmiInput (); /* default constructor */
Expand Down
68 changes: 67 additions & 1 deletion rpc/cli/dsHdmiIn.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
#include "iarmUtil.h"
#include "libIARM.h"
#include "libIBus.h"
#include "safec_lib.h"
#include "safec_lib.h"
#include "dsInternal.h"


dsError_t dsHdmiInInit (void)
Expand Down Expand Up @@ -463,6 +464,71 @@ dsError_t dsGetEdid2AllmSupport (dsHdmiInPort_t iHdmiPort, bool *allm_support)
return dsERR_GENERAL;
}

dsError_t dsHdmiInSetVRRSupport (dsHdmiInPort_t iHdmiPort, bool vrr_support)
{
_DEBUG_ENTER();

dsVRRSupportParam_t param;
IARM_Result_t rpcRet = IARM_RESULT_SUCCESS;
param.iHdmiPort = iHdmiPort;
param.vrrSupport = vrr_support;
rpcRet = IARM_Bus_Call (IARM_BUS_DSMGR_NAME,
(char *)IARM_BUS_DSMGR_API_dsSetVRRSupport,
(void *)&param,
sizeof(param));

if (IARM_RESULT_SUCCESS == rpcRet)
{
printf ("[cli] %s: dsSetVRRSupport eRet: %d \r\n", __FUNCTION__, param.result);
return param.result;
}
printf("%s:%d - dsERR_GENERAL\n", __PRETTY_FUNCTION__,__LINE__);
return dsERR_GENERAL;
}

dsError_t dsHdmiInGetVRRSupport (dsHdmiInPort_t iHdmiPort, bool *vrr_support)
{
_DEBUG_ENTER();

dsVRRSupportParam_t param;
IARM_Result_t rpcRet = IARM_RESULT_SUCCESS;
param.iHdmiPort = iHdmiPort;
rpcRet = IARM_Bus_Call (IARM_BUS_DSMGR_NAME,
(char *)IARM_BUS_DSMGR_API_dsGetVRRSupport,
(void *)&param,
sizeof(param));

if (IARM_RESULT_SUCCESS == rpcRet)
{
*vrr_support = param.vrrSupport;
printf ("[cli] %s: dsGetVRRSupport: %d \r\n", __FUNCTION__, param.vrrSupport);
return param.result;
}
printf("%s:%d - dsERR_GENERAL\n", __PRETTY_FUNCTION__,__LINE__);
return dsERR_GENERAL;
}

dsError_t dsHdmiInGetVRRStatus (dsHdmiInPort_t iHdmiPort, dsVRRType_t *vrrStatus)
{
_DEBUG_ENTER();
dsVRRStatusParam_t param;
IARM_Result_t rpcRet = IARM_RESULT_SUCCESS;
param.iHdmiPort = iHdmiPort;
rpcRet = IARM_Bus_Call (IARM_BUS_DSMGR_NAME,
(char *)IARM_BUS_DSMGR_API_dsGetVRRStatus,
(void *)&param,
sizeof(param));

if (IARM_RESULT_SUCCESS == rpcRet)
{
*vrrStatus = param.vrrStatus;
printf ("[cli] %s: dsGetVRRStatus VRR Status: %d \r\n", __FUNCTION__, param.vrrStatus);
return param.result;
}
printf("%s:%d - dsERR_GENERAL\n", __FUNCTION__,__LINE__);
return dsERR_GENERAL;
}

dsError_t dsGetHdmiVersion (dsHdmiInPort_t iHdmiPort, dsHdmiMaxCapabilityVersion_t *capversion)
{
_DEBUG_ENTER();
Expand Down
23 changes: 23 additions & 0 deletions rpc/include/dsInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,29 @@ dsError_t dsVideoPortSetPreferredColorDepth(intptr_t handle,dsDisplayColorDepth_
*/
dsError_t dsVideoPortGetPreferredColorDepth(intptr_t handle, dsDisplayColorDepth_t *colorDepth, bool persist );

/**
* @brief Gets the EDID ALLM support
*
* For sink devices, this function gets the EDID ALLM support.
* For source devices, this function returns dsERR_OPERATION_NOT_SUPPORTED always.
*
* @param[in] iHdmiPort - HDMI input port. Please refer ::dsHdmiInPort_t
* @param[in] allmSupport - Allm support. False for disabled, True for enabled
*
* @return dsError_t - Status
* @retval dsERR_NONE - Success
* @retval dsERR_NOT_INITIALIZED - Module is not initialised
* @retval dsERR_INVALID_PARAM - Parameter passed to this function is invalid
* @retval dsERR_OPERATION_NOT_SUPPORTED - The attempted operation is not supported; e.g: source devices
* @retval dsERR_OPERATION_FAILED - The attempted operation has failed
*
* @pre dsHdmiInInit() must be called before calling this API
*
* @warning This API is Not thread safe
*
*/
dsError_t dsGetEdid2AllmSupport (dsHdmiInPort_t iHdmiPort, bool *allmSupport);

/**
* @brief Gets the encoding type of an audio port
*
Expand Down
7 changes: 7 additions & 0 deletions rpc/include/dsMgr.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in rpc/include/dsMgr.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'rpc/include/dsMgr.h' (Match: HariniElangovan890/rdkservices/d73bf6eda46ff140b2d678f5a2eaf3fca1c07bbd, 229 lines, url: https://github.com/HariniElangovan890/rdkservices/archive/d73bf6eda46ff140b2d678f5a2eaf3fca1c07bbd.tar.gz, file: Tests/headers/rdk/ds/dsMgr.h)

Check failure on line 3 in rpc/include/dsMgr.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'rpc/include/dsMgr.h' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2012, 141 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-2012.tar.gz, file: rpc/include/dsMgr.h)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -57,6 +57,7 @@
IARM_BUS_DSMGR_EVENT_HDMI_IN_STATUS, /*!< HDMI IN status change event */
IARM_BUS_DSMGR_EVENT_HDMI_IN_VIDEO_MODE_UPDATE, /*!< HDMI IN video mode update event */
IARM_BUS_DSMGR_EVENT_HDMI_IN_ALLM_STATUS, /*!< HDMI IN ALLM mode update event */
IARM_BUS_DSMGR_EVENT_HDMI_IN_VRR_STATUS, /*!< HDMI IN VRR mode update event */
IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_HOTPLUG, /*!< COMPOSITE IN HPD change event */
IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_SIGNAL_STATUS, /*!< COMPOSITE IN signal status change event */
IARM_BUS_DSMGR_EVENT_COMPOSITE_IN_STATUS, /*!< COMPOSITE IN status change event */
Expand Down Expand Up @@ -86,7 +87,7 @@
dsAUDIOPORT_STATE_MAX
} dsAudioPortState_t;

/*! DS Manager Event Data */

Check failure on line 90 in rpc/include/dsMgr.h

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'rpc/include/dsMgr.h' (Match: rdkcentral/rdkservices/1, 159 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.tar.gz, file: Tests/mocks/devicesettings.h)
typedef struct _DSMgr_EventData_t {
union {
struct _RESOLUTION_DATA{
Expand Down Expand Up @@ -230,6 +231,12 @@
bool allm_mode;
}hdmi_in_allm_mode; /*HDMI in ALLM Mode change*/

struct _HDMI_IN_VRR_MODE_DATA{
/* Declare HDMI In VRR Mode*/
dsHdmiInPort_t port;
dsVRRType_t vrr_type;
}hdmi_in_vrr_mode; /*HDMI in VRR Mode change*/

struct _HDMI_IN_CONTENT_TYPE_DATA{
/* Declare HDMI In ALLM Mode*/
dsHdmiInPort_t port;
Expand Down
17 changes: 17 additions & 0 deletions rpc/include/dsRpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ extern "C" {
#define IARM_BUS_DSMGR_API_dsSetEdid2AllmSupport "dsSetEdid2AllmSupport"
#define IARM_BUS_DSMGR_API_dsGetEdid2AllmSupport "dsGetEdid2AllmSupport"
#define IARM_BUS_DSMGR_API_dsGetAllmStatus "dsGetAllmStatus"
#define IARM_BUS_DSMGR_API_dsSetVRRSupport "dsSetVRRSupport"
#define IARM_BUS_DSMGR_API_dsGetVRRSupport "dsGetVRRSupport"
#define IARM_BUS_DSMGR_API_dsGetVRRStatus "dsGetVRRStatus"
#define IARM_BUS_DSMGR_API_dsGetSupportedGameFeaturesList "dsGetSupportedGameFeaturesList"
#define IARM_BUS_DSMGR_API_dsGetAVLatency "dsGetAVLatency"
#define IARM_BUS_DSMGR_API_dsGetHdmiVersion "dsGetHdmiVersion"
Expand Down Expand Up @@ -1009,6 +1012,20 @@ typedef struct _dsEdidAllmSupportParam_t
bool allmSupport;
}dsEdidAllmSupportParam_t;

typedef struct _dsVRRSupportParam_t
{
dsError_t result;
dsHdmiInPort_t iHdmiPort;
bool vrrSupport;
}dsVRRSupportParam_t;

typedef struct _dsVRRStatusParam_t
{
dsError_t result;
dsHdmiInPort_t iHdmiPort;
dsVRRType_t vrrStatus;
}dsVRRStatusParam_t;

typedef struct _dsGetHDMIARCPortIdParam_t {
dsError_t result;
int portId;
Expand Down
Loading
Loading