From 67fe7002d496b7c2e99f22d50ca15bf2f5d2b204 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 14 Nov 2019 15:08:45 +0000 Subject: [PATCH] kodi: adapt ALSA/PULSE for PR16913 --- ...i-100.14-use-alsa-and-pulse-together.patch | 188 ------------------ .../mediacenter/kodi/system.d/kodi.service | 1 + 2 files changed, 1 insertion(+), 188 deletions(-) delete mode 100644 packages/mediacenter/kodi/patches/kodi-100.14-use-alsa-and-pulse-together.patch diff --git a/packages/mediacenter/kodi/patches/kodi-100.14-use-alsa-and-pulse-together.patch b/packages/mediacenter/kodi/patches/kodi-100.14-use-alsa-and-pulse-together.patch deleted file mode 100644 index c1f0ac0c6a..0000000000 --- a/packages/mediacenter/kodi/patches/kodi-100.14-use-alsa-and-pulse-together.patch +++ /dev/null @@ -1,188 +0,0 @@ -From c8265155b5aa6716c6c74e15f255dd1bdbdf2441 Mon Sep 17 00:00:00 2001 -From: MilhouseVH -Date: Wed, 10 Jul 2019 17:52:11 +0100 -Subject: [PATCH] allow using alsa and pulse together - ---- - xbmc/windowing/X11/WinSystemX11GLContext.cpp | 35 ++-------------------------- - xbmc/windowing/gbm/WinSystemGbm.cpp | 34 ++------------------------- - xbmc/windowing/rpi/WinSystemRpi.cpp | 17 ++++---------- - xbmc/windowing/wayland/WinSystemWayland.cpp | 35 +++------------------------- - 4 files changed, 11 insertions(+), 110 deletions(-) - -diff --git a/xbmc/windowing/X11/WinSystemX11GLContext.cpp b/xbmc/windowing/X11/WinSystemX11GLContext.cpp -index 8ff2abd..1c00a93 100644 ---- a/xbmc/windowing/X11/WinSystemX11GLContext.cpp -+++ b/xbmc/windowing/X11/WinSystemX11GLContext.cpp -@@ -43,39 +43,8 @@ std::unique_ptr CWinSystemBase::CreateWinSystem() - - CWinSystemX11GLContext::CWinSystemX11GLContext() - { -- std::string envSink; -- if (getenv("KODI_AE_SINK")) -- envSink = getenv("KODI_AE_SINK"); -- if (StringUtils::EqualsNoCase(envSink, "ALSA")) -- { -- OPTIONALS::ALSARegister(); -- } -- else if (StringUtils::EqualsNoCase(envSink, "PULSE")) -- { -- OPTIONALS::PulseAudioRegister(); -- } -- else if (StringUtils::EqualsNoCase(envSink, "OSS")) -- { -- OPTIONALS::OSSRegister(); -- } -- else if (StringUtils::EqualsNoCase(envSink, "SNDIO")) -- { -- OPTIONALS::SndioRegister(); -- } -- else -- { -- if (!OPTIONALS::PulseAudioRegister()) -- { -- if (!OPTIONALS::ALSARegister()) -- { -- if (!OPTIONALS::SndioRegister()) -- { -- OPTIONALS::OSSRegister(); -- } -- } -- } -- } -- -+ OPTIONALS::ALSARegister(); -+ OPTIONALS::PulseAudioRegister(); - m_lirc.reset(OPTIONALS::LircRegister()); - } - -diff --git a/xbmc/windowing/gbm/WinSystemGbm.cpp b/xbmc/windowing/gbm/WinSystemGbm.cpp -index a714192..4b52e39 100644 ---- a/xbmc/windowing/gbm/WinSystemGbm.cpp -+++ b/xbmc/windowing/gbm/WinSystemGbm.cpp -@@ -35,38 +35,8 @@ CWinSystemGbm::CWinSystemGbm() : - m_GBM(new CGBMUtils), - m_libinput(new CLibInputHandler) - { -- std::string envSink; -- if (getenv("KODI_AE_SINK")) -- envSink = getenv("KODI_AE_SINK"); -- if (StringUtils::EqualsNoCase(envSink, "ALSA")) -- { -- OPTIONALS::ALSARegister(); -- } -- else if (StringUtils::EqualsNoCase(envSink, "PULSE")) -- { -- OPTIONALS::PulseAudioRegister(); -- } -- else if (StringUtils::EqualsNoCase(envSink, "OSS")) -- { -- OPTIONALS::OSSRegister(); -- } -- else if (StringUtils::EqualsNoCase(envSink, "SNDIO")) -- { -- OPTIONALS::SndioRegister(); -- } -- else -- { -- if (!OPTIONALS::PulseAudioRegister()) -- { -- if (!OPTIONALS::ALSARegister()) -- { -- if (!OPTIONALS::SndioRegister()) -- { -- OPTIONALS::OSSRegister(); -- } -- } -- } -- } -+ OPTIONALS::ALSARegister(); -+ OPTIONALS::PulseAudioRegister(); - - m_dpms = std::make_shared(); - CLinuxPowerSyscall::Register(); -diff --git a/xbmc/windowing/rpi/WinSystemRpi.cpp b/xbmc/windowing/rpi/WinSystemRpi.cpp -index 75fbe56..ac06490 100644 ---- a/xbmc/windowing/rpi/WinSystemRpi.cpp -+++ b/xbmc/windowing/rpi/WinSystemRpi.cpp -@@ -10,7 +10,9 @@ - - #include "ServiceBroker.h" - #include "cores/AudioEngine/AESinkFactory.h" -+#include "cores/AudioEngine/Sinks/AESinkALSA.h" - #include "cores/AudioEngine/Sinks/AESinkPi.h" -+#include "cores/AudioEngine/Sinks/AESinkPULSE.h" - #include "guilib/DispResource.h" - #include "settings/DisplaySettings.h" - #include "settings/Settings.h" -@@ -46,19 +48,8 @@ CWinSystemRpi::CWinSystemRpi() : - AE::CAESinkFactory::ClearSinks(); - - CAESinkPi::Register(); -- std::string envSink; -- if (getenv("KODI_AE_SINK")) -- envSink = getenv("KODI_AE_SINK"); -- -- if (StringUtils::EqualsNoCase(envSink, "PULSE")) -- { -- OPTIONALS::PulseAudioRegister(); -- } -- else -- { -- OPTIONALS::ALSARegister(); -- } -- -+ CAESinkALSA::Register(); -+ CAESinkPULSE::Register(); - CLinuxPowerSyscall::Register(); - m_lirc.reset(OPTIONALS::LircRegister()); - m_libinput->Start(); -diff --git a/xbmc/windowing/wayland/WinSystemWayland.cpp b/xbmc/windowing/wayland/WinSystemWayland.cpp -index 9d00312..2b76e77 100644 ---- a/xbmc/windowing/wayland/WinSystemWayland.cpp -+++ b/xbmc/windowing/wayland/WinSystemWayland.cpp -@@ -137,38 +137,9 @@ struct MsgBufferScale - CWinSystemWayland::CWinSystemWayland() - : CWinSystemBase{}, m_protocol{"WinSystemWaylandInternal"} - { -- std::string envSink; -- if (getenv("KODI_AE_SINK")) -- envSink = getenv("KODI_AE_SINK"); -- if (StringUtils::EqualsNoCase(envSink, "ALSA")) -- { -- OPTIONALS::ALSARegister(); -- } -- else if (StringUtils::EqualsNoCase(envSink, "PULSE")) -- { -- OPTIONALS::PulseAudioRegister(); -- } -- else if (StringUtils::EqualsNoCase(envSink, "OSS")) -- { -- OPTIONALS::OSSRegister(); -- } -- else if (StringUtils::EqualsNoCase(envSink, "SNDIO")) -- { -- OPTIONALS::SndioRegister(); -- } -- else -- { -- if (!OPTIONALS::PulseAudioRegister()) -- { -- if (!OPTIONALS::ALSARegister()) -- { -- if (!OPTIONALS::SndioRegister()) -- { -- OPTIONALS::OSSRegister(); -- } -- } -- } -- } -+ OPTIONALS::ALSARegister(); -+ OPTIONALS::PulseAudioRegister(); -+ - m_winEvents.reset(new CWinEventsWayland()); - CLinuxPowerSyscall::Register(); - m_lirc.reset(OPTIONALS::LircRegister()); --- -2.14.1 - diff --git a/packages/mediacenter/kodi/system.d/kodi.service b/packages/mediacenter/kodi/system.d/kodi.service index 97f7dd4f14..d551663991 100644 --- a/packages/mediacenter/kodi/system.d/kodi.service +++ b/packages/mediacenter/kodi/system.d/kodi.service @@ -5,6 +5,7 @@ Requires=graphical.target Wants=network-online.target [Service] +Environment=KODI_AE_SINK=ALSA+PULSE Environment=__GL_YIELD=USLEEP Environment=DISPLAY=:0.0 Environment=WAYLAND_DISPLAY=wayland-0