- remove TRIPLEDRAGON leftovers

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-05-17 23:27:41 +02:00
committed by Thilo Graf
parent 8ead7f9805
commit 42264ba4af
4 changed files with 1 additions and 65 deletions

View File

@@ -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

View File

@@ -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) {

View File

@@ -22,19 +22,7 @@
#include <cstdlib>
#include <vector>
#include <inttypes.h>
/* at least on td, config.h needs to be included before... */
#ifndef HAVE_TRIPLEDRAGON
#include <linux/dvb/dmx.h>
#else /* TRIPLEDRAGON */
extern "C" {
#include <hardware/xp/xp_osd_user.h>
}
#if defined DMX_FILTER_SIZE
#undef DMX_FILTER_SIZE
#endif
#define DMX_FILTER_SIZE FILTER_LENGTH
#endif /* TRIPLEDRAGON */
#include <cs_types.h>
#if BOXMODEL_VUULTIMO4K

View File

@@ -25,11 +25,7 @@
#include <time.h>
#include <utime.h>
#if HAVE_TRIPLEDRAGON
#define TARGETRES "704x576"
#else
#define TARGETRES "1280x720"
#endif
int main(int argc, char **argv)
{