mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
kodi: add patch to allow building without alsa
This commit is contained in:
parent
7e487b9d0f
commit
7ed43ce85f
@ -0,0 +1,62 @@
|
||||
From 4839aa9e65478bab3a1f61bab06419348daa061c Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Rusak <lorusak@gmail.com>
|
||||
Date: Tue, 17 May 2022 10:43:44 -0700
|
||||
Subject: [PATCH] CPlatformLinux: ifdef alsa support
|
||||
|
||||
---
|
||||
xbmc/platform/linux/PlatformLinux.cpp | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/xbmc/platform/linux/PlatformLinux.cpp b/xbmc/platform/linux/PlatformLinux.cpp
|
||||
index dd2e35f2e2..4a1e104eb9 100644
|
||||
--- a/xbmc/platform/linux/PlatformLinux.cpp
|
||||
+++ b/xbmc/platform/linux/PlatformLinux.cpp
|
||||
@@ -8,11 +8,17 @@
|
||||
|
||||
#include "PlatformLinux.h"
|
||||
|
||||
+#if defined(HAS_ALSA)
|
||||
#include "cores/AudioEngine/Sinks/alsa/ALSADeviceMonitor.h"
|
||||
#include "cores/AudioEngine/Sinks/alsa/ALSAHControlMonitor.h"
|
||||
+#endif
|
||||
+
|
||||
#include "utils/StringUtils.h"
|
||||
|
||||
+#if defined(HAS_ALSA)
|
||||
#include "platform/linux/FDEventMonitor.h"
|
||||
+#endif
|
||||
+
|
||||
#include "platform/linux/powermanagement/LinuxPowerSyscall.h"
|
||||
|
||||
// clang-format off
|
||||
@@ -122,6 +128,7 @@ bool CPlatformLinux::InitStageOne()
|
||||
|
||||
m_lirc.reset(OPTIONALS::LircRegister());
|
||||
|
||||
+#if defined(HAS_ALSA)
|
||||
RegisterService(std::make_shared<CFDEventMonitor>());
|
||||
#if defined(HAVE_LIBUDEV)
|
||||
RegisterService(std::make_shared<CALSADeviceMonitor>());
|
||||
@@ -129,11 +136,13 @@ bool CPlatformLinux::InitStageOne()
|
||||
#if !defined(HAVE_X11)
|
||||
RegisterService(std::make_shared<CALSAHControlMonitor>());
|
||||
#endif
|
||||
+#endif // HAS_ALSA
|
||||
return true;
|
||||
}
|
||||
|
||||
void CPlatformLinux::DeinitStageOne()
|
||||
{
|
||||
+#if defined(HAS_ALSA)
|
||||
#if !defined(HAVE_X11)
|
||||
DeregisterService(typeid(CALSAHControlMonitor));
|
||||
#endif
|
||||
@@ -141,4 +150,5 @@ void CPlatformLinux::DeinitStageOne()
|
||||
DeregisterService(typeid(CALSADeviceMonitor));
|
||||
#endif
|
||||
DeregisterService(typeid(CFDEventMonitor));
|
||||
+#endif // HAS_ALSA
|
||||
}
|
||||
--
|
||||
2.35.3
|
||||
|
Loading…
x
Reference in New Issue
Block a user