From 12609c5587755fb0e7c1269ee44110b8e5f6f5d2 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 16 May 2015 16:20:59 +0200 Subject: [PATCH] projects/WeTek_Play/patches/kodi: add patch to force IEC958 Audio and remove temporary patch to Allow audio passthrough, recommend from @fritsch, thanks much Signed-off-by: Stephan Raue --- ...assthrough-for-Amlogic-based-devices.patch | 49 ------------------- .../patches/kodi/0017-enable-IEC958.patch | 18 +++++++ 2 files changed, 18 insertions(+), 49 deletions(-) delete mode 100644 projects/WeTek_Play/patches/kodi/0002-Allow-audio-passthrough-for-Amlogic-based-devices.patch create mode 100644 projects/WeTek_Play/patches/kodi/0017-enable-IEC958.patch diff --git a/projects/WeTek_Play/patches/kodi/0002-Allow-audio-passthrough-for-Amlogic-based-devices.patch b/projects/WeTek_Play/patches/kodi/0002-Allow-audio-passthrough-for-Amlogic-based-devices.patch deleted file mode 100644 index f062629493..0000000000 --- a/projects/WeTek_Play/patches/kodi/0002-Allow-audio-passthrough-for-Amlogic-based-devices.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 7cdd0f41588b9ddf4778f643fc77cbcbf7ca54a5 Mon Sep 17 00:00:00 2001 -From: Alex Deryskyba -Date: Wed, 16 Apr 2014 22:11:51 +0300 -Subject: [PATCH 02/17] Allow audio passthrough for Amlogic-based devices. - ---- - xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -index b391ff3..a7565f0 100644 ---- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp -@@ -91,6 +91,7 @@ AEDeviceType CActiveAESink::GetDeviceType(const std::string &device) - - bool CActiveAESink::HasPassthroughDevice() - { -+#ifndef HAS_LIBAMCODEC - for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt) - { - for (AEDeviceInfoList::iterator itt2 = itt->m_deviceInfoList.begin(); itt2 != itt->m_deviceInfoList.end(); ++itt2) -@@ -101,10 +102,14 @@ bool CActiveAESink::HasPassthroughDevice() - } - } - return false; -+#else -+ return true; -+#endif - } - - bool CActiveAESink::SupportsFormat(const std::string &device, AEDataFormat format, int samplerate) - { -+#ifndef HAS_LIBAMCODEC - std::string dev = device; - std::string dri; - CAESinkFactory::ParseDevice(dev, dri); -@@ -135,6 +140,9 @@ bool CActiveAESink::SupportsFormat(const std::string &device, AEDataFormat forma - } - } - return false; -+#else -+ return true; -+#endif - } - - enum SINK_STATES --- -1.7.10.4 - diff --git a/projects/WeTek_Play/patches/kodi/0017-enable-IEC958.patch b/projects/WeTek_Play/patches/kodi/0017-enable-IEC958.patch new file mode 100644 index 0000000000..c3f38fb26b --- /dev/null +++ b/projects/WeTek_Play/patches/kodi/0017-enable-IEC958.patch @@ -0,0 +1,18 @@ +diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +index e22db7a..dcdaf2e 100644 +--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp ++++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +@@ -1291,6 +1291,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") +