cec: fixed - send the power up command as first command when powering up, as the...
authorLars Op den Kamp <lars@opdenkamp.eu>
Sun, 20 Nov 2011 23:38:03 +0000 (00:38 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Sun, 20 Nov 2011 23:59:59 +0000 (00:59 +0100)
xbmc/peripherals/devices/PeripheralCecAdapter.cpp

index 3e21a91..7ebcf87 100644 (file)
@@ -259,30 +259,23 @@ void CPeripheralCecAdapter::Process(void)
 
   CLog::Log(LOGDEBUG, "%s - connection to the CEC adapter opened", __FUNCTION__);
 
-  /* get the vendor id directly after connecting, because the TV might be using a non-standard CEC implementation */
-  m_cecAdapter->GetDeviceVendorId(CECDEVICE_TV);
-
   m_bIsReady = true;
   CAnnouncementManager::AddAnnouncer(this);
 
-  // set correct physical address from peripheral settings
-  int iHdmiPort = GetSettingInt("cec_hdmi_port");
-  if (iHdmiPort <= 0 || iHdmiPort > 16)
-    iHdmiPort = 1;
-  m_cecAdapter->SetPhysicalAddress((uint16_t) (iHdmiPort << 12));
-
-  FlushLog();
-
   if (GetSettingBool("cec_power_on_startup"))
   {
-    cec_power_status status = m_cecAdapter->GetDevicePowerStatus(CECDEVICE_TV);
-    if (status == CEC_POWER_STATUS_STANDBY ||
-        status == CEC_POWER_STATUS_IN_TRANSITION_ON_TO_STANDBY)
-      PowerOnCecDevices(CECDEVICE_TV);
+    PowerOnCecDevices(CECDEVICE_TV);
     FlushLog();
   }
 
-  m_cecAdapter->SetActiveView();
+  /* get the vendor id directly after connecting, because the TV might be using a non-standard CEC implementation */
+  m_cecAdapter->GetDeviceVendorId(CECDEVICE_TV);
+
+  // set correct physical address from peripheral settings
+  int iHdmiPort = GetSettingInt("cec_hdmi_port");
+  if (iHdmiPort <= 0 || iHdmiPort > 16)
+    iHdmiPort = 1;
+  m_cecAdapter->SetPhysicalAddress((uint16_t) (iHdmiPort << 12));
   FlushLog();
 
   if (GetSettingBool("use_tv_menu_language"))