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

Check failure on line 1 in HdmiCecSink/HdmiCecSink.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/HdmiCecSink.cpp' (Match: rdkcentral/rdkservices/866, 3572 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/HdmiCecSink.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/HdmiCecSink.cpp' (Match: rdkcentral/rdkservices/1, 3609 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 @@ -58,6 +58,7 @@
#define HDMICECSINK_METHOD_REQUEST_SHORT_AUDIO_DESCRIPTOR "requestShortAudioDescriptor"
#define HDMICECSINK_METHOD_SEND_STANDBY_MESSAGE "sendStandbyMessage"
#define HDMICECSINK_METHOD_SEND_AUDIO_DEVICE_POWER_ON "sendAudioDevicePowerOnMessage"
#define HDMICECSINK_METHOD_SEND_AUDIO_DEVICE_MUTE "sendAudioDeviceMuteMessage"
#define HDMICECSINK_METHOD_SEND_KEY_PRESS "sendKeyPressEvent"
#define HDMICECSINK_METHOD_SEND_USER_CONTROL_PRESSED "sendUserControlPressed"
#define HDMICECSINK_METHOD_SEND_USER_CONTROL_RELEASED "sendUserControlReleased"
Expand Down Expand Up @@ -739,6 +740,7 @@
Register(HDMICECSINK_METHOD_REQUEST_SHORT_AUDIO_DESCRIPTOR, &HdmiCecSink::requestShortAudioDescriptorWrapper, this);
Register(HDMICECSINK_METHOD_SEND_STANDBY_MESSAGE, &HdmiCecSink::sendStandbyMessageWrapper, this);
Register(HDMICECSINK_METHOD_SEND_AUDIO_DEVICE_POWER_ON, &HdmiCecSink::sendAudioDevicePowerOnMsgWrapper, this);
Register(HDMICECSINK_METHOD_SEND_AUDIO_DEVICE_MUTE, &HdmiCecSink::sendAVRMuteMsgWrapper, this);
Register(HDMICECSINK_METHOD_SEND_KEY_PRESS,&HdmiCecSink::sendRemoteKeyPressWrapper,this);
Register(HDMICECSINK_METHOD_SEND_USER_CONTROL_PRESSED,&HdmiCecSink::sendUserControlPressedWrapper,this);
Register(HDMICECSINK_METHOD_SEND_USER_CONTROL_RELEASED,&HdmiCecSink::sendUserControlReleasedWrapper,this);
Expand Down Expand Up @@ -1388,6 +1390,30 @@
}
}

void HdmiCecSink::systemAVRAudioMuteRequest()
{
if ( cecEnableStatus != true )
{
LOGINFO("systemAVRAudioMuteRequest: Cec is disabled-> EnableCEC first");
return;
}

if(!HdmiCecSink::_instance)
return;
if(!(_instance->smConnection))
return;
LOGINFO(" Send systemAVRAudioMuteRequest ");
_instance->smConnection->sendTo(LogicalAddress::AUDIO_SYSTEM,MessageEncoder().encode(UserControlPressed(UICommand::UI_COMMAND_MUTE)), 1000);
LOGINFO(" Send systemAVRAudioMuteRequest sompleted \n");
}

uint32_t HdmiCecSink::sendAVRMuteMsgWrapper(const JsonObject& parameters, JsonObject& response)
{
LOGINFO("%s invoked. \n",__FUNCTION__);
systemAVRAudioMuteRequest();
returnResponse(true);
}

void HdmiCecSink::SendStandbyMsgEvent(const int logicalAddress)
{
JsonObject params;
Expand Down
2 changes: 2 additions & 0 deletions HdmiCecSink/HdmiCecSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ namespace WPEFramework {
void sendFeatureAbort(const LogicalAddress logicalAddress, const OpCode feature, const AbortReason reason);
void reportFeatureAbortEvent(const LogicalAddress logicalAddress, const OpCode feature, const AbortReason reason);
void systemAudioModeRequest();
void systemAVRAudioMuteRequest();
void SendStandbyMsgEvent(const int logicalAddress);
void requestAudioDevicePowerStatus();
void reportAudioDevicePowerStatusInfo(const int logicalAddress, const int powerStatus);
Expand Down Expand Up @@ -642,6 +643,7 @@ namespace WPEFramework {
uint32_t requestShortAudioDescriptorWrapper(const JsonObject& parameters, JsonObject& response);
uint32_t sendStandbyMessageWrapper(const JsonObject& parameters, JsonObject& response);
uint32_t sendAudioDevicePowerOnMsgWrapper(const JsonObject& parameters, JsonObject& response);
uint32_t sendAVRMuteMsgWrapper(const JsonObject& parameters, JsonObject& response);
uint32_t sendRemoteKeyPressWrapper(const JsonObject& parameters, JsonObject& response);
uint32_t sendUserControlPressedWrapper(const JsonObject& parameters, JsonObject& response);
uint32_t sendUserControlReleasedWrapper(const JsonObject& parameters, JsonObject& response);
Expand Down
Loading