summaryrefslogtreecommitdiff
path: root/package/pulseaudio
diff options
context:
space:
mode:
Diffstat (limited to 'package/pulseaudio')
-rw-r--r--package/pulseaudio/Makefile21
-rw-r--r--package/pulseaudio/files/client.conf2
-rw-r--r--package/pulseaudio/files/daemon.conf26
-rw-r--r--package/pulseaudio/files/pulseaudio.postinst2
-rw-r--r--package/pulseaudio/files/system.pa27
-rw-r--r--package/pulseaudio/patches/patch-src_pulsecore_native-common_h11
6 files changed, 76 insertions, 13 deletions
diff --git a/package/pulseaudio/Makefile b/package/pulseaudio/Makefile
index 4c7247c5c..578d382e2 100644
--- a/package/pulseaudio/Makefile
+++ b/package/pulseaudio/Makefile
@@ -5,16 +5,15 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= pulseaudio
PKG_VERSION:= 4.0
-PKG_RELEASE:= 3
+PKG_RELEASE:= 4
PKG_MD5SUM:= 591f211db2790a7e4d222f2dc6858db3
PKG_DESCR:= a sound system for POSIX OSes
PKG_SECTION:= multimedia
-PKG_DEPENDS:= libltdl json-c libsndfile libudev libspeex libncurses
-PKG_DEPENDS+= libflac libvorbis libogg libuuid libsndfile dbus
+PKG_DEPENDS:= libltdl json-c libsndfile libspeex libncurses
+PKG_DEPENDS+= libflac libvorbis libogg libuuid libsndfile
PKG_DEPENDS+= libgcc libpthread librt alsa-lib libsamplerate
-PKG_BUILDDEP:= libtool json-c libsndfile eudev speex libsndfile
-PKG_BUILDDEP+= flac libvorbis libogg util-linux dbus ncurses alsa-lib
-PKG_BUILDDEP+= libsamplerate
+PKG_BUILDDEP:= libtool json-c libsndfile speex libsamplerate
+PKG_BUILDDEP+= flac libvorbis libogg util-linux ncurses alsa-lib
PKG_URL:= http://www.freedesktop.org/wiki/Software/PulseAudio/
PKG_SITES:= http://freedesktop.org/software/pulseaudio/releases/
PKG_OPTS:= dev
@@ -42,18 +41,16 @@ CONFIGURE_ARGS+= --disable-systemd \
--disable-esound \
--disable-jack \
--disable-gconf \
+ --disable-udev \
+ --disable-dbus \
+ --disable-hal-compat \
--enable-samplerate \
--enable-alsa \
- --enable-dbus \
- --enable-udev \
--with-speex
pulseaudio-install:
- $(INSTALL_DIR) $(IDIR_PULSEAUDIO)/etc/dbus-1
- $(CP) $(WRKINST)/etc/dbus-1/* \
- $(IDIR_PULSEAUDIO)/etc/dbus-1
$(INSTALL_DIR) $(IDIR_PULSEAUDIO)/etc/pulse
- $(CP) $(WRKINST)/etc/pulse/* \
+ $(CP) ./files/*.{conf,pa} \
$(IDIR_PULSEAUDIO)/etc/pulse
$(INSTALL_DIR) $(IDIR_PULSEAUDIO)/usr/bin
$(INSTALL_BIN) $(WRKINST)/usr/bin/* \
diff --git a/package/pulseaudio/files/client.conf b/package/pulseaudio/files/client.conf
new file mode 100644
index 000000000..8e4fa9f29
--- /dev/null
+++ b/package/pulseaudio/files/client.conf
@@ -0,0 +1,2 @@
+autospawn = no
+cookie-file = /var/run/pulse/cookie
diff --git a/package/pulseaudio/files/daemon.conf b/package/pulseaudio/files/daemon.conf
new file mode 100644
index 000000000..cfb58724d
--- /dev/null
+++ b/package/pulseaudio/files/daemon.conf
@@ -0,0 +1,26 @@
+daemonize = yes
+allow-module-loading = no
+allow-exit = no
+use-pid-file = yes
+high-priority = yes
+nice-level = -11
+fail = yes
+system-instance = yes
+enable-shm = no
+realtime-scheduling = yes
+realtime-priority = 5
+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-level = error
+log-time = yes
+; default-sample-format = s16le
+; default-sample-rate = 44100
+; alternate-sample-rate = 48000
+; default-sample-channels = 2
+; default-channel-map = front-left,front-right
+
+; default-fragments = 4
+; default-fragment-size-msec = 25
diff --git a/package/pulseaudio/files/pulseaudio.postinst b/package/pulseaudio/files/pulseaudio.postinst
index b339de93f..0ec666ee5 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 "-D --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 --realtime=false"
+add_rcconf pulseaudio_flags pulseaudio_flags ""
diff --git a/package/pulseaudio/files/system.pa b/package/pulseaudio/files/system.pa
new file mode 100644
index 000000000..035f4a6db
--- /dev/null
+++ b/package/pulseaudio/files/system.pa
@@ -0,0 +1,27 @@
+#!/usr/bin/pulseaudio -nF
+
+load-module module-native-protocol-unix
+
+### Automatically restore the volume of streams and devices
+load-module module-stream-restore
+load-module module-device-restore
+
+### Automatically restore the default sink/source when changed by the user
+### during runtime
+### NOTE: This should be loaded as early as possible so that subsequent modules
+### that look up the default sink/source get the right value
+load-module module-default-device-restore
+
+### Automatically move streams to the default sink if the sink they are
+### connected to dies, similar for sources
+load-module module-rescue-streams
+
+### Make sure we always have a sink around, even if it is a null sink.
+load-module module-always-sink
+
+### Enable positioned event sounds
+load-module module-position-event-sounds
+
+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
+
diff --git a/package/pulseaudio/patches/patch-src_pulsecore_native-common_h b/package/pulseaudio/patches/patch-src_pulsecore_native-common_h
new file mode 100644
index 000000000..9502a370e
--- /dev/null
+++ b/package/pulseaudio/patches/patch-src_pulsecore_native-common_h
@@ -0,0 +1,11 @@
+--- pulseaudio-4.0.orig/src/pulsecore/native-common.h 2012-09-26 13:27:01.000000000 +0200
++++ pulseaudio-4.0/src/pulsecore/native-common.h 2014-01-21 12:19:09.178012326 +0100
+@@ -180,7 +180,7 @@ enum {
+ };
+
+ #define PA_NATIVE_COOKIE_LENGTH 256
+-#define PA_NATIVE_COOKIE_FILE ".config/pulse/cookie"
++#define PA_NATIVE_COOKIE_FILE "cookie"
+ #define PA_NATIVE_COOKIE_FILE_FALLBACK ".pulse-cookie"
+
+ #define PA_NATIVE_DEFAULT_PORT 4713