aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Hochecker <fernetmenta@online.de>2013-12-10 13:48:55 +0100
committerRainer Hochecker <fernetmenta@online.de>2013-12-29 11:24:12 +0100
commit2e7666ad103f4d90f27a186ed46dce578ee2c097 (patch)
treee432ab323c5e8c4f426c439a17efb9d2dbae30c3
parenta59f822e2b1e762207a4d043ecc9561c922afade (diff)
ActiveAE: suspend hdmi audio during change of refresh rate
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
index 97cfbc65cd..843321f245 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -235,6 +235,8 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg)
case CActiveAEControlProtocol::KEEPCONFIG:
m_extKeepConfig = *(unsigned int*)msg->data;
return;
+ case CActiveAEControlProtocol::DISPLAYRESET:
+ return;
default:
break;
}
@@ -423,6 +425,7 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg)
m_state = AE_TOP_CONFIGURED_SUSPEND;
m_extDeferData = true;
}
+ msg->Reply(CActiveAEControlProtocol::ACC);
return;
case CActiveAEControlProtocol::PAUSESTREAM:
CActiveAEStream *stream;
@@ -636,6 +639,17 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg)
break;
}
}
+ else if (port == NULL) // timeout
+ {
+ switch (signal)
+ {
+ case CActiveAEControlProtocol::TIMEOUT:
+ m_extTimeout = 1000;
+ return;
+ default:
+ break;
+ }
+ }
break;
case AE_TOP_CONFIGURED_IDLE:
@@ -2238,12 +2252,27 @@ void CActiveAE::KeepConfiguration(unsigned int millis)
void CActiveAE::OnLostDevice()
{
-// m_controlPort.SendOutMessage(CActiveAEControlProtocol::DISPLAYLOST);
+ Message *reply;
+ if (m_controlPort.SendOutMessageSync(CActiveAEControlProtocol::DISPLAYLOST,
+ &reply,
+ 5000))
+ {
+ bool success = reply->signal == CActiveAEControlProtocol::ACC ? true : false;
+ reply->Release();
+ if (!success)
+ {
+ CLog::Log(LOGERROR, "ActiveAE::%s - returned error", __FUNCTION__);
+ }
+ }
+ else
+ {
+ CLog::Log(LOGERROR, "ActiveAE::%s - timed out", __FUNCTION__);
+ }
}
void CActiveAE::OnResetDevice()
{
-// m_controlPort.SendOutMessage(CActiveAEControlProtocol::DISPLAYRESET);
+ m_controlPort.SendOutMessage(CActiveAEControlProtocol::DISPLAYRESET);
}
//-----------------------------------------------------------------------------