From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 9973527D99; Tue, 29 Jul 2025 00:33:22 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 26A6527D80; Tue, 29 Jul 2025 00:33:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by atuin.qyliss.net (Postfix) with ESMTPS id DF89E27CFD for ; Tue, 29 Jul 2025 00:33:18 +0000 (UTC) Received: by mail-qk1-x731.google.com with SMTP id af79cd13be357-7dd8773f9d9so462509185a.2 for ; Mon, 28 Jul 2025 17:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753749197; x=1754353997; darn=spectrum-os.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vyH0OH036afciD0AwymzPF0p4hbkt06Ltba8pLxhbJQ=; b=Phh8bBPKmvmt+LYECAYJV3M8AgqoYN/sx0iG080UqT8hOxjC7zuXJ3oDmpeNQF2cxa efk/G8PqMCT5yJe898jOfPxJQfrNA05yof6BeEcyGTgWcjh70oSYdazZvRtAVDWjYqoL 1b/rE1Qc7dTL4VcrbYulLTt38f3fHjRmCOmvAJ9E9L7Lkho606DgofnjihXWQKIfmV7G i47zdW5ygq9dIZsu5A1hpaRv44CEySuGhh2+fwOVJQKn4OWz5/snVsKH+eCVXWtvJ6io CGyFzhhY6MrkwSAxJDvfPBQP8tXMRMvlhpevMVxHhbi6Lb+ZPYILOym5/Ho6mXEEOS11 klaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753749197; x=1754353997; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vyH0OH036afciD0AwymzPF0p4hbkt06Ltba8pLxhbJQ=; b=BsZOaO6acvnCJ4QNkPFmBqA+F03kFwypDQnMOY4prk1jx6iHKaTP8T5iVwNTZMRsLz pzpdaG/ICRIWeGBDTK8x1JhPwDy60Zrs/ujLn8OzjT5NIbA6gosWTft3ylaPx4pkQKA3 ixsga0AhdFwsYpmF6MM8zvH/1yal594cfbSO9mjic3sFu1OC5Q6lK4uyID+luKfvx5Tl rXte7riL3Koeo+vWrtSCehxR1tKtAT58xi4yoSi078kjBKDNTJzbwwXV/fp1W24p3U+B 8iGdkCpPP7q/3hBR3/pbQIQnl8dN4ERzqbvNeZyoT73RS13m625huOhx3Rh0rS53rCia YAeA== X-Gm-Message-State: AOJu0Yx6D2aVKPDKiOfWC6E516COX68/oWluoa3NTbc0GcwPEVDILyA1 XhPU6M+DlnHjXPE11UJzbJIaqeZyPUphIfWUrDO/l6mXBuaffSLuKuvlxZ4nsQ== X-Gm-Gg: ASbGncs1xQD38t+crLF3r/0ScpErlF5UazIGYJoZ8mV07IfkHYBnirTzHBEmqGjfSoT oTV5zcWqVUXrPVAHf1sdoKGjG1mSplxpCFX/dA+U9S7QSZydMYBXRXpxM0oLQB897/hy3PpxhZl IvQlyep/4L3TpSNmkfVs46YdAb87XfsJkTbX2jCFqum8fVGLlv6vjRrH73wVWTvMpPAdxSbCZ1Z ByYtbErM/v5d1qyfcbDdCBIohK8jkyuGzYg+7qJrXgvCtVT68icLmmXLY7o2xPePmFB11h2i9G3 dDAt053DpabmtoF+/etG7DtwSH8zCh4pw7iLoS2NOBgp0dYRpzD6dyCwfzNGoNdcChKtrxpXypv 0Hx5EZmBMB/oHUerlJ2rUGUR6Sq4= X-Google-Smtp-Source: AGHT+IFUTVcZcTzCh2wZcKO1wwRdiOb0cN9WWSfR3aV9aG2pmVrN0xP8D9N1RlZIzDj32i8ED4bh4Q== X-Received: by 2002:a05:620a:aa0d:b0:7e6:5e6e:fa63 with SMTP id af79cd13be357-7e65e6efab6mr296865485a.2.1753749197416; Mon, 28 Jul 2025 17:33:17 -0700 (PDT) Received: from very-personal ([89.187.178.201]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4ae9966c433sm41746611cf.54.2025.07.28.17.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jul 2025 17:33:16 -0700 (PDT) From: Demi Marie Obenour To: Spectrum OS Development Subject: [PATCH v9 0/2] Sound support in Spectrum VMs Date: Mon, 28 Jul 2025 20:32:59 -0400 Message-ID: X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250728231303.2416-1-demiobenour@gmail.com> References: <20250728231303.2416-1-demiobenour@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: JA7DZ4V5IUO3RBJWDFC7GWTCF54F4PPE X-Message-ID-Hash: JA7DZ4V5IUO3RBJWDFC7GWTCF54F4PPE X-MailFrom: demiobenour@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Demi Marie Obenour , Alyssa Ross X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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)