1+ From e0106e0db9c5ff9d1a2eb433c44771e97a97a42e Mon Sep 17 00:00:00 2001
2+ From: cdu13a <cdu13a@gmail.com>
3+ Date: Tue, 12 Feb 2019 12:45:29 -0500
4+ Subject: CoreELEC Settings
5+
6+ ---
7+ .../resources/strings.po | 67 ++++++++++++++++++-
8+ system/settings/settings.xml | 34 ++++++++++
9+ xbmc/settings/Settings.cpp | 5 ++
10+ xbmc/settings/Settings.h | 5 ++
11+ xbmc/windowing/amlogic/WinSystemAmlogic.cpp | 34 ++++++++++
12+ 5 files changed, 144 insertions(+), 1 deletion(-)
13+
114diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
2- index b28cd82..e510311 100644
15+ index b28cd82141..2177ef4c08 100644
316--- a/addons/resource.language.en_gb/resources/strings.po
417+++ b/addons/resource.language.en_gb/resources/strings.po
5- @@ -8325,7 +8325,62 @@ msgctxt "#14277"
18+ @@ -8325,7 +8325,72 @@ msgctxt "#14277"
619 msgid "Allow remote control from applications on other systems"
720 msgstr ""
821
@@ -44,33 +57,43 @@ index b28cd82..e510311 100644
4457+
4558+ #: system/settings/settings.xml
4659+ msgctxt "#14285"
47- + msgid "Disable auto colour depth switching "
60+ + msgid "Limit output to 8-bit "
4861+ msgstr ""
4962+
5063+ #: system/settings/settings.xml
5164+ msgctxt "#14286"
52- + msgid "Enable this to disable auto colour depth switching . Requires reboot."
65+ + msgid "Enable this to limit output colour depth to 8-bit . Requires reboot."
5366+ msgstr ""
5467+
5568+ #: system/settings/settings.xml
56- + msgctxt "#14287"
69+ + msgctxt "#14289"
70+ + msgid "Use 4:2:2 colour subsampling"
71+ + msgstr ""
72+ +
73+ + #: system/settings/settings.xml
74+ + msgctxt "#14290"
75+ + msgid "Some displays (usually LG) work better with 4:2:2 colour subsampling. Requires reboot."
76+ + msgstr ""
77+ +
78+ + #: system/settings/settings.xml
79+ + msgctxt "#14291"
5780+ msgid "Enable HEVC seek workaround"
5881+ msgstr ""
5982+
6083+ #: system/settings/settings.xml
61- + msgctxt "#14288 "
84+ + msgctxt "#14292 "
6285+ msgid "Enable this if you have problems with HEVC content after seeking."
6386+ msgstr ""
6487+
65- + #empty strings from id 14289 to 14300
88+ + #empty strings from id 14293 to 14300
6689
6790 #. pvr "channels" settings group label
6891 #: system/settings/settings.xml
6992diff --git a/system/settings/settings.xml b/system/settings/settings.xml
70- index f87ac4b..0d99a97 100755
93+ index f87ac4b6f4..61ab180361 100755
7194--- a/system/settings/settings.xml
7295+++ b/system/settings/settings.xml
73- @@ -2989,6 +2989,34 @@
96+ @@ -2989,6 +2989,40 @@
7497 </setting>
7598 </group>
7699 </category>
@@ -88,13 +111,19 @@ index f87ac4b..0d99a97 100755
88111+ <default>false</default>
89112+ <control type="toggle" />
90113+ </setting>
91- + <setting id="coreelec.amlogic.autocdsw " type="boolean" label="14285" help="14286">
114+ + <setting id="coreelec.amlogic.limit8bit " type="boolean" label="14285" help="14286">
92115+ <requirement>HAVE_AMCODEC</requirement>
93116+ <level>3</level>
94117+ <default>false</default>
95118+ <control type="toggle" />
96119+ </setting>
97- + <setting id="coreelec.amlogic.hevcworkaround" type="boolean" label="14287" help="14288">
120+ + <setting id="coreelec.amlogic.force422" type="boolean" label="14289" help="14290">
121+ + <requirement>HAVE_AMCODEC</requirement>
122+ + <level>3</level>
123+ + <default>false</default>
124+ + <control type="toggle" />
125+ + </setting>
126+ + <setting id="coreelec.amlogic.hevcworkaround" type="boolean" label="14291" help="14292">
98127+ <requirement>HAVE_AMCODEC</requirement>
99128+ <level>3</level>
100129+ <default>false</default>
@@ -106,40 +135,42 @@ index f87ac4b..0d99a97 100755
106135 <visible>false</visible>
107136 <group id="1">
108137diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
109- index b299b73..f306d46 100644
138+ index b299b73fac..dbaacc4cf4 100644
110139--- a/xbmc/settings/Settings.cpp
111140+++ b/xbmc/settings/Settings.cpp
112- @@ -392,6 +392,10 @@ const std::string CSettings::SETTING_EVENTLOG_SHOW = "eventlog.show";
141+ @@ -392,6 +392,11 @@ const std::string CSettings::SETTING_EVENTLOG_SHOW = "eventlog.show";
113142 const std::string CSettings::SETTING_MASTERLOCK_LOCKCODE = "masterlock.lockcode";
114143 const std::string CSettings::SETTING_MASTERLOCK_STARTUPLOCK = "masterlock.startuplock";
115144 const std::string CSettings::SETTING_MASTERLOCK_MAXRETRIES = "masterlock.maxretries";
116145+ const std::string CSettings::SETTING_COREELEC_AMLOGIC_DEINTERLACING = "coreelec.amlogic.deinterlacing";
117146+ const std::string CSettings::SETTING_COREELEC_AMLOGIC_NOISEREDUCTION = "coreelec.amlogic.noisereduction";
118- + const std::string CSettings::SETTING_COREELEC_AMLOGIC_AUTOCDSW = "coreelec.amlogic.autocdsw";
147+ + const std::string CSettings::SETTING_COREELEC_AMLOGIC_LIMIT8BIT = "coreelec.amlogic.limit8bit";
148+ + const std::string CSettings::SETTING_COREELEC_AMLOGIC_FORCE422 = "coreelec.amlogic.force422";
119149+ const std::string CSettings::SETTING_COREELEC_AMLOGIC_HEVCWORKAROUND = "coreelec.amlogic.hevcworkaround";
120150 const std::string CSettings::SETTING_CACHE_HARDDISK = "cache.harddisk";
121151 const std::string CSettings::SETTING_CACHEVIDEO_DVDROM = "cachevideo.dvdrom";
122152 const std::string CSettings::SETTING_CACHEVIDEO_LAN = "cachevideo.lan";
123153diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h
124- index 95baba2..a446a45 100644
154+ index 95baba2a7e..fc4063b7ee 100644
125155--- a/xbmc/settings/Settings.h
126156+++ b/xbmc/settings/Settings.h
127- @@ -352,6 +352,10 @@ public:
157+ @@ -352,6 +352,11 @@ public:
128158 static const std::string SETTING_MASTERLOCK_LOCKCODE;
129159 static const std::string SETTING_MASTERLOCK_STARTUPLOCK;
130160 static const std::string SETTING_MASTERLOCK_MAXRETRIES;
131161+ static const std::string SETTING_COREELEC_AMLOGIC_DEINTERLACING;
132162+ static const std::string SETTING_COREELEC_AMLOGIC_NOISEREDUCTION;
133- + static const std::string SETTING_COREELEC_AMLOGIC_AUTOCDSW;
163+ + static const std::string SETTING_COREELEC_AMLOGIC_LIMIT8BIT;
164+ + static const std::string SETTING_COREELEC_AMLOGIC_FORCE422;
134165+ static const std::string SETTING_COREELEC_AMLOGIC_HEVCWORKAROUND;
135166 static const std::string SETTING_CACHE_HARDDISK;
136167 static const std::string SETTING_CACHEVIDEO_DVDROM;
137168 static const std::string SETTING_CACHEVIDEO_LAN;
138169diff --git a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp
139- index 0637f83..e2fbb1f 100644
170+ index 0637f83fc0..888b2387f2 100644
140171--- a/xbmc/windowing/amlogic/WinSystemAmlogic.cpp
141172+++ b/xbmc/windowing/amlogic/WinSystemAmlogic.cpp
142- @@ -82,6 +82,18 @@ CWinSystemAmlogic::~CWinSystemAmlogic()
173+ @@ -82,6 +82,40 @@ CWinSystemAmlogic::~CWinSystemAmlogic()
143174
144175 bool CWinSystemAmlogic::InitWindowSystem()
145176 {
@@ -149,12 +180,37 @@ index 0637f83..e2fbb1f 100644
149180+ SysfsUtils::SetString("/sys/module/di/parameters/nr2_en", "0");
150181+ }
151182+
152- + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_AUTOCDSW))
183+ + std::string attr = "";
184+ + SysfsUtils::GetString("/sys/class/amhdmitx/amhdmitx0/attr", attr);
185+ + //We delay writing attr until everything is done with it to avoid multiple display resets.
186+ + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_FORCE422))
187+ + {
188+ + CLog::Log(LOGDEBUG, "CWinSystemAmlogic::InitWindowSystem -- Setting 422 output");
189+ + if (attr.find("444") != std::string::npos ||
190+ + attr.find("422") != std::string::npos ||
191+ + attr.find("420") != std::string::npos)
192+ + attr.replace(attr.find("4"),3,"422");
193+ + else
194+ + attr.append("422");
195+ + }
196+ + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_LIMIT8BIT))
197+ + {
198+ + CLog::Log(LOGDEBUG, "CWinSystemAmlogic::InitWindowSystem -- Limiting display to 8bit colour depth");
199+ + if (attr.find("10bit") != std::string::npos)
200+ + attr.replace(attr.find("10bit"),5,"8bit");
201+ + else
202+ + attr.append("8bit");
203+ + }
204+ + if (CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_LIMIT8BIT) ||
205+ + CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_COREELEC_AMLOGIC_FORCE422))
153206+ {
154- + CLog::Log(LOGDEBUG, "CWinSystemAmlogic::InitWindowSystem -- disabling auto cd switching ");
155- + SysfsUtils::SetString("/sys/class/video/disable_cdsw ", "1" );
207+ + //attr.append("now ");
208+ + SysfsUtils::SetString("/sys/class/amhdmitx/amhdmitx0/attr ", attr.c_str() );
156209+ }
157210+
158211 m_nativeDisplay = EGL_DEFAULT_DISPLAY;
159212
160213 CDVDVideoCodecAmlogic::Register();
214+ - -
215+ 2.17.1
216+
0 commit comments