forked from xbmc/xbmc
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added power management support for the Raspberry Pi. Since it doesn't…
… support true standby, we fake it by turning video on or off, and ignoring remote inputs during the standby phase.
- Loading branch information
1 parent
9215fc9
commit 4de8f79
Showing
5 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (C) 2013 Team XBMC | ||
* http://www.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 | ||
* <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#if defined(TARGET_RASPBERRY_PI) | ||
|
||
#include "RaspberryPIPowerSyscall.h" | ||
#include "RBP.h" | ||
|
||
bool CRaspberryPIPowerSyscall::VirtualSleep() | ||
{ | ||
g_RBP.SuspendVideoOutput(); | ||
return true; | ||
} | ||
|
||
bool CRaspberryPIPowerSyscall::VirtualWake() | ||
{ | ||
g_RBP.ResumeVideoOutput(); | ||
return true; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#pragma once | ||
/* | ||
* Copyright (C) 2013 Team XBMC | ||
* http://www.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 | ||
* <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#ifndef _RASPBERRY_PI_POWER_SYSCALL_H_ | ||
#define _RASPBERRY_PI_POWER_SYSCALL_H_ | ||
|
||
#if defined(TARGET_RASPBERRY_PI) | ||
#include "powermanagement/PowerSyscallVirtualSleep.h" | ||
|
||
class CRaspberryPIPowerSyscall : public CPowerSyscallVirtualSleep | ||
{ | ||
public: | ||
CRaspberryPIPowerSyscall() : CPowerSyscallVirtualSleep() {} | ||
virtual ~CRaspberryPIPowerSyscall() {} | ||
|
||
virtual bool Powerdown() { return false; } | ||
virtual bool Hibernate() { return false; } | ||
virtual bool Reboot() { return false; } | ||
|
||
virtual bool CanPowerdown() { return false; } | ||
virtual bool CanHibernate() { return false; } | ||
virtual bool CanReboot() { return true; } | ||
|
||
virtual int BatteryLevel() { return 0; } | ||
|
||
virtual bool VirtualSleep(); | ||
virtual bool VirtualWake(); | ||
}; | ||
#endif // TARGET_RASPBERRY_PI | ||
|
||
#endif // _RASPBERRY_PI_POWER_SYSCALL_H_ |