Skip to content

Commit 7c7035f

Browse files
author
Anurag Krishnan
committed
VPLAY-11854 Webprocess crash AampDRMLicenseManager::createDrmSession
Reason for change: trigger the fake tune only when the device transitions from DEEPSLEEP to ON/STANDBY, we can make sure that HDMI is in the expected state and the playback should work as expected. Test Procedure: updated in ticket Risks: Low Signed-off-by: Anurag Krishnan <[email protected]>
1 parent d3b4447 commit 7c7035f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

middleware/externals/rdk/PlayerExternalsRdkInterface.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#define RETRYSLEEP (300 * 1000) //Retry sleep
3939

4040
#ifdef USE_PREINIT_DECODING
41+
static PowerController_PowerState_t prevState = POWER_STATE_ON;
4142
static void IARM_PowerChangeHandler (const PowerController_PowerState_t currentState,
4243
const PowerController_PowerState_t newState, void* userdata);
4344
#endif
@@ -100,6 +101,7 @@ void getPwrContInterface()
100101
}
101102
usleep(RETRYSLEEP); // 300ms
102103
}
104+
103105
MW_LOG_INFO("Registering power mode change callback...");
104106
PowerController_RegisterPowerModeChangedCallback(IARM_PowerChangeHandler, nullptr);
105107

@@ -143,12 +145,16 @@ static void IARM_PowerChangeHandler (const PowerController_PowerState_t currentS
143145
{
144146
MW_LOG_INFO("Entering IARM_PowerChangeHandler:State Changed currentState: %d, newState: %d",
145147
currentState, newState);
148+
149+
bool isOnOrStandby = (newState == POWER_STATE_STANDBY || newState == POWER_STATE_ON);
146150

147-
if(currentState == POWER_STATE_STANDBY_DEEP_SLEEP && newState != POWER_STATE_STANDBY_DEEP_SLEEP )
151+
if((currentState == POWER_STATE_STANDBY_DEEP_SLEEP && isOnOrStandby) ||
152+
(prevState == POWER_STATE_STANDBY_DEEP_SLEEP && currentState == POWER_STATE_STANDBY_LIGHT_SLEEP && isOnOrStandby) )
148153
{
149154
MW_LOG_INFO(" DEEPSLEEP : calling triggerFakeTune \n");
150155
triggerFakeTune();
151156
}
157+
prevState = currentState;
152158

153159
MW_LOG_INFO("Exiting IARM_PowerChangeHandler..");
154160
}

0 commit comments

Comments
 (0)