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:
@@ -54,8 +54,6 @@ void hal_debug_init(void)
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
char *tmp = getenv("HAL_DEBUG");
|
char *tmp = getenv("HAL_DEBUG");
|
||||||
if (! tmp)
|
|
||||||
tmp = getenv("TRIPLE_DEBUG"); /* backwards compatibility... */
|
|
||||||
if (! tmp)
|
if (! tmp)
|
||||||
debuglevel = 0;
|
debuglevel = 0;
|
||||||
else
|
else
|
||||||
|
@@ -28,11 +28,6 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.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_debug(args...) _hal_debug(HAL_DEBUG_PWRMNGR, this, args)
|
||||||
#define hal_info(args...) _hal_info(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)
|
bool cCpuFreqManager::SetCpuFreq(unsigned long f)
|
||||||
{
|
{
|
||||||
hal_info("%s(%lu) => set standby = %s\n", __func__, f, f?"true":"false");
|
hal_info("%s(%lu) => set standby = %s\n", __func__, f, f?"true":"false");
|
||||||
#if HAVE_TRIPLEDRAGON
|
#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE
|
||||||
/* 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 (f) {
|
if (f) {
|
||||||
FILE *pll0 = fopen ("/proc/cpu_frequ/pll0_ndiv_mdiv", "w");
|
FILE *pll0 = fopen ("/proc/cpu_frequ/pll0_ndiv_mdiv", "w");
|
||||||
if (pll0) {
|
if (pll0) {
|
||||||
|
@@ -22,19 +22,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
/* at least on td, config.h needs to be included before... */
|
|
||||||
#ifndef HAVE_TRIPLEDRAGON
|
|
||||||
#include <linux/dvb/dmx.h>
|
#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>
|
#include <cs_types.h>
|
||||||
|
|
||||||
#if BOXMODEL_VUULTIMO4K
|
#if BOXMODEL_VUULTIMO4K
|
||||||
|
@@ -25,11 +25,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
|
|
||||||
#if HAVE_TRIPLEDRAGON
|
|
||||||
#define TARGETRES "704x576"
|
|
||||||
#else
|
|
||||||
#define TARGETRES "1280x720"
|
#define TARGETRES "1280x720"
|
||||||
#endif
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user