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
49 changes: 27 additions & 22 deletions HdmiCecSink/HdmiCecSinkImplementation.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**

Check failure on line 1 in HdmiCecSink/HdmiCecSinkImplementation.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 'HdmiCecSink/HdmiCecSinkImplementation.cpp' (Match: rdkcentral/rdkservices/866, 3515 lines, url: https://github.com/rdkcentral/rdkservices/archive/AML_BSP_VERSION_866.tar.gz, file: HdmiCecSink/HdmiCecSink.cpp)

Check failure on line 1 in HdmiCecSink/HdmiCecSinkImplementation.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 'HdmiCecSink/HdmiCecSinkImplementation.cpp' (Match: rdkcentral/rdkservices/1, 3585 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.tar.gz, file: HdmiCecSink/HdmiCecSink.cpp)
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
Expand Down Expand Up @@ -2205,31 +2205,36 @@

}

void HdmiCecSinkImplementation::requestAudioDevicePowerStatus()
{
if ( cecEnableStatus != true )
{
LOGWARN("cec is disabled-> EnableCEC first");
return;
}

if(!HdmiCecSinkImplementation::_instance)
return;

if(!(_instance->smConnection))
Core::hresult HdmiCecSinkImplementation::RequestAudioDevicePowerStatus(HdmiCecSinkSuccess &success)
{
if ( cecEnableStatus != true )
{
return;
LOGWARN("[%s]cec is disabled-> EnableCEC first", __FUNCTION__);
return Core::ERROR_GENERAL;
}
if ( _instance->m_logicalAddressAllocated == LogicalAddress::UNREGISTERED ){
LOGERR("Logical Address NOT Allocated");
return;
}

LOGINFO(" Send GiveDevicePowerStatus Message to Audio system in the network \n");
_instance->smConnection->sendTo(LogicalAddress::AUDIO_SYSTEM, MessageEncoder().encode(GiveDevicePowerStatus()), 500);

if(!HdmiCecSinkImplementation::_instance)
{
LOGWARN("[%s]HdmiCecSinkImplementation instance is NULL", __FUNCTION__);
success.success = false;
return Core::ERROR_GENERAL;
}
if(!(_instance->smConnection))
{
LOGWARN("[%s]smConnection is NULL", __FUNCTION__);
success.success = false;
return Core::ERROR_GENERAL;
}
if ( _instance->m_logicalAddressAllocated == LogicalAddress::UNREGISTERED ){
LOGWARN("[%s]Logical Address NOT Allocated", __FUNCTION__);
success.success = false;
return Core::ERROR_GENERAL;
}
LOGINFO(" Send GiveDevicePowerStatus Message to Audio system in the network \n");
_instance->smConnection->sendTo(LogicalAddress::AUDIO_SYSTEM, MessageEncoder().encode(GiveDevicePowerStatus()), 500);
m_audioDevicePowerStatusRequested = true;
}
success.success = true;
return Core::ERROR_NONE;
}

void HdmiCecSinkImplementation::sendFeatureAbort(const LogicalAddress logicalAddress, const OpCode feature, const AbortReason reason)
{
Expand Down
2 changes: 1 addition & 1 deletion HdmiCecSink/HdmiCecSinkImplementation.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**

Check failure on line 1 in HdmiCecSink/HdmiCecSinkImplementation.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 'HdmiCecSink/HdmiCecSinkImplementation.h' (Match: rdkcentral/rdkservices/1, 714 lines, url: https://github.com/rdkcentral/rdkservices/archive/GRT_v1.tar.gz, file: HdmiCecSink/HdmiCecSink.h)
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
Expand Down Expand Up @@ -562,7 +562,6 @@
void reportFeatureAbortEvent(const LogicalAddress logicalAddress, const OpCode feature, const AbortReason reason);
void systemAudioModeRequest();
void SendStandbyMsgEvent(const int logicalAddress);
void requestAudioDevicePowerStatus();
void reportAudioDevicePowerStatusInfo(const int logicalAddress, const int powerStatus);
void updateCurrentLatency(int videoLatency, bool lowLatencyMode, int audioOutputCompensated, int audioOutputDelay);
void setLatencyInfo();
Expand Down Expand Up @@ -742,6 +741,7 @@
Core::hresult Register(Exchange::IHdmiCecSink::INotification *notification) override;
Core::hresult Unregister(Exchange::IHdmiCecSink::INotification *notification) override;
Core::hresult SetMenuLanguage(const string &language, HdmiCecSinkSuccess &success) override;
Core::hresult RequestAudioDevicePowerStatus(HdmiCecSinkSuccess &success) override;

private:
std::list<Exchange::IHdmiCecSink::INotification*> _hdmiCecSinkNotifications;
Expand Down
Loading