diff options
Diffstat (limited to 'package/pulseaudio')
-rw-r--r-- | package/pulseaudio/Makefile | 74 | ||||
-rw-r--r-- | package/pulseaudio/files/client.conf | 2 | ||||
-rw-r--r-- | package/pulseaudio/files/daemon.conf | 22 | ||||
-rw-r--r-- | package/pulseaudio/files/pulseaudio.init | 36 | ||||
-rw-r--r-- | package/pulseaudio/files/pulseaudio.postinst | 7 | ||||
-rw-r--r-- | package/pulseaudio/files/system.pa | 45 | ||||
-rw-r--r-- | package/pulseaudio/patches/patch-src_pulsecore_native-common_h | 11 |
7 files changed, 197 insertions, 0 deletions
diff --git a/package/pulseaudio/Makefile b/package/pulseaudio/Makefile new file mode 100644 index 000000000..f1cf961e1 --- /dev/null +++ b/package/pulseaudio/Makefile @@ -0,0 +1,74 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= pulseaudio +PKG_VERSION:= 4.0 +PKG_RELEASE:= 5 +PKG_MD5SUM:= 591f211db2790a7e4d222f2dc6858db3 +PKG_DESCR:= a sound system for POSIX OSes +PKG_SECTION:= multimedia +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 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 + +PKG_LIBC_DEPENDS:= uclibc eglibc glibc + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,PULSEAUDIO,pulseaudio,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) + +TARGET_CPPFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE +CONFIGURE_ARGS+= --disable-systemd \ + --disable-manpages \ + --disable-neon-opt \ + --disable-x11 \ + --disable-avahi \ + --disable-lirc \ + --disable-openssl \ + --disable-orc \ + --disable-tcpwrap \ + --disable-oss-output \ + --disable-oss-wrapper \ + --disable-esound \ + --disable-jack \ + --disable-gconf \ + --disable-udev \ + --disable-dbus \ + --disable-hal-compat \ + --enable-samplerate \ + --enable-alsa \ + --with-speex \ + --with-access-group=audio + +pulseaudio-install: + $(INSTALL_DIR) $(IDIR_PULSEAUDIO)/etc/pulse + $(CP) ./files/*.{conf,pa} \ + $(IDIR_PULSEAUDIO)/etc/pulse + $(INSTALL_DIR) $(IDIR_PULSEAUDIO)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/bin/* \ + $(IDIR_PULSEAUDIO)/usr/bin + $(INSTALL_DIR) $(IDIR_PULSEAUDIO)/usr/lib + $(CP) $(WRKINST)/usr/lib/libpulse*.so* \ + $(IDIR_PULSEAUDIO)/usr/lib + $(INSTALL_DIR) $(IDIR_PULSEAUDIO)/usr/lib/pulseaudio + $(CP) $(WRKINST)/usr/lib/pulseaudio/libpulse*.so* \ + $(IDIR_PULSEAUDIO)/usr/lib/pulseaudio + $(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/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..760e5299f --- /dev/null +++ b/package/pulseaudio/files/daemon.conf @@ -0,0 +1,22 @@ +daemonize = no +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 = 9 +resample-method = src-sinc-fastest +exit-idle-time = -1 +load-default-script-file = yes +default-script-file = /etc/pulse/system.pa +log-target = stderr +log-level = 1 +log-time = yes +default-sample-rate = 44100 +resample-method = src-sinc-fastest +default-fragments = 10 +default-fragment-size-msec = 10 diff --git a/package/pulseaudio/files/pulseaudio.init b/package/pulseaudio/files/pulseaudio.init new file mode 100644 index 000000000..584a42350 --- /dev/null +++ b/package/pulseaudio/files/pulseaudio.init @@ -0,0 +1,36 @@ +#!/bin/sh +#PKG pulseaudio +#INIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${pulseaudio:-NO}" = x"NO" && exit 0 + 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 + chown pulse /etc/pulse + env PULSE_STATE_PATH=/etc/pulse/state /usr/bin/pulseaudio $pulseaudio_flags + ;; +stop) + kill $(pgrep -f /usr/bin/pulseaudio) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "usage: $0 {start | stop | restart}" + exit 1 +esac +exit $? diff --git a/package/pulseaudio/files/pulseaudio.postinst b/package/pulseaudio/files/pulseaudio.postinst new file mode 100644 index 000000000..e1ef8dfd1 --- /dev/null +++ b/package/pulseaudio/files/pulseaudio.postinst @@ -0,0 +1,7 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +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 --log-target=syslog" diff --git a/package/pulseaudio/files/system.pa b/package/pulseaudio/files/system.pa new file mode 100644 index 000000000..693db412b --- /dev/null +++ b/package/pulseaudio/files/system.pa @@ -0,0 +1,45 @@ +#!/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 + +# 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 + +# configure as a rtp receiver and 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 loop=1 +#load-module module-alsa-sink device=hw:0,0 sink_name=alsa +#load-module module-rtp-recv sap_address=224.0.0.56 sink=alsa + +# configure combine-sink (echo in the same room) +#load-module module-alsa-sink device=hw:0,0 sink_name=alsa +#load-module module-combine-sink slaves=rtp,alsa + +# configure as a rtp receiver +load-module module-rtp-recv sap_address=224.0.0.56 +load-module module-alsa-sink device=hw:0,0 + 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 |