On Wed, Feb 04, 2026 at 09:38:13PM +0530, Jeevan via lists.yoctoproject.org
wrote:
> Add a systemd service to run PulseAudio in system mode where multiple
> applications need audio access without user sessions. Depends on
> pulseaudio-server to ensure audio/pulse groups exist.
>
> Enable this service by default to provide system-wide audio for all
> applications.
>
> Signed-off-by: Telukula Jeevan Kumar Sahu <[email protected]>
> ---
> Changes in v2: Add SUMMARY, PV and PR.
>
> .../pulseaudio/files/pulseaudio.service | 11 ++++++
> .../pulseaudio/pulseaudio-service.bb | 39 +++++++++++++++++++
> 2 files changed, 50 insertions(+)
> create mode 100644
> meta-arago-extras/recipes-multimedia/pulseaudio/files/pulseaudio.service
> create mode 100644
> meta-arago-extras/recipes-multimedia/pulseaudio/pulseaudio-service.bb
>
> diff --git
> a/meta-arago-extras/recipes-multimedia/pulseaudio/files/pulseaudio.service
> b/meta-arago-extras/recipes-multimedia/pulseaudio/files/pulseaudio.service
> new file mode 100644
> index 00000000..1d3ac435
> --- /dev/null
> +++ b/meta-arago-extras/recipes-multimedia/pulseaudio/files/pulseaudio.service
> @@ -0,0 +1,11 @@
> +[Unit]
> +Description=PulseAudio Sound System
> +After=alsa-restore.service
> +
> +[Service]
> +BusName=org.pulseaudio.Server
> +ExecStart=/usr/bin/pulseaudio --system
> +Restart=always
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git
> a/meta-arago-extras/recipes-multimedia/pulseaudio/pulseaudio-service.bb
> b/meta-arago-extras/recipes-multimedia/pulseaudio/pulseaudio-service.bb
> new file mode 100644
> index 00000000..5ce849fc
> --- /dev/null
> +++ b/meta-arago-extras/recipes-multimedia/pulseaudio/pulseaudio-service.bb
> @@ -0,0 +1,39 @@
> +SUMMARY = "PulseAudio systemd service for system-wide audio"
> +DESCRIPTION = "Systemd service to run PulseAudio in system mode for embedded
> systems"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM =
> "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> +
> +PV = "1.0"
> +PR = "r0"
These days PR is managed automatically, so it is advised against tweaking it
manually.
> +inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}
> +inherit useradd
> +
> +DEPENDS = "pulseaudio"
> +
> +# Ensure pulseaudio-server is installed to create audio group
> +RDEPENDS:${PN} = "pulseaudio-server"
> +
> +SRC_URI = "\
> + file://pulseaudio.service \
> +"
> +
> +S = "${UNPACKDIR}"
> +
> +SYSTEMD_PACKAGES = "${PN}"
> +SYSTEMD_SERVICE:${PN} = "pulseaudio.service"
> +SYSTEMD_AUTO_ENABLE:${PN} = "disable"
> +
> +FILES:${PN} = " \
> + ${systemd_system_unitdir}/pulseaudio.service \
> +"
> +
> +USERADD_PACKAGES = "${PN}"
> +GROUPMEMS_PARAM:${PN} = "--add root --group audio"
> +
> +do_install() {
> + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};
> then
> + install -d ${D}${systemd_system_unitdir}
> + install -m 0644 ${S}/pulseaudio.service
> ${D}${systemd_system_unitdir}/
> + fi
> +}
> --
> 2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17080):
https://lists.yoctoproject.org/g/meta-arago/message/17080
Mute This Topic: https://lists.yoctoproject.org/mt/117636674/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-