kodi: drop WeTek_Play patches

This commit is contained in:
Lukas Rusak 2017-02-10 15:06:54 -08:00
parent eccfad7df0
commit 622041914c
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3
9 changed files with 0 additions and 349 deletions

View File

@ -1,55 +0,0 @@
From d692d81a72f47fa8fcc57063b0e54336399af811 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Wed, 16 Apr 2014 22:02:01 +0300
Subject: [PATCH 01/10] [aml] Fix ALSA sound output for Amlogic-based devices.
---
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index 6a9066b..75f2cf0 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -88,6 +88,17 @@ static unsigned int ALSASampleRateList[] =
0
};
+static int CheckNP2(unsigned x)
+{
+ --x;
+ x |= x >> 1;
+ x |= x >> 2;
+ x |= x >> 4;
+ x |= x >> 8;
+ x |= x >> 16;
+ return ++x;
+}
+
CAESinkALSA::CAESinkALSA() :
m_bufferSize(0),
m_formatSampleRateMul(0.0),
@@ -752,12 +763,20 @@ bool CAESinkALSA::InitializeHW(const ALSAConfig &inconfig, ALSAConfig &outconfig
*/
periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 20);
bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) sampleRate / 5);
+#if defined(HAS_LIBAMCODEC)
+ // must be pot for pivos.
+ bufferSize = CheckNP2(bufferSize);
+#endif
/*
According to upstream we should set buffer size first - so make sure it is always at least
4x period size to not get underruns (some systems seem to have issues with only 2 periods)
*/
periodSize = std::min(periodSize, bufferSize / 4);
+#if defined(HAS_LIBAMCODEC)
+ // must be pot for pivos.
+ periodSize = CheckNP2(periodSize);
+#endif
CLog::Log(LOGDEBUG, "CAESinkALSA::InitializeHW - Request: periodSize %lu, bufferSize %lu", periodSize, bufferSize);
--
1.7.10.4

View File

