Skip to content

Commit

Permalink
[Information]
Browse files Browse the repository at this point in the history
* improve edid-decode and add dream support

Close #3459
  • Loading branch information
jbleyel committed Nov 29, 2024
1 parent d8ebe7a commit d282302
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
19 changes: 19 additions & 0 deletions lib/driver/avcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,5 +705,24 @@ void eAVControl::setOSDAlpha(int alpha, int flags) const
#endif
}

/// @brief getEDIDPath
/// @return
std::string eAVControl::getEDIDPath() const
{
struct stat buffer = {};

#ifdef DREAMNEXTGEN
const std::string proc = "/sys/class/amhdmitx/amhdmitx0/rawedid";
#else
const std::string proc = "/proc/stb/hdmi/raw_edid";
#endif

if (stat(proc.c_str(), &buffer) == 0 && stat("/usr/bin/edid-decode", &buffer) == 0)
{
return proc;
}
return "";
}


eAutoInitP0<eAVControl> init_avcontrol(eAutoInitNumbers::rc, "AVControl Driver");
2 changes: 2 additions & 0 deletions lib/driver/avcontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ class eAVControl : public sigc::trackable

void setVideoSize(int top, int left, int width, int height, int flags = 0) const;

std::string getEDIDPath() const;

enum
{
FLAGS_DEBUG = 1,
Expand Down
1 change: 0 additions & 1 deletion lib/python/Components/SystemInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ def getWakeOnLANType(fileName):
BoxInfo.setItem("HasSDmmc", MultiBoot.canMultiBoot() and "sd" in MultiBoot.getBootSlots()["2"] and "mmcblk" in MTDROOTFS)
BoxInfo.setItem("HasSDswap", MODEL in ("h9", "i55plus") and pathExists("/dev/mmcblk0p1"))
BoxInfo.setItem("HaveCISSL", fileCheck("/etc/ssl/certs/customer.pem") and fileCheck("/etc/ssl/certs/device.pem"))
BoxInfo.setItem("HAVEEDIDDECODE", fileCheck("/proc/stb/hdmi/raw_edid") and fileCheck("/usr/bin/edid-decode"))
BoxInfo.setItem("HaveID", fileCheck("/etc/.id"))
BoxInfo.setItem("HAVEINITCAM", hasInitCam())
BoxInfo.setItem("HAVEINITCARDSERVER", hasInitCardServer())
Expand Down
8 changes: 5 additions & 3 deletions lib/python/Screens/Information.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from time import localtime, strftime, strptime
from urllib.request import urlopen

from enigma import eDVBFrontendParametersSatellite, eDVBResourceManager, eGetEnigmaDebugLvl, eRTSPStreamServer, eServiceCenter, eStreamServer, eTimer, getDesktop, getE2Rev, iPlayableService, iServiceInformation
from enigma import eAVControl, eDVBFrontendParametersSatellite, eDVBResourceManager, eGetEnigmaDebugLvl, eRTSPStreamServer, eServiceCenter, eStreamServer, eTimer, getDesktop, getE2Rev, iPlayableService, iServiceInformation

from ServiceReference import ServiceReference
from skin import parameters
Expand Down Expand Up @@ -2079,8 +2079,10 @@ def __init__(self, session):
("Mounted Volumes", ("/bin/mount", "/bin/mount"), None),
("Partition Table", None, "/proc/partitions")
]
if BoxInfo.getItem("HAVEEDIDDECODE"):
self.systemCommands.append(("EDID", ("/usr/bin/edid-decode", "/usr/bin/edid-decode", "/proc/stb/hdmi/raw_edid"), None))

edidPath = eAVControl.getInstance().getEDIDPath()
if edidPath:
self.systemCommands.append(("EDID", ("/usr/bin/edid-decode", "/usr/bin/edid-decode", edidPath), None))
self.systemCommandsIndex = 0
self.systemCommandsMax = len(self.systemCommands)
self.info = None
Expand Down

0 comments on commit d282302

Please sign in to comment.