Skip to content
Merged
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
19 changes: 14 additions & 5 deletions rpc/srv/dsAudio.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/dsAudio.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/dsAudio.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/b34ed54, 7067 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/b34ed545b533a0cf4d29d221cc23daad47f32644.tar.gz, file: rpc/srv/dsAudio.c)

Check failure on line 3 in rpc/srv/dsAudio.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/dsAudio.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2003, 7067 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-2003.tar.gz, file: rpc/srv/dsAudio.c)

Check failure on line 3 in rpc/srv/dsAudio.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/dsAudio.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2009, 7067 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-2009.tar.gz, file: rpc/srv/dsAudio.c)

Check failure on line 3 in rpc/srv/dsAudio.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/dsAudio.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2102, 7067 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-2102.tar.gz, file: rpc/srv/dsAudio.c)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -3257,6 +3257,11 @@
INT_DEBUG("%s: port: %s , persist audio mute: %s\n",__func__,"HEADPHONE0", param->mute ? "TRUE" : "FALSE");
device::HostPersistence::getInstance().persistHostProperty("HEADPHONE0.audio.mute", _mute);
break;
case dsAUDIOPORT_TYPE_HDMI_ARC:
INT_DEBUG("%s: port: %s , persist audio mute: %s\n",__func__,"HDMI_ARC0", param->mute ? "TRUE" : "FALSE");
device::HostPersistence::getInstance().persistHostProperty("HDMI_ARC0.audio.mute", _mute);
break;

default:
break;
}
Expand All @@ -3279,15 +3284,15 @@

dsAudioSetMutedParam_t *param = (dsAudioSetMutedParam_t *)arg;
bool muted = false;

dsError_t ret = dsIsAudioMute(param->handle, &muted);
if (ret == dsERR_NONE) {
dsAudioPortType_t _APortType = _GetAudioPortType(param->handle);
if (ret == dsERR_NONE || (_APortType == dsAUDIOPORT_TYPE_HDMI_ARC)) {
param->mute = muted;

#ifdef DS_AUDIO_SETTINGS_PERSISTENCE
std::string isMuteKey("");
std::string _mute("FALSE");
dsAudioPortType_t _APortType = _GetAudioPortType(param->handle);
switch(_APortType) {
case dsAUDIOPORT_TYPE_SPDIF:
isMuteKey.append("SPDIF0.audio.mute");
Expand All @@ -3301,6 +3306,9 @@
case dsAUDIOPORT_TYPE_HEADPHONE:
isMuteKey.append("HEADPHONE0.audio.mute");
break;
case dsAUDIOPORT_TYPE_HDMI_ARC:
isMuteKey.append("HDMI_ARC0.audio.mute");
break;
default:
break;
}
Expand All @@ -3312,6 +3320,7 @@
_mute = "FALSE";
}
if ("TRUE" == _mute) {
INT_INFO("%s: param mute to true \n", __FUNCTION__);
param->mute = true;
}
INT_DEBUG("%s: persist value:%s for :%s\n", __FUNCTION__, _mute.c_str(), isMuteKey.c_str());
Expand Down Expand Up @@ -7080,11 +7089,11 @@
INT_DEBUG("%s Audio level persistence update timer thread running...\n",__func__);
struct timespec ts;
while(1){
clock_gettime(CLOCK_REALTIME, &ts);
ts.tv_sec += 5;

pthread_mutex_lock(&audioLevelMutex);
while(!audioLevel_timer_set){
clock_gettime(CLOCK_REALTIME, &ts);
ts.tv_sec += 5;
int rc = pthread_cond_timedwait(&audioLevelTimerCV, &audioLevelMutex, &ts);
if (rc == ETIMEDOUT)
continue;
Expand Down
29 changes: 13 additions & 16 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/1906, 2265 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/2102, 2265 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 @@ -921,23 +921,20 @@
bool IsIgnoreEdid = ignoreEdidParam.ignoreEDID;
IARM_BUS_Lock(lock);
INT_DEBUG("ResOverride _dsSetResolution IsIgnoreEdid:%d\n", IsIgnoreEdid);
//IsIgnoreEdid is true platform will take care of current resolution cache.
if (!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);
if ((strcmp(resolution.name,platresolution.name) == 0 ))
{
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);
if ((strcmp(resolution.name,platresolution.name) == 0 ))
{

INT_INFO("Same Resolution ..Ignoring Resolution Request------\r\n");
_dsHDMIResolution = platresolution.name;
/*!< Persist Resolution Settings */
persistResolution(param);
param->result = ret;
IARM_BUS_Unlock(lock);
return IARM_RESULT_SUCCESS;
}
INT_INFO("Same Resolution ..Ignoring Resolution Request------\r\n");
_dsHDMIResolution = platresolution.name;
/*!< Persist Resolution Settings */
persistResolution(param);
param->result = ret;
IARM_BUS_Unlock(lock);
return IARM_RESULT_SUCCESS;
}
/*!< Resolution Pre Change Event - IARM_BUS_DSMGR_EVENT_RES_POSTCHANGE */
_dsVideoPortPreResolutionCall(&param->resolution);
Expand Down
Loading