summaryrefslogtreecommitdiff
path: root/package/pulseaudio
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-01-26 12:40:29 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-01-26 12:40:29 +0100
commit998d7aefadfd52bf283bebb5f2c6e83e86c9ec80 (patch)
tree5ec2efe4c9fe1016dd5c22295da68d71a834fd28 /package/pulseaudio
parentc9969f1e6f1b363a9d32c9baf32dc9c012fd3a27 (diff)
fix pacmd, finetune startup behavior
Diffstat (limited to 'package/pulseaudio')
-rw-r--r--package/pulseaudio/Makefile10
-rw-r--r--package/pulseaudio/files/daemon.conf4
-rw-r--r--package/pulseaudio/files/pulseaudio.init12
-rw-r--r--package/pulseaudio/files/pulseaudio.postinst2
-rw-r--r--package/pulseaudio/files/system.pa3
5 files changed, 22 insertions, 9 deletions
diff --git a/package/pulseaudio/Makefile b/package/pulseaudio/Makefile
index 578d382e2..f1cf961e1 100644
--- a/package/pulseaudio/Makefile
+++ b/package/pulseaudio/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= pulseaudio
PKG_VERSION:= 4.0
-PKG_RELEASE:= 4
+PKG_RELEASE:= 5
PKG_MD5SUM:= 591f211db2790a7e4d222f2dc6858db3
PKG_DESCR:= a sound system for POSIX OSes
PKG_SECTION:= multimedia
@@ -46,7 +46,8 @@ CONFIGURE_ARGS+= --disable-systemd \
--disable-hal-compat \
--enable-samplerate \
--enable-alsa \
- --with-speex
+ --with-speex \
+ --with-access-group=audio
pulseaudio-install:
$(INSTALL_DIR) $(IDIR_PULSEAUDIO)/etc/pulse
@@ -64,5 +65,10 @@ pulseaudio-install:
$(INSTALL_DIR) $(IDIR_PULSEAUDIO)/usr/lib/pulse-$(PKG_VERSION)/modules
$(CP) $(WRKINST)/usr/lib/pulse-$(PKG_VERSION)/modules/*.so \
$(IDIR_PULSEAUDIO)/usr/lib/pulse-$(PKG_VERSION)/modules
+ # pa uses $HOME from root user otherwise
+ mv $(IDIR_PULSEAUDIO)/usr/bin/pacmd $(IDIR_PULSEAUDIO)/usr/bin/pacmd.bin
+ echo "#!/bin/sh" > $(IDIR_PULSEAUDIO)/usr/bin/pacmd
+ echo 'PULSE_RUNTIME_PATH=/var/run/pulse pacmd.bin "$$@"' >> $(IDIR_PULSEAUDIO)/usr/bin/pacmd
+ chmod 755 $(IDIR_PULSEAUDIO)/usr/bin/pacmd
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/pulseaudio/files/daemon.conf b/package/pulseaudio/files/daemon.conf
index 69de9fdc6..760e5299f 100644
--- a/package/pulseaudio/files/daemon.conf
+++ b/package/pulseaudio/files/daemon.conf
@@ -1,4 +1,4 @@
-daemonize = yes
+daemonize = no
allow-module-loading = no
allow-exit = no
use-pid-file = yes
@@ -13,7 +13,7 @@ resample-method = src-sinc-fastest
exit-idle-time = -1
load-default-script-file = yes
default-script-file = /etc/pulse/system.pa
-log-target = syslog
+log-target = stderr
log-level = 1
log-time = yes
default-sample-rate = 44100
diff --git a/package/pulseaudio/files/pulseaudio.init b/package/pulseaudio/files/pulseaudio.init
index f928e3fe6..584a42350 100644
--- a/package/pulseaudio/files/pulseaudio.init
+++ b/package/pulseaudio/files/pulseaudio.init
@@ -10,13 +10,17 @@ autostart)
exec sh $0 start
;;
start)
+ # check group membership
+ id pulse | grep audio >/dev/null 2>&1
+ if [ $? -ne 0 ];then
+ echo "pulse user must be in group audio."
+ exit 1
+ fi
if [ ! -d /var/run/pulse ]; then
mkdir -p /var/run/pulse/ && chown -R pulse.pulse /var/run/pulse && chmod 750 /var/run/pulse
fi
- if [ ! -d /var/lib/pulse ]; then
- mkdir -p /var/lib/pulse/.pulse-cookie && chown -R pulse.pulse /var/lib/pulse && chmod 750 /var/lib/pulse
- fi
- /usr/bin/pulseaudio $pulseaudio_flags
+ chown pulse /etc/pulse
+ env PULSE_STATE_PATH=/etc/pulse/state /usr/bin/pulseaudio $pulseaudio_flags
;;
stop)
kill $(pgrep -f /usr/bin/pulseaudio)
diff --git a/package/pulseaudio/files/pulseaudio.postinst b/package/pulseaudio/files/pulseaudio.postinst
index 0ec666ee5..e1ef8dfd1 100644
--- a/package/pulseaudio/files/pulseaudio.postinst
+++ b/package/pulseaudio/files/pulseaudio.postinst
@@ -4,4 +4,4 @@ add_rcconf pulseaudio pulseaudio NO
gid=$(get_next_gid)
add_user pulse $(get_next_uid) $gid /var/run/pulse
add_group pulse $gid
-add_rcconf pulseaudio_flags pulseaudio_flags ""
+add_rcconf pulseaudio_flags pulseaudio_flags "-D --log-target=syslog"
diff --git a/package/pulseaudio/files/system.pa b/package/pulseaudio/files/system.pa
index 671ddbec1..693db412b 100644
--- a/package/pulseaudio/files/system.pa
+++ b/package/pulseaudio/files/system.pa
@@ -22,6 +22,9 @@ load-module module-always-sink
### Enable positioned event sounds
load-module module-position-event-sounds
+# pacmd communication
+load-module module-cli-protocol-unix socket=/var/run/pulse/cli
+
# configure as a rtp sender
#load-module module-null-sink sink_name=rtp format=s16be channels=2
#load-module module-rtp-send source=rtp.monitor destination=224.0.0.56