Added old pipewire/wireplumber packages.

This commit is contained in:
2022-11-26 23:03:25 +00:00
parent 67e909aa35
commit ac8005ed3a
24 changed files with 1547 additions and 0 deletions
@@ -0,0 +1,17 @@
# 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
}
]
@@ -0,0 +1,29 @@
#!/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
@@ -0,0 +1,12 @@
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
@@ -0,0 +1,55 @@
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/aaa015d0c0c66b64c7198a34ad3c4b43445667d2
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/1a5ec4452fa21592eaeeb823ad95a1db6eb60376
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/f857fd46262b1a90ad94f86e34216a1a886d9463
From aaa015d0c0c66b64c7198a34ad3c4b43445667d2 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Tue, 19 Jul 2022 13:06:52 +0200
Subject: [PATCH] avb: fix compilation on big endian
--- a/spa/plugins/avb/avbtp/packets.h
+++ b/spa/plugins/avb/avbtp/packets.h
@@ -116,7 +116,7 @@ struct spa_avbtp_packet_aaf {
unsigned gv:1;
unsigned tv:1;
- uint8_t seq_number;
+ uint8_t seq_num;
unsigned _r2:7;
unsigned tu:1;
GitLab
From 1a5ec4452fa21592eaeeb823ad95a1db6eb60376 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Tue, 19 Jul 2022 13:49:42 +0200
Subject: [PATCH] avb: fix compilation on big endian
--- a/src/modules/module-avb/aaf.h
+++ b/src/modules/module-avb/aaf.h
@@ -35,7 +35,7 @@ struct avb_packet_aaf {
unsigned gv:1;
unsigned tv:1;
- uint8_t seq_number;
+ uint8_t seq_num;
unsigned _r2:7;
unsigned tu:1;
GitLab
From f857fd46262b1a90ad94f86e34216a1a886d9463 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Tue, 19 Jul 2022 14:07:16 +0200
Subject: [PATCH] avb: fix compilation on big endian
--- a/src/modules/module-avb/iec61883.h
+++ b/src/modules/module-avb/iec61883.h
@@ -37,7 +37,7 @@ struct avb_packet_iec61883 {
unsigned gv:1;
unsigned tv:1;
- uint8_t seq_number;
+ uint8_t seq_num;
unsigned _r2:7;
unsigned tu:1;
GitLab
@@ -0,0 +1,87 @@
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/94a857550b566472e5ab51191e1b34098e5a9506
From 94a857550b566472e5ab51191e1b34098e5a9506 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 3 Oct 2022 09:44:32 +0200
Subject: [PATCH] filter-chain: alloc port data per handle.
--- a/src/modules/module-filter-chain.c
+++ b/src/modules/module-filter-chain.c
@@ -1501,7 +1501,6 @@ static int load_node(struct graph *graph, struct spa_json *json)
bool have_config = false;
uint32_t i;
int res;
- float *data;
while (spa_json_get_string(json, key, sizeof(key)) > 0) {
if (spa_streq("type", key)) {
@@ -1576,14 +1575,6 @@ static int load_node(struct graph *graph, struct spa_json *json)
port->idx = i;
port->external = SPA_ID_INVALID;
port->p = desc->output[i];
- if ((data = port->audio_data[i]) == NULL) {
- data = calloc(1, MAX_SAMPLES * sizeof(float));
- if (data == NULL) {
- pw_log_error("cannot create port data: %m");
- return -errno;
- }
- }
- port->audio_data[i] = data;
spa_list_init(&port->link_list);
}
for (i = 0; i < desc->n_control; i++) {
@@ -1629,6 +1620,26 @@ static void node_cleanup(struct node *node)
}
}
+static int port_ensure_data(struct port *port, uint32_t i)
+{
+ float *data;
+ if ((data = port->audio_data[i]) == NULL) {
+ data = calloc(1, MAX_SAMPLES * sizeof(float));
+ if (data == NULL) {
+ pw_log_error("cannot create port data: %m");
+ return -errno;
+ }
+ }
+ port->audio_data[i] = data;
+ return 0;
+}
+
+static void port_free_data(struct port *port, uint32_t i)
+{
+ free(port->audio_data[i]);
+ port->audio_data[i] = NULL;
+}
+
static void node_free(struct node *node)
{
uint32_t i, j;
@@ -1636,7 +1647,7 @@ static void node_free(struct node *node)
spa_list_remove(&node->link);
for (i = 0; i < node->n_hndl; i++) {
for (j = 0; j < node->desc->n_output; j++)
- free(node->output_port[j].audio_data[i]);
+ port_free_data(&node->output_port[j], i);
}
node_cleanup(node);
descriptor_unref(node->desc);
@@ -1688,6 +1699,8 @@ static int graph_instantiate(struct graph *graph)
spa_list_for_each(link, &port->link_list, input_link) {
struct port *peer = link->output;
+ if ((res = port_ensure_data(peer, i)) < 0)
+ goto error;
pw_log_info("connect input port %s[%d]:%s %p",
node->name, i, d->ports[port->p].name,
peer->audio_data[i]);
@@ -1696,6 +1709,8 @@ static int graph_instantiate(struct graph *graph)
}
for (j = 0; j < desc->n_output; j++) {
port = &node->output_port[j];
+ if ((res = port_ensure_data(port, i)) < 0)
+ goto error;
pw_log_info("connect output port %s[%d]:%s %p",
node->name, i, d->ports[port->p].name,
port->audio_data[i]);
GitLab
@@ -0,0 +1,12 @@
[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
@@ -0,0 +1,12 @@
[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