Skip to contentSkip to conversation

pipewire: Install missing ALSA config files

oe Ariel D'Alessandro 1 participant 1 message Apr 24, 2025

lore
Share & tools
lore
#0 lore raw

As detailed in Pipewire documentation [0], the ALSA plugin requires config files to be symlinked as follow:

```
The plugin will be picked up by alsa when the following files are in /etc/alsa/conf.d/:

/etc/alsa/conf.d/50-pipewire.conf -> /usr/share/alsa/alsa.conf.d/50-pipewire.conf
/etc/alsa/conf.d/99-pipewire-default.conf
```

The above symlinks are missing, thus the pipewire device is not properly detected.

Fix this by creating the required symlinks and installing them in the pipewire-alsa package.

[0] https://github.com/PipeWire/pipewire/blob/master/INSTALL.md#alsa-plugin

---
 .../recipes-multimedia/pipewire/pipewire_1.0.9.bb      | 10 ++++++++++
 1 file changed, 10 insertions(+)
meta-multimedia/recipes-multimedia/pipewire/pipewire_1.0.9.bb +10 -0
index 15cd6e9ab8..c166725258 100644
@@ -157,6 +157,14 @@ remove_unused_installed_files() {
     rm -f "${D}${datadir}/pipewire/minimal.conf"
 }
 
+do_install:append() {
+    # The pipewire-alsa plugin needs the following files in /etc/alsa/conf.d/ to
+    # be picked up by alsa.
+    install -d ${D}${sysconfdir}/alsa/conf.d
+    ln -sf ${datadir}/alsa/alsa.conf.d/50-pipewire.conf ${D}${sysconfdir}/alsa/conf.d/50-pipewire.conf
+    ln -sf ${datadir}/alsa/alsa.conf.d/99-pipewire-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pipewire-default.conf
+}
+
 do_install[postfuncs] += "remove_unused_installed_files"
 
 python split_dynamic_packages () {
@@ -328,6 +336,8 @@ RDEPENDS:${PN}-pulse += " \
 FILES:${PN}-alsa = "\
     ${libdir}/alsa-lib/* \
     ${datadir}/alsa/alsa.conf.d/* \
+    ${sysconfdir}/alsa/conf.d/50-pipewire.conf \
+    ${sysconfdir}/alsa/conf.d/99-pipewire-default.conf \
 "
 
 # JACK drop-in libraries to redirect audio to pipewire.
Signature · 1 line
2.49.0