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
11 changes: 8 additions & 3 deletions HdmiCecSink/HdmiCecSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,8 @@ namespace WPEFramework
JsonObject params;
if(!HdmiCecSink::_instance)
return;
if (m_audioStatusTimerStarted)
m_audioDeviceNewVolumeLevel = msg.status.getAudioVolume();
if (m_audioStatusTimerStarted && (m_audioDeviceNewVolumeLevel != m_audioDevicePrevVolumeLevel))
{
m_audioStatusReceived = true;
m_isAudioStatusInfoUpdated = true;
Expand All @@ -1231,7 +1232,7 @@ namespace WPEFramework
params["muteStatus"] = msg.status.getAudioMuteStatus();
params["volumeLevel"] = msg.status.getAudioVolume();
sendNotify(eventString[HDMICECSINK_EVENT_REPORT_AUDIO_STATUS], params);

m_audioDevicePrevVolumeLevel = m_audioDeviceNewVolumeLevel;
}
void HdmiCecSink::sendKeyPressEvent(const int logicalAddress, int keyCode)
{
Expand Down Expand Up @@ -3548,7 +3549,11 @@ namespace WPEFramework
else if(keyInfo.UserControl == "sendUserControlReleased")
{
LOGINFO("sendUserControlReleased : logical addr:0x%x queue size :%zu \n",keyInfo.logicalAddr,_instance->m_SendKeyQueue.size());
_instance->sendUserControlReleased(keyInfo.logicalAddr);
if(!_instance->m_isAudioStatusInfoUpdated)
{
_instance->sendGiveAudioStatusMsg();
}
_instance->sendUserControlReleased(keyInfo.logicalAddr);
}
else
{
Expand Down
2 changes: 2 additions & 0 deletions HdmiCecSink/HdmiCecSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@ namespace WPEFramework {
bool m_audioStatusReceived;
bool m_audioStatusTimerStarted;
int m_audioStatusRequestedCount;
int m_audioDeviceNewVolumeLevel;
int m_audioDevicePrevVolumeLevel;
std::thread m_sendKeyEventThread;
std::mutex m_sendKeyEventMutex;
std::queue<SendKeyInfo> m_SendKeyQueue;
Expand Down
Loading