From 42264ba4af4177dbcbb1a3c3e1080e75b71cb8d9 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 17 May 2021 23:27:41 +0200 Subject: [PATCH] - remove TRIPLEDRAGON leftovers Signed-off-by: Thilo Graf --- common/hal_debug.cpp | 2 -- common/pwrmngr.cpp | 48 +------------------------------------------- include/dmx_hal.h | 12 ----------- tools/pic2m2v.c | 4 ---- 4 files changed, 1 insertion(+), 65 deletions(-) diff --git a/common/hal_debug.cpp b/common/hal_debug.cpp index 457b8d5..9679bb5 100644 --- a/common/hal_debug.cpp +++ b/common/hal_debug.cpp @@ -54,8 +54,6 @@ void hal_debug_init(void) { int i = 0; char *tmp = getenv("HAL_DEBUG"); - if (! tmp) - tmp = getenv("TRIPLE_DEBUG"); /* backwards compatibility... */ if (! tmp) debuglevel = 0; else diff --git a/common/pwrmngr.cpp b/common/pwrmngr.cpp index 3c23c30..98e9ed2 100644 --- a/common/pwrmngr.cpp +++ b/common/pwrmngr.cpp @@ -28,11 +28,6 @@ #include #include -#if HAVE_TRIPLEDRAGON -#include -#include -#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) { diff --git a/include/dmx_hal.h b/include/dmx_hal.h index 9e98a22..8cf9797 100644 --- a/include/dmx_hal.h +++ b/include/dmx_hal.h @@ -22,19 +22,7 @@ #include #include #include -/* at least on td, config.h needs to be included before... */ -#ifndef HAVE_TRIPLEDRAGON #include -#else /* TRIPLEDRAGON */ -extern "C" { -#include -} -#if defined DMX_FILTER_SIZE -#undef DMX_FILTER_SIZE -#endif -#define DMX_FILTER_SIZE FILTER_LENGTH -#endif /* TRIPLEDRAGON */ - #include #if BOXMODEL_VUULTIMO4K diff --git a/tools/pic2m2v.c b/tools/pic2m2v.c index e70a78e..35a1db4 100644 --- a/tools/pic2m2v.c +++ b/tools/pic2m2v.c @@ -25,11 +25,7 @@ #include #include -#if HAVE_TRIPLEDRAGON -#define TARGETRES "704x576" -#else #define TARGETRES "1280x720" -#endif int main(int argc, char **argv) {