From dcf73e14b924997e3836765fec7a24a7c467d8a2 Mon Sep 17 00:00:00 2001 From: Nuno Senica Date: Wed, 19 Sep 2018 09:25:54 +0200 Subject: RPI: Be sure to register Alsa and Pulseaudio. This was broken in a previous commit, making them unavailable in kodi. Add default audio device to Pi settings --- system/settings/rbp.xml | 3 +++ xbmc/windowing/rpi/WinSystemRpi.cpp | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/system/settings/rbp.xml b/system/settings/rbp.xml index 7337d13f4c..035b2b8ff4 100644 --- a/system/settings/rbp.xml +++ b/system/settings/rbp.xml @@ -95,6 +95,9 @@ 100 + + PI:HDMI + diff --git a/xbmc/windowing/rpi/WinSystemRpi.cpp b/xbmc/windowing/rpi/WinSystemRpi.cpp index f98abadaf8..a403464d83 100644 --- a/xbmc/windowing/rpi/WinSystemRpi.cpp +++ b/xbmc/windowing/rpi/WinSystemRpi.cpp @@ -42,7 +42,21 @@ CWinSystemRpi::CWinSystemRpi() : m_rpi = new CRPIUtils(); 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(); + } + CLinuxPowerSyscall::Register(); m_lirc.reset(OPTIONALS::LircRegister()); m_libinput->Start(); -- cgit v1.2.3