mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
Merge pull request #4653 from lrusak/pulseaudio_again
Pulseaudio update to 8.0 and switch back to AEPulseSink
This commit is contained in:
commit
39c6a99537
@ -1,50 +0,0 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="alsa-plugins"
|
||||
PKG_VERSION="1.1.0"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.alsa-project.org/"
|
||||
PKG_URL="ftp://ftp.alsa-project.org/pub/plugins/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain alsa-lib"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="audio"
|
||||
PKG_SHORTDESC=""
|
||||
PKG_LONGDESC=""
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
if [ "$PULSEAUDIO_SUPPORT" = yes ]; then
|
||||
# for PulseAudio support
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET pulseaudio"
|
||||
ALSA_PLUGINS_PULSEAUDIO="--enable-pulseaudio"
|
||||
else
|
||||
ALSA_PLUGINS_PULSEAUDIO="--disable-pulseaudio"
|
||||
fi
|
||||
|
||||
# package specific configure options
|
||||
PKG_CONFIGURE_OPTS_TARGET="--disable-jack \
|
||||
$ALSA_PLUGINS_PULSEAUDIO \
|
||||
--disable-samplerate \
|
||||
--disable-maemo-plugin \
|
||||
--disable-maemo-resource-manager \
|
||||
--disable-avcodec \
|
||||
--with-plugindir=/usr/lib/alsa"
|
@ -0,0 +1,5 @@
|
||||
Files have to have the .conf file name extension, but otherwise the file names can be
|
||||
chosen freely. The files under pulse-daemon.conf.d are processed in alphabetical order.
|
||||
In case the same option is set in multiple files, the last file to set an option
|
||||
overrides earlier files. The main daemon.conf file is processed first, so
|
||||
options set in files under pulse-daemon.conf.d override the main file.
|
@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="pulseaudio"
|
||||
PKG_VERSION="7.1"
|
||||
PKG_VERSION="8.0"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
@ -108,6 +108,11 @@ post_makeinstall_target() {
|
||||
|
||||
cp $PKG_DIR/config/system.pa $INSTALL/etc/pulse/
|
||||
cp $PKG_DIR/config/pulseaudio-system.conf $INSTALL/etc/dbus-1/system.d/
|
||||
|
||||
mkdir -p $INSTALL/usr/config
|
||||
cp -PR $PKG_DIR/config/pulse-daemon.conf.d $INSTALL/usr/config
|
||||
|
||||
ln -sf /storage/.config/pulse-daemon.conf.d $INSTALL/etc/pulse/daemon.conf.d
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
@ -71,6 +71,14 @@ else
|
||||
KODI_ALSA="--disable-alsa"
|
||||
fi
|
||||
|
||||
if [ "$PULSEAUDIO_SUPPORT" = yes ]; then
|
||||
# for PulseAudio support
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET pulseaudio"
|
||||
KODI_PULSEAUDIO="--enable-pulse"
|
||||
else
|
||||
KODI_PULSEAUDIO="--disable-pulse"
|
||||
fi
|
||||
|
||||
if [ "$ESPEAK_SUPPORT" = yes ]; then
|
||||
# for espeak support
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET espeak"
|
||||
@ -246,7 +254,7 @@ PKG_CONFIGURE_OPTS_TARGET="gl_cv_func_gettimeofday_clobber=no \
|
||||
$KODI_XORG \
|
||||
--disable-ccache \
|
||||
$KODI_ALSA \
|
||||
--disable-pulse \
|
||||
$KODI_PULSEAUDIO \
|
||||
--enable-rtmp \
|
||||
$KODI_SAMBA \
|
||||
$KODI_NFS \
|
||||
|
@ -1,28 +0,0 @@
|
||||
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
index fbccce0..597492d 100644
|
||||
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
@@ -1293,6 +1293,22 @@ void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+ CAEDeviceInfo pulseDevice;
|
||||
+ bool found = false;
|
||||
+ for (AEDeviceInfoList::iterator itl = list.begin(); itl != list.end(); ++itl)
|
||||
+ {
|
||||
+ if (itl->m_deviceName == "pulse")
|
||||
+ {
|
||||
+ pulseDevice = *itl;
|
||||
+ found = true;
|
||||
+ list.erase(itl);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ // append pulse device at the end
|
||||
+ if (found)
|
||||
+ list.push_back(pulseDevice);
|
||||
}
|
||||
|
||||
AEDeviceType CAESinkALSA::AEDeviceTypeFromName(const std::string &name)
|
||||
|
@ -0,0 +1,79 @@
|
||||
diff -Naur a/xbmc/cores/AudioEngine/AESinkFactory.cpp b/xbmc/cores/AudioEngine/AESinkFactory.cpp
|
||||
--- a/xbmc/cores/AudioEngine/AESinkFactory.cpp 2016-01-12 22:00:19.000000000 +0100
|
||||
+++ b/xbmc/cores/AudioEngine/AESinkFactory.cpp 2016-01-25 10:25:46.375653966 +0100
|
||||
@@ -28,6 +28,9 @@
|
||||
#elif defined(TARGET_RASPBERRY_PI)
|
||||
#include "Sinks/AESinkPi.h"
|
||||
#include "Sinks/AESinkALSA.h"
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
+ #include "Sinks/AESinkPULSE.h"
|
||||
+ #endif
|
||||
#elif defined(TARGET_DARWIN_IOS)
|
||||
#include "Sinks/AESinkDARWINIOS.h"
|
||||
#elif defined(TARGET_DARWIN_OSX)
|
||||
@@ -67,6 +70,9 @@
|
||||
#elif defined(TARGET_RASPBERRY_PI)
|
||||
driver == "PI" ||
|
||||
driver == "ALSA" ||
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
+ driver == "PULSE" ||
|
||||
+ #endif
|
||||
#elif defined(TARGET_DARWIN_IOS)
|
||||
driver == "DARWINIOS" ||
|
||||
#elif defined(TARGET_DARWIN_OSX)
|
||||
@@ -108,6 +114,10 @@
|
||||
#elif defined(TARGET_RASPBERRY_PI)
|
||||
if (driver == "PI")
|
||||
sink = new CAESinkPi();
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
+ if (driver == "PULSE")
|
||||
+ sink = new CAESinkPULSE();
|
||||
+ #endif
|
||||
#if defined(HAS_ALSA)
|
||||
if (driver == "ALSA")
|
||||
sink = new CAESinkALSA();
|
||||
@@ -209,6 +219,16 @@
|
||||
if(!info.m_deviceInfoList.empty())
|
||||
list.push_back(info);
|
||||
#endif
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
+ info.m_deviceInfoList.clear();
|
||||
+ info.m_sinkName = "PULSE";
|
||||
+ CAESinkPULSE::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
+ if(!info.m_deviceInfoList.empty())
|
||||
+ {
|
||||
+ list.push_back(info);
|
||||
+ return;
|
||||
+ }
|
||||
+ #endif
|
||||
#elif defined(TARGET_DARWIN_IOS)
|
||||
|
||||
info.m_deviceInfoList.clear();
|
||||
@@ -253,21 +273,20 @@
|
||||
CLog::Log(LOGNOTICE, "User specified Sink %s could not be enumerated", envSink.c_str());
|
||||
}
|
||||
|
||||
- #if defined(HAS_PULSEAUDIO)
|
||||
+ #if defined(HAS_ALSA)
|
||||
info.m_deviceInfoList.clear();
|
||||
- info.m_sinkName = "PULSE";
|
||||
- CAESinkPULSE::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
+ info.m_sinkName = "ALSA";
|
||||
+ CAESinkALSA::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
if(!info.m_deviceInfoList.empty())
|
||||
{
|
||||
list.push_back(info);
|
||||
- return;
|
||||
}
|
||||
#endif
|
||||
|
||||
- #if defined(HAS_ALSA)
|
||||
+ #if defined(HAS_PULSEAUDIO)
|
||||
info.m_deviceInfoList.clear();
|
||||
- info.m_sinkName = "ALSA";
|
||||
- CAESinkALSA::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
+ info.m_sinkName = "PULSE";
|
||||
+ CAESinkPULSE::EnumerateDevicesEx(info.m_deviceInfoList, force);
|
||||
if(!info.m_deviceInfoList.empty())
|
||||
{
|
||||
list.push_back(info);
|
@ -0,0 +1,32 @@
|
||||
From b70f963a0963735e627b12cf361e4e30d6c2a799 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Rusak <lorusak@gmail.com>
|
||||
Date: Tue, 26 Jan 2016 08:31:52 +0100
|
||||
Subject: [PATCH] change pulseaudio default device name to Bluetooth Audio
|
||||
|
||||
---
|
||||
xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
|
||||
index 67b7b90..8537163 100644
|
||||
--- a/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
|
||||
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkPULSE.cpp
|
||||
@@ -362,12 +362,14 @@ static void SinkInfoRequestCallback(pa_context *c, const pa_sink_info *i, int eo
|
||||
CAEDeviceInfo defaultDevice;
|
||||
defaultDevice.m_deviceName = std::string("Default");
|
||||
defaultDevice.m_displayName = std::string("Default");
|
||||
- defaultDevice.m_displayNameExtra = std::string("Default Output Device (PULSEAUDIO)");
|
||||
+ defaultDevice.m_displayNameExtra = std::string("Bluetooth Audio (PULSEAUDIO)");
|
||||
defaultDevice.m_dataFormats.insert(defaultDevice.m_dataFormats.end(), defaultDataFormats, defaultDataFormats + ARRAY_SIZE(defaultDataFormats));
|
||||
defaultDevice.m_channels = CAEChannelInfo(AE_CH_LAYOUT_2_0);
|
||||
defaultDevice.m_sampleRates.assign(defaultSampleRates, defaultSampleRates + ARRAY_SIZE(defaultSampleRates));
|
||||
defaultDevice.m_deviceType = AE_DEVTYPE_PCM;
|
||||
sinkStruct->list->push_back(defaultDevice);
|
||||
+ // OE only wants the default device - so we are done here
|
||||
+ return;
|
||||
}
|
||||
if (i && i->name)
|
||||
{
|
||||
--
|
||||
1.9.3
|
||||
|
@ -23,7 +23,7 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.alsa-project.org/"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain alsa-lib alsa-utils alsa-plugins"
|
||||
PKG_DEPENDS_TARGET="toolchain alsa-lib alsa-utils"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="virtual"
|
||||
PKG_SHORTDESC="alsa: Matapackage to install all alsa components"
|
||||
|
Loading…
x
Reference in New Issue
Block a user