From 4d8221fdfc2bf19f34d119bfe016ba2b92295966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Tue, 7 May 2024 11:17:05 +0200 Subject: [PATCH] init: support for not loading vchan-sink --- rootfs/init | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/rootfs/init b/rootfs/init index ac25155..504f3d0 100755 --- a/rootfs/init +++ b/rootfs/init @@ -44,13 +44,22 @@ if [ -n "$audio_model" ] ; then fi export XDG_CONFIG_HOME='/tmp' pa_args=$'-audiodev\npa,id=qemupa,server=unix:/tmp/pa.sock'$model_args; - pulseaudio --use-pid-file=no --daemonize=no --exit-idle-time=-1 -n \ - -L "module-native-protocol-unix auth-anonymous=1 socket=/tmp/pa.sock" \ - -L "module-always-sink" \ - -L "module-always-source" \ - -L "module-null-sink" \ - -L "module-null-source" \ - -L "module-vchan-sink domid=$domid" & + if [ "$domid" -ge 0 ]; then + pulseaudio --use-pid-file=no --daemonize=no --exit-idle-time=-1 -n \ + -L "module-native-protocol-unix auth-anonymous=1 socket=/tmp/pa.sock" \ + -L "module-vchan-sink domid=$domid" \ + -L "module-always-sink" \ + -L "module-always-source" \ + -L "module-null-sink" \ + -L "module-null-source" & + else + pulseaudio --use-pid-file=no --daemonize=no --exit-idle-time=-1 -n \ + -L "module-native-protocol-unix auth-anonymous=1 socket=/tmp/pa.sock" \ + -L "module-always-sink" \ + -L "module-always-source" \ + -L "module-null-sink" \ + -L "module-null-source" & + fi fi # Extract network parameters and remove them from dm_args