Cleaned up phinephone stuff

This commit is contained in:
2023-10-25 12:09:36 +02:00
parent c521c14af6
commit 4ce0aa6bca
204 changed files with 1 additions and 23136 deletions

View File

@@ -1,95 +0,0 @@
From 14ebb9a568f3d8e1351181300dda93099b52742c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikl=C4=81vs=20Ko=C4=BCes=C5=86ikovs?=
<89q1r14hd@relay.firefox.com>
Date: Mon, 26 Jun 2023 17:07:04 +0300
Subject: [PATCH 1/2] spa/plugins/bluez5/meson: removed some unneeded redefines
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As far as I can tell, the code in question was not doing anything there
and was also breaking the new code elsewhere, so it was put on the
chopping block. Don't mind the squirming tentacles.
Signed-off-by: NiklÄvs Koļesņikovs <89q1r14hd@relay.firefox.com>
---
spa/plugins/bluez5/meson.build | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/spa/plugins/bluez5/meson.build b/spa/plugins/bluez5/meson.build
index e6c52ccc57..80493cfe61 100644
--- a/spa/plugins/bluez5/meson.build
+++ b/spa/plugins/bluez5/meson.build
@@ -118,16 +118,14 @@ endif
if ldac_dep.found()
ldac_args = codec_args
- ldac_dep = [ ldac_dep ]
if ldac_abr_dep.found()
ldac_args += [ '-DENABLE_LDAC_ABR' ]
- ldac_dep += ldac_abr_dep
endif
bluez_codec_ldac = shared_library('spa-codec-bluez5-ldac',
[ 'a2dp-codec-ldac.c', 'media-codecs.c' ],
include_directories : [ configinc ],
c_args : ldac_args,
- dependencies : [ spa_dep, ldac_dep ],
+ dependencies : [ spa_dep, ldac_dep, ldac_abr_dep ],
install : true,
install_dir : spa_plugindir / 'bluez5')
endif
@@ -144,7 +142,6 @@ endif
if get_option('bluez5-codec-opus').allowed() and opus_dep.found()
opus_args = codec_args
- opus_dep = [ opus_dep ]
bluez_codec_opus = shared_library('spa-codec-bluez5-opus',
[ 'a2dp-codec-opus.c', 'media-codecs.c' ],
include_directories : [ configinc ],
--
GitLab
From 23a10a8abb324809d1ebc5d33e36cdfa570390ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikl=C4=81vs=20Ko=C4=BCes=C5=86ikovs?=
<89q1r14hd@relay.firefox.com>
Date: Mon, 26 Jun 2023 16:35:01 +0300
Subject: [PATCH 2/2] src/modules/meson: ensure Opus libs were actually found,
too
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The old way fails, if a distro has the header but not the library,
which can happen on at least Gentoo with multilib deployments,
where the shared header is present but non-native libraries might not.
This could still fail, if a distro had some but not all libraries for
some architectures but hopefully no one did that. In that case, a compile
test would likely be required via cc.check_header() instead but let's try
the faster fix first.
Reported-by: Sam James <sam@gentoo.org>
Thanks-to: Barnabás PÅcze <pobrn@protonmail.com>
Thanks-to: Xavier Claessens <xavier.claessens@collabora.com>
Signed-off-by: NiklÄvs Koļesņikovs <89q1r14hd@relay.firefox.com>
---
src/modules/meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/modules/meson.build b/src/modules/meson.build
index 342bd697b1..970e04db98 100644
--- a/src/modules/meson.build
+++ b/src/modules/meson.build
@@ -203,7 +203,8 @@ endif
summary({'ffado-driver': build_module_ffado_driver}, bool_yn: true, section: 'Optional Modules')
opus_custom_h = cc.has_header('opus/opus_custom.h', dependencies: opus_dep)
-if opus_custom_h
+# One would imagine that opus_dep is a requirement but for some reason it's not, so we need to manually check that
+if opus_dep.found() and opus_custom_h
opus_custom_dep = declare_dependency(compile_args: ['-DHAVE_OPUS_CUSTOM'], dependencies: opus_dep)
else
opus_custom_dep = dependency('', required: false)
--
GitLab

View File

@@ -1,32 +0,0 @@
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/4df753d0d7af7e68ab16ee90b94c4ddd44506074
From 4df753d0d7af7e68ab16ee90b94c4ddd44506074 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 26 Jun 2023 16:11:33 +0200
Subject: [PATCH] context: avoid segfault when no fallback driver
In some cases, there might not be a fallback driver. Handle this without
segfaulting.
---
src/pipewire/context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pipewire/context.c b/src/pipewire/context.c
index daf13c16b..5fd0cdec9 100644
--- a/src/pipewire/context.c
+++ b/src/pipewire/context.c
@@ -1327,11 +1327,11 @@ again:
if ((t->want_driver && t->active && t->runnable) ||
t->always_process) {
driver = target;
- driver->runnable = true;
break;
}
}
if (driver != NULL) {
+ driver->runnable = true;
/* driver needed for this group */
move_to_driver(context, &collect, driver);
} else {
--
GitLab

View File

@@ -1,30 +0,0 @@
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/4456f2efd16d6190989a903f70f4419c2ca4c819
https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3316
https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3345
From 4456f2efd16d6190989a903f70f4419c2ca4c819 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 10 Jul 2023 16:59:17 +0200
Subject: [PATCH] impl-node: remove the node from the target peers
When we destroy a node, we need to remove the node as a current
driver peer.
Not doing this has 2 problems:
- remote drivers still trigger our node
- the client-node does not clean up the memid for the activation and
we might reuse it later for a new node with the same fd.
See #3316
--- a/src/pipewire/impl-node.c
+++ b/src/pipewire/impl-node.c
@@ -1983,6 +1983,7 @@ void pw_impl_node_destroy(struct pw_impl_node *node)
/* remove ourself as a follower from the driver node */
spa_list_remove(&node->follower_link);
+ pw_impl_node_emit_peer_removed(node->driver_node, node);
remove_segment_owner(node->driver_node, node->info.id);
spa_list_consume(follower, &node->follower_list, follower_link) {
--
GitLab

View File

@@ -1,34 +0,0 @@
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/140374d2071e6204fded4ca65645d4e9a3dd053e
https://bugs.webkit.org/show_bug.cgi?id=259735
From 140374d2071e6204fded4ca65645d4e9a3dd053e Mon Sep 17 00:00:00 2001
From: Philippe Normand <philn@igalia.com>
Date: Fri, 4 Aug 2023 10:01:07 +0100
Subject: [PATCH] gst: Prevent a crash when stopping device provider
The provider might fail to connect to the PipeWire core when starting up, so
when stopping we need to check the core is valid before attempting to acquire a
mutex on its loop.
--- a/src/gst/gstpipewiredeviceprovider.c
+++ b/src/gst/gstpipewiredeviceprovider.c
@@ -665,11 +665,16 @@ gst_pipewire_device_provider_stop (GstDeviceProvider * provider)
{
GstPipeWireDeviceProvider *self = GST_PIPEWIRE_DEVICE_PROVIDER (provider);
- pw_thread_loop_lock (self->core->loop);
+ /* core might be NULL if we failed to connect in _start. */
+ if (self->core != NULL) {
+ pw_thread_loop_lock (self->core->loop);
+ }
GST_DEBUG_OBJECT (self, "stopping provider");
g_clear_pointer ((struct pw_proxy**)&self->registry, pw_proxy_destroy);
- pw_thread_loop_unlock (self->core->loop);
+ if (self->core != NULL) {
+ pw_thread_loop_unlock (self->core->loop);
+ }
g_clear_pointer (&self->core, gst_pipewire_core_release);
}
--
GitLab

View File

@@ -1,17 +0,0 @@
# Load pipewire configuration at conf hook processing time. This allows to
# override pulseaudio defaults configuration which is also applied via hook.
#
# Note since hooks are run after @GENTOO_PORTAGE_EPREFIX@/etc/asound.conf and ~/.asoundrc are applied,
# we load these again here make sure that user configuration takes precedence.
@hooks [
{
func load
files [
"@GENTOO_PORTAGE_EPREFIX@/usr/share/alsa/alsa.conf.d/99-pipewire-default.conf"
"@GENTOO_PORTAGE_EPREFIX@/etc/asound.conf"
"~/.asoundrc"
]
errors false
}
]

View File

@@ -1,43 +0,0 @@
.TH "gentoo-pipewire-launcher" "1" "2023-06-15"
.SH "NAME"
gentoo\-pipewire\-launcher \- start instances of PipeWire, PipeWire-Pulse and WirePlumber
.SH "SYNOPSIS"
.BR gentoo\-pipewire\-launcher
[restart]
.SH "DESCRIPTION"
\fIgentoo\-pipewire\-launcher\fR starts instances of PipeWire and
WirePlumber.
Two instances of PipeWire are started: one as the core sound-server, and
one for PulseAudio emulation (cf.\&
.BR pipewire-pulse (1)\fR).
.PP
It must be run in an environment with an active D-Bus session bus,
i.e. one in which the
.B DBUS_SESSION_BUS_ADDRESS
environment variable is set appropriately.
.PP
\fIgentoo\-pipewire\-launcher\fR
tries to avoid restarting, in order to avoid audio dropouts.
However, a restart can be forced by calling
\fIgentoo\-pipewire\-launcher\fR
with an argument of \(oqrestart\(cq.
.PP
.B ${XDG_CONFIG_HOME}/gentoo\-pipewire\-launcher.conf
can be used to specify absolute paths of files to which log output
should be sent, by specifying values for one or more of the
.B GENTOO_PIPEWIRE_LOG\fR,
.B GENTOO_PIPEWIRE_PULSE_LOG\fR,
and
.B GENTOO_WIREPLUMBER_LOG
variables, one per line.
.SH "REPORTING BUGS"
Please report bugs via https://bugs.gentoo.org/
.SH "FILES"
.TP
.B ${XDG_CONFIG_HOME}/gentoo\-pipewire\-launcher.conf
configures locations of files for log output.
.SH "SEE ALSO"
.BR pipewire (1),
.BR pipewire-pulse (1),
.BR wireplumber (1),
.BR pipewire.conf (5)

View File

@@ -1,29 +0,0 @@
#!/bin/sh
# PipeWire launcher script for XDG compliant desktops on OpenRC.
#
# systemd users are very _STRONGLY_ advised to use the much
# more reliable and predictable user units instead.
# WARNING: This script assumes being run inside XDG compliant session,
# which means D-Bus session instance is expected to be correctly set up
# prior to this script starting. If that is not true, things may break!
# Best to reap any existing daemons and only then try to start a new set.
pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
# The core daemon which by itself does probably nothing.
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire &
# The so called pipewire-pulse daemon used for PulseAudio compatibility.
# Commenting this out will stop the PA proxying daemon from starting,
# however ALSA (with pipewire-alsa), JACK (with jack-sdk) and PW API using
# clients will still have access to audio and may end up clashing with
# non-PW apps over HW control (most notably, /usr/bin/pulseaudio daemon).
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire -c pipewire-pulse.conf &
# Hack for bug #822498
sleep 1
# Finally a session manager is required for PipeWire to do anything.
exec @GENTOO_PORTAGE_EPREFIX@/usr/bin/wireplumber

View File

@@ -1,52 +0,0 @@
#!/bin/sh
# PipeWire launcher script for XDG compliant desktops on OpenRC.
#
# systemd users are very _STRONGLY_ advised to use the much
# more reliable and predictable user units instead.
# WARNING: This script assumes being run inside XDG compliant session,
# which means D-Bus session instance is expected to be correctly set up
# prior to this script starting. If that is not true, things may break!
restart () {
echo "Terminating PipeWire processes ..."
pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
pwait -u "${USER}" -x pipewire\|wireplumber
echo "PipeWire terminated."
}
if [ "${#}" -gt 0 ]
then
if [ "${1}" = 'restart' ]
then
restart
else
echo "Unrecognised argument." >&2
echo "Usage: gentoo-pipewire-launcher [restart]" >&2
exit 1
fi
fi
if pgrep -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
then
echo "PipeWire already running, exiting." >&2
echo "(Use 'gentoo-pipewire-launcher restart' to restart PipeWire and WirePlumber.)" >&2
exit 1
fi
# The core daemon which by itself does probably nothing.
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire &
# The so called pipewire-pulse daemon used for PulseAudio compatibility.
# Commenting this out will stop the PA proxying daemon from starting,
# however ALSA (with pipewire-alsa), JACK (with jack-sdk) and PW API using
# clients will still have access to audio and may end up clashing with
# non-PW apps over HW control (most notably, /usr/bin/pulseaudio daemon).
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire -c pipewire-pulse.conf &
# Hack for bug #822498
sleep 1
# Finally a session manager is required for PipeWire to do anything.
exec @GENTOO_PORTAGE_EPREFIX@/usr/bin/wireplumber

View File

@@ -1,77 +0,0 @@
#!/bin/sh
# PipeWire launcher script for XDG compliant desktops on OpenRC.
#
# systemd users are very _STRONGLY_ advised to use the much
# more reliable and predictable user units instead.
# WARNING: This script assumes being run inside XDG compliant session,
# which means D-Bus session instance is expected to be correctly set up
# prior to this script starting. If that is not true, things may break!
DATE_FORMAT='+%Y-%m-%dT%H:%M:%S%Z'
CONF="${XDG_CONFIG_HOME}/gentoo-pipewire-launcher.conf"
if [ -f "${CONF}" ]
then
. "${CONF}"
else
GENTOO_PIPEWIRE_LOG='/dev/null'
GENTOO_PIPEWIRE_PULSE_LOG='/dev/null'
GENTOO_WIREPLUMBER_LOG='/dev/null'
fi
for L in \
"${GENTOO_PIPEWIRE_LOG}" \
"${GENTOO_PIPEWIRE_PULSE_LOG}" \
"${GENTOO_WIREPLUMBER_LOG}"
do
if [ ! -e "${L}" ]
then
touch "${L}"
fi
done
restart () {
echo "Terminating PipeWire processes ..."
pkill -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
pwait -u "${USER}" -x pipewire\|wireplumber
echo "PipeWire terminated."
}
if [ "${#}" -gt 0 ]
then
if [ "${1}" = 'restart' ]
then
restart
else
echo "Unrecognised argument." >&2
echo "Usage: gentoo-pipewire-launcher [restart]" >&2
exit 1
fi
fi
if pgrep -u "${USER}" -x pipewire\|wireplumber 1>/dev/null 2>&1
then
echo "PipeWire already running, exiting." >&2
echo "(Use 'gentoo-pipewire-launcher restart' to restart PipeWire and WirePlumber.)" >&2
exit 1
fi
# The core daemon which by itself does probably nothing.
echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting PipeWire." 1>>"${GENTOO_PIPEWIRE_LOG}"
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire 1>>"${GENTOO_PIPEWIRE_LOG}" 2>&1 &
# The so called pipewire-pulse daemon used for PulseAudio compatibility.
# Commenting this out will stop the PA proxying daemon from starting,
# however ALSA (with pipewire-alsa), JACK (with jack-sdk) and PW API using
# clients will still have access to audio and may end up clashing with
# non-PW apps over HW control (most notably, /usr/bin/pulseaudio daemon).
echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting PipeWire-Pulse." 1>>"${GENTOO_PIPEWIRE_PULSE_LOG}"
@GENTOO_PORTAGE_EPREFIX@/usr/bin/pipewire -c pipewire-pulse.conf 1>>"${GENTOO_PIPEWIRE_PULSE_LOG}" 2>&1 &
# Hack for bug #822498
sleep 1
# Finally a session manager is required for PipeWire to do anything.
echo "[$(@GENTOO_PORTAGE_EPREFIX@/bin/date ${DATE_FORMAT})] Starting WirePlumber." 1>>"${GENTOO_WIREPLUMBER_LOG}"
exec @GENTOO_PORTAGE_EPREFIX@/usr/bin/wireplumber 1>>"${GENTOO_WIREPLUMBER_LOG}" 2>&1

View File

@@ -1,12 +0,0 @@
diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
--- a/src/daemon/pipewire.conf.in
+++ b/src/daemon/pipewire.conf.in
@@ -6,7 +6,7 @@ context.properties = {
#support.dbus = true
#link.max-buffers = 64
link.max-buffers = 16 # version < 3 clients can't handle more
- #mem.warn-mlock = false
+ mem.warn-mlock = true # Gentoo should have good RLIMITs now
#mem.allow-mlock = true
#mem.mlock-all = false
#clock.power-of-two-quantum = true

View File

@@ -1,12 +0,0 @@
[Desktop Entry]
Version=1.0
Name[de]=PipeWire Mediensystem
Name=PipeWire Media System
Comment[de]=Das PipeWire Mediensystem starten
Comment=Start the PipeWire Media System
Exec=/usr/libexec/pipewire-launcher
Terminal=false
Type=Application
X-GNOME-HiddenUnderSystemd=true
X-KDE-HiddenUnderSystemd=true
X-systemd-skip=true

View File

@@ -1,12 +0,0 @@
[Desktop Entry]
Version=1.0
Name[de]=PipeWire Mediensystem
Name=PipeWire Media System
Comment[de]=Das PipeWire Mediensystem starten
Comment=Start the PipeWire Media System
Exec=/usr/bin/gentoo-pipewire-launcher
Terminal=false
Type=Application
X-GNOME-HiddenUnderSystemd=true
X-KDE-HiddenUnderSystemd=true
X-systemd-skip=true

View File

@@ -1,12 +0,0 @@
[Desktop Entry]
Version=1.0
Name[de]=PipeWire Mediensystem
Name=PipeWire Media System
Comment[de]=Das PipeWire Mediensystem starten
Comment=Start the PipeWire Media System
Exec=/usr/bin/gentoo-pipewire-launcher restart
Terminal=false
Type=Application
X-GNOME-HiddenUnderSystemd=true
X-KDE-HiddenUnderSystemd=true
X-systemd-skip=true