Skip to content

Commit

Permalink
satdreamgr: add HDMI on/off from enigma2
Browse files Browse the repository at this point in the history
  • Loading branch information
athoik committed Dec 8, 2019
1 parent 835dc1e commit d03e5e9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
Expand Up @@ -21,7 +21,7 @@ SRC_URI += " \
SRC_URI_append_ixusszero = " file://0001-Ixuss-disable-blending-issues.patch "
SRC_URI_append_ixussone = " file://0001-Ixuss-disable-blending-issues.patch "
SRC_URI_append_sf4008 = " file://sf4008_boxmode6.patch file://sf4008rc2.patch file://sdg_vtuner_msg2.patch "
SRC_URI_append_sf8008 = " file://sf8008_e2.patch file://sf8008_nosignal_stats.patch file://sdg_vtuner_msg2.patch file://sf8008_led.patch "
SRC_URI_append_sf8008 = " file://sf8008_e2.patch file://sf8008_nosignal_stats.patch file://sdg_vtuner_msg2.patch file://sf8008_led.patch file://sdg_hdmioutput.patch "

RRECOMMENDS_${PN} = " \
tzdata enigma2-plugin-skins-satdreamgr-hd-transpba \
Expand Down
@@ -0,0 +1,41 @@
diff --git a/lib/python/Components/SystemInfo.py b/lib/python/Components/SystemInfo.py
index 1d0a5ae..13c6a67 100644
--- a/lib/python/Components/SystemInfo.py
+++ b/lib/python/Components/SystemInfo.py
@@ -110,6 +110,7 @@ SystemInfo["CanDownmixAC3"] = fileHas("/proc/stb/audio/ac3_choices", "downmix")
SystemInfo["CanDownmixDTS"] = fileHas("/proc/stb/audio/dts_choices", "downmix")
SystemInfo["CanDownmixAAC"] = fileHas("/proc/stb/audio/aac_choices", "downmix")
SystemInfo["HDMIAudioSource"] = fileCheck("/proc/stb/hdmi/audio_source")
+SystemInfo["HDMIOutput"] = fileCheck("/proc/stb/hdmi/output")

dev = ("root" in cmdline and cmdline['root'].startswith('/dev/')) and cmdline['root'][5:]
while dev and not fileExists('/sys/block/' + dev):
diff --git a/lib/python/Screens/Standby.py b/lib/python/Screens/Standby.py
index 052e62e..c7ceb5e 100644
--- a/lib/python/Screens/Standby.py
+++ b/lib/python/Screens/Standby.py
@@ -50,6 +50,12 @@ class Standby(Screen):
if os.path.exists("/usr/script/standby_enter.sh"):
Console().ePopen("/usr/script/standby_enter.sh")

+ if SystemInfo["HDMIOutput"]:
+ try:
+ open(SystemInfo["HDMIOutput"], "w").write("off")
+ except:
+ pass
+
self["actions"] = ActionMap( [ "StandbyActions" ],
{
"power": self.Power,
@@ -142,6 +148,11 @@ class Standby(Screen):
self.leaveMute()
if os.path.exists("/usr/script/standby_leave.sh"):
Console().ePopen("/usr/script/standby_leave.sh")
+ if SystemInfo["HDMIOutput"]:
+ try:
+ open(SystemInfo["HDMIOutput"], "w").write("on")
+ except:
+ pass
if config.usage.remote_fallback_import_standby.value:
ImportChannels()

0 comments on commit d03e5e9

Please sign in to comment.