git: 49583c3a40d2 - main - multimedia/pipewire: unbreak ALSA=on with default config
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Dec 2024 22:02:55 UTC
The branch main has been updated by jbeich:
URL: https://cgit.FreeBSD.org/ports/commit/?id=49583c3a40d221e85ae6d35f92a95b6764064344
commit 49583c3a40d221e85ae6d35f92a95b6764064344
Author: Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-06-15 03:28:16 +0000
Commit: Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-12-06 22:02:45 +0000
multimedia/pipewire: unbreak ALSA=on with default config
$ pw-play foo.wav
stream node 42 error: no target node available
remote error: id=2 seq:7 res:-2 (No such file or directory): no target node available
PR: 272004
Approved by: arrowd (maintainer)
(cherry picked from commit a7aaffb08b1688f28121d1f12e8012fd40bf75e7)
---
multimedia/pipewire/Makefile | 9 ++++++++-
multimedia/pipewire/files/10-alsa-default.conf.in | 23 +++++++++++++++++++++++
multimedia/pipewire/pkg-plist | 1 +
3 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/multimedia/pipewire/Makefile b/multimedia/pipewire/Makefile
index 53c4f91a4926..6213315458f2 100644
--- a/multimedia/pipewire/Makefile
+++ b/multimedia/pipewire/Makefile
@@ -1,6 +1,6 @@
PORTNAME= pipewire
DISTVERSION= 1.2.6
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= multimedia
MAINTAINER= arrowd@FreeBSD.org
@@ -37,6 +37,8 @@ OPTIONS_SUB= yes
ALSA_MESON_ENABLED= alsa pipewire-alsa
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
+ALSA_RUN_DEPENDS= alsa-plugins>0:audio/alsa-plugins
+ALSA_SUB_FILES= 10-alsa-default.conf
AVAHI_DESC= Automatic service discovery for the Pulseaudio module via Avahi
AVAHI_IMPLIES= PULSEAUDIO
@@ -105,4 +107,9 @@ post-patch:
${REINPLACE_CMD} -e "s|find_installation('python3'|find_installation('python${PYTHON_VER}'|" \
${WRKSRC}/meson.build
+post-install-ALSA-on:
+ ${MKDIR} ${STAGEDIR}${DATADIR}/${PORTNAME}.conf.d
+ ${INSTALL_DATA} ${WRKDIR}/10-alsa-default.conf \
+ ${STAGEDIR}${DATADIR}/${PORTNAME}.conf.d
+
.include <bsd.port.mk>
diff --git a/multimedia/pipewire/files/10-alsa-default.conf.in b/multimedia/pipewire/files/10-alsa-default.conf.in
new file mode 100644
index 000000000000..8eb5c9b1ea6b
--- /dev/null
+++ b/multimedia/pipewire/files/10-alsa-default.conf.in
@@ -0,0 +1,23 @@
+# Create sink and source for the default device
+# See also %%LOCALBASE%%/etc/asound.conf
+
+context.objects = [
+ { factory = adapter
+ args = {
+ factory.name = api.alsa.pcm.sink
+ node.name = "alsa-sink"
+ node.description = "ALSA plugins (OSS by default)"
+ media.class = "Audio/Sink"
+ api.alsa.path = "pcm.default"
+ }
+ }
+ { factory = adapter
+ args = {
+ factory.name = api.alsa.pcm.source
+ node.name = "alsa-source"
+ node.description = "ALSA plugins (OSS by default)"
+ media.class = "Audio/Source"
+ api.alsa.path = "pcm.default"
+ }
+ }
+]
diff --git a/multimedia/pipewire/pkg-plist b/multimedia/pipewire/pkg-plist
index 25f5afa59c48..d1459c4535aa 100644
--- a/multimedia/pipewire/pkg-plist
+++ b/multimedia/pipewire/pkg-plist
@@ -463,3 +463,4 @@ share/locale/zh_TW/LC_MESSAGES/pipewire.mo
%%DATADIR%%/pipewire.conf
%%DATADIR%%/pipewire.conf.avail/10-rates.conf
%%DATADIR%%/pipewire.conf.avail/20-upmix.conf
+%%ALSA%%%%DATADIR%%/pipewire.conf.d/10-alsa-default.conf