Skip to content

Commit 44eec34

Browse files
committed
Introduce audio-volume feature
Allowing user to set the default audio volume per qube via `audio-volume` feature. By default it is 100% (except some select qubes which will be always muted). resolves: QubesOS/qubes-issues#2724
1 parent a5ea121 commit 44eec34

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

doc/manpages/qvm-features.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,13 @@ device instead of audio agent installed in the qube itself. The value is audio
404404
model to be emulated, supported values are `ich6`, `sb16`, `ac97`, `es1370`.
405405
Recommended is `ich6`. This is useful to get audio in a Windows qube.
406406

407+
408+
audio-volume
409+
^^^^^^^^^^^^
410+
411+
Optionally sets the audio volume of the qube. Valid values are from 0 to 150;
412+
or `mute`. Default for `untrusted` and Whonix workstation based qubes is mute.
413+
407414
uefi
408415
^^^^
409416

qubesadmin/tools/qvm_start_daemon.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,18 @@ async def start_audio_for_vm(self, vm):
793793
str(self.pacat_domid(vm)),
794794
vm.name,
795795
]
796+
797+
volume = vm.features.check_with_template(
798+
"audio-volume",
799+
self.app.domains[self.app.local_name].features.check_with_template(
800+
"audio-volume",
801+
None,
802+
)
803+
)
804+
if volume:
805+
pacat_cmd.insert(1, "-V")
806+
pacat_cmd.insert(2, volume)
807+
796808
vm.log.info("Starting AUDIO")
797809

798810
await asyncio.create_subprocess_exec(*pacat_cmd)

0 commit comments

Comments
 (0)