diff --git a/packages/audio/pulseaudio/package.mk b/packages/audio/pulseaudio/package.mk new file mode 100644 index 0000000000..1f6e78293d --- /dev/null +++ b/packages/audio/pulseaudio/package.mk @@ -0,0 +1,105 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="pulseaudio" +PKG_VERSION="4.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://pulseaudio.org/" +PKG_URL="http://freedesktop.org/software/pulseaudio/releases/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="libtool alsa-lib libsamplerate dbus speex systemd openssl" +PKG_BUILD_DEPENDS_TARGET="toolchain libtool json-c alsa-lib libsndfile libsamplerate dbus systemd openssl libcap" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="pulseaudio: Yet another sound server for Unix" +PKG_LONGDESC="PulseAudio is a sound server for Linux and other Unix-like operating systems. It is intended to be an improved drop-in replacement for the Enlightened Sound Daemon (esound or esd). In addition to the features esound provides, PulseAudio has an extensible plugin architecture, support for more than one sink per source, better low-latency behavior, the ability to be embedded into other software, a completely asynchronous C API, a simple command line interface for reconfiguring the daemon while running, flexible and implicit sample type conversion and resampling, and a "Zero-Copy" architecture." + +PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + +# package specific configure options +PKG_CONFIGURE_OPTS_TARGET="--disable-silent-rules \ + --disable-nls \ + --enable-largefile \ + --disable-rpath \ + --disable-x11 \ + --disable-tests \ + --enable-samplerate \ + --disable-oss-output \ + --disable-oss-wrapper \ + --disable-coreaudio-output \ + --enable-alsa \ + --disable-esound \ + --disable-solaris \ + --disable-waveout \ + --disable-glib2 \ + --disable-gtk3 \ + --disable-gconf \ + --disable-avahi \ + --disable-jack \ + --disable-asyncns \ + --disable-tcpwrap \ + --disable-lirc \ + --enable-dbus \ + --disable-bluez \ + --enable-udev \ + --disable-hal-compat \ + --enable-ipv6 \ + --enable-openssl \ + --disable-xen \ + --disable-orc \ + --disable-manpages \ + --disable-per-user-esound-socket \ + --disable-default-build-tests \ + --disable-legacy-database-entry-format \ + --with-system-user=root \ + --with-system-group=root \ + --with-access-group=root \ + --without-caps \ + --without-fftw \ + --with-speex \ + --with-module-dir=/usr/lib/pulse" + +pre_configure_target() { + # pulseaudio fails to build with LTO support + strip_lto +} + +pre_make_target() { + MAKEFLAGS=-j1 +} + +post_makeinstall_target() { +# add_user pulse x 499 498 "PulseAudio System Daemon" "/var/run/pulse" "/bin/sh" +# add_group pulse 498 +# add_group pulse-access 497 + + sed -e 's%user="pulse"%user="root"%g' -i $INSTALL/etc/dbus-1/system.d/pulseaudio-system.conf + + rm -rf $INSTALL/usr/bin/esdcompat + rm -rf $INSTALL/usr/lib/cmake + rm -rf $INSTALL/usr/share/vala + rm -rf $INSTALL/etc/bash_completion.d +} + +post_install() { + enable_service pulseaudio.service +} diff --git a/packages/audio/pulseaudio/patches/pulseaudio-0020-stream-Return-error-in-case-a-client-peeks-to-early.patch b/packages/audio/pulseaudio/patches/pulseaudio-0020-stream-Return-error-in-case-a-client-peeks-to-early.patch new file mode 100644 index 0000000000..2f6d7e0caa --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-0020-stream-Return-error-in-case-a-client-peeks-to-early.patch @@ -0,0 +1,64 @@ +From david.henningsson@canonical.com Mon Oct 1 15:06:56 2012 +Return-Path: +X-Original-To: diwic@mail.canonical.com +Delivered-To: diwic@mail.canonical.com +Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) + by grenadilla.canonical.com (Postfix) with ESMTP id A48961472160 + for ; Mon, 1 Oct 2012 15:06:56 +0000 (UTC) +Received: from cluster-e.mailcontrol.com (cluster-e.mailcontrol.com [85.115.58.190]) + by fiordland.canonical.com (Postfix) with ESMTP id 5DC1EA18423 + for ; Mon, 1 Oct 2012 15:06:56 +0000 (UTC) +Received: from arctowski.canonical.com (arctowski.canonical.com [91.189.94.158]) + by rly62e.srv.mailcontrol.com (MailControl) with ESMTP id q91F6t9E016745 + for ; Mon, 1 Oct 2012 16:06:55 +0100 +Received: from fiordland.canonical.com ([91.189.94.145]) + by arctowski.canonical.com with esmtp (Exim 4.71) + (envelope-from ) + id 1TIhaB-0002MW-HX + for david.henningsson@cleanmail.canonical.com; Mon, 01 Oct 2012 15:06:55 +0000 +Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) + by fiordland.canonical.com (Postfix) with ESMTP id 8706DA18423 + for ; Mon, 1 Oct 2012 15:06:55 +0000 (UTC) +Received: from hd9483857.selulk5.dyn.perspektivbredband.net ([217.72.56.87] helo=localhost.localdomain) + by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) + (Exim 4.71) + (envelope-from ) + id 1TIhaB-0006f2-8F; Mon, 01 Oct 2012 15:06:55 +0000 +From: David Henningsson +To: pulseaudio-discuss@lists.freedesktop.org +Cc: 1058200@bugs.launchpad.net, + David Henningsson +Subject: [PATCH] stream: Return error in case a client peeks to early +Date: Mon, 1 Oct 2012 17:06:55 +0200 +Message-Id: <1349104015-5924-1-git-send-email-david.henningsson@canonical.com> +X-Mailer: git-send-email 1.7.9.5 +X-Mailcontrol-Inbound: uq3drnD2P+ps5SfEb0fvr78+NoP1DHBZwGqKpaXB2eTgNv8D6KLIxb8+NoP1DHBZ8VSaBg0k0xw= +X-Spam-Score: -0.4 +X-Scanned-By: MailControl 9446.0 (www.mailcontrol.com) on 10.69.0.172 + +If there is no silence memblock and no data, pa_memblockq_peek can +return NULL. In this case, do not crash on an assertion in +pa_memblock_acquire, but instead return a proper error to the client. + +BugLink: http://bugs.launchpad.net/bugs/1058200 +Signed-off-by: David Henningsson +--- + src/pulse/stream.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/pulse/stream.c b/src/pulse/stream.c +index 2b6d306..9bb0995 100644 +--- a/src/pulse/stream.c ++++ b/src/pulse/stream.c +@@ -1598,6 +1598,8 @@ int pa_stream_peek(pa_stream *s, const void **data, size_t *length) { + return 0; + } + ++ PA_CHECK_VALIDITY(s->context, s->peek_memchunk.memblock != NULL, PA_ERR_NODATA); ++ + s->peek_data = pa_memblock_acquire(s->peek_memchunk.memblock); + } + +-- +1.7.9.5 + diff --git a/packages/audio/pulseaudio/patches/pulseaudio-0023-fixing_snd_mixer_poll_descriptors_count_when_zero.patch b/packages/audio/pulseaudio/patches/pulseaudio-0023-fixing_snd_mixer_poll_descriptors_count_when_zero.patch new file mode 100644 index 0000000000..c4439fa4b0 --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-0023-fixing_snd_mixer_poll_descriptors_count_when_zero.patch @@ -0,0 +1,16 @@ +Description: Avoid abort when poll descriptor is 0 (LP: #1092377) + +Index: pulseaudio/src/modules/alsa/alsa-mixer.c +=================================================================== +--- pulseaudio.orig/src/modules/alsa/alsa-mixer.c 2012-12-20 00:37:53.862456000 -0200 ++++ pulseaudio/src/modules/alsa/alsa-mixer.c 2012-12-20 00:39:58.631080479 -0200 +@@ -160,6 +160,9 @@ + if (n < 0) { + pa_log("snd_mixer_poll_descriptors_count() failed: %s", pa_alsa_strerror(n)); + return; ++ } else if (n == 0) { ++ pa_log("snd_mixer_poll_descriptors_count() equal 0"); ++ return; + } + num_fds = (unsigned) n; + diff --git a/packages/audio/pulseaudio/patches/pulseaudio-0101-alsa-ucm-Make-combination-ports-have-lower-priority.patch b/packages/audio/pulseaudio/patches/pulseaudio-0101-alsa-ucm-Make-combination-ports-have-lower-priority.patch new file mode 100644 index 0000000000..b6676c3c14 --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-0101-alsa-ucm-Make-combination-ports-have-lower-priority.patch @@ -0,0 +1,60 @@ +From 908deb136c46c17e5c42fd3a2767746c767d10eb Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Fri, 19 Jul 2013 16:38:16 +0200 +Subject: [PATCH] alsa-ucm: Make combination ports have lower priority + +Usually, you want to use one input or output at a time: e g, +you expect your speaker to mute when you plug in headphones. + +Therefore, the headphones+speaker port should have lower priority +and both headphones and speaker. + +A practical formula to do this is 1/x = 1/xa + 1/xb + .. + 1/xn. + +Signed-off-by: David Henningsson +--- + src/modules/alsa/alsa-ucm.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +Index: pulseaudio-4.0/src/modules/alsa/alsa-ucm.c +=================================================================== +--- pulseaudio-4.0.orig/src/modules/alsa/alsa-ucm.c 2013-08-23 11:20:00.365810574 +0200 ++++ pulseaudio-4.0/src/modules/alsa/alsa-ucm.c 2013-08-23 11:20:02.065810544 +0200 +@@ -654,6 +654,7 @@ + pa_device_port *port; + int i; + unsigned priority; ++ double prio2; + char *name, *desc; + const char *dev_name; + const char *direction; +@@ -667,6 +668,7 @@ + : pa_sprintf_malloc("Combination port for %s", dev_name); + + priority = is_sink ? dev->playback_priority : dev->capture_priority; ++ prio2 = (priority == 0 ? 0 : 1.0/priority); + + for (i = 1; i < num; i++) { + char *tmp; +@@ -682,10 +684,19 @@ + pa_xfree(desc); + desc = tmp; + +- /* FIXME: Is this true? */ +- priority += (is_sink ? dev->playback_priority : dev->capture_priority); ++ priority = is_sink ? dev->playback_priority : dev->capture_priority; ++ if (priority != 0 && prio2 > 0) ++ prio2 += 1.0/priority; + } + ++ /* Make combination ports always have lower priority, and use the formula ++ 1/p = 1/p1 + 1/p2 + ... 1/pn. ++ This way, the result will always be less than the individual components, ++ yet higher components will lead to higher result. */ ++ ++ if (num > 1) ++ priority = prio2 > 0 ? 1.0/prio2 : 0; ++ + port = pa_hashmap_get(ports, name); + if (!port) { + port = pa_device_port_new(core, pa_strna(name), desc, 0); diff --git a/packages/audio/pulseaudio/patches/pulseaudio-0102-combine-Fix-crash-in-output-freeing.patch b/packages/audio/pulseaudio/patches/pulseaudio-0102-combine-Fix-crash-in-output-freeing.patch new file mode 100644 index 0000000000..98dded29b4 --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-0102-combine-Fix-crash-in-output-freeing.patch @@ -0,0 +1,33 @@ +From 0e9baa429ea2620dbb11f4b3a26eaa46620a9124 Mon Sep 17 00:00:00 2001 +From: Tanu Kaskinen +Date: Tue, 18 Jun 2013 21:21:08 +0300 +Subject: [PATCH] combine: Fix crash in output freeing + +The outputs are removed from the idxset before output_free() is +called. Trying to remove them again in output_free(), and asserting +that it should succeed caused crashing whenever outputs were freed. + +This bug was introduced in commit +061878b5a47ed9aa05d12430b039874b63c29a84. + +BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=65901 +--- + src/modules/module-combine-sink.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/modules/module-combine-sink.c b/src/modules/module-combine-sink.c +index 7d660f0..faf65c2 100644 +--- a/src/modules/module-combine-sink.c ++++ b/src/modules/module-combine-sink.c +@@ -923,8 +923,6 @@ static void output_free(struct output *o) { + pa_assert(o); + + output_disable(o); +- +- pa_assert_se(pa_idxset_remove_by_data(o->userdata->outputs, o, NULL)); + update_description(o->userdata); + + if (o->inq_rtpoll_item_read) +-- +1.7.9.5 + diff --git a/packages/audio/pulseaudio/patches/pulseaudio-0103-resampler-Fix-peaks-resampler-s-channel-handling.patch b/packages/audio/pulseaudio/patches/pulseaudio-0103-resampler-Fix-peaks-resampler-s-channel-handling.patch new file mode 100644 index 0000000000..e7dc566495 --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-0103-resampler-Fix-peaks-resampler-s-channel-handling.patch @@ -0,0 +1,36 @@ +From 1470fc325a0f583813e625b2cfb53fb3907ccd72 Mon Sep 17 00:00:00 2001 +From: Tanu Kaskinen +Date: Wed, 10 Jul 2013 21:48:40 +0300 +Subject: [PATCH] resampler: Fix peaks resampler's channel handling + +In the resampling phase the input and output data have the same number +of channels (o_ss.channels). +--- + src/pulsecore/resampler.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c +index cdfaf8f..341d85b 100644 +--- a/src/pulsecore/resampler.c ++++ b/src/pulsecore/resampler.c +@@ -1526,7 +1526,7 @@ static void peaks_resample(pa_resampler *r, const pa_memchunk *input, unsigned i + o_index++, r->peaks.o_counter++; + } + } else if (r->work_format == PA_SAMPLE_S16NE) { +- int16_t *s = (int16_t*) src + r->i_ss.channels * i; ++ int16_t *s = (int16_t*) src + r->o_ss.channels * i; + int16_t *d = (int16_t*) dst + r->o_ss.channels * o_index; + + for (; i < i_end && i < in_n_frames; i++) +@@ -1545,7 +1545,7 @@ static void peaks_resample(pa_resampler *r, const pa_memchunk *input, unsigned i + o_index++, r->peaks.o_counter++; + } + } else { +- float *s = (float*) src + r->i_ss.channels * i; ++ float *s = (float*) src + r->o_ss.channels * i; + float *d = (float*) dst + r->o_ss.channels * o_index; + + for (; i < i_end && i < in_n_frames; i++) +-- +1.7.9.5 + diff --git a/packages/audio/pulseaudio/patches/pulseaudio-0104-default-system.pa-Do-not-load-module-dbus-protocol.patch b/packages/audio/pulseaudio/patches/pulseaudio-0104-default-system.pa-Do-not-load-module-dbus-protocol.patch new file mode 100644 index 0000000000..0ae2228145 --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-0104-default-system.pa-Do-not-load-module-dbus-protocol.patch @@ -0,0 +1,55 @@ +From dcb52b0844c21c7fe591ef1cfacafbda1df770f0 Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Fri, 27 Sep 2013 10:22:53 +0200 +Subject: [PATCH] default/system.pa: Do not load module-dbus-protocol + +The author of this module, Tanu Kaskinen, has said that this module +"is not suitable for general use". Also, it is still causing crashes +on card removal (see bug 69871). + +Qpaeq, and possibly other tools, use this module - but they can load +the module manually if they still wish to use it. + +Signed-off-by: David Henningsson +--- + src/daemon/default.pa.in | 7 ------- + src/daemon/system.pa.in | 5 ----- + 2 files changed, 12 deletions(-) + +diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in +index f50d929..4e77ae9 100755 +--- a/src/daemon/default.pa.in ++++ b/src/daemon/default.pa.in +@@ -171,13 +171,6 @@ load-module module-filter-heuristics + load-module module-filter-apply + ])dnl + +-ifelse(@HAVE_DBUS@, 1, [dnl +-### Load DBus protocol +-.ifexists module-dbus-protocol@PA_SOEXT@ +-load-module module-dbus-protocol +-.endif +-])dnl +- + ifelse(@HAVE_X11@, 1, [dnl + # X11 modules should not be started from default.pa so that one daemon + # can be shared by multiple sessions. +diff --git a/src/daemon/system.pa.in b/src/daemon/system.pa.in +index e881a12..6da880e 100755 +--- a/src/daemon/system.pa.in ++++ b/src/daemon/system.pa.in +@@ -52,11 +52,6 @@ load-module module-device-restore + ### that look up the default sink/source get the right value + load-module module-default-device-restore + +-.ifexists module-dbus-protocol@PA_SOEXT@ +-### If you want to allow TCP connections, set access to "remote" or "local,remote". +-load-module module-dbus-protocol access=local +-.endif +- + ### Automatically move streams to the default sink if the sink they are + ### connected to dies, similar for sources + load-module module-rescue-streams +-- +1.7.9.5 + diff --git a/packages/audio/pulseaudio/patches/pulseaudio-0202-dont-probe-ucm.patch b/packages/audio/pulseaudio/patches/pulseaudio-0202-dont-probe-ucm.patch new file mode 100644 index 0000000000..957e480f7e --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-0202-dont-probe-ucm.patch @@ -0,0 +1,14 @@ +Index: pulseaudio-4.0/src/modules/alsa/alsa-ucm.c +=================================================================== +--- pulseaudio-4.0.orig/src/modules/alsa/alsa-ucm.c 2013-08-13 15:32:15.968363587 +0200 ++++ pulseaudio-4.0/src/modules/alsa/alsa-ucm.c 2013-08-13 15:33:57.000362087 +0200 +@@ -1484,7 +1484,8 @@ + ucm_create_profile(ucm, ps, verb, verb_name, verb_desc); + } + +- ucm_probe_profile_set(ucm, ps); ++/* Just trust that the person writing the UCM file knows what (s)he was doing, right? */ ++/* ucm_probe_profile_set(ucm, ps); */ + ps->probed = TRUE; + + return ps; diff --git a/packages/audio/pulseaudio/patches/pulseaudio-0203-card-Add-hook-before-profile-changes.patch b/packages/audio/pulseaudio/patches/pulseaudio-0203-card-Add-hook-before-profile-changes.patch new file mode 100644 index 0000000000..3f6ba0d419 --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-0203-card-Add-hook-before-profile-changes.patch @@ -0,0 +1,40 @@ +From 3e04d944626ba4caee8a4d74a683c6c967e935ca Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Tue, 13 Aug 2013 12:43:29 +0200 +Subject: [PATCH 203/204] card: Add hook before profile changes + +This is useful to modules that want to do things just before a +profile becomes inactive. +--- + src/pulsecore/card.c | 2 ++ + src/pulsecore/core.h | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c +index 7cf45df..b58dfa7 100644 +--- a/src/pulsecore/card.c ++++ b/src/pulsecore/card.c +@@ -272,6 +272,8 @@ int pa_card_set_profile(pa_card *c, const char *name, pa_bool_t save) { + return 0; + } + ++ pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGING], profile); ++ + if ((r = c->set_profile(c, profile)) < 0) + return r; + +diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h +index a8cff5c..904b610 100644 +--- a/src/pulsecore/core.h ++++ b/src/pulsecore/core.h +@@ -115,6 +115,7 @@ typedef enum pa_core_hook { + PA_CORE_HOOK_CARD_PUT, + PA_CORE_HOOK_CARD_UNLINK, + PA_CORE_HOOK_CARD_PROFILE_CHANGED, ++ PA_CORE_HOOK_CARD_PROFILE_CHANGING, + PA_CORE_HOOK_CARD_PROFILE_ADDED, + PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED, + PA_CORE_HOOK_PORT_AVAILABLE_CHANGED, +-- +1.7.9.5 + diff --git a/packages/audio/pulseaudio/patches/pulseaudio-0900.01-never-append-dirty-to-server-module-version.patch b/packages/audio/pulseaudio/patches/pulseaudio-0900.01-never-append-dirty-to-server-module-version.patch new file mode 100644 index 0000000000..8bea8d95fb --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-0900.01-never-append-dirty-to-server-module-version.patch @@ -0,0 +1,24 @@ +From c9d7dcaa87f9ada49d75483a7c604dba27a0d71a Mon Sep 17 00:00:00 2001 +From: Stefan Saraev +Date: Tue, 7 Jan 2014 13:22:48 +0200 +Subject: [PATCH] never append -dirty to server/module version + +--- + git-version-gen | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/git-version-gen b/git-version-gen +index 9d65b80..fcf11fd 100755 +--- a/git-version-gen ++++ b/git-version-gen +@@ -152,6 +152,7 @@ v=`echo "$v" |sed 's/^v//'` + git status > /dev/null 2>&1 + + dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= ++dirty= + case "$dirty" in + '') ;; + *) # Append the suffix only if there isn't one already. +-- +1.7.2.5 + diff --git a/packages/audio/pulseaudio/profile.d/04-pulseaudio.conf b/packages/audio/pulseaudio/profile.d/04-pulseaudio.conf new file mode 100644 index 0000000000..0c72f573cb --- /dev/null +++ b/packages/audio/pulseaudio/profile.d/04-pulseaudio.conf @@ -0,0 +1 @@ +export SDL_AUDIODRIVER=pulse diff --git a/packages/audio/pulseaudio/system.d/pulseaudio.service b/packages/audio/pulseaudio/system.d/pulseaudio.service new file mode 100644 index 0000000000..7709483cdb --- /dev/null +++ b/packages/audio/pulseaudio/system.d/pulseaudio.service @@ -0,0 +1,14 @@ +[Unit] +Description=PulseAudio Sound System +After=syslog.target local-fs.target + +[Service] +Type=forking +ExecStart=/usr/bin/pulseaudio --start --daemonize --log-level +TimeoutStopSec=5 +Restart=always +RestartSec=2 +StartLimitInterval=0 + +[Install] +WantedBy=multi-user.target