Răsfoiți Sursa

add minimal example configs

Waldemar Brodkorb 11 ani în urmă
părinte
comite
e31358b576

+ 11 - 13
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
@@ -37,22 +36,21 @@ CONFIGURE_ARGS+=	--disable-systemd \
 			--disable-openssl \
 			--disable-orc \
 			--disable-libwrap \
-			--disable-oss \
+			--disable-oss-wrapper \
+			--disable-oss-output \
 			--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/* \

+ 2 - 0
package/pulseaudio/files/client.conf

@@ -0,0 +1,2 @@
+autospawn = no
+cookie-file = /var/run/pulse/cookie

+ 26 - 0
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

+ 1 - 1
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 ""

+ 27 - 0
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
+

+ 11 - 0
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