From aa25d206374262d7bd70ada49389ce080fe2ff6d Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 14 Dec 2014 15:32:46 +0100 Subject: [PATCH] kodi: add patch to disable unsupported powerfunctions for iMX6 builds Signed-off-by: Stephan Raue --- .../kodi-999.95-iMX6-powermanager.patch | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 packages/mediacenter/kodi/patches/kodi-999.95-iMX6-powermanager.patch diff --git a/packages/mediacenter/kodi/patches/kodi-999.95-iMX6-powermanager.patch b/packages/mediacenter/kodi/patches/kodi-999.95-iMX6-powermanager.patch new file mode 100644 index 0000000000..869bdd23c9 --- /dev/null +++ b/packages/mediacenter/kodi/patches/kodi-999.95-iMX6-powermanager.patch @@ -0,0 +1,81 @@ +From fa31c513986f8429f8e8e4b1ca39455769cd0a1c 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 + +--- + xbmc/powermanagement/PowerManager.cpp | 4 +++ + xbmc/powermanagement/linux/CIMXPowerSyscall.h | 40 +++++++++++++++++++++++++++ + 2 files changed, 44 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..27e644e +--- /dev/null ++++ b/xbmc/powermanagement/linux/CIMXPowerSyscall.h +@@ -0,0 +1,40 @@ ++/* ++ * 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) ++ ++class CIMXPowerSyscall : public CPowerSyscallWithoutEvents ++{ ++public: ++ virtual bool Powerdown() {return false; } ++ virtual bool Suspend() {return false; } ++ virtual bool Hibernate() {return false; } ++ virtual bool Reboot() {return true; } ++ ++ virtual bool CanPowerdown() {return false; } ++ virtual bool CanSuspend() {return false; } ++ virtual bool CanHibernate() {return false; } ++ virtual bool CanReboot() {return true; } ++ virtual int BatteryLevel() {return 0; } ++}; ++#endif +-- +1.9.1