Patch 1 creates directories that PipeWire, WirePlumber, and applications need early in boot to avoid ordering problems. Patch 2 adds working (and tested) support for audio in the VM via PipeWire. This only works when running in a VM, as Spectrum OS has no sound on the host yet. --- Changes since v8: - Add longer explanation for the priority.driver and priority.session values. - Give credit to George Kiagiadakis. - Fix spelling errors in comments. Changes since v7: - Give the capture node a higher priority.session than the playback node, so WirePlumber links recording applications to the capture node instead of the monitor of the playback node. - Give the capture node a higher priority.driver than the playback node, so PipeWire has the capture node drive the graph. This is better because capture xruns lead to permanently corrupted data, whereas playback xruns do not. - Re-enable monitor node creation in WirePlumber. Changes since v6: - Add missing S-o-b to directory creation patch. - Add comments explaining why each directory needs to be created. - Fix spelling errors in commit messages. - Sort lines in Makefile. - Don't disable support.settings as a comment in wireplumber.conf says to not do that. Instead, tell WirePlumber to not create monitor nodes. This is a workaround for WirePlumber bug 829. - Don't remove "-cpu host" from make run-qemu's QEMU command line. This was needed for local testing with KVM disabled but should not have been submitted upstream. Hardware with KVM support should be used instead. Changes since v5: - Move changes to startup scripts into a single patch. - Remove "directories" service in favor of creating the directories from rc.init. - Use VM_DIRS to create /run/user and /run/wait. - Create /run/user and /run/wait on the host as well, using the same mechanism as for the VM (though with a different variable name in the makefile). - Use a drop-in configuration file for WirePlumber instead of overriding wireplumber.conf. This should be more robust to future WirePlumber changes. Demi Marie Obenour (2): img/app: Create needed directories in early boot img/app: Run PipeWire and WirePlumber in the VMs img/app/Makefile | 16 +- img/app/default.nix | 3 + img/app/etc/mdev.conf | 1 + img/app/etc/pipewire/pipewire.conf | 229 ++++++++++++++++++ img/app/etc/s6-linux-init/scripts/rc.init | 13 + .../etc/s6-rc/app/dependencies.d/wireplumber | 0 .../etc/s6-rc/pipewire/dependencies.d/dbus | 0 img/app/etc/s6-rc/pipewire/notification-fd | 1 + .../s6-rc/pipewire/notification-fd.license | 2 + img/app/etc/s6-rc/pipewire/run | 23 ++ img/app/etc/s6-rc/pipewire/type | 1 + img/app/etc/s6-rc/pipewire/type.license | 2 + img/app/etc/s6-rc/wayland-proxy-virtwl/run | 10 - .../etc/s6-rc/wireplumber/dependencies.d/dbus | 0 .../s6-rc/wireplumber/dependencies.d/pipewire | 0 img/app/etc/s6-rc/wireplumber/run | 4 + img/app/etc/s6-rc/wireplumber/type | 1 + img/app/etc/s6-rc/wireplumber/type.license | 2 + .../wireplumber.conf.d/99_spectrum.conf | 42 ++++ 19 files changed, 338 insertions(+), 12 deletions(-) create mode 100644 img/app/etc/pipewire/pipewire.conf create mode 100644 img/app/etc/s6-rc/app/dependencies.d/wireplumber create mode 100644 img/app/etc/s6-rc/pipewire/dependencies.d/dbus create mode 100644 img/app/etc/s6-rc/pipewire/notification-fd create mode 100644 img/app/etc/s6-rc/pipewire/notification-fd.license create mode 100644 img/app/etc/s6-rc/pipewire/run create mode 100644 img/app/etc/s6-rc/pipewire/type create mode 100644 img/app/etc/s6-rc/pipewire/type.license create mode 100644 img/app/etc/s6-rc/wireplumber/dependencies.d/dbus create mode 100644 img/app/etc/s6-rc/wireplumber/dependencies.d/pipewire create mode 100644 img/app/etc/s6-rc/wireplumber/run create mode 100644 img/app/etc/s6-rc/wireplumber/type create mode 100644 img/app/etc/s6-rc/wireplumber/type.license create mode 100644 img/app/etc/wireplumber/wireplumber.conf.d/99_spectrum.conf base-commit: 560fd878ba1bbd8df0fe28488e72948f28940948 -- Sincerely, Demi Marie Obenour (she/her/hers)