Skip to content

Commit

Permalink
Merge pull request #2174 from apatel859/sprint/2201
Browse files Browse the repository at this point in the history
LLAMA-5154:Panel fails to come out of standby
  • Loading branch information
anand-ky authored Jan 26, 2022
2 parents 2c4739a + c3bba1c commit b98a056
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 19 additions & 1 deletion DisplaySettings/DisplaySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3795,6 +3795,11 @@ namespace WPEFramework {
return m_powerState;
}

void DisplaySettings::initAudioPortsWorker(void)
{
DisplaySettings::_instance->InitAudioPorts();
}

void DisplaySettings::powerEventHandler(const char *owner, IARM_EventId_t eventId, void *data, size_t len)
{
if(!DisplaySettings::_instance)
Expand All @@ -3810,7 +3815,20 @@ namespace WPEFramework {
eventData->data.state.curState, eventData->data.state.newState);
m_powerState = eventData->data.state.newState;
if (eventData->data.state.newState == IARM_BUS_PWRMGR_POWERSTATE_ON) {
DisplaySettings::_instance->InitAudioPorts();
try
{
LOGWARN("creating worker thread for initAudioPortsWorker ");
std::thread audioPortInitThread = std::thread(initAudioPortsWorker);
audioPortInitThread.detach();
}
catch(const std::system_error& e)
{
LOGERR("system_error exception in thread creation: %s", e.what());
}
catch(const std::exception& e)
{
LOGERR("exception in thread creation : %s", e.what());
}
}

else {
Expand Down
1 change: 1 addition & 0 deletions DisplaySettings/DisplaySettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ namespace WPEFramework {
uint32_t setMS12ProfileSettingsOverride(const JsonObject& parameters, JsonObject& response);
void InitAudioPorts();
void AudioPortsReInitialize();
static void initAudioPortsWorker(void);
//End methods

//Begin events
Expand Down

0 comments on commit b98a056

Please sign in to comment.