We want to add support for audio to our graphical Ubuntu Core variant, which in turn will require some snap declaration changes. Namely:
- allow D-Bus slots claiming the names
org.pulseaudio.Server
andorg.freedesktop.ReserveDevice1
on the session bus. These are used by the pipewire components we’re running as part of the snap. - we’re adding
audio-playback
,audio-record
, andpulseaudio
slots. These should have similar connection policies to the equivalent implicit slots on classic systems. I realise that thepulseaudio
interface is deprecated in favour of the first two, but without it old snaps still using it as a plug won’t have anything to connect to.
I think the snap declaration changes I want would look something like this:
slots:
dbus:
allow-connection:
-
slot-attributes:
name: org.pulseaudio.Server
-
slot-attributes:
name: org.freedesktop.ReserveDevice1
# plus all the other cases already in the declaration...
deny-auto-connection: true
audio-playback:
allow-installation: true
allow-connection:
on-classic: false
allow-auto-connection:
on-classic: false
audio-record:
allow-installation: true
allow-connection:
on-classic: false
allow-auto-connection: false
pulseaudio:
allow-installation: true
allow-connection:
on-classic: false
allow-auto-connection: false
Note that allow-auto-connection
for audio-record
and pulseaudio
should be more restrictive than audio-playback
, as it is in the base declaration. I think it’d be useful to follow the pattern we used for the desktop/wayland/x11 slots, and only make it a connection candidate on Ubuntu Core systems.