mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
- remove TRIPLEDRAGON leftovers
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -28,11 +28,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if HAVE_TRIPLEDRAGON
|
||||
#include <avs/avs_inf.h>
|
||||
#include <tdpanel/lcdstuff.h>
|
||||
#endif
|
||||
|
||||
#define hal_debug(args...) _hal_debug(HAL_DEBUG_PWRMNGR, this, args)
|
||||
#define hal_info(args...) _hal_info(HAL_DEBUG_PWRMNGR, this, args)
|
||||
|
||||
@@ -90,48 +85,7 @@ unsigned long cCpuFreqManager::GetCpuFreq(void)
|
||||
bool cCpuFreqManager::SetCpuFreq(unsigned long f)
|
||||
{
|
||||
hal_info("%s(%lu) => set standby = %s\n", __func__, f, f?"true":"false");
|
||||
#if HAVE_TRIPLEDRAGON
|
||||
/* actually SetCpuFreq is used to determine if the system is in standby
|
||||
this is an "elegant" hack, because:
|
||||
* during a recording, cpu freq is kept "high", even if the box is sent to standby
|
||||
* the "SetStandby" call is made even if a recording is running
|
||||
On the TD, setting standby disables the frontend, so we must not do it
|
||||
if a recording is running.
|
||||
For now, the values in neutrino are hardcoded:
|
||||
* f == 0 => max => not standby
|
||||
* f == 50000000 => min => standby
|
||||
*/
|
||||
int fd = open("/dev/stb/tdsystem", O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
perror("open tdsystem");
|
||||
return false;
|
||||
}
|
||||
if (f)
|
||||
{
|
||||
ioctl(fd, IOC_AVS_SET_VOLUME, 31); /* mute AVS to avoid ugly noise */
|
||||
ioctl(fd, IOC_AVS_STANDBY_ENTER);
|
||||
if (getenv("TRIPLE_LCDBACKLIGHT"))
|
||||
{
|
||||
hal_info("%s: TRIPLE_LCDBACKLIGHT is set: keeping LCD backlight on\n", __func__);
|
||||
close(fd);
|
||||
fd = open("/dev/stb/tdlcd", O_RDONLY);
|
||||
if (fd < 0)
|
||||
hal_info("%s: open tdlcd error: %m\n", __func__);
|
||||
else
|
||||
ioctl(fd, IOC_LCD_BACKLIGHT_ON);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ioctl(fd, IOC_AVS_SET_VOLUME, 31); /* mute AVS to avoid ugly noise */
|
||||
ioctl(fd, IOC_AVS_STANDBY_LEAVE);
|
||||
/* unmute will be done by cAudio::do_mute(). Ugly, but prevents pops */
|
||||
// ioctl(fd, IOC_AVS_SET_VOLUME, 0); /* max gain */
|
||||
}
|
||||
|
||||
close(fd);
|
||||
#elif HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE
|
||||
#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE
|
||||
if (f) {
|
||||
FILE *pll0 = fopen ("/proc/cpu_frequ/pll0_ndiv_mdiv", "w");
|
||||
if (pll0) {
|
||||
|
Reference in New Issue
Block a user