Skip to content

Commit

Permalink
Merge pull request xbmc#17954 from fritsch/aesuspend2
Browse files Browse the repository at this point in the history
ActiveAE: Don't wake when externally suspended
  • Loading branch information
fritsch authored May 28, 2020
2 parents 314a228 + d4ff9a2 commit 51b150b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg)
m_stats.SetSuspended(true);
m_state = AE_TOP_CONFIGURED_SUSPEND;
m_extDeferData = true;
m_extSuspended = true;
return;
case CActiveAEControlProtocol::DISPLAYLOST:
if (m_sink.GetDeviceType(m_mode == MODE_PCM ? m_settings.device : m_settings.passthroughdevice) == AE_DEVTYPE_HDMI)
Expand Down Expand Up @@ -852,10 +853,13 @@ void CActiveAE::StateMachine(int signal, Protocol *port, Message *msg)
switch (signal)
{
case CActiveAEControlProtocol::DISPLAYRESET:
if (m_extSuspended)
return;
CLog::Log(LOGDEBUG,"CActiveAE - display reset event");
displayReset = true;
case CActiveAEControlProtocol::INIT:
m_extError = false;
m_extSuspended = false;
if (!displayReset)
{
m_controlPort.PurgeOut(CActiveAEControlProtocol::DEVICECHANGE);
Expand Down
1 change: 1 addition & 0 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ class CActiveAE : public IAE, public IDispResource, private CThread
unsigned int m_extKeepConfig;
bool m_extDeferData;
std::queue<time_t> m_extLastDeviceChange;
bool m_extSuspended = false;
bool m_isWinSysReg = false;

enum
Expand Down

0 comments on commit 51b150b

Please sign in to comment.