From 93fb5e82c35ec53e4ed6284349722235f773efef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Fri, 3 May 2024 15:14:07 +0200 Subject: [PATCH] Support setting audiovm not being dom0 on start From https://forum.qubes-os.org/t/audio-qube/20685#special-cases-of-non-linux-hvm-16 --- rootfs/init | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rootfs/init b/rootfs/init index 7d5b698..ac25155 100755 --- a/rootfs/init +++ b/rootfs/init @@ -29,6 +29,12 @@ if test -e /bin/qrexec-agent; then mdev -d fi +# Extract audiovm parameter and remove them from dm_args +audio_args=$(echo "$dm_args" | sed -n '/^-qubes-audio:/p') +dm_args=$(echo "$dm_args" | sed '/^-qubes-audio:/d') + +domid="$(echo "$audio_args" | sed -n 's/^.*[:,]audiovm_xid=\([^,]\+\).*$/\1/p')" + # add audiodev conf to cmdline and run pulseaudio audio_model=$(echo "$dm_args" | sed -n '/^\(intel-hda\|ac97\|adlib\|es1370\|cs4231a\|gus\|sb16\)$/ {p}') if [ -n "$audio_model" ] ; then @@ -44,7 +50,7 @@ if [ -n "$audio_model" ] ; then -L "module-always-source" \ -L "module-null-sink" \ -L "module-null-source" \ - -L "module-vchan-sink domid=0" & + -L "module-vchan-sink domid=$domid" & fi # Extract network parameters and remove them from dm_args