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
8 changes: 4 additions & 4 deletions ds/audioOutputPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ AudioOutputPort::AudioOutputPort(const int type, const int index, const int id)
out << getType().getName() << _index;
_name = out.str();
}
printf ("\nAudioOutputPort init: _type:%d _index:%d _handle:%d\n", _type, _index, _handle);
printf ("\nAudioOutputPort init: _type:%d _index:%d _handle:%ld\n", _type, _index, (long)_handle);
if (dsERR_NONE == ret) {
//dsGetAudioCompression (_handle, (dsAudioCompression_t *)&_compression);
dsGetAudioEncoding (_handle, (dsAudioEncoding_t *)&_encoding);
Expand Down Expand Up @@ -184,7 +184,7 @@ dsError_t AudioOutputPort::reInitializeAudioOutputPort()
_name = out.str();
}

printf ("\nAudioOutputPort init: _type:%d _index:%d _handle:%d\n", _type, _index, _handle);
printf ("\nAudioOutputPort init: _type:%d _index:%d _handle:%ld\n", _type, _index,(long)_handle);
if (dsERR_NONE == ret) {
//dsGetAudioCompression>(_handle, (dsAudioCompression_t *)&_compression);
dsGetAudioEncoding(_handle, (dsAudioEncoding_t *)&_encoding);
Expand Down Expand Up @@ -1422,11 +1422,11 @@ void AudioOutputPort::setAudioDelay(const uint32_t audioDelayMs)
dsError_t ret = dsERR_NONE;
uint32_t ms = audioDelayMs;

INT_INFO("AudioOutputPort [%s], setting delay to [%lu] ms\n", _name.c_str(), audioDelayMs);
INT_INFO("AudioOutputPort [%s], setting delay to [%u] ms\n", _name.c_str(), audioDelayMs);

if (ms > audioDelayMsMax)
{
INT_ERROR("AudioOutputPort [%s], delay [%lu] ms, exceeds max [%lu]. Setting Max \n",
INT_ERROR("AudioOutputPort [%s], delay [%u] ms, exceeds max [%u]. Setting Max \n",
_name.c_str(),
audioDelayMs,
audioDelayMsMax);
Expand Down
3 changes: 0 additions & 3 deletions ds/edid-parser.cpp
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 ds/edid-parser.cpp

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 'ds/edid-parser.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1906, 700 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1906.tar.gz, file: ds/edid-parser.cpp)
*
* Copyright 2019 RDK Management
*
Expand Down Expand Up @@ -55,7 +55,6 @@
case 1: v = (h * 3) / 4; break;
case 2: v = (h * 4) / 5; break;
case 3: v = (h * 9) / 16; break;
default: return;
}
int r = (bytes[idx + 1] & 0x3F) + 60;
INT_DEBUG("STD %dx%d@%d\n", h, v, r);
Expand Down Expand Up @@ -381,8 +380,6 @@
case 6: break;
// 'Use Extended Tag'
case 7: parse_extended_db(&bytes[idx], data_ptr); break;
// default - unsupported
default: INT_DEBUG("Unsupported extension tag: 0x%X\n", tag);
}
idx += len + 1;
}
Expand Down
2 changes: 1 addition & 1 deletion ds/hdmiIn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ void HdmiInput::getHDMISPDInfo (int iHdmiPort, std::vector<uint8_t> &data) {
data.clear();
if (ret == dsERR_NONE) {
if (sizeof(spdinfo) <= sizeof(struct dsSpd_infoframe_st)) {
printf("HdmiInput::getHDMISPDInfo has %d bytes\r\n", sizeof(spdinfo));
printf("HdmiInput::getHDMISPDInfo has %zu bytes\r\n", sizeof(spdinfo));
data.insert(data.begin(), spdinfo, spdinfo + sizeof(struct dsSpd_infoframe_st));
} else {
ret = dsERR_OPERATION_NOT_SUPPORTED;
Expand Down
2 changes: 1 addition & 1 deletion ds/include/exception.hpp
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 ds/include/exception.hpp

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 'ds/include/exception.hpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2.1-20161031, 133 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/2.1-20161031.tar.gz, file: ds/include/exception.hpp)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -64,7 +64,7 @@
*
* @return None
*/
Exception(const char *msg = "No Message for this exception") throw() : _msg(msg) {
Exception(const char *msg = "No Message for this exception") throw() : _err(0), _msg(msg) {
}


Expand Down
18 changes: 13 additions & 5 deletions ds/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,18 @@ Manager::~Manager() {
*/
void Manager::Initialize()
{
bool needInit = false;

{std::lock_guard<std::mutex> lock(gManagerInitMutex);
printf("Entering %s count %d with thread id %lu\n",__FUNCTION__,IsInitialized,pthread_self());
printf("Entering %s count %d with thread id %lu\n",__FUNCTION__,IsInitialized,pthread_self());
if (IsInitialized == 0) {
needInit = true;
}
IsInitialized++;
}

try {
if (0 == IsInitialized) {
if (needInit) {

dsError_t err = dsERR_GENERAL;
unsigned int retryCount = 0;
Expand All @@ -134,14 +141,15 @@ void Manager::Initialize()
AudioOutputPortConfig::getInstance().load();
VideoOutputPortConfig::getInstance().load();
VideoDeviceConfig::getInstance().load();
}
IsInitialized++;
}
}
catch(const Exception &e) {
cout << "Caught exception during Initialization" << e.what() << endl;
std::lock_guard<std::mutex> lock(gManagerInitMutex);
IsInitialized--;
throw e;
}
}

printf("Exiting %s with thread %lu\n",__FUNCTION__,pthread_self());
}

Expand Down
2 changes: 1 addition & 1 deletion ds/videoDevice.cpp
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 ds/videoDevice.cpp

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 'ds/videoDevice.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/b34ed54, 293 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/b34ed545b533a0cf4d29d221cc23daad47f32644.tar.gz, file: ds/videoDevice.cpp)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -101,7 +101,7 @@
* @param[in] id Port id.
* @return None.
*/
VideoDevice::VideoDevice(int id)
VideoDevice::VideoDevice(int id): _dfc(0)
{
dsError_t ret = dsGetVideoDevice(id, &_handle);

Expand Down
4 changes: 2 additions & 2 deletions rpc/cli/dsVideoPort.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

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

Check failure on line 2 in rpc/cli/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/cli/dsVideoPort.c' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1906, 968 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1906.tar.gz, file: rpc/cli/dsVideoPort.c)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -82,7 +82,7 @@
&param,
sizeof(param));

printf("%s..%d-%d\n",__func__,param.type,param.handle);
printf("%s..%d-%ld\n",__func__,param.type,(long)param.handle);

if (IARM_RESULT_SUCCESS == rpcRet)
{
Expand Down Expand Up @@ -530,7 +530,7 @@
}
}

printf("IARM:CLI:dsEnableHDCP %d, %p, %d\r\n", contentProtect, hdcpKey, keySize);
printf("IARM:CLI:dsEnableHDCP %d, %p, %zu\r\n", contentProtect, hdcpKey, keySize);

IARM_Result_t rpcRet = IARM_RESULT_SUCCESS;
rpcRet = IARM_Bus_Call(IARM_BUS_DSMGR_NAME,
Expand Down
15 changes: 12 additions & 3 deletions rpc/srv/dsAudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ void AudioConfigInit()
m_volumeLeveller.level = atoi(_volLevellerLevel.c_str());
//SPEAKER init
handle = 0;
INT_DEBUG("bDolbyVolumeOverrideCheck value: %d\n", bDolbyVolumeOverrideCheck);
INT_DEBUG("bDolbyVolumeOverrideCheck value: %d\n", (int)bDolbyVolumeOverrideCheck);
if(bDolbyVolumeOverrideCheck && dsGetAudioPort(dsAUDIOPORT_TYPE_SPEAKER,0,&handle) == dsERR_NONE) {
if (dsSetVolumeLevellerFunc(handle, m_volumeLeveller) == dsERR_NONE) {
INT_INFO("Port %s: Initialized Volume Leveller : Mode: %d, Level: %d\n","SPEAKER0", m_volumeLeveller.mode, m_volumeLeveller.level);
Expand Down Expand Up @@ -2357,10 +2357,18 @@ IARM_Result_t dsAudioMgr_init()
IARM_Result_t dsAudioMgr_term()
{
#ifdef DS_AUDIO_SETTINGS_PERSISTENCE
if(persist_audioLevel_timer_threadIsAlive){
bool shouldJoin = false;
pthread_t threadId;
IARM_BUS_Lock(lock);
shouldJoin = persist_audioLevel_timer_threadIsAlive;
if(shouldJoin){
persist_audioLevel_timer_threadIsAlive=false;
threadId = persist_audioLevel_timer_threadId;
pthread_cond_signal(&audioLevelTimerCV);
pthread_join(persist_audioLevel_timer_threadId,NULL);
}
IARM_BUS_Unlock(lock);
if(shouldJoin){
pthread_join(threadId,NULL);
}
#endif
return IARM_RESULT_SUCCESS;
Expand Down Expand Up @@ -7227,6 +7235,7 @@ static void* persist_audioLevel_timer_threadFunc(void* arg) {
break;
}
// wait for 3 sec, then update the latest audio level from cache variable
/* coverity[sleep : FALSE] */
if(audioLevel_timer_set){
sleep(3);

Expand Down
7 changes: 6 additions & 1 deletion sample/testFrontPanel.cpp
100755 → 100644
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 sample/testFrontPanel.cpp

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 'sample/testFrontPanel.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2.1-20161031, 134 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/2.1-20161031.tar.gz, file: sample/testFrontPanel.cpp)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -118,7 +118,12 @@
printf("Exception Caught during [%s]\r\n", argv[0]);
}

device::Manager::DeInitialize();
try {
device::Manager::DeInitialize();
}
catch (...) {
printf("Unknown exception during DeInitialize\n");
}


IARM_Bus_Disconnect();
Expand Down
Loading