feat: usb devices in sys-audio

Introduces support for USB connected devices such as Bluetooth and
camera, microphone as well as their integrated versions.
This commit is contained in:
Ben Grande 2024-01-17 15:11:23 +01:00
parent 6bf9b97a36
commit 3faa523820
4 changed files with 25 additions and 3 deletions

View File

@ -15,8 +15,8 @@ Audio operations in Qubes OS.
Creates the named disposable "disp-sys-audio" qube for providing audio
operations such as microphone and speakers to and from qubes. By default, you
can use wired USB audio, but if you want, you can install the necessary
packages for bluetooth with the provided state.
can use the builtin stereo, JACK and USB , but if you want, you can install
the necessary packages for bluetooth with the provided state.
## Installation
@ -74,3 +74,16 @@ will fail. To be able to use the device again:
- Restart the audio server `disp-sys-audio`;
- Restart the audio client; and
- Attach the device to the audio client;
### How to use USB devices, Bluetooth, Camera and Microphone
Bluetooth and Camera are normally integrated in laptops, but they still are
USB devices internally. They will be held by `(disp-)sys-usb` or
`(disp-)sys-net`, else `dom0`.
Built-in microphones on the other hand, are directly attached to `dom0`.
To use these devices, you have to attach them to their respective qubes:
- audio server: Bluetooth; and
- audio client: cameras, speakers, microphones.

View File

@ -8,6 +8,9 @@
## Do not modify this file, create a new policy with with a lower number in the
## file name instead. For example `30-user.policy`.
## Literal name 'sys-usb' in case user has not installed from our formula.
admin.vm.device.usb.Available * disp-{{ sls_path }} sys-usb allow target=dom0
admin.vm.device.usb.Available * disp-{{ sls_path }} @tag:usbvm allow target=dom0
admin.vm.device.mic.Available * disp-{{ sls_path }} @adminvm allow target=dom0
admin.Events * disp-{{ sls_path }} disp-{{ sls_path }} allow target=dom0

View File

@ -21,6 +21,7 @@ include:
- skip_suggestions: True
- pkgs:
- blueman
- linux-firmware
- libspa-0.2-bluetooth
- firmware-iwlwifi
{% endif -%}

View File

@ -6,6 +6,10 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{% if grains['nodename'] != 'dom0' -%}
## qubes-usb-proxy required for integrated camera (USB internally).
include:
- sys-usb.install-client-proxy
"{{ slsdotpath }}-client-updated":
pkg.uptodate:
- refresh: True
@ -18,6 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
- pkgs:
- pipewire-qubes
- pipewire-pulse
- pipewire-libcamera
- wireplumber
- rtkit