diff options
-rw-r--r-- | configure.ac | 95 | ||||
-rw-r--r-- | src/Makefile.am | 170 | ||||
-rwxr-xr-x | src/daemon/default.pa.in | 2 | ||||
-rw-r--r-- | src/modules/alsa/alsa-sink.c | 62 | ||||
-rw-r--r-- | src/modules/alsa/alsa-source.c | 4 | ||||
-rw-r--r-- | src/modules/bluetooth/bluetooth-util.c | 2 | ||||
-rw-r--r-- | src/modules/bluetooth/bluetooth-util.h | 16 | ||||
-rw-r--r-- | src/modules/bluetooth/sbc.c | 8 | ||||
-rw-r--r-- | src/modules/module-loopback.c | 27 | ||||
-rw-r--r-- | src/modules/module-tunnel.c | 4 | ||||
-rw-r--r-- | src/modules/module-udev-detect.c | 2 | ||||
-rw-r--r-- | src/pulse/stream.c | 4 | ||||
-rw-r--r-- | src/pulsecore/asyncq.c | 2 | ||||
-rw-r--r-- | src/pulsecore/core-util.c | 4 | ||||
-rw-r--r-- | src/pulsecore/dbus-util.c | 7 | ||||
-rw-r--r-- | src/pulsecore/flist.c | 6 | ||||
-rw-r--r-- | src/pulsecore/flist.h | 4 | ||||
-rw-r--r-- | src/pulsecore/log.c | 4 | ||||
-rw-r--r-- | src/pulsecore/log.h | 2 | ||||
-rw-r--r-- | src/pulsecore/memblock.c | 2 | ||||
-rw-r--r-- | src/pulsecore/protocol-native.c | 60 | ||||
-rw-r--r-- | src/pulsecore/pstream.c | 2 | ||||
-rw-r--r-- | src/pulsecore/ratelimit.c | 4 | ||||
-rw-r--r-- | src/pulsecore/ratelimit.h | 3 | ||||
-rw-r--r-- | src/pulsecore/sink.c | 35 | ||||
-rw-r--r-- | src/utils/padsp.c | 61 |
26 files changed, 359 insertions, 233 deletions
diff --git a/configure.ac b/configure.ac index 5216c01d..0cffdc12 100644 --- a/configure.ac +++ b/configure.ac @@ -1188,28 +1188,6 @@ AC_SUBST(UDEV_LIBS) AC_SUBST(HAVE_UDEV) AM_CONDITIONAL([HAVE_UDEV], [test "x$HAVE_UDEV" = x1]) -#### HAL compat support (optional) #### - -AC_ARG_ENABLE([hal-compat], - AS_HELP_STRING([--disable-hal-compat],[Disable optional HAL->udev transition compatibility support]), - [ - case "${enableval}" in - yes) halcompat=yes ;; - no) halcompat=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal-compat) ;; - esac - ], - [halcompat=auto]) -if test "x${halcompat}" != xno -a "x$HAVE_HAL" = "x0" -a "x$HAVE_UDEV" = "x1" ; then - HAVE_HAL_COMPAT=1 - AC_DEFINE([HAVE_HAL_COMPAT], 1, [Have HAL compatibility.]) -else - HAVE_HAL_COMPAT=0 -fi - -AC_SUBST(HAVE_HAL_COMPAT) -AM_CONDITIONAL([HAVE_HAL_COMPAT], [test "x$HAVE_HAL_COMPAT" = x1]) - #### BlueZ support (optional) #### AC_ARG_ENABLE([bluez], @@ -1253,11 +1231,7 @@ AC_ARG_ENABLE([dbus], ], [dbus=auto]) -if test "x$HAVE_HAL" = x1 ; then - dbus=yes -fi - -if test "x${dbus}" != xno || test "x${bluez}" != xno || test "x${hal}" != xno ; then +if test "x${dbus}" != xno ; then PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.0.0 ], [ @@ -1284,6 +1258,43 @@ AC_SUBST(DBUS_LIBS) AC_SUBST(HAVE_DBUS) AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1]) + +# udev and HAL depend on DBUS: So double check if they were explicitly enabled. +if test "x$HAVE_DBUS" != "x1" ; then + HAVE_HAL=0 + if test "x${hal}" = xyes ; then + AC_MSG_ERROR([*** D-Bus support is required by HAL]) + fi + + HAVE_BLUEZ=0 + if test "x${bluez}" = xyes ; then + AC_MSG_ERROR([*** D-Bus support is required by BLUEZ]) + fi +fi + + +#### HAL compat support (optional) #### + +AC_ARG_ENABLE([hal-compat], + AS_HELP_STRING([--disable-hal-compat],[Disable optional HAL->udev transition compatibility support]), + [ + case "${enableval}" in + yes) halcompat=yes ;; + no) halcompat=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-hal-compat) ;; + esac + ], + [halcompat=auto]) +if test "x${halcompat}" != xno -a "x$HAVE_HAL" = "x0" -a "x$HAVE_UDEV" = "x1" ; then + HAVE_HAL_COMPAT=1 + AC_DEFINE([HAVE_HAL_COMPAT], 1, [Have HAL compatibility.]) +else + HAVE_HAL_COMPAT=0 +fi + +AC_SUBST(HAVE_HAL_COMPAT) +AM_CONDITIONAL([HAVE_HAL_COMPAT], [test "x$HAVE_HAL_COMPAT" = x1]) + ### IPv6 connection support (optional) ### AC_ARG_ENABLE([ipv6], @@ -1669,10 +1680,10 @@ echo " Enable Async DNS: ${ENABLE_LIBASYNCNS} Enable LIRC: ${ENABLE_LIRC} Enable DBUS: ${ENABLE_DBUS} - Enable HAL: ${ENABLE_HAL} + Enable HAL: ${ENABLE_HAL} + Enable BlueZ: ${ENABLE_BLUEZ} Enable udev: ${ENABLE_UDEV} - Enable HAL->udev compat: ${ENABLE_HAL_COMPAT} - Enable BlueZ: ${ENABLE_BLUEZ} + Enable HAL->udev compat: ${ENABLE_HAL_COMPAT} Enable TCP Wrappers: ${ENABLE_TCPWRAP} Enable libsamplerate: ${ENABLE_LIBSAMPLERATE} Enable IPv6: ${ENABLE_IPV6} @@ -1690,3 +1701,27 @@ echo " Force preopen: ${FORCE_PREOPEN} Preopened modules: ${PREOPEN_MODS} " + +if test "${ENABLE_DBUS}" = "no" ; then + echo " +===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING ===== +You do not have DBUS support enabled. It is strongly recommended +that you enable DBUS support if you platform supports it. +Many parts of PulseAudio use udev, from Console Kit interaction +to the Device Reservation Protocol to speak to JACK, Bluetooth +support and even a native control protocol for communicating and +controling the PulseAudio daemon itself. +===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING ===== +" +fi + +if test "${ENABLE_UDEV}" = "no" ; then + echo " +===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING ===== +You do not have udev support enabled. It is strongly recommended +that you enable udev support if you platform supports it as it is +the primary method used to detect hardware audio devices (on Linux) +and is thus a critical part of PulseAudio on that platform. +===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING ===== +" +fi diff --git a/src/Makefile.am b/src/Makefile.am index 15a4644b..f67b2f68 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -106,6 +106,7 @@ endif FOREIGN_CFLAGS = -w MODULE_LDFLAGS = -module -disable-static -avoid-version $(LDFLAGS_NOUNDEFINED) +MODULE_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la ################################### # Extra files # @@ -1332,40 +1333,40 @@ $(SYMDEF_FILES): modules/module-defs.h.m4 module_simple_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c module_simple_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_SIMPLE $(AM_CFLAGS) module_simple_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS) -module_simple_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-simple.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_simple_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-simple.la module_simple_protocol_unix_la_SOURCES = modules/module-protocol-stub.c module_simple_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_SIMPLE $(AM_CFLAGS) module_simple_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS) -module_simple_protocol_unix_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-simple.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_simple_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-simple.la # CLI protocol module_cli_la_SOURCES = modules/module-cli.c module_cli_la_LDFLAGS = $(MODULE_LDFLAGS) -module_cli_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libcli.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_cli_la_LIBADD = $(MODULE_LIBADD) libcli.la module_cli_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c module_cli_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS) module_cli_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS) -module_cli_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-cli.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_cli_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-cli.la module_cli_protocol_unix_la_SOURCES = modules/module-protocol-stub.c module_cli_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_CLI $(AM_CFLAGS) module_cli_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS) -module_cli_protocol_unix_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-cli.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_cli_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-cli.la # HTTP protocol module_http_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c module_http_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_HTTP $(AM_CFLAGS) module_http_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS) -module_http_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-http.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_http_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-http.la module_http_protocol_unix_la_SOURCES = modules/module-protocol-stub.c module_http_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_HTTP $(AM_CFLAGS) module_http_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS) -module_http_protocol_unix_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-http.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_http_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-http.la # D-Bus protocol @@ -1383,149 +1384,149 @@ module_dbus_protocol_la_SOURCES = \ modules/dbus/module-dbus-protocol.c module_dbus_protocol_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) module_dbus_protocol_la_LDFLAGS = $(MODULE_LDFLAGS) -module_dbus_protocol_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_dbus_protocol_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) # Native protocol module_native_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c module_native_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_NATIVE $(AM_CFLAGS) module_native_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS) -module_native_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-native.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_native_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la module_native_protocol_unix_la_SOURCES = modules/module-protocol-stub.c module_native_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_NATIVE $(AM_CFLAGS) module_native_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS) -module_native_protocol_unix_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-native.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_native_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la module_native_protocol_fd_la_SOURCES = modules/module-native-protocol-fd.c module_native_protocol_fd_la_CFLAGS = $(AM_CFLAGS) module_native_protocol_fd_la_LDFLAGS = $(MODULE_LDFLAGS) -module_native_protocol_fd_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-native.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_native_protocol_fd_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la # EsounD protocol module_esound_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c module_esound_protocol_tcp_la_CFLAGS = -DUSE_TCP_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS) module_esound_protocol_tcp_la_LDFLAGS = $(MODULE_LDFLAGS) -module_esound_protocol_tcp_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-esound.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_esound_protocol_tcp_la_LIBADD = $(MODULE_LIBADD) libprotocol-esound.la module_esound_protocol_unix_la_SOURCES = modules/module-protocol-stub.c module_esound_protocol_unix_la_CFLAGS = -DUSE_UNIX_SOCKETS -DUSE_PROTOCOL_ESOUND $(AM_CFLAGS) module_esound_protocol_unix_la_LDFLAGS = $(MODULE_LDFLAGS) -module_esound_protocol_unix_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libprotocol-esound.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_esound_protocol_unix_la_LIBADD = $(MODULE_LIBADD) libprotocol-esound.la module_esound_compat_spawnfd_la_SOURCES = modules/module-esound-compat-spawnfd.c module_esound_compat_spawnfd_la_LDFLAGS = $(MODULE_LDFLAGS) -module_esound_compat_spawnfd_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_esound_compat_spawnfd_la_LIBADD = $(MODULE_LIBADD) module_esound_compat_spawnpid_la_SOURCES = modules/module-esound-compat-spawnpid.c module_esound_compat_spawnpid_la_LDFLAGS = $(MODULE_LDFLAGS) -module_esound_compat_spawnpid_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_esound_compat_spawnpid_la_LIBADD = $(MODULE_LIBADD) module_esound_sink_la_SOURCES = modules/module-esound-sink.c module_esound_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_esound_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_esound_sink_la_LIBADD = $(MODULE_LIBADD) # Pipes module_pipe_sink_la_SOURCES = modules/module-pipe-sink.c module_pipe_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_pipe_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_pipe_sink_la_LIBADD = $(MODULE_LIBADD) module_pipe_source_la_SOURCES = modules/module-pipe-source.c module_pipe_source_la_LDFLAGS = $(MODULE_LDFLAGS) -module_pipe_source_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_pipe_source_la_LIBADD = $(MODULE_LIBADD) # Fake sources/sinks module_sine_la_SOURCES = modules/module-sine.c module_sine_la_LDFLAGS = $(MODULE_LDFLAGS) -module_sine_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_sine_la_LIBADD = $(MODULE_LIBADD) module_null_sink_la_SOURCES = modules/module-null-sink.c module_null_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_null_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_null_sink_la_LIBADD = $(MODULE_LIBADD) module_sine_source_la_SOURCES = modules/module-sine-source.c module_sine_source_la_LDFLAGS = -module -avoid-version -module_sine_source_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_sine_source_la_LIBADD = $(MODULE_LIBADD) # Couplings module_combine_la_SOURCES = modules/module-combine.c module_combine_la_LDFLAGS = $(MODULE_LDFLAGS) -module_combine_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_combine_la_LIBADD = $(MODULE_LIBADD) module_remap_sink_la_SOURCES = modules/module-remap-sink.c module_remap_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_remap_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_remap_sink_la_LIBADD = $(MODULE_LIBADD) module_ladspa_sink_la_SOURCES = modules/module-ladspa-sink.c modules/ladspa.h module_ladspa_sink_la_CFLAGS = -DLADSPA_PATH=\"$(libdir)/ladspa:/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/local/lib64/ladspa:/usr/lib64/ladspa\" $(AM_CFLAGS) module_ladspa_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_ladspa_sink_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_ladspa_sink_la_LIBADD = $(MODULE_LIBADD) $(LIBLTDL) module_equalizer_sink_la_SOURCES = modules/module-equalizer-sink.c module_equalizer_sink_la_CFLAGS = $(AM_CFLAGS) $(FFTW_CFLAGS) module_equalizer_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_equalizer_sink_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) $(FFTW_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_equalizer_sink_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) $(FFTW_LIBS) module_match_la_SOURCES = modules/module-match.c module_match_la_LDFLAGS = $(MODULE_LDFLAGS) -module_match_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_match_la_LIBADD = $(MODULE_LIBADD) module_tunnel_sink_la_SOURCES = modules/module-tunnel.c module_tunnel_sink_la_CFLAGS = -DTUNNEL_SINK=1 $(AM_CFLAGS) module_tunnel_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_tunnel_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_tunnel_sink_la_LIBADD = $(MODULE_LIBADD) module_tunnel_source_la_SOURCES = modules/module-tunnel.c module_tunnel_source_la_LDFLAGS = $(MODULE_LDFLAGS) -module_tunnel_source_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_tunnel_source_la_LIBADD = $(MODULE_LIBADD) module_loopback_la_SOURCES = modules/module-loopback.c module_loopback_la_LDFLAGS = $(MODULE_LDFLAGS) -module_loopback_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_loopback_la_LIBADD = $(MODULE_LIBADD) module_virtual_sink_la_SOURCES = modules/module-virtual-sink.c module_virtual_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_virtual_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_virtual_sink_la_LIBADD = $(MODULE_LIBADD) module_virtual_source_la_SOURCES = modules/module-virtual-source.c module_virtual_source_la_LDFLAGS = $(MODULE_LDFLAGS) -module_virtual_source_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_virtual_source_la_LIBADD = $(MODULE_LIBADD) # X11 module_x11_bell_la_SOURCES = modules/x11/module-x11-bell.c module_x11_bell_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS) module_x11_bell_la_LDFLAGS = $(MODULE_LDFLAGS) -module_x11_bell_la_LIBADD = $(AM_LIBADD) $(X11_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_x11_bell_la_LIBADD = $(MODULE_LIBADD) $(X11_LIBS) module_x11_publish_la_SOURCES = modules/x11/module-x11-publish.c module_x11_publish_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS) module_x11_publish_la_LDFLAGS = $(MODULE_LDFLAGS) -module_x11_publish_la_LIBADD = $(AM_LIBADD) $(X11_LIBS) libprotocol-native.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_x11_publish_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la $(X11_LIBS) module_x11_xsmp_la_SOURCES = modules/x11/module-x11-xsmp.c module_x11_xsmp_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS) module_x11_xsmp_la_LDFLAGS = $(MODULE_LDFLAGS) -module_x11_xsmp_la_LIBADD = $(AM_LIBADD) $(X11_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_x11_xsmp_la_LIBADD = $(MODULE_LIBADD) $(X11_LIBS) module_x11_cork_request_la_SOURCES = modules/x11/module-x11-cork-request.c module_x11_cork_request_la_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS) module_x11_cork_request_la_LDFLAGS = $(MODULE_LDFLAGS) -module_x11_cork_request_la_LIBADD = $(AM_LIBADD) $(X11_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_x11_cork_request_la_LIBADD = $(MODULE_LIBADD) $(X11_LIBS) # OSS liboss_util_la_SOURCES = modules/oss/oss-util.c modules/oss/oss-util.h liboss_util_la_LDFLAGS = -avoid-version -liboss_util_la_LIBADD = libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +liboss_util_la_LIBADD = $(MODULE_LIBADD) module_oss_la_SOURCES = modules/oss/module-oss.c module_oss_la_LDFLAGS = $(MODULE_LDFLAGS) -module_oss_la_LIBADD = $(AM_LIBADD) liboss-util.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_oss_la_LIBADD = $(MODULE_LIBADD) liboss-util.la # COREAUDIO @@ -1533,18 +1534,19 @@ module_coreaudio_detect_la_SOURCES = modules/coreaudio/module-coreaudio-detect.c module_coreaudio_detect_la_LDFLAGS = $(MODULE_LDFLAGS) \ -Wl,-framework -Wl,Cocoa -framework CoreAudio \ -Wl,-framework -Wl,AudioUnit -framework AudioUnit -module_coreaudio_detect_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_coreaudio_detect_la_LIBADD = $(MODULE_LIBADD) module_coreaudio_device_la_SOURCES = modules/coreaudio/module-coreaudio-device.c module_coreaudio_device_la_LDFLAGS = $(MODULE_LDFLAGS) \ -Wl,-framework -Wl,Cocoa -framework CoreAudio \ -Wl,-framework -Wl,AudioUnit -framework AudioUnit -module_coreaudio_device_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_coreaudio_device_la_LIBADD = $(MODULE_LIBADD) + # ALSA libalsa_util_la_SOURCES = modules/alsa/alsa-util.c modules/alsa/alsa-util.h modules/alsa/alsa-mixer.c modules/alsa/alsa-mixer.h modules/alsa/alsa-sink.c modules/alsa/alsa-sink.h modules/alsa/alsa-source.c modules/alsa/alsa-source.h modules/reserve-wrap.c modules/reserve-wrap.h libalsa_util_la_LDFLAGS = -avoid-version -libalsa_util_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +libalsa_util_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS) if HAVE_HAL @@ -1567,35 +1569,35 @@ endif module_alsa_sink_la_SOURCES = modules/alsa/module-alsa-sink.c module_alsa_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_alsa_sink_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_alsa_sink_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la module_alsa_sink_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS) module_alsa_source_la_SOURCES = modules/alsa/module-alsa-source.c module_alsa_source_la_LDFLAGS = $(MODULE_LDFLAGS) -module_alsa_source_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_alsa_source_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la module_alsa_source_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS) module_alsa_card_la_SOURCES = modules/alsa/module-alsa-card.c module_alsa_card_la_LDFLAGS = $(MODULE_LDFLAGS) -module_alsa_card_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_alsa_card_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la module_alsa_card_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS) # Solaris module_solaris_la_SOURCES = modules/module-solaris.c module_solaris_la_LDFLAGS = $(MODULE_LDFLAGS) -module_solaris_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_solaris_la_LIBADD = $(MODULE_LIBADD) # Avahi module_zeroconf_publish_la_SOURCES = modules/module-zeroconf-publish.c module_zeroconf_publish_la_LDFLAGS = $(MODULE_LDFLAGS) -module_zeroconf_publish_la_LIBADD = $(AM_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la libprotocol-native.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_zeroconf_publish_la_LIBADD = $(MODULE_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la libprotocol-native.la module_zeroconf_publish_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS) module_zeroconf_discover_la_SOURCES = modules/module-zeroconf-discover.c module_zeroconf_discover_la_LDFLAGS = $(MODULE_LDFLAGS) -module_zeroconf_discover_la_LIBADD = $(AM_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_zeroconf_discover_la_LIBADD = $(MODULE_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la module_zeroconf_discover_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS) # Bonjour @@ -1603,76 +1605,76 @@ module_zeroconf_discover_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS) module_bonjour_publish_la_SOURCES = modules/module-bonjour-publish.c module_bonjour_publish_la_LDFLAGS = $(MODULE_LDFLAGS) \ -Wl,-framework -Wl,CoreFoundation -framework CoreFoundation -module_bonjour_publish_la_LIBADD = libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_bonjour_publish_la_LIBADD = $(MODULE_LIBADD) # LIRC module_lirc_la_SOURCES = modules/module-lirc.c module_lirc_la_LDFLAGS = $(MODULE_LDFLAGS) -module_lirc_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la $(LIRC_LIBS) +module_lirc_la_LIBADD = $(MODULE_LIBADD) $(LIRC_LIBS) module_lirc_la_CFLAGS = $(AM_CFLAGS) $(LIRC_CFLAGS) # Linux evdev module_mmkbd_evdev_la_SOURCES = modules/module-mmkbd-evdev.c module_mmkbd_evdev_la_LDFLAGS = $(MODULE_LDFLAGS) -module_mmkbd_evdev_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_mmkbd_evdev_la_LIBADD = $(MODULE_LIBADD) module_mmkbd_evdev_la_CFLAGS = $(AM_CFLAGS) # Windows waveout #module_waveout_la_SOURCES = modules/module-waveout.c #module_waveout_la_LDFLAGS = $(MODULE_LDFLAGS) -#module_waveout_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la -lwinmm libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +#module_waveout_la_LIBADD = $(MODULE_LIBADD) -lwinmm #module_waveout_la_CFLAGS = $(AM_CFLAGS) # Hardware autodetection module module_detect_la_SOURCES = modules/module-detect.c module_detect_la_LDFLAGS = $(MODULE_LDFLAGS) -module_detect_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_detect_la_LIBADD = $(MODULE_LIBADD) module_detect_la_CFLAGS = $(AM_CFLAGS) # Volume restore module module_volume_restore_la_SOURCES = modules/module-volume-restore.c module_volume_restore_la_LDFLAGS = $(MODULE_LDFLAGS) -module_volume_restore_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_volume_restore_la_LIBADD = $(MODULE_LIBADD) module_volume_restore_la_CFLAGS = $(AM_CFLAGS) # Position event sounds in space module_position_event_sounds_la_SOURCES = modules/module-position-event-sounds.c module_position_event_sounds_la_LDFLAGS = $(MODULE_LDFLAGS) -module_position_event_sounds_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_position_event_sounds_la_LIBADD = $(MODULE_LIBADD) module_position_event_sounds_la_CFLAGS = $(AM_CFLAGS) # Augment properties from XDG .desktop files module_augment_properties_la_SOURCES = modules/module-augment-properties.c module_augment_properties_la_LDFLAGS = $(MODULE_LDFLAGS) -module_augment_properties_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_augment_properties_la_LIBADD = $(MODULE_LIBADD) #module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"$(datadir)/applications\" module_augment_properties_la_CFLAGS = $(AM_CFLAGS) -DDESKTOPFILEDIR=\"/usr/share/applications\" # Cork music streams while a phone stream is active module_cork_music_on_phone_la_SOURCES = modules/module-cork-music-on-phone.c module_cork_music_on_phone_la_LDFLAGS = $(MODULE_LDFLAGS) -module_cork_music_on_phone_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_cork_music_on_phone_la_LIBADD = $(MODULE_LIBADD) module_cork_music_on_phone_la_CFLAGS = $(AM_CFLAGS) # Device description restore module module_device_manager_la_SOURCES = modules/module-device-manager.c module_device_manager_la_LDFLAGS = $(MODULE_LDFLAGS) -module_device_manager_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_device_manager_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la module_device_manager_la_CFLAGS = $(AM_CFLAGS) # Device volume/muted restore module module_device_restore_la_SOURCES = modules/module-device-restore.c module_device_restore_la_LDFLAGS = $(MODULE_LDFLAGS) -module_device_restore_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_device_restore_la_LIBADD = $(MODULE_LIBADD) module_device_restore_la_CFLAGS = $(AM_CFLAGS) # Stream volume/muted/device restore module module_stream_restore_la_SOURCES = modules/module-stream-restore.c module_stream_restore_la_LDFLAGS = $(MODULE_LDFLAGS) -module_stream_restore_la_LIBADD = $(AM_LIBADD) libprotocol-native.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_stream_restore_la_LIBADD = $(MODULE_LIBADD) libprotocol-native.la module_stream_restore_la_CFLAGS = $(AM_CFLAGS) if HAVE_DBUS @@ -1683,37 +1685,37 @@ endif # Card profile restore module module_card_restore_la_SOURCES = modules/module-card-restore.c module_card_restore_la_LDFLAGS = $(MODULE_LDFLAGS) -module_card_restore_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_card_restore_la_LIBADD = $(MODULE_LIBADD) module_card_restore_la_CFLAGS = $(AM_CFLAGS) # Default sink/source restore module module_default_device_restore_la_SOURCES = modules/module-default-device-restore.c module_default_device_restore_la_LDFLAGS = $(MODULE_LDFLAGS) -module_default_device_restore_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_default_device_restore_la_LIBADD = $(MODULE_LIBADD) module_default_device_restore_la_CFLAGS = $(AM_CFLAGS) # Always Sink module module_always_sink_la_SOURCES = modules/module-always-sink.c module_always_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_always_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_always_sink_la_LIBADD = $(MODULE_LIBADD) module_always_sink_la_CFLAGS = $(AM_CFLAGS) # Rescue streams module module_rescue_streams_la_SOURCES = modules/module-rescue-streams.c module_rescue_streams_la_LDFLAGS = $(MODULE_LDFLAGS) -module_rescue_streams_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_rescue_streams_la_LIBADD = $(MODULE_LIBADD) module_rescue_streams_la_CFLAGS = $(AM_CFLAGS) # Automatically move streams to devices that are intended for their roles module_intended_roles_la_SOURCES = modules/module-intended-roles.c module_intended_roles_la_LDFLAGS = $(MODULE_LDFLAGS) -module_intended_roles_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_intended_roles_la_LIBADD = $(MODULE_LIBADD) module_intended_roles_la_CFLAGS = $(AM_CFLAGS) # Suspend-on-idle module module_suspend_on_idle_la_SOURCES = modules/module-suspend-on-idle.c module_suspend_on_idle_la_LDFLAGS = $(MODULE_LDFLAGS) -module_suspend_on_idle_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_suspend_on_idle_la_LIBADD = $(MODULE_LIBADD) module_suspend_on_idle_la_CFLAGS = $(AM_CFLAGS) # echo-cancel module @@ -1726,73 +1728,73 @@ module_echo_cancel_la_SOURCES = modules/echo-cancel/module-echo-cancel.c modules $(ORC_SOURCE).orc nodist_module_echo_cancel_la_SOURCES = $(ORC_NODIST_SOURCES) module_echo_cancel_la_LDFLAGS = $(MODULE_LDFLAGS) -module_echo_cancel_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la $(LIBSPEEX_LIBS) $(ORC_LIBS) +module_echo_cancel_la_LIBADD = $(MODULE_LIBADD) $(LIBSPEEX_LIBS) $(ORC_LIBS) module_echo_cancel_la_CFLAGS = $(AM_CFLAGS) $(LIBSPEEX_CFLAGS) $(ORC_CFLAGS) # RTP modules module_rtp_send_la_SOURCES = modules/rtp/module-rtp-send.c module_rtp_send_la_LDFLAGS = $(MODULE_LDFLAGS) -module_rtp_send_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la librtp.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_rtp_send_la_LIBADD = $(MODULE_LIBADD) librtp.la module_rtp_send_la_CFLAGS = $(AM_CFLAGS) module_rtp_recv_la_SOURCES = modules/rtp/module-rtp-recv.c module_rtp_recv_la_LDFLAGS = $(MODULE_LDFLAGS) -module_rtp_recv_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la librtp.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_rtp_recv_la_LIBADD = $(MODULE_LIBADD) librtp.la module_rtp_recv_la_CFLAGS = $(AM_CFLAGS) # JACK module_jackdbus_detect_la_SOURCES = modules/jack/module-jackdbus-detect.c module_jackdbus_detect_la_LDFLAGS = $(MODULE_LDFLAGS) -module_jackdbus_detect_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINOR@.la $(JACK_LIBS) libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_jackdbus_detect_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) $(JACK_LIBS) module_jackdbus_detect_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) $(JACK_CFLAGS) module_jack_sink_la_SOURCES = modules/jack/module-jack-sink.c module_jack_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_jack_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la $(JACK_LIBS) libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_jack_sink_la_LIBADD = $(MODULE_LIBADD) $(JACK_LIBS) module_jack_sink_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS) module_jack_source_la_SOURCES = modules/jack/module-jack-source.c module_jack_source_la_LDFLAGS = $(MODULE_LDFLAGS) -module_jack_source_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la $(JACK_LIBS) libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_jack_source_la_LIBADD = $(MODULE_LIBADD) $(JACK_LIBS) module_jack_source_la_CFLAGS = $(AM_CFLAGS) $(JACK_CFLAGS) if HAVE_HAL_COMPAT module_hal_detect_la_SOURCES = modules/module-hal-detect-compat.c -module_hal_detect_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_hal_detect_la_LIBADD = $(MODULE_LIBADD) module_hal_detect_la_CFLAGS = $(AM_CFLAGS) else module_hal_detect_la_SOURCES = modules/module-hal-detect.c -module_hal_detect_la_LIBADD = $(AM_LIBADD) $(HAL_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_hal_detect_la_LIBADD = $(MODULE_LIBADD) $(HAL_LIBS) module_hal_detect_la_CFLAGS = $(AM_CFLAGS) $(HAL_CFLAGS) endif module_hal_detect_la_LDFLAGS = $(MODULE_LDFLAGS) module_udev_detect_la_SOURCES = modules/module-udev-detect.c module_udev_detect_la_LDFLAGS = $(MODULE_LDFLAGS) -module_udev_detect_la_LIBADD = $(AM_LIBADD) $(UDEV_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_udev_detect_la_LIBADD = $(MODULE_LIBADD) $(UDEV_LIBS) module_udev_detect_la_CFLAGS = $(AM_CFLAGS) $(UDEV_CFLAGS) module_console_kit_la_SOURCES = modules/module-console-kit.c module_console_kit_la_LDFLAGS = $(MODULE_LDFLAGS) -module_console_kit_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_console_kit_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) # GConf support module_gconf_la_SOURCES = modules/gconf/module-gconf.c module_gconf_la_LDFLAGS = $(MODULE_LDFLAGS) -module_gconf_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_gconf_la_LIBADD = $(MODULE_LIBADD) module_gconf_la_CFLAGS = $(AM_CFLAGS) -DPA_GCONF_HELPER=\"$(pulselibexecdir)/gconf-helper\" gconf_helper_SOURCES = modules/gconf/gconf-helper.c -gconf_helper_LDADD = $(AM_LDADD) $(GCONF_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +gconf_helper_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la $(GCONF_LIBS) gconf_helper_CFLAGS = $(AM_CFLAGS) $(GCONF_CFLAGS) gconf_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) # Bluetooth proximity module_bluetooth_proximity_la_SOURCES = modules/bluetooth/module-bluetooth-proximity.c module_bluetooth_proximity_la_LDFLAGS = $(MODULE_LDFLAGS) -module_bluetooth_proximity_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_bluetooth_proximity_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) module_bluetooth_proximity_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) -DPA_BT_PROXIMITY_HELPER=\"$(pulselibexecdir)/proximity-helper\" proximity_helper_SOURCES = modules/bluetooth/proximity-helper.c @@ -1803,12 +1805,12 @@ proximity_helper_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) # Bluetooth sink / source module_bluetooth_discover_la_SOURCES = modules/bluetooth/module-bluetooth-discover.c module_bluetooth_discover_la_LDFLAGS = $(MODULE_LDFLAGS) -module_bluetooth_discover_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINOR@.la libbluetooth-util.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_bluetooth_discover_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) libbluetooth-util.la module_bluetooth_discover_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) libbluetooth_sbc_la_SOURCES = modules/bluetooth/sbc.c modules/bluetooth/sbc.h modules/bluetooth/sbc_tables.h modules/bluetooth/sbc_math.h modules/bluetooth/sbc_primitives.h modules/bluetooth/sbc_primitives.c modules/bluetooth/sbc_primitives_mmx.h modules/bluetooth/sbc_primitives_neon.h modules/bluetooth/sbc_primitives_mmx.c modules/bluetooth/sbc_primitives_neon.c libbluetooth_sbc_la_LDFLAGS = -avoid-version -libbluetooth_sbc_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +libbluetooth_sbc_la_LIBADD = $(MODULE_LIBADD) libbluetooth_sbc_la_CFLAGS = $(AM_CFLAGS) BLUETOOTH_SBC_FILES = $(subst modules/bluetooth/,,$(libbluetooth_sbc_la_SOURCES)) @@ -1820,28 +1822,28 @@ BLUETOOTH_IPC_FILES = $(subst modules/bluetooth/,,$(libbluetooth_ipc_la_SOURCES) libbluetooth_util_la_SOURCES = modules/bluetooth/bluetooth-util.c modules/bluetooth/bluetooth-util.h libbluetooth_util_la_LDFLAGS = -avoid-version -libbluetooth_util_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +libbluetooth_util_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) libbluetooth_util_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) module_bluetooth_device_la_SOURCES = modules/bluetooth/module-bluetooth-device.c modules/bluetooth/rtp.h module_bluetooth_device_la_LDFLAGS = $(MODULE_LDFLAGS) -module_bluetooth_device_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINOR@.la libbluetooth-util.la libbluetooth-ipc.la libbluetooth-sbc.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_bluetooth_device_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) libbluetooth-util.la libbluetooth-ipc.la libbluetooth-sbc.la module_bluetooth_device_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) # Apple Airtunes/RAOP module_raop_sink_la_SOURCES = modules/raop/module-raop-sink.c module_raop_sink_la_LDFLAGS = $(MODULE_LDFLAGS) -module_raop_sink_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la librtp.la libraop.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_raop_sink_la_LIBADD = $(MODULE_LIBADD) librtp.la libraop.la module_raop_discover_la_SOURCES = modules/raop/module-raop-discover.c module_raop_discover_la_LDFLAGS = $(MODULE_LDFLAGS) -module_raop_discover_la_LIBADD = $(AM_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la +module_raop_discover_la_LIBADD = $(MODULE_LIBADD) $(AVAHI_LIBS) libavahi-wrap.la module_raop_discover_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS) # Rygel module_rygel_media_server_la_SOURCES = modules/module-rygel-media-server.c module_rygel_media_server_la_LDFLAGS = $(MODULE_LDFLAGS) -module_rygel_media_server_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la libprotocol-http.la +module_rygel_media_server_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) libprotocol-http.la module_rygel_media_server_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) ################################### diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in index f9b9eadd..ace0f09e 100755 --- a/src/daemon/default.pa.in +++ b/src/daemon/default.pa.in @@ -111,7 +111,9 @@ load-module module-suspend-on-idle ### If autoexit on idle is enabled we want to make sure we only quit ### when no local session needs us anymore. +.ifexists module-console-kit@PA_SOEXT@ load-module module-console-kit +.endif ### Enable positioned event sounds load-module module-position-event-sounds diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index 53c14b80..9ed4d4d9 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -440,7 +440,7 @@ static size_t check_left_to_play(struct userdata *u, size_t n_bytes, pa_bool_t o #endif if (!u->first && !u->after_rewind) - if (pa_log_ratelimit()) + if (pa_log_ratelimit(PA_LOG_INFO)) pa_log_info("Underrun!"); } @@ -1281,15 +1281,17 @@ static void sink_write_volume_cb(pa_sink *s) { (pa_cvolume_max(&tmp_vol) <= (PA_VOLUME_NORM + VOLUME_ACCURACY)); if (!accurate_enough) { - char vol_str_pcnt[PA_CVOLUME_SNPRINT_MAX]; - char vol_str_db[PA_SW_CVOLUME_SNPRINT_DB_MAX]; + union { + char db[2][PA_SW_CVOLUME_SNPRINT_DB_MAX]; + char pcnt[2][PA_CVOLUME_SNPRINT_MAX]; + } vol; pa_log_debug("Written HW volume did not match with the request: %s (request) != %s", - pa_cvolume_snprint(vol_str_pcnt, sizeof(vol_str_pcnt), &s->thread_info.current_hw_volume), - pa_cvolume_snprint(vol_str_pcnt, sizeof(vol_str_pcnt), &hw_vol)); + pa_cvolume_snprint(vol.pcnt[0], sizeof(vol.pcnt[0]), &s->thread_info.current_hw_volume), + pa_cvolume_snprint(vol.pcnt[1], sizeof(vol.pcnt[1]), &hw_vol)); pa_log_debug(" in dB: %s (request) != %s", - pa_sw_cvolume_snprint_dB(vol_str_db, sizeof(vol_str_db), &s->thread_info.current_hw_volume), - pa_sw_cvolume_snprint_dB(vol_str_db, sizeof(vol_str_db), &hw_vol)); + pa_sw_cvolume_snprint_dB(vol.db[0], sizeof(vol.db[0]), &s->thread_info.current_hw_volume), + pa_sw_cvolume_snprint_dB(vol.db[1], sizeof(vol.db[1]), &hw_vol)); } } } @@ -1509,7 +1511,7 @@ static void thread_func(void *userdata) { * we have filled the buffer at least once * completely.*/ - if (pa_log_ratelimit()) + if (pa_log_ratelimit(PA_LOG_DEBUG)) pa_log_debug("Cutting sleep time for the initial iterations by half."); sleep_usec /= 2; } @@ -1573,7 +1575,7 @@ static void thread_func(void *userdata) { u->first = TRUE; u->since_start = 0; - } else if (revents && u->use_tsched && pa_log_ratelimit()) + } else if (revents && u->use_tsched && pa_log_ratelimit(PA_LOG_DEBUG)) pa_log_debug("Wakeup from ALSA!"); } else @@ -1670,8 +1672,6 @@ fail: } static int setup_mixer(struct userdata *u, pa_bool_t ignore_dB, pa_bool_t sync_volume) { - int (*mixer_callback)(snd_mixer_elem_t *, unsigned int); - pa_assert(u); if (!u->mixer_handle) @@ -1760,29 +1760,31 @@ static int setup_mixer(struct userdata *u, pa_bool_t ignore_dB, pa_bool_t sync_v pa_log_info("Using hardware mute control."); } - if (sync_volume) { - u->mixer_pd = pa_alsa_mixer_pdata_new(); - mixer_callback = io_mixer_callback; - - if (pa_alsa_set_mixer_rtpoll(u->mixer_pd, u->mixer_handle, u->rtpoll) < 0) { - pa_log("Failed to initialize file descriptor monitoring"); - return -1; - } + if (u->sink->flags & (PA_SINK_HW_VOLUME_CTRL|PA_SINK_HW_MUTE_CTRL)) { + int (*mixer_callback)(snd_mixer_elem_t *, unsigned int); + if (u->sink->flags & PA_SINK_SYNC_VOLUME) { + u->mixer_pd = pa_alsa_mixer_pdata_new(); + mixer_callback = io_mixer_callback; - } else { - u->mixer_fdl = pa_alsa_fdlist_new(); - mixer_callback = ctl_mixer_callback; + if (pa_alsa_set_mixer_rtpoll(u->mixer_pd, u->mixer_handle, u->rtpoll) < 0) { + pa_log("Failed to initialize file descriptor monitoring"); + return -1; + } + } else { + u->mixer_fdl = pa_alsa_fdlist_new(); + mixer_callback = ctl_mixer_callback; - if (pa_alsa_fdlist_set_mixer(u->mixer_fdl, u->mixer_handle, u->core->mainloop) < 0) { - pa_log("Failed to initialize file descriptor monitoring"); - return -1; + if (pa_alsa_fdlist_set_mixer(u->mixer_fdl, u->mixer_handle, u->core->mainloop) < 0) { + pa_log("Failed to initialize file descriptor monitoring"); + return -1; + } } - } - if (u->mixer_path_set) - pa_alsa_path_set_set_callback(u->mixer_path_set, u->mixer_handle, mixer_callback, u); - else - pa_alsa_path_set_callback(u->mixer_path, u->mixer_handle, mixer_callback, u); + if (u->mixer_path_set) + pa_alsa_path_set_set_callback(u->mixer_path_set, u->mixer_handle, mixer_callback, u); + else + pa_alsa_path_set_callback(u->mixer_path, u->mixer_handle, mixer_callback, u); + } return 0; } diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c index d2147498..45a7af39 100644 --- a/src/modules/alsa/alsa-source.c +++ b/src/modules/alsa/alsa-source.c @@ -428,7 +428,7 @@ static size_t check_left_to_record(struct userdata *u, size_t n_bytes, pa_bool_t PA_DEBUG_TRAP; #endif - if (pa_log_ratelimit()) + if (pa_log_ratelimit(PA_LOG_INFO)) pa_log_info("Overrun!"); } @@ -1323,7 +1323,7 @@ static void thread_func(void *userdata) { goto fail; u->first = TRUE; - } else if (revents && u->use_tsched && pa_log_ratelimit()) + } else if (revents && u->use_tsched && pa_log_ratelimit(PA_LOG_DEBUG)) pa_log_debug("Wakeup from ALSA!"); } else diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c index 53545209..47e0fd50 100644 --- a/src/modules/bluetooth/bluetooth-util.c +++ b/src/modules/bluetooth/bluetooth-util.c @@ -955,12 +955,14 @@ int pa_bluetooth_transport_acquire(const pa_bluetooth_transport *t, const char * return -1; } +#ifdef DBUS_TYPE_UNIX_FD if (!dbus_message_get_args(r, &err, DBUS_TYPE_UNIX_FD, &ret, DBUS_TYPE_INVALID)) { pa_log("Failed to parse org.bluez.MediaTransport.Acquire(): %s", err.message); ret = -1; dbus_error_free(&err); goto fail; } +#endif fail: dbus_message_unref(r); diff --git a/src/modules/bluetooth/bluetooth-util.h b/src/modules/bluetooth/bluetooth-util.h index ce551967..f141209d 100644 --- a/src/modules/bluetooth/bluetooth-util.h +++ b/src/modules/bluetooth/bluetooth-util.h @@ -30,18 +30,18 @@ #include <pulsecore/core-util.h> /* UUID copied from bluez/audio/device.h */ -#define GENERIC_AUDIO_UUID "00001203-0000-1000-8000-00805F9B34FB" +#define GENERIC_AUDIO_UUID "00001203-0000-1000-8000-00805f9b34fb" -#define HSP_HS_UUID "00001108-0000-1000-8000-00805F9B34FB" -#define HSP_AG_UUID "00001112-0000-1000-8000-00805F9B34FB" +#define HSP_HS_UUID "00001108-0000-1000-8000-00805f9b34fb" +#define HSP_AG_UUID "00001112-0000-1000-8000-00805f9b34fb" -#define HFP_HS_UUID "0000111E-0000-1000-8000-00805F9B34FB" -#define HFP_AG_UUID "0000111F-0000-1000-8000-00805F9B34FB" +#define HFP_HS_UUID "0000111e-0000-1000-8000-00805f9b34fb" +#define HFP_AG_UUID "0000111f-0000-1000-8000-00805f9b34fb" -#define ADVANCED_AUDIO_UUID "0000110D-0000-1000-8000-00805F9B34FB" +#define ADVANCED_AUDIO_UUID "0000110d-0000-1000-8000-00805f9b34fb" -#define A2DP_SOURCE_UUID "0000110A-0000-1000-8000-00805F9B34FB" -#define A2DP_SINK_UUID "0000110B-0000-1000-8000-00805F9B34FB" +#define A2DP_SOURCE_UUID "0000110a-0000-1000-8000-00805f9b34fb" +#define A2DP_SINK_UUID "0000110b-0000-1000-8000-00805f9b34fb" typedef struct pa_bluetooth_uuid pa_bluetooth_uuid; typedef struct pa_bluetooth_device pa_bluetooth_device; diff --git a/src/modules/bluetooth/sbc.c b/src/modules/bluetooth/sbc.c index 779be4bd..5157c70f 100644 --- a/src/modules/bluetooth/sbc.c +++ b/src/modules/bluetooth/sbc.c @@ -1005,7 +1005,8 @@ ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len, priv->frame.codesize = sbc_get_codesize(sbc); priv->frame.length = framelen; - } + } else if (priv->frame.bitpool != sbc->bitpool) + sbc->bitpool = priv->frame.bitpool; if (!output) return framelen; @@ -1076,6 +1077,9 @@ ssize_t sbc_encode(sbc_t *sbc, const void *input, size_t input_len, sbc_encoder_init(&priv->enc_state, &priv->frame); priv->init = 1; + } else if (priv->frame.bitpool != sbc->bitpool) { + priv->frame.length = sbc_get_frame_length(sbc); + priv->frame.bitpool = sbc->bitpool; } /* input must be large enough to encode a complete frame */ @@ -1140,7 +1144,7 @@ size_t sbc_get_frame_length(sbc_t *sbc) struct sbc_priv *priv; priv = sbc->priv; - if (priv->init) + if (priv->init && priv->frame.bitpool == sbc->bitpool) return priv->frame.length; subbands = sbc->subbands ? 8 : 4; diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c index 2b1f5055..8cabf71b 100644 --- a/src/modules/module-loopback.c +++ b/src/modules/module-loopback.c @@ -57,7 +57,9 @@ PA_MODULE_USAGE( "sink_input_name=<custom name for the sink input> " "source_output_name=<custom name for the source output> " "sink_input_role=<media.role for the sink input> " - "source_output_role=<media.role for the source output>"); + "source_output_role=<media.role for the source output> " + "source_dont_move=<boolean> " + "sink_dont_move=<boolean>"); #define DEFAULT_LATENCY_MSEC 200 @@ -116,6 +118,8 @@ static const char* const valid_modargs[] = { "source_output_name", "sink_input_role", "source_output_role", + "source_dont_move", + "sink_dont_move", NULL, }; @@ -631,8 +635,10 @@ int pa__init(pa_module *m) { struct userdata *u; pa_sink *sink; pa_sink_input_new_data sink_input_data; + pa_bool_t sink_dont_move; pa_source *source; pa_source_output_new_data source_output_data; + pa_bool_t source_dont_move; uint32_t latency_msec; pa_sample_spec ss; pa_channel_map map; @@ -709,6 +715,15 @@ int pa__init(pa_module *m) { pa_sink_input_new_data_set_channel_map(&sink_input_data, &map); sink_input_data.flags = PA_SINK_INPUT_VARIABLE_RATE; + sink_dont_move = FALSE; + if (pa_modargs_get_value_boolean(ma, "sink_dont_move", &sink_dont_move) < 0) { + pa_log("sink_dont_move= expects a boolean argument."); + goto fail; + } + + if (sink_dont_move) + sink_input_data.flags |= PA_SINK_INPUT_DONT_MOVE; + pa_sink_input_new(&u->sink_input, m->core, &sink_input_data); pa_sink_input_new_data_done(&sink_input_data); @@ -750,6 +765,16 @@ int pa__init(pa_module *m) { pa_source_output_new_data_set_sample_spec(&source_output_data, &ss); pa_sink_input_new_data_set_channel_map(&sink_input_data, &map); + source_output_data.flags = (pa_source_output_flags_t)0; + + source_dont_move = FALSE; + if (pa_modargs_get_value_boolean(ma, "source_dont_move", &source_dont_move) < 0) { + pa_log("source_dont_move= expects a boolean argument."); + goto fail; + } + + if (source_dont_move) + source_output_data.flags |= PA_SOURCE_OUTPUT_DONT_MOVE; pa_source_output_new(&u->source_output, m->core, &source_output_data); pa_source_output_new_data_done(&source_output_data); diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c index ce5f8d55..176c2c00 100644 --- a/src/modules/module-tunnel.c +++ b/src/modules/module-tunnel.c @@ -1919,7 +1919,7 @@ int pa__init(pa_module*m) { #ifdef TUNNEL_SINK if (!(dn = pa_xstrdup(pa_modargs_get_value(ma, "sink_name", NULL)))) - dn = pa_sprintf_malloc("tunnel.%s", u->server_name); + dn = pa_sprintf_malloc("tunnel-sink.%s", u->server_name); pa_sink_new_data_init(&data); data.driver = __FILE__; @@ -1963,7 +1963,7 @@ int pa__init(pa_module*m) { #else if (!(dn = pa_xstrdup(pa_modargs_get_value(ma, "source_name", NULL)))) - dn = pa_sprintf_malloc("tunnel.%s", u->server_name); + dn = pa_sprintf_malloc("tunnel-source.%s", u->server_name); pa_source_new_data_init(&data); data.driver = __FILE__; diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c index 2eecc25a..1eaa84fd 100644 --- a/src/modules/module-udev-detect.c +++ b/src/modules/module-udev-detect.c @@ -324,7 +324,7 @@ static void verify_access(struct userdata *u, struct device *d) { * during opening was canceled by a "try again" * failure or a "fatal" failure. */ - if (pa_ratelimit_test(&d->ratelimit)) { + if (pa_ratelimit_test(&d->ratelimit, PA_LOG_DEBUG)) { pa_log_debug("Loading module-alsa-card with arguments '%s'", d->args); m = pa_module_load(u->core, "module-alsa-card", d->args); diff --git a/src/pulse/stream.c b/src/pulse/stream.c index 87c24ba8..addc36ae 100644 --- a/src/pulse/stream.c +++ b/src/pulse/stream.c @@ -1733,8 +1733,8 @@ static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command, i->read_index -= (int64_t) pa_memblockq_get_length(o->stream->record_memblockq); } - /* Update smoother */ - if (o->stream->smoother) { + /* Update smoother if we're not corked */ + if (o->stream->smoother && !o->stream->corked) { pa_usec_t u, x; u = x = pa_rtclock_now() - i->transport_usec; diff --git a/src/pulsecore/asyncq.c b/src/pulsecore/asyncq.c index 072ef02c..e62d0c16 100644 --- a/src/pulsecore/asyncq.c +++ b/src/pulsecore/asyncq.c @@ -206,7 +206,7 @@ void pa_asyncq_post(pa_asyncq*l, void *p) { /* OK, we couldn't push anything in the queue. So let's queue it * locally and push it later */ - if (pa_log_ratelimit()) + if (pa_log_ratelimit(PA_LOG_WARN)) pa_log_warn("q overrun, queuing locally"); if (!(q = pa_flist_pop(PA_STATIC_FLIST_GET(localq)))) diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index effc598e..4e7d0d71 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -680,7 +680,7 @@ int pa_make_realtime(int rtprio) { } for (p = rtprio-1; p >= 1; p--) - if (set_scheduler(p)) { + if (set_scheduler(p) >= 0) { pa_log_info("Successfully enabled SCHED_RR scheduling for thread, with priority %i, which is lower than the requested %i.", p, rtprio); return 0; } @@ -750,7 +750,7 @@ int pa_raise_priority(int nice_level) { } for (n = nice_level+1; n < 0; n++) - if (set_nice(n) > 0) { + if (set_nice(n) >= 0) { pa_log_info("Successfully acquired nice level %i, which is lower than the requested %i.", n, nice_level); return 0; } diff --git a/src/pulsecore/dbus-util.c b/src/pulsecore/dbus-util.c index 8b203051..09ab071b 100644 --- a/src/pulsecore/dbus-util.c +++ b/src/pulsecore/dbus-util.c @@ -595,14 +595,19 @@ void pa_dbus_send_proplist_variant_reply(DBusConnection *c, DBusMessage *in_repl void pa_dbus_append_basic_array(DBusMessageIter *iter, int item_type, const void *array, unsigned n) { DBusMessageIter array_iter; + unsigned i; + unsigned item_size; pa_assert(iter); pa_assert(dbus_type_is_basic(item_type)); pa_assert(array || n == 0); + item_size = basic_type_size(item_type); + pa_assert_se(dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, signature_from_basic_type(item_type), &array_iter)); - pa_assert_se(dbus_message_iter_append_fixed_array(&array_iter, item_type, array, n)); + for (i = 0; i < n; ++i) + pa_assert_se(dbus_message_iter_append_basic(&array_iter, item_type, &((uint8_t*) array)[i * item_size])); pa_assert_se(dbus_message_iter_close_container(iter, &array_iter)); }; diff --git a/src/pulsecore/flist.c b/src/pulsecore/flist.c index 1867525b..e342a579 100644 --- a/src/pulsecore/flist.c +++ b/src/pulsecore/flist.c @@ -83,13 +83,14 @@ static void stack_push(pa_atomic_ptr_t *list, pa_flist_elem *new_elem) { pa_flist *pa_flist_new_with_name(unsigned size, const char *name) { pa_flist *l; unsigned i; + pa_assert(name); if (!size) size = FLIST_SIZE; l = pa_xmalloc0(sizeof(pa_flist) + sizeof(pa_flist_elem) * size); - l->name = name; + l->name = pa_xstrdup(name); l->size = size; pa_atomic_ptr_store(&l->stored, NULL); pa_atomic_ptr_store(&l->empty, NULL); @@ -105,6 +106,7 @@ pa_flist *pa_flist_new(unsigned size) { void pa_flist_free(pa_flist *l, pa_free_cb_t free_cb) { pa_assert(l); + pa_assert(l->name); if (free_cb) { pa_flist_elem *elem; @@ -122,7 +124,7 @@ int pa_flist_push(pa_flist *l, void *p) { elem = stack_pop(&l->empty); if (elem == NULL) { - if (pa_log_ratelimit()) + if (pa_log_ratelimit(PA_LOG_DEBUG)) pa_log_debug("%s flist is full (don't worry)", l->name); return -1; } diff --git a/src/pulsecore/flist.h b/src/pulsecore/flist.h index 7fb50359..915b1135 100644 --- a/src/pulsecore/flist.h +++ b/src/pulsecore/flist.h @@ -33,8 +33,8 @@ typedef struct pa_flist pa_flist; pa_flist * pa_flist_new(unsigned size); -/* Freeing the name is responsibility of caller. The name is only used - * for debug printing. */ +/* Name string is copied and added to flist structure. The original is + * responsibility of the caller. The name is only used for debug printing. */ pa_flist * pa_flist_new_with_name(unsigned size, const char *name); void pa_flist_free(pa_flist *l, pa_free_cb_t free_cb); diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c index 0c5a317c..7ba41ee9 100644 --- a/src/pulsecore/log.c +++ b/src/pulsecore/log.c @@ -431,7 +431,7 @@ void pa_log_level(pa_log_level_t level, const char *format, ...) { va_end(ap); } -pa_bool_t pa_log_ratelimit(void) { +pa_bool_t pa_log_ratelimit(pa_log_level_t level) { /* Not more than 10 messages every 5s */ static PA_DEFINE_RATELIMIT(ratelimit, 5 * PA_USEC_PER_SEC, 10); @@ -440,5 +440,5 @@ pa_bool_t pa_log_ratelimit(void) { if (no_rate_limit) return TRUE; - return pa_ratelimit_test(&ratelimit); + return pa_ratelimit_test(&ratelimit, level); } diff --git a/src/pulsecore/log.h b/src/pulsecore/log.h index 2f379f68..1fd38d44 100644 --- a/src/pulsecore/log.h +++ b/src/pulsecore/log.h @@ -135,6 +135,6 @@ LOG_FUNC(error, PA_LOG_ERROR) #define pa_log pa_log_error -pa_bool_t pa_log_ratelimit(void); +pa_bool_t pa_log_ratelimit(pa_log_level_t level); #endif diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c index f38b17c6..454900d1 100644 --- a/src/pulsecore/memblock.c +++ b/src/pulsecore/memblock.c @@ -258,7 +258,7 @@ static struct mempool_slot* mempool_allocate_slot(pa_mempool *p) { slot = (struct mempool_slot*) ((uint8_t*) p->memory.ptr + (p->block_size * (size_t) idx)); if (!slot) { - if (pa_log_ratelimit()) + if (pa_log_ratelimit(PA_LOG_DEBUG)) pa_log_debug("Pool full"); pa_atomic_inc(&p->stat.n_pool_full); return NULL; diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 85245a93..cc6a6b1d 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -125,6 +125,10 @@ typedef struct playback_stream { uint32_t drain_tag; uint32_t syncid; + /* Optimization to avoid too many rewinds with a lot of small blocks */ + pa_atomic_t seek_or_post_in_queue; + int64_t seek_windex; + pa_atomic_t missing; pa_usec_t configured_sink_latency; pa_buffer_attr buffer_attr; @@ -1100,6 +1104,8 @@ static playback_stream* playback_stream_new( s->buffer_attr = *a; s->adjust_latency = adjust_latency; s->early_requests = early_requests; + pa_atomic_store(&s->seek_or_post_in_queue, 0); + s->seek_windex = -1; s->sink_input->parent.process_msg = sink_input_process_msg; s->sink_input->pop = sink_input_pop_cb; @@ -1359,42 +1365,35 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int switch (code) { - case SINK_INPUT_MESSAGE_SEEK: { - int64_t windex; - - windex = pa_memblockq_get_write_index(s->memblockq); - - /* The client side is incapable of accounting correctly - * for seeks of a type != PA_SEEK_RELATIVE. We need to be - * able to deal with that. */ - - pa_memblockq_seek(s->memblockq, offset, PA_PTR_TO_UINT(userdata), PA_PTR_TO_UINT(userdata) == PA_SEEK_RELATIVE); - - handle_seek(s, windex); - return 0; - } - + case SINK_INPUT_MESSAGE_SEEK: case SINK_INPUT_MESSAGE_POST_DATA: { - int64_t windex; + int64_t windex = pa_memblockq_get_write_index(s->memblockq); - pa_assert(chunk); + if (code == SINK_INPUT_MESSAGE_SEEK) { + /* The client side is incapable of accounting correctly + * for seeks of a type != PA_SEEK_RELATIVE. We need to be + * able to deal with that. */ - windex = pa_memblockq_get_write_index(s->memblockq); - -/* pa_log("sink input post: %lu %lli", (unsigned long) chunk->length, (long long) windex); */ - - if (pa_memblockq_push_align(s->memblockq, chunk) < 0) { + pa_memblockq_seek(s->memblockq, offset, PA_PTR_TO_UINT(userdata), PA_PTR_TO_UINT(userdata) == PA_SEEK_RELATIVE); + windex = PA_MIN(windex, pa_memblockq_get_write_index(s->memblockq)); + } - if (pa_log_ratelimit()) + if (chunk && pa_memblockq_push_align(s->memblockq, chunk) < 0) { + if (pa_log_ratelimit(PA_LOG_WARN)) pa_log_warn("Failed to push data into queue"); pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(s), PLAYBACK_STREAM_MESSAGE_OVERFLOW, NULL, 0, NULL, NULL); pa_memblockq_seek(s->memblockq, (int64_t) chunk->length, PA_SEEK_RELATIVE, TRUE); } - handle_seek(s, windex); - -/* pa_log("sink input post2: %lu", (unsigned long) pa_memblockq_get_length(s->memblockq)); */ - + /* If more data is in queue, we rewind later instead. */ + if (s->seek_windex != -1) + windex = PA_MIN(windex, s->seek_windex); + if (pa_atomic_dec(&s->seek_or_post_in_queue) > 1) + s->seek_windex = windex; + else { + s->seek_windex = -1; + handle_seek(s, windex); + } return 0; } @@ -4464,11 +4463,12 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o if (playback_stream_isinstance(stream)) { playback_stream *ps = PLAYBACK_STREAM(stream); + pa_atomic_inc(&ps->seek_or_post_in_queue); if (chunk->memblock) { if (seek != PA_SEEK_RELATIVE || offset != 0) - pa_asyncmsgq_post(ps->sink_input->sink->asyncmsgq, PA_MSGOBJECT(ps->sink_input), SINK_INPUT_MESSAGE_SEEK, PA_UINT_TO_PTR(seek), offset, NULL, NULL); - - pa_asyncmsgq_post(ps->sink_input->sink->asyncmsgq, PA_MSGOBJECT(ps->sink_input), SINK_INPUT_MESSAGE_POST_DATA, NULL, 0, chunk, NULL); + pa_asyncmsgq_post(ps->sink_input->sink->asyncmsgq, PA_MSGOBJECT(ps->sink_input), SINK_INPUT_MESSAGE_SEEK, PA_UINT_TO_PTR(seek), offset, chunk, NULL); + else + pa_asyncmsgq_post(ps->sink_input->sink->asyncmsgq, PA_MSGOBJECT(ps->sink_input), SINK_INPUT_MESSAGE_POST_DATA, NULL, 0, chunk, NULL); } else pa_asyncmsgq_post(ps->sink_input->sink->asyncmsgq, PA_MSGOBJECT(ps->sink_input), SINK_INPUT_MESSAGE_SEEK, PA_UINT_TO_PTR(seek), offset+chunk->length, NULL, NULL); diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c index 1d4ac177..3e0bfa3b 100644 --- a/src/pulsecore/pstream.c +++ b/src/pulsecore/pstream.c @@ -832,7 +832,7 @@ static int do_read(pa_pstream *p) { ntohl(p->read.shm_info[PA_PSTREAM_SHM_INDEX]), ntohl(p->read.shm_info[PA_PSTREAM_SHM_LENGTH])))) { - if (pa_log_ratelimit()) + if (pa_log_ratelimit(PA_LOG_DEBUG)) pa_log_debug("Failed to import memory block."); } diff --git a/src/pulsecore/ratelimit.c b/src/pulsecore/ratelimit.c index 844dd77d..a274d2cc 100644 --- a/src/pulsecore/ratelimit.c +++ b/src/pulsecore/ratelimit.c @@ -35,7 +35,7 @@ static pa_static_mutex mutex = PA_STATIC_MUTEX_INIT; /* Modelled after Linux' lib/ratelimit.c by Dave Young * <hidave.darkstar@gmail.com>, which is licensed GPLv2. */ -pa_bool_t pa_ratelimit_test(pa_ratelimit *r) { +pa_bool_t pa_ratelimit_test(pa_ratelimit *r, pa_log_level_t t) { pa_usec_t now; pa_mutex *m; @@ -52,7 +52,7 @@ pa_bool_t pa_ratelimit_test(pa_ratelimit *r) { r->begin + r->interval < now) { if (r->n_missed > 0) - pa_log_warn("%u events suppressed", r->n_missed); + pa_logl(t, "%u events suppressed", r->n_missed); r->begin = now; diff --git a/src/pulsecore/ratelimit.h b/src/pulsecore/ratelimit.h index 9857a291..9a36195d 100644 --- a/src/pulsecore/ratelimit.h +++ b/src/pulsecore/ratelimit.h @@ -23,6 +23,7 @@ ***/ #include <pulse/sample.h> +#include <pulsecore/log.h> #include <pulsecore/macro.h> typedef struct pa_ratelimit { @@ -51,6 +52,6 @@ typedef struct pa_ratelimit { r->begin = 0; \ } while (FALSE); -pa_bool_t pa_ratelimit_test(pa_ratelimit *r); +pa_bool_t pa_ratelimit_test(pa_ratelimit *r, pa_log_level_t t); #endif diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 7b4e626d..62000e0d 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -751,8 +751,11 @@ void pa_sink_process_rewind(pa_sink *s, size_t nbytes) { if (s->thread_info.state == PA_SINK_SUSPENDED) return; - if (nbytes > 0) + if (nbytes > 0) { pa_log_debug("Processing rewind..."); + if (s->flags & PA_SINK_SYNC_VOLUME) + pa_sink_volume_change_rewind(s, nbytes); + } PA_HASHMAP_FOREACH(i, s->thread_info.inputs, state) { pa_sink_input_assert_ref(i); @@ -762,8 +765,6 @@ void pa_sink_process_rewind(pa_sink *s, size_t nbytes) { if (nbytes > 0) { if (s->monitor_source && PA_SOURCE_IS_LINKED(s->monitor_source->thread_info.state)) pa_source_process_rewind(s->monitor_source, nbytes); - if (s->flags & PA_SINK_SYNC_VOLUME) - pa_sink_volume_change_rewind(s, nbytes); } } @@ -2905,10 +2906,7 @@ void pa_sink_volume_change_push(pa_sink *s) { return; } - /* Get the latency of the sink */ - if (PA_MSGOBJECT(s)->process_msg(PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY, &nc->at, 0, NULL) < 0) - nc->at = 0; - + nc->at = pa_sink_get_latency_within_thread(s); nc->at += pa_rtclock_now() + s->thread_info.volume_change_extra_delay; if (s->thread_info.volume_changes_tail) { @@ -2991,7 +2989,7 @@ pa_bool_t pa_sink_volume_change_apply(pa_sink *s, pa_usec_t *usec_to_next) { if (s->thread_info.volume_changes) { if (usec_to_next) *usec_to_next = s->thread_info.volume_changes->at - now; - if (pa_log_ratelimit()) + if (pa_log_ratelimit(PA_LOG_DEBUG)) pa_log_debug("Next volume change in %lld usec", s->thread_info.volume_changes->at - now); } else { @@ -3006,20 +3004,25 @@ pa_bool_t pa_sink_volume_change_apply(pa_sink *s, pa_usec_t *usec_to_next) { static void pa_sink_volume_change_rewind(pa_sink *s, size_t nbytes) { /* All the queued volume events later than current latency are shifted to happen earlier. */ pa_sink_volume_change *c; + pa_volume_t prev_vol = pa_cvolume_avg(&s->thread_info.current_hw_volume); pa_usec_t rewound = pa_bytes_to_usec(nbytes, &s->sample_spec); - pa_usec_t limit; - - /* Get the latency of the sink */ - if (PA_MSGOBJECT(s)->process_msg(PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_LATENCY, &limit, 0, NULL) < 0) - limit = 0; + pa_usec_t limit = pa_sink_get_latency_within_thread(s); + pa_log_debug("latency = %lld", limit); limit += pa_rtclock_now() + s->thread_info.volume_change_extra_delay; PA_LLIST_FOREACH(c, s->thread_info.volume_changes) { - if (c->at > limit) { + pa_usec_t modified_limit = limit; + if (prev_vol > pa_cvolume_avg(&c->hw_volume)) + modified_limit -= s->thread_info.volume_change_safety_margin; + else + modified_limit += s->thread_info.volume_change_safety_margin; + if (c->at > modified_limit) { c->at -= rewound; - if (c->at < limit) - c->at = limit; + if (c->at < modified_limit) + c->at = modified_limit; } + prev_vol = pa_cvolume_avg(&c->hw_volume); } + pa_sink_volume_change_apply(s, NULL); } diff --git a/src/utils/padsp.c b/src/utils/padsp.c index fb756d39..ec0c46d9 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -118,6 +118,7 @@ static PA_LLIST_HEAD(fd_info, fd_infos) = NULL; static int (*_ioctl)(int, int, void*) = NULL; static int (*_close)(int) = NULL; static int (*_open)(const char *, int, mode_t) = NULL; +static int (*___open_2)(const char *, int) = NULL; static FILE* (*_fopen)(const char *path, const char *mode) = NULL; static int (*_stat)(const char *, struct stat *) = NULL; #ifdef _STAT_VER @@ -125,6 +126,7 @@ static int (*___xstat)(int, const char *, struct stat *) = NULL; #endif #ifdef HAVE_OPEN64 static int (*_open64)(const char *, int, mode_t) = NULL; +static int (*___open64_2)(const char *, int) = NULL; static FILE* (*_fopen64)(const char *path, const char *mode) = NULL; static int (*_stat64)(const char *, struct stat64 *) = NULL; #ifdef _STAT_VER @@ -157,6 +159,14 @@ do { \ pthread_mutex_unlock(&func_mutex); \ } while(0) +#define LOAD___OPEN_2_FUNC() \ +do { \ + pthread_mutex_lock(&func_mutex); \ + if (!___open_2) \ + ___open_2 = (int (*)(const char *, int)) dlsym_fn(RTLD_NEXT, "__open_2"); \ + pthread_mutex_unlock(&func_mutex); \ +} while(0) + #define LOAD_OPEN64_FUNC() \ do { \ pthread_mutex_lock(&func_mutex); \ @@ -165,6 +175,14 @@ do { \ pthread_mutex_unlock(&func_mutex); \ } while(0) +#define LOAD___OPEN64_2_FUNC() \ +do { \ + pthread_mutex_lock(&func_mutex); \ + if (!___open64_2) \ + ___open64_2 = (int (*)(const char *, int)) dlsym_fn(RTLD_NEXT, "__open64_2"); \ + pthread_mutex_unlock(&func_mutex); \ +} while(0) + #define LOAD_CLOSE_FUNC() \ do { \ pthread_mutex_lock(&func_mutex); \ @@ -1494,6 +1512,27 @@ int open(const char *filename, int flags, ...) { return real_open(filename, flags, mode); } +static pa_bool_t is_audio_device_node(const char *path) { + return + pa_streq(path, "/dev/dsp") || + pa_streq(path, "/dev/adsp") || + pa_streq(path, "/dev/audio") || + pa_streq(path, "/dev/sndstat") || + pa_streq(path, "/dev/mixer"); +} + +int __open_2(const char *filename, int flags) { + debug(DEBUG_LEVEL_VERBOSE, __FILE__": __open_2(%s)\n", filename?filename:"NULL"); + + if ((flags & O_CREAT) || + !filename || + !is_audio_device_node(filename)) { + LOAD___OPEN_2_FUNC(); + return ___open_2(filename, flags); + } + return real_open(filename, flags, 0); +} + static int mixer_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno) { int ret = -1; @@ -2383,15 +2422,6 @@ int close(int fd) { return 0; } -static pa_bool_t is_audio_device_node(const char *path) { - return - pa_streq(path, "/dev/dsp") || - pa_streq(path, "/dev/adsp") || - pa_streq(path, "/dev/audio") || - pa_streq(path, "/dev/sndstat") || - pa_streq(path, "/dev/mixer"); -} - int access(const char *pathname, int mode) { debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname?pathname:"NULL"); @@ -2527,6 +2557,19 @@ int open64(const char *filename, int flags, ...) { return real_open(filename, flags, mode); } +int __open64_2(const char *filename, int flags) { + debug(DEBUG_LEVEL_VERBOSE, __FILE__": __open64_2(%s)\n", filename?filename:"NULL"); + + if ((flags & O_CREAT) || + !filename || + !is_audio_device_node(filename)) { + LOAD___OPEN64_2_FUNC(); + return ___open64_2(filename, flags); + } + + return real_open(filename, flags, 0); +} + #endif #ifdef _STAT_VER |