diff options
author | Peter Frühberger <Peter.Fruehberger@gmail.com> | 2013-12-29 04:57:52 -0800 |
---|---|---|
committer | Peter Frühberger <Peter.Fruehberger@gmail.com> | 2013-12-29 04:57:52 -0800 |
commit | 6a59001ae10746035f117b6931c9e933fe85d662 (patch) | |
tree | b4413690f85e1f43824a8bd7a62f21e80e5683e0 | |
parent | 4561a4c0b4d3124f3a2baf252f8b828fc6c98490 (diff) | |
parent | 2e7666ad103f4d90f27a186ed46dce578ee2c097 (diff) |
Merge pull request #3797 from FernetMenta/hdmiaudio
ActiveAE: suspend hdmi audio during change of refresh rate
-rw-r--r-- | xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 33 |
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); } //----------------------------------------------------------------------------- |