Skip to content
Open
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
28 changes: 24 additions & 4 deletions rpc/srv/dsVideoPort.c
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/srv/dsVideoPort.c

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/srv/dsVideoPort.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/b34ed54, 2022 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/b34ed545b533a0cf4d29d221cc23daad47f32644.tar.gz, file: rpc/srv/dsVideoPort.c)

Check failure on line 3 in rpc/srv/dsVideoPort.c

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/srv/dsVideoPort.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1906, 2285 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1906.tar.gz, file: rpc/srv/dsVideoPort.c)

Check failure on line 3 in rpc/srv/dsVideoPort.c

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/srv/dsVideoPort.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1908, 2285 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1908.tar.gz, file: rpc/srv/dsVideoPort.c)

Check failure on line 3 in rpc/srv/dsVideoPort.c

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/srv/dsVideoPort.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2102, 2285 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-2102.tar.gz, file: rpc/srv/dsVideoPort.c)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -877,12 +877,16 @@

IARM_BUS_Lock(lock);

INT_INFO("%s:%d Entering ...\r\n",__FUNCTION__,__LINE__);

dsVideoPortSetResolutionParam_t *param = (dsVideoPortSetResolutionParam_t *)arg;
if (param != NULL) //CID:82753 - Reverse_inull
{
dsVideoPortType_t _VPortType = _GetVideoPortType(param->handle);
bool isConnected = 0;
INT_INFO("%s:%d _VPortType:%d Resolution to be set::%s \n",__FUNCTION__,__LINE__,_VPortType,param->resolution.name);
dsIsDisplayConnected(param->handle,&isConnected);
INT_INFO("%s:%d isConnected:%d \n",__FUNCTION__,__LINE__,isConnected);
if(!isConnected)
{
INT_INFO("Port _VPortType:%d not connected..Ignoring Resolution Request------\r\n",_VPortType);
Expand All @@ -894,7 +898,7 @@

dsVideoPortResolution_t resolution = param->resolution;
std::string resolutionName(resolution.name);
INT_DEBUG("Resolution Requested ..%s \r\n",resolution.name);
INT_INFO("%s:%d Resolution Requested ..%s \r\n",__FUNCTION__,__LINE__,resolution.name);

if(force_disable_4K)
{
Expand All @@ -920,38 +924,48 @@
_dsGetIgnoreEDIDStatus(&ignoreEdidParam);
bool IsIgnoreEdid = ignoreEdidParam.ignoreEDID;
IARM_BUS_Lock(lock);
INT_DEBUG("ResOverride _dsSetResolution IsIgnoreEdid:%d\n", IsIgnoreEdid);
INT_INFO("%s:%d ResOverride _dsSetResolution IsIgnoreEdid:%d\n", __FUNCTION__,__LINE__, IsIgnoreEdid);
dsVideoPortResolution_t platresolution;
memset(&platresolution,'\0',sizeof(platresolution));
dsGetResolution(param->handle,&platresolution);
INT_INFO("Resolution Requested ..%s Platform Resolution - %s\r\n",resolution.name,platresolution.name);
INT_INFO("%s:%d Resolution Requested ..%s Platform Resolution - %s\r\n",__FUNCTION__,__LINE__,resolution.name,platresolution.name);
if ((strcmp(resolution.name,platresolution.name) == 0 ))
{

INT_INFO("Same Resolution ..Ignoring Resolution Request------\r\n");
INT_INFO("%s:%d Same Resolution ..Ignoring Resolution Request------\r\n",__FUNCTION__,__LINE__);
_dsHDMIResolution = platresolution.name;
/*!< Persist Resolution Settings */
persistResolution(param);
param->result = ret;
IARM_BUS_Unlock(lock);
return IARM_RESULT_SUCCESS;
}
INT_INFO("%s:%d Different Resolution ..Processing Resolution Request------\r\n",__FUNCTION__,__LINE__);
/*!< Resolution Pre Change Event - IARM_BUS_DSMGR_EVENT_RES_POSTCHANGE */
_dsVideoPortPreResolutionCall(&param->resolution);
INT_INFO("%s:%d After PreResolution Call ..\r\n",__FUNCTION__,__LINE__);

INT_INFO("%s:%d Before dsSetResolution Call Res::%s \r\n",__FUNCTION__,__LINE__,param->resolution.name);
/*!< Set Platform Resolution */
ret = dsSetResolution(param->handle, &param->resolution);
INT_INFO("%s:%d After dsSetResolution Call ..ret=%d \r\n",__FUNCTION__,__LINE__,ret);

INT_INFO("%s:%d Before PostResolution Call ..\r\n",__FUNCTION__,__LINE__);
/*!< Resolution Post Change Event - IARM_BUS_DSMGR_EVENT_RES_POSTCHANGE */
_dsSendVideoPortPostResolutionCall(&param->resolution);
INT_INFO("%s:%d After PostResolution Call ..\r\n",__FUNCTION__,__LINE__);

if (ret == dsERR_NONE)
{
INT_INFO("%s:%d Setting Resolution Success ..%s \r\n",__FUNCTION__,__LINE__,param->resolution.name);
/*!< Persist Resolution Settings */
persistResolution(param);
INT_INFO("%s:%d After persistResolution Call ..\r\n",__FUNCTION__,__LINE__);
}
param->result = ret;
}

INT_INFO("%s:%d Exiting ...\r\n",__FUNCTION__,__LINE__);

IARM_BUS_Unlock(lock);

Expand Down Expand Up @@ -1354,8 +1368,11 @@
}
eventData.data.resn.width = param.width;
eventData.data.resn.height = param.height;
INT_INFO("%s:%d Before <IARM_BusDaemon_ResolutionPostchange> Call, Width:%d Height:%d \r\n",__FUNCTION__,__LINE__, param.width, param.height);
IARM_BusDaemon_ResolutionPostchange(param);
INT_INFO("%s:%d After <IARM_BusDaemon_ResolutionPostchange> Call and IARM_Bus_BroadcastEvent triggered\r\n",__FUNCTION__,__LINE__);
IARM_Bus_BroadcastEvent(IARM_BUS_DSMGR_NAME,(IARM_EventId_t)IARM_BUS_DSMGR_EVENT_RES_POSTCHANGE,(void *)&eventData, sizeof(eventData));
INT_INFO("%s:%d After <IARM_Bus_BroadcastEvent> Call\r\n",__FUNCTION__,__LINE__);
}
return ret;
}
Expand Down Expand Up @@ -1411,8 +1428,11 @@
}
eventData.data.resn.width = param.width;
eventData.data.resn.height = param.height;
INT_INFO("%s:%d Before <IARM_BusDaemon_ResolutionPrechange> Call, Width:%d Height:%d \r\n",__FUNCTION__,__LINE__, param.width, param.height);
IARM_BusDaemon_ResolutionPrechange(param);
INT_INFO("%s:%d After <IARM_BusDaemon_ResolutionPrechange> Call and IARM_Bus_BroadcastEvent triggered\r\n",__FUNCTION__,__LINE__);
IARM_Bus_BroadcastEvent(IARM_BUS_DSMGR_NAME,(IARM_EventId_t)IARM_BUS_DSMGR_EVENT_RES_PRECHANGE,(void *)&eventData, sizeof(eventData));
INT_INFO("%s:%d After <IARM_Bus_BroadcastEvent> Call\r\n",__FUNCTION__,__LINE__);
}
return ret;
}
Expand Down
Loading