From 4c41dd58305c6810226b7b5cea7a209e98cc5cf9 Mon Sep 17 00:00:00 2001 From: fritsch Date: Tue, 23 Dec 2014 19:08:03 +0100 Subject: [PATCH] IMX: Remove special handling via powermanager (user wish) --- .../kodi/kodi-999.95-iMX6-powermanager.patch | 110 ------------------ 1 file changed, 110 deletions(-) delete mode 100644 projects/imx6/patches/kodi/kodi-999.95-iMX6-powermanager.patch diff --git a/projects/imx6/patches/kodi/kodi-999.95-iMX6-powermanager.patch b/projects/imx6/patches/kodi/kodi-999.95-iMX6-powermanager.patch deleted file mode 100644 index 601b070de9..0000000000 --- a/projects/imx6/patches/kodi/kodi-999.95-iMX6-powermanager.patch +++ /dev/null @@ -1,110 +0,0 @@ -From fc4ab34876077a012c4d0749b872703f46546255 Mon Sep 17 00:00:00 2001 -From: fritsch -Date: Sat, 13 Dec 2014 18:36:00 +0100 -Subject: [PATCH] IMX: PowerManager - do nothing besides rebooting (wrap - Login1) - ---- - xbmc/powermanagement/PowerManager.cpp | 4 ++ - xbmc/powermanagement/linux/CIMXPowerSyscall.h | 70 +++++++++++++++++++++++++++ - 2 files changed, 74 insertions(+) - create mode 100644 xbmc/powermanagement/linux/CIMXPowerSyscall.h - -diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp -index 5900f98..f669894 100644 ---- a/xbmc/powermanagement/PowerManager.cpp -+++ b/xbmc/powermanagement/PowerManager.cpp -@@ -40,6 +40,8 @@ - #include "osx/CocoaPowerSyscall.h" - #elif defined(TARGET_ANDROID) - #include "android/AndroidPowerSyscall.h" -+#elif defined(HAS_IMXVPU) -+#include "linux/CIMXPowerSyscall.h" - #elif defined(TARGET_POSIX) - #include "linux/FallbackPowerSyscall.h" - #if defined(HAS_DBUS) -@@ -73,6 +75,8 @@ void CPowerManager::Initialize() - m_instance = new CCocoaPowerSyscall(); - #elif defined(TARGET_ANDROID) - m_instance = new CAndroidPowerSyscall(); -+#elif defined(HAS_IMXVPU) -+ m_instance = new CIMXPowerSyscall(); - #elif defined(TARGET_POSIX) - #if defined(HAS_DBUS) - if (CConsoleUPowerSyscall::HasConsoleKitAndUPower()) -diff --git a/xbmc/powermanagement/linux/CIMXPowerSyscall.h b/xbmc/powermanagement/linux/CIMXPowerSyscall.h -new file mode 100644 -index 0000000..2bf428e ---- /dev/null -+++ b/xbmc/powermanagement/linux/CIMXPowerSyscall.h -@@ -0,0 +1,70 @@ -+/* -+ * Copyright (C) 2005-2013 Team XBMC -+ * http://xbmc.org -+ * -+ * This Program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2, or (at your option) -+ * any later version. -+ * -+ * This Program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with XBMC; see the file COPYING. If not, see -+ * . -+ * -+ */ -+ -+#pragma once -+#include "powermanagement/IPowerSyscall.h" -+#include "system.h" -+#if defined(TARGET_POSIX) && defined(HAS_DBUS) -+#include "powermanagement/linux/LogindUPowerSyscall.h" -+#endif -+ -+class CIMXPowerSyscall : public CPowerSyscallWithoutEvents -+{ -+public: -+ CIMXPowerSyscall() -+ { -+ m_instance = NULL; -+ #if defined(TARGET_POSIX) && defined(HAS_DBUS) -+ if (CLogindUPowerSyscall::HasLogind()) -+ { -+ m_instance = new CLogindUPowerSyscall(); -+ } -+ #endif -+ } -+ ~CIMXPowerSyscall() -+ { -+ delete m_instance; -+ } -+ virtual bool Powerdown() {return false; } -+ virtual bool Suspend() {return false; } -+ virtual bool Hibernate() {return false; } -+ virtual bool Reboot() -+ { -+ if (m_instance) -+ return m_instance->Reboot(); -+ else -+ return false; -+ } -+ -+ virtual bool CanPowerdown() {return false; } -+ virtual bool CanSuspend() {return false; } -+ virtual bool CanHibernate() {return false;} -+ virtual bool CanReboot() -+ { -+ if (m_instance) -+ return m_instance->CanReboot(); -+ else -+ return false; -+ } -+ virtual int BatteryLevel() {return 0; } -+ -+private: -+ IPowerSyscall * m_instance; -+};