Skip to content

Commit

Permalink
Improve load of modules for dynamic switch
Browse files Browse the repository at this point in the history
  • Loading branch information
fepitre committed May 11, 2024
1 parent b1ba5ae commit 666c0ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions rootfs/init
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ if [ -n "$audio_model" ] ; then
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" &
-L "module-vchan-sink domid=$domid" &
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" \
Expand Down
3 changes: 3 additions & 0 deletions rootfs/qubes.SetAudioVM
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ domid="${1:-0}"

export PULSE_SERVER=unix:/tmp/pa.sock

for module in module-always-sink module-always-source module-null-sink module-null-source; do
pactl load-module $module || true
done
pactl unload-module module-vchan-sink

if [ "$domid" -ge 0 ]; then
Expand Down

0 comments on commit 666c0ca

Please sign in to comment.