[oe] [PATCH v2] pulseaudio: Run as system-wide instance instead of per-user

Paul Menzel paulepanter at users.sourceforge.net
Thu Jul 7 07:00:18 UTC 2011


Dear Joel,


Am Donnerstag, den 07.07.2011, 00:38 -0500 schrieb Joel A Fernandes:
> * Pulseaudio running as per-user is opening audio devices and blocking everyone else from getting access
>   to the device. The problem is it doesn't even seem to be allowing applications to connect to it, this
>   patch starts it up in system mode instead which is tested and known to work

thank you for the patch. Could you post your error and check with the
PulseAudio guys what the cause is? There are very responsive on their
mailing list, which moved to freedesktop.org recently.

As far as I understood system mode can sometimes be the right thing to
do but most of the time it is just a configuration error. Running PA and
printing out the debug messages should give you a clue.

> Signed-off-by: Joel A Fernandes <agnel.joel at gmail.com>
> ---
> Changes since earlier version:
>  Sorry I didn't bump the PR! Resending it again
> 
>  .../pulseaudio-system-mode-startup.sh              |    4 ++++
>  recipes/pulseaudio/pulseaudio_0.9.22.bb            |   17 ++++++++++++++++-
>  2 files changed, 20 insertions(+), 1 deletions(-)
>  create mode 100755 recipes/pulseaudio/pulseaudio-0.9.21/pulseaudio-system-mode-startup.sh
> 
> diff --git a/recipes/pulseaudio/pulseaudio-0.9.21/pulseaudio-system-mode-startup.sh b/recipes/pulseaudio/pulseaudio-0.9.21/pulseaudio-system-mode-startup.sh
> new file mode 100755
> index 0000000..528ceb9
> --- /dev/null
> +++ b/recipes/pulseaudio/pulseaudio-0.9.21/pulseaudio-system-mode-startup.sh
> @@ -0,0 +1,4 @@
> +#!/bin/sh
> +
> +echo "Starting Pulseaudio in system mode.."
> +pulseaudio --log-target=syslog --system
> diff --git a/recipes/pulseaudio/pulseaudio_0.9.22.bb b/recipes/pulseaudio/pulseaudio_0.9.22.bb
> index 2368829..1bc6816 100644
> --- a/recipes/pulseaudio/pulseaudio_0.9.22.bb
> +++ b/recipes/pulseaudio/pulseaudio_0.9.22.bb
> @@ -1,6 +1,6 @@
>  require pulseaudio.inc
>  
> -PR = ${INC_PR}.2
> +PR = ${INC_PR}.3
>  
>  DEPENDS += "gdbm speex"
>  
> @@ -12,6 +12,10 @@ FILESPATHPKG =. "pulseaudio-0.9.21:"
>  
>  inherit gettext
>  
> +inherit update-rc.d
> +INITSCRIPT_NAME = "pulseaudio.sh"
> +INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
> +
>  #SRC_URI += "\
>  #  file://buildfix.patch \
>  #  file://autoconf_version.patch \
> @@ -27,6 +31,7 @@ SRC_URI += "\
>    file://armv4+v5asm.patch \
>    file://fixbluezbuild.patch \
>    file://ubacktrace.patch \
> +  file://pulseaudio-system-mode-startup.sh \
>  "
>  
>  #do_compile_prepend() {
> @@ -37,3 +42,13 @@ SRC_URI += "\
>  
>  SRC_URI[md5sum] = "ca85ab470669b05e100861654cf5eb3c"
>  SRC_URI[sha256sum] = "c6019324395117a258c048a6db5e9734551cc2c61dc35b46403ff00d64be55f0"
> +
> +do_install_append() {
> +  # init script to start pulseaudio system-wide
> +  install -d ${D}/${sysconfdir}/init.d/
> +  install -m 0755 ${WORKDIR}/pulseaudio-system-mode-startup.sh ${D}/${sysconfdir}/init.d/pulseaudio.sh

If I remember correctly that is configurable in the config files for PA
under `/etc/pulse/`.

> +  # Disable startup of pulseaudio as a per-user instance
> +  chmod -x ${D}/${bindir}/start-pulseaudio-x11

Is that needed? It is an unexpected change for the user having to find
out that s/he has to make a program under `/usr/bin/` executable to run
it.

> +}
> +

Please do not add empty lines.


Thanks,

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20110707/a658f66a/attachment-0002.sig>


More information about the Openembedded-devel mailing list