mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
libtriple: implement option to keep LCD backlight on in standby
Based on an idea by Kim Danielmeier, keep the backlight on if TRIPLE_LCDBACKLIGHT environment variable is set.
This commit is contained in:
@@ -8,7 +8,10 @@ environment variables, which are described here:
|
|||||||
TRIPLE_NOSCART=1 - makes neutrino *not* do any voltage switching on
|
TRIPLE_NOSCART=1 - makes neutrino *not* do any voltage switching on
|
||||||
SCART pin 8, probably not useful for anyone but me
|
SCART pin 8, probably not useful for anyone but me
|
||||||
|
|
||||||
TRIPLE_DEBUG=... - controls various debugging levels in libtriple
|
TRIPLE_LCDBACKLIGHT=1 - makes the LCD backlight stay on in standby,
|
||||||
|
may disturb others
|
||||||
|
|
||||||
|
HAL_DEBUG=... - controls various debugging levels in libtriple
|
||||||
valid values for the different component:
|
valid values for the different component:
|
||||||
audio 0x01
|
audio 0x01
|
||||||
video 0x02
|
video 0x02
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
#include "pwrmngr.h"
|
#include "pwrmngr.h"
|
||||||
#include "lt_debug.h"
|
#include "lt_debug.h"
|
||||||
@@ -9,8 +10,10 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <avs/avs_inf.h>
|
#include <avs/avs_inf.h>
|
||||||
|
#include <tdpanel/lcdstuff.h>
|
||||||
|
|
||||||
#define lt_debug(args...) _lt_debug(TRIPLE_DEBUG_PWRMNGR, this, args)
|
#define lt_debug(args...) _lt_debug(TRIPLE_DEBUG_PWRMNGR, this, args)
|
||||||
|
#define lt_info(args...) _lt_info(TRIPLE_DEBUG_PWRMNGR, this, args)
|
||||||
void cCpuFreqManager::Up(void) { lt_debug("%s\n", __FUNCTION__); }
|
void cCpuFreqManager::Up(void) { lt_debug("%s\n", __FUNCTION__); }
|
||||||
void cCpuFreqManager::Down(void) { lt_debug("%s\n", __FUNCTION__); }
|
void cCpuFreqManager::Down(void) { lt_debug("%s\n", __FUNCTION__); }
|
||||||
void cCpuFreqManager::Reset(void) { lt_debug("%s\n", __FUNCTION__); }
|
void cCpuFreqManager::Reset(void) { lt_debug("%s\n", __FUNCTION__); }
|
||||||
@@ -55,6 +58,16 @@ bool cCpuFreqManager::SetCpuFreq(unsigned long f)
|
|||||||
{
|
{
|
||||||
ioctl(fd, IOC_AVS_SET_VOLUME, 31); /* mute AVS to avoid ugly noise */
|
ioctl(fd, IOC_AVS_SET_VOLUME, 31); /* mute AVS to avoid ugly noise */
|
||||||
ioctl(fd, IOC_AVS_STANDBY_ENTER);
|
ioctl(fd, IOC_AVS_STANDBY_ENTER);
|
||||||
|
if (getenv("TRIPLE_LCDBACKLIGHT"))
|
||||||
|
{
|
||||||
|
lt_info("%s: TRIPLE_LCDBACKLIGHT is set: keeping LCD backlight on\n", __func__);
|
||||||
|
close(fd);
|
||||||
|
fd = open("/dev/stb/tdlcd", O_RDONLY);
|
||||||
|
if (fd < 0)
|
||||||
|
lt_info("%s: open tdlcd error: %m\n", __func__);
|
||||||
|
else
|
||||||
|
ioctl(fd, IOC_LCD_BACKLIGHT_ON);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user