@ -1,30 +0,0 @@
From a1f4a5a74bb8e9fd48ec3d45bc908861dddb0296 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Mon, 8 Sep 2014 23:29:40 +0300
Subject: [PATCH 02/10] [aml] Reorder libraries in configure script to prevent
linker errors when linking with libsmbclient
Place libsmbclient before all other libraries to prevent linker errors when linking
with libsmbclient if the libc that is currently used doesn't contain some functions
such as dn_expand (which are often included in libc), but are actually included in
libresolv.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5b8c04b..7869041 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1305,7 +1305,7 @@ fi
# samba
if test "x$use_samba" != "xno"; then
PKG_CHECK_MODULES([SAMBA], [smbclient],
- [INCLUDES="$INCLUDES $SAMBA_CFLAGS"; LIBS="$LIBS $SAMBA_LIBS"],
+ [INCLUDES="$INCLUDES $SAMBA_CFLAGS"; LIBS="$SAMBA_LIBS $LIBS"],
[AC_CHECK_LIB([smbclient], [main],,
use_samba=no;AC_MSG_ERROR($missing_library))
USE_LIBSMBCLIENT=0
--
1.7.10.4

View File

@ -1,45 +0,0 @@
From 044271ec20fb82025c59fed81baddf766e28c28d Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Fri, 19 Sep 2014 01:55:12 +0300
Subject: [PATCH 03/10] [aml] Change the sample rates that are supported by
ALSA but unsupported by HDMI to the closest supported
value
---
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index 75f2cf0..08777aa 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -677,6 +677,26 @@ bool CAESinkALSA::InitializeHW(const ALSAConfig &inconfig, ALSAConfig &outconfig
snd_pcm_hw_params_set_access(m_pcm, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
unsigned int sampleRate = inconfig.sampleRate;
+#ifdef HAS_LIBAMCODEC
+ // Change the sample rates that are supported by ALSA but unsupported by HDMI to the closest supported value
+ switch (sampleRate)
+ {
+ case 5512:
+ case 8000:
+ case 11025:
+ case 16000:
+ case 22050:
+ sampleRate = 44100;
+ break;
+ case 64000:
+ sampleRate = 88200;
+ break;
+ case 384000:
+ sampleRate = 192000;
+ break;
+ }
+#endif
+
snd_pcm_hw_params_set_rate_near (m_pcm, hw_params, &sampleRate, NULL);
unsigned int channelCount = inconfig.channels;
--
1.7.10.4

View File

@ -1,29 +0,0 @@
From a9be548866b1f01e5f467a6f92b731fa07f9ba9e Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Sat, 20 Sep 2014 04:43:52 +0300
Subject: [PATCH 04/10] [aml] Fill audio packets completely when resampling to
prevent 'audio data unaligned' kernel warnings
---
xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
index 3ca667c..304cff8 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
@@ -162,7 +162,11 @@ CActiveAEBufferPoolResample::CActiveAEBufferPoolResample(AEAudioFormat inputForm
m_inputFormat.m_channelLayout += AE_CH_FC;
}
m_resampler = NULL;
+#ifdef HAS_LIBAMCODEC
+ m_fillPackets = true;
+#else
m_fillPackets = false;
+#endif
m_drain = false;
m_empty = true;
m_procSample = NULL;
--
1.7.10.4

View File

@ -1,58 +0,0 @@
From 9936eb795dc53b7681540c57263d175907ae45ac Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Sun, 19 Oct 2014 16:20:33 +0300
Subject: [PATCH 05/10] Save settings only if they were modified after the
last save
This prevents from multiple saving the same settings and helps to resolve
the issue on Amlogic G18REF TV-boxes when setiings may be lost after a poweroff.
On G18REF When you press the red button on the remote the system receives a signal that power
is about to off. XBMC always writes guisettings.xml before exit, and the same settings
may be written several times from different places in code. But the power gets turned off
before the system completes all shutdown procedures. There may be the case that guisettings.xml
is written half-way and couldn't be read upon next boot, so the XBMC creates a new one with
default settings.
With this fix the settings will be written at exit only once, minimizing the risk of being lost.
note by seo:
added utils/md5.h after kodi includes cleanup.
however, this patch should not be needed at all. TODO remove
---
xbmc/settings/Settings.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index a8114aa..e629e97 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -75,6 +75,7 @@
#include "threads/SingleLock.h"
#include "utils/CharsetConverter.h"
#include "utils/log.h"
+#include "utils/md5.h"
#include "utils/RssManager.h"
#include "utils/StringUtils.h"
#include "utils/SystemInfo.h"
@@ -537,6 +538,17 @@ bool CSettings::Save(const std::string &file)
if (!m_settingsManager->Save(root))
return false;
+ // Avoid saving if the settings saved earlier are indetical to the current ones
+ if (CFile::Exists(file))
+ {
+ std::string fileMD5 = CUtil::GetFileMD5(file);
+ TiXmlPrinter xmlPrinter;
+ xmlDoc.Accept(&xmlPrinter);
+ std::string settingsMD5 = XBMC::XBMC_MD5::GetMD5(xmlPrinter.CStr());
+ if (fileMD5 == settingsMD5)
+ return true;
+ }
+
return xmlDoc.SaveFile(file);
}
--
1.7.10.4

View File

@ -1,30 +0,0 @@
From 50833b2af0c7c9aab3593ec8abf8e237851fff61 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 3 Feb 2015 17:58:19 +0100
Subject: [PATCH 06/10] [aml] Disable deinterlacing for HD content while video
is being played in a window
... to prevent screen blinking in 1080p50/60hz display modes
---
xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
index aa30474..1fb5e3e 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
@@ -2289,6 +2289,11 @@ void CAMLCodec::SetVideoRect(const CRect &SrcRect, const CRect &DestRect)
CLog::Log(LOGDEBUG, "CAMLCodec::SetVideoRect:m_stereo_view(%d)", m_stereo_view);
#endif
+ if (dst_rect.Width() < display.Width() || dst_rect.Height() < display.Height())
+ SysfsUtils::SetInt("/sys/module/di/parameters/bypass_hd", 1);
+ else
+ SysfsUtils::SetInt("/sys/module/di/parameters/bypass_hd", 0);
+
// goofy 0/1 based difference in aml axis coordinates.
// fix them.
dst_rect.x2--;
--
1.7.10.4

View File

@ -1,30 +0,0 @@
From bd6b4809c2fac4ef7393e96c3c8b72a7faea2f85 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 30 Jun 2015 11:19:57 +0200
Subject: [PATCH 07/10] [aml] Ugly workaround to show DTS/AC3 caps
... but don't run into multi channel issues as we can only open 2 pcm channels
---
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index 08777aa..c3f5fce 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -1340,6 +1340,12 @@ void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
AEDeviceType CAESinkALSA::AEDeviceTypeFromName(const std::string &name)
{
+#ifdef HAS_LIBAMCODEC
+ // ugly workaround to show DTS / AC3 caps
+ // but don't run into multi channel issues
+ // as we can only open 2 pcm channels
+ return AE_DEVTYPE_IEC958;
+#endif
if (name.substr(0, 4) == "hdmi")
return AE_DEVTYPE_HDMI;
else if (name.substr(0, 6) == "iec958" || name.substr(0, 5) == "spdif")
--
1.7.10.4

View File

@ -1,24 +0,0 @@
From 56dac3c356e8419205eae251e76982be9a0da688 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 14 Jul 2015 15:55:20 +0300
Subject: [PATCH 08/10] Add mapping for Browser Home key on Linux
---
xbmc/input/linux/LinuxInputDevices.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp
index 3875138..3643a96 100644
--- a/xbmc/input/linux/LinuxInputDevices.cpp
+++ b/xbmc/input/linux/LinuxInputDevices.cpp
@@ -247,6 +247,7 @@ KeyMap keyMap[] = {
{ KEY_RECORD , XBMCK_RECORD },
{ KEY_REWIND , XBMCK_REWIND },
{ KEY_PHONE , XBMCK_PHONE },
+ { KEY_HOMEPAGE , XBMCK_BROWSER_HOME},
{ KEY_REFRESH , XBMCK_SHUFFLE },
{ KEY_SCROLLUP , XBMCK_PAGEUP },
{ KEY_SCROLLDOWN , XBMCK_PAGEDOWN },
--
1.7.10.4

View File

@ -1,48 +0,0 @@
From 72497ca4d29af8ac224b826a3993bfdb76a7f9f6 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 14 Jul 2015 16:02:35 +0300
Subject: [PATCH 09/10] [powermanagement] Perform suspend instead of powerdown
---
system/keymaps/keyboard.xml | 2 +-
xbmc/powermanagement/linux/LogindUPowerSyscall.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml
index 90517af..62cc847 100644
--- a/system/keymaps/keyboard.xml
+++ b/system/keymaps/keyboard.xml
@@ -94,7 +94,7 @@
<backslash>ToggleFullScreen</backslash>
<home>FirstPage</home>
<end>LastPage</end>
- <power>ActivateWindow(ShutdownMenu)</power>
+ <power>XBMC.Powerdown()</power>
<sleep>ActivateWindow(ShutdownMenu)</sleep>
<!-- PVR windows -->
<e>ActivateWindow(TVGuide)</e>
diff --git a/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp b/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
index 4e5bcc6..ad5847d 100644
--- a/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
+++ b/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
@@ -53,7 +53,7 @@ CLogindUPowerSyscall::CLogindUPowerSyscall()
m_canPowerdown = LogindCheckCapability("CanPowerOff");
m_canReboot = LogindCheckCapability("CanReboot");
m_canHibernate = LogindCheckCapability("CanHibernate");
- m_canSuspend = LogindCheckCapability("CanSuspend");
+ m_canSuspend = false;
InhibitDelayLock();
@@ -98,7 +98,7 @@ CLogindUPowerSyscall::~CLogindUPowerSyscall()
bool CLogindUPowerSyscall::Powerdown()
{
- return LogindSetPowerState("PowerOff");
+ return Suspend();
}
bool CLogindUPowerSyscall::Reboot()
--
1.7.10.4