Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/manpages/qvm-features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,14 @@ device instead of audio agent installed in the qube itself. The value is audio
model to be emulated, supported values are `ich6`, `sb16`, `ac97`, `es1370`.
Recommended is `ich6`. This is useful to get audio in a Windows qube.


audio-initial-volume
^^^^^^^^^^^^^^^^^^^^

Optionally sets the audio volume of the qube at every launch. Valid values are
from 0 to 150; or `mute`. Default for `untrusted` and Whonix workstation based
qubes is mute.

uefi
^^^^

Expand Down
20 changes: 20 additions & 0 deletions qubesadmin/tools/qvm_start_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,26 @@ async def start_audio_for_vm(self, vm):
str(self.pacat_domid(vm)),
vm.name,
]

try:
volume = vm.features.check_with_template(
"audio-initial-volume",
self.app.domains[
self.app.local_name
].features.check_with_template(
"audio-initial-volume",
None,
),
)
if volume:
if volume.endswith("%"):
volume = volume[:-1]
pacat_cmd.insert(1, "-V")
pacat_cmd.insert(2, volume)
except qubesadmin.exc.QubesDaemonAccessError:
# Most probably within a sys-audio with older policy files
pass

vm.log.info("Starting AUDIO")

await asyncio.create_subprocess_exec(*pacat_cmd)
Expand Down