When the pulseaudio interface was written, it was known to be a transitional interface since it gives full access to only pulseaudio (and no other sound servers) without a design for mediating audio recording.
As of 2.41, snapd adds the audio-playback (auto-connected) and audio-record (manually connected) interfaces. These interfaces currently support using the host’s PulseAudio sound server and will be extended to support other sound servers as required (eg, pipewire). In this manner, snaps are future-proofed and need only plugs audio-playback
to have access to the configured sound servers on the system (as supported by snapd) as opposed to having to specify multiple interfaces for different sound servers (ie, plugs: [ audio-playback ]
vs plugs: [ pulseaudio, pipewire, foo, bar ]
).
Furthermore, for host systems that support the snapd-integration patch for pulseaudio, pulseaudio will mediate recording by verifying that the audio-record
interface is connected by the client snap.
Next steps
Though the pulseaudio
interface is being deprecated, it will not be removed from snapd and you are free to continue plugging pulseaudio
as always. In the coming weeks, pulseaudio
will change from being auto-connected to being manually connected. During this transition, all existing snaps that currently plugs: [ pulseaudio ]
will be grandfathered into auto-connection.
As of today, the forum documentation has been updated to suggest using these new interfaces instead of pulseaudio
, the snapcraft-desktop-helpers have been adjusted to plugs: [ audio-playback, pulseaudio ]
, bugs have been filed in other projects that provide templates (eg, electron), snapd 2.41 is finding its way out to various distributions and the grandfathering of existing snaps has begun.
Your snaps
If your snap currently plugs: [ pulseaudio ]
, you may want to opt into future-proofing and adjust it to use plugs: [ audio-playback, pulseaudio ]
(adding audio-record
as desired). Again, this is not required for existing snaps since they will be grandfathered into auto-connection.
Your templates
If you use the snapcraft-desktop-helpers, you may want to verify your new snaps are using the latest version that pull in audio-playback
.
If you use another snap template system that still only plugs pulseaudio
, feel free fix it to additionally plugs audio-playback
and/or report this upstream and report back here.
Happy snapcrafting!