Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
satdreamgr: add HDMI on/off from enigma2
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
meta-satdreamgr/recipes-satdreamgr/satdreamgr/files/sdg_hdmioutput.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
|