[pulseaudio] 02/19: Imported Upstream version 5.99.1

Luke Yelavich themuso-guest at moszumanska.debian.org
Sun Nov 30 22:48:38 UTC 2014


This is an automated email from the git hooks/post-receive script.

themuso-guest pushed a commit to branch ubuntu
in repository pulseaudio.

commit 9d219dac2000a04b697106f01bf42498b2e90e42
Author: Luke Yelavich <themuso at ubuntu.com>
Date:   Tue Nov 25 09:38:27 2014 +1100

    Imported Upstream version 5.99.1
---
 .tarball-version                                   |    2 +-
 .version                                           |    2 +-
 Makefile.am                                        |   22 +-
 Makefile.in                                        |   86 +-
 NEWS                                               |   61 +
 PROTOCOL                                           |   22 +-
 README                                             |    3 -
 bootstrap.sh                                       |    4 -
 build-aux/ltmain.sh                                |    4 +-
 config.h.in                                        |   25 +-
 configure                                          |  919 +++--
 configure.ac                                       |  154 +-
 doxygen/Makefile.in                                |   18 +-
 doxygen/doxygen.conf.in                            | 1115 ++++--
 man/Makefile.am                                    |    3 -
 man/Makefile.in                                    |   26 +-
 man/default.pa.5                                   |    4 +-
 man/pactl.1                                        |   20 +-
 man/pactl.1.xml.in                                 |   27 +-
 man/pax11publish.1                                 |    2 +-
 man/pulse-cli-syntax.5                             |    4 +-
 man/pulse-client.conf.5                            |    6 +-
 man/pulse-client.conf.5.xml.in                     |    2 +-
 man/pulse-daemon.conf.5                            |   18 +-
 man/pulse-daemon.conf.5.xml.in                     |   14 +-
 man/pulseaudio.1                                   |    6 +-
 man/start-pulseaudio-kde.1                         |   14 -
 man/start-pulseaudio-kde.1.xml.in                  |   48 -
 po/LINGUAS                                         |    1 +
 po/POTFILES.in                                     |    4 +-
 po/el.po                                           | 3587 ++++++++++++--------
 po/pt_BR.po                                        |  854 ++---
 po/ru.po                                           |  465 +--
 po/{el.po => sk.po}                                | 2803 +++++++--------
 po/uk.po                                           |  581 ++--
 pulseaudio.supp                                    |   50 +
 .../pulseaudio}                                    |    4 +-
 .../_pulseaudio}                                   |  402 ++-
 src/.gitignore                                     |   11 +-
 src/Makefile.am                                    |  140 +-
 src/Makefile.in                                    | 1312 ++++---
 src/daemon/.gitignore                              |    1 -
 src/daemon/caps.c                                  |    7 +-
 src/daemon/cmdline.c                               |    2 +-
 src/daemon/daemon-conf.c                           |    8 +-
 src/daemon/daemon.conf.in                          |    2 +-
 src/daemon/default.pa.in                           |   10 +-
 src/daemon/main.c                                  |  181 +-
 src/daemon/pulseaudio-kde.desktop.in               |   10 -
 src/daemon/pulseaudio.desktop.in                   |    1 +
 src/daemon/server-lookup.c                         |   30 +-
 src/daemon/start-pulseaudio-kde.in                 |   30 -
 src/daemon/start-pulseaudio-x11.in                 |    6 +-
 src/daemon/systemd/user/pulseaudio.service.in      |   10 +
 src/daemon/systemd/user/pulseaudio.socket          |   10 +
 src/map-file                                       |    3 +
 src/modules/alsa/alsa-mixer.c                      |  248 +-
 src/modules/alsa/alsa-mixer.h                      |   10 +-
 src/modules/alsa/alsa-sink.c                       |   37 +-
 src/modules/alsa/alsa-source.c                     |   35 +-
 src/modules/alsa/alsa-ucm.c                        |    7 +-
 src/modules/alsa/alsa-util.c                       |  121 +-
 src/modules/alsa/alsa-util.h                       |    9 +-
 src/modules/alsa/mixer/paths/analog-input.conf     |   15 +
 .../mixer/paths/analog-output-desktop-speaker.conf |  102 -
 .../mixer/paths/analog-output-headphones-2.conf    |    8 +
 .../alsa/mixer/paths/analog-output-headphones.conf |   20 +
 .../alsa/mixer/paths/analog-output-lineout.conf    |   19 +
 .../alsa/mixer/paths/analog-output-mono.conf       |   10 +
 .../mixer/paths/analog-output-speaker-always.conf  |   16 +-
 .../alsa/mixer/paths/analog-output-speaker.conf    |   22 +-
 src/modules/alsa/mixer/paths/analog-output.conf    |   30 -
 src/modules/alsa/mixer/paths/hdmi-output-4.conf    |   10 +
 src/modules/alsa/mixer/paths/hdmi-output-5.conf    |   10 +
 src/modules/alsa/mixer/paths/hdmi-output-6.conf    |   10 +
 src/modules/alsa/mixer/paths/hdmi-output-7.conf    |   10 +
 .../alsa/mixer/profile-sets/90-pulseaudio.rules    |    4 -
 src/modules/alsa/mixer/profile-sets/default.conf   |  292 +-
 .../alsa/mixer/profile-sets/extra-hdmi.conf        |  164 -
 .../profile-sets/force-speaker-and-int-mic.conf    |   46 +-
 .../alsa/mixer/profile-sets/force-speaker.conf     |   46 +-
 src/modules/alsa/module-alsa-card.c                |   77 +-
 src/modules/bluetooth/backend-native.c             |  501 +++
 src/modules/bluetooth/backend-ofono.c              |  665 ++++
 src/modules/bluetooth/bluez5-util.c                |  201 +-
 src/modules/bluetooth/bluez5-util.h                |   53 +-
 src/modules/bluetooth/module-bluetooth-discover.c  |    5 +-
 src/modules/bluetooth/module-bluetooth-policy.c    |   45 +-
 src/modules/bluetooth/module-bluez4-device.c       |   39 +-
 src/modules/bluetooth/module-bluez5-device.c       |  686 +++-
 src/modules/bluetooth/module-bluez5-discover.c     |   39 +-
 src/modules/dbus/iface-core.c                      |    6 +-
 src/modules/dbus/iface-device.c                    |   15 +-
 src/modules/dbus/iface-stream.c                    |    4 +-
 src/modules/echo-cancel/module-echo-cancel.c       |   31 +-
 src/modules/gconf/gconf-helper.c                   |    2 +
 src/modules/gconf/module-gconf.c                   |    7 +-
 src/modules/jack/module-jack-sink.c                |    4 +-
 src/modules/jack/module-jack-source.c              |    4 +-
 src/modules/macosx/module-coreaudio-device.c       |    2 +-
 src/modules/module-card-restore.c                  |    6 +-
 src/modules/module-combine-sink.c                  |  193 +-
 src/modules/module-console-kit.c                   |   10 +-
 src/modules/module-device-manager.c                |    4 +-
 src/modules/module-device-restore.c                |   18 +-
 src/modules/module-equalizer-sink.c                |    2 +-
 src/modules/module-esound-sink.c                   |   15 +-
 src/modules/module-mmkbd-evdev.c                   |    7 +-
 src/modules/module-null-sink.c                     |    2 +-
 src/modules/module-null-source.c                   |    2 +-
 src/modules/module-pipe-sink.c                     |    2 +-
 src/modules/module-pipe-source.c                   |    2 +-
 src/modules/module-protocol-stub.c                 |    6 +-
 src/modules/module-rescue-streams.c                |  105 +-
 src/modules/module-role-cork.c                     |    9 +-
 src/modules/module-sine-source.c                   |    2 +-
 src/modules/module-solaris.c                       |   27 +-
 src/modules/module-stream-restore.c                |   24 +-
 src/modules/module-suspend-on-idle.c               |    5 +-
 src/modules/module-switch-on-connect.c             |   34 +-
 src/modules/module-switch-on-port-available.c      |   38 +-
 src/modules/module-tunnel-sink-new.c               |   98 +-
 src/modules/module-tunnel-source-new.c             |   47 +-
 src/modules/module-tunnel.c                        |   22 +-
 src/modules/module-virtual-surround-sink.c         |   57 +-
 src/modules/module-waveout.c                       |    2 +-
 src/modules/module-zeroconf-publish.c              |   47 +-
 src/modules/oss/module-oss.c                       |    2 +-
 src/modules/raop/module-raop-sink.c                |   10 +-
 src/modules/raop/raop_client.c                     |    9 +-
 src/modules/rtp/headerlist.c                       |    8 +-
 src/modules/rtp/module-rtp-recv.c                  |   14 +-
 src/modules/rtp/module-rtp-send.c                  |    2 +-
 src/modules/rtp/rtp.c                              |   25 +-
 src/modules/xen/module-xenpv-sink.c                |    2 +-
 src/pulse/channelmap.c                             |    6 +
 src/pulse/client-conf-x11.c                        |    9 +-
 src/pulse/client-conf-x11.h                        |    6 +-
 src/pulse/client-conf.c                            |  213 +-
 src/pulse/client-conf.h                            |   39 +-
 src/pulse/client.conf.in                           |    2 +-
 src/pulse/context.c                                |  153 +-
 src/pulse/def.h                                    |    4 +-
 src/{pulsecore/cpu.h => pulse/direction.c}         |   41 +-
 src/pulse/{client-conf-x11.h => direction.h}       |   20 +-
 src/pulse/error.c                                  |    2 +-
 src/pulse/ext-device-manager.c                     |    1 +
 src/pulse/ext-device-manager.h                     |    3 +
 src/pulse/format.c                                 |   43 +-
 src/pulse/internal.h                               |    3 +
 src/pulse/introspect.c                             |    6 +-
 src/pulse/mainloop-api.h                           |   14 +-
 src/pulse/mainloop.c                               |   13 +-
 src/pulse/proplist.c                               |    5 +-
 src/pulse/proplist.h                               |    2 +-
 src/pulse/pulseaudio.h                             |    5 +-
 src/pulse/simple.c                                 |   21 +-
 src/pulse/stream.c                                 |   20 +-
 src/pulse/stream.h                                 |   13 +-
 src/pulse/thread-mainloop.c                        |    7 +-
 src/pulse/thread-mainloop.h                        |    4 +-
 src/pulse/util.c                                   |   59 +-
 src/pulse/version.h                                |    6 +-
 src/pulse/volume.h                                 |    2 +-
 src/pulsecore/asyncmsgq.c                          |    2 -
 src/pulsecore/aupdate.c                            |    2 +-
 src/pulsecore/auth-cookie.c                        |    2 +-
 src/pulsecore/authkey.c                            |   66 +-
 src/pulsecore/authkey.h                            |    3 +-
 src/pulsecore/card.c                               |    2 +-
 src/pulsecore/cli-text.c                           |    4 +-
 src/pulsecore/conf-parser.c                        |    1 +
 src/pulsecore/core-util.c                          |  157 +-
 src/pulsecore/core-util.h                          |    8 +-
 src/pulsecore/core.c                               |   16 +-
 src/pulsecore/core.h                               |   13 +-
 src/pulsecore/cpu-arm.c                            |   22 +-
 src/pulsecore/cpu-arm.h                            |    4 +-
 src/pulsecore/cpu.c                                |   38 +
 src/pulsecore/cpu.h                                |    6 +
 src/pulsecore/creds.h                              |   13 +
 src/pulsecore/database-simple.c                    |    9 +-
 src/pulsecore/device-port.c                        |   27 +
 src/pulsecore/device-port.h                        |    2 +
 src/pulsecore/endianmacros.h                       |   27 +-
 src/pulsecore/esound.h                             |    2 +-
 src/pulsecore/fdsem.c                              |    3 +-
 src/pulsecore/fdsem.h                              |    4 +-
 src/pulsecore/hashmap.c                            |   13 +
 src/pulsecore/hashmap.h                            |    7 +
 src/pulsecore/iochannel.c                          |   92 +-
 src/pulsecore/iochannel.h                          |    3 +-
 src/pulsecore/log.c                                |   12 +-
 src/pulsecore/log.h                                |    4 +-
 src/pulsecore/macro.h                              |    8 +-
 src/pulsecore/memblock.c                           |   56 +-
 src/pulsecore/memblock.h                           |   10 +-
 src/pulsecore/memblockq.c                          |    3 +-
 src/pulsecore/memchunk.c                           |    2 +-
 src/pulsecore/memtrap.c                            |    3 +
 src/pulsecore/mix.c                                |   31 +-
 src/pulsecore/mix_neon.c                           |  131 +-
 src/pulsecore/modargs.c                            |    3 -
 src/pulsecore/native-common.h                      |    7 +-
 src/pulsecore/pdispatch.c                          |   37 +-
 src/pulsecore/pdispatch.h                          |    4 +-
 src/pulsecore/pid.c                                |    2 +-
 src/pulsecore/pipe.c                               |    4 +-
 src/pulsecore/poll-win32.c                         |   60 +-
 src/pulsecore/protocol-dbus.c                      |    3 +-
 src/pulsecore/protocol-esound.c                    |   17 +-
 src/pulsecore/protocol-native.c                    |  133 +-
 src/pulsecore/protocol-native.h                    |    1 +
 src/pulsecore/pstream-util.c                       |   45 +-
 src/pulsecore/pstream-util.h                       |    1 +
 src/pulsecore/pstream.c                            |  351 +-
 src/pulsecore/pstream.h                            |    9 +-
 src/pulsecore/remap.c                              |  480 ++-
 src/pulsecore/remap.h                              |   20 +-
 src/pulsecore/remap_mmx.c                          |   53 +-
 src/pulsecore/remap_neon.c                         |  498 +++
 src/pulsecore/remap_sse.c                          |   53 +-
 src/pulsecore/resampler.c                          |  701 +---
 src/pulsecore/resampler.h                          |   51 +
 src/pulsecore/resampler/ffmpeg.c                   |  132 +
 src/pulsecore/resampler/libsamplerate.c            |  102 +
 src/pulsecore/resampler/peaks.c                    |  163 +
 src/pulsecore/resampler/speex.c                    |  180 +
 src/pulsecore/resampler/trivial.c                  |  102 +
 src/pulsecore/rtpoll.c                             |   14 +-
 src/pulsecore/rtpoll.h                             |    7 +-
 src/pulsecore/sample-util.c                        |    4 +-
 src/pulsecore/sconv-s16le.c                        |   22 +-
 src/pulsecore/sconv_neon.c                         |   10 +-
 src/pulsecore/sconv_sse.c                          |    3 +-
 src/pulsecore/shm.c                                |   12 +-
 src/pulsecore/shm.h                                |    2 +-
 src/pulsecore/sink-input.c                         |  157 +-
 src/pulsecore/sink-input.h                         |   14 +-
 src/pulsecore/sink.c                               |  249 +-
 src/pulsecore/sink.h                               |   37 +-
 src/pulsecore/socket-server.c                      |   98 +-
 src/pulsecore/socket-util.c                        |   18 +
 src/pulsecore/source-output.c                      |  136 +-
 src/pulsecore/source-output.h                      |   14 +-
 src/pulsecore/source.c                             |  235 +-
 src/pulsecore/source.h                             |   33 +-
 src/pulsecore/srbchannel.c                         |  378 +++
 src/pulsecore/srbchannel.h                         |   59 +
 src/pulsecore/start-child.c                        |    2 +-
 src/pulsecore/svolume_c.c                          |    6 +-
 src/tests/alsa-time-test.c                         |   37 +-
 src/tests/connect-stress.c                         |    8 +-
 src/tests/cpu-mix-test.c                           |  226 ++
 src/tests/cpu-remap-test.c                         |  436 +++
 src/tests/cpu-sconv-test.c                         |  265 ++
 src/tests/cpu-test.c                               |  887 -----
 src/tests/cpu-volume-test.c                        |  249 ++
 src/tests/flist-test.c                             |    2 +-
 src/tests/format-test.c                            |    2 +-
 src/tests/lo-test-util.c                           |   10 +-
 src/tests/mcalign-test.c                           |    5 +-
 src/tests/memblock-test.c                          |    4 +-
 src/tests/mix-special-test.c                       |  326 --
 src/tests/mix-test.c                               |  231 +-
 src/tests/resampler-test.c                         |    8 +-
 src/tests/rtpoll-test.c                            |    4 +-
 src/tests/sigbus-test.c                            |    2 +
 src/tests/srbchannel-test.c                        |  138 +
 src/utils/pacat.c                                  |   12 +-
 src/utils/pactl.c                                  |  322 +-
 src/utils/pax11publish.c                           |   12 +-
 vala/libpulse-simple.deps                          |    1 +
 vala/libpulse-simple.vapi                          |   36 +
 vala/libpulse.vapi                                 |    8 +
 275 files changed, 17561 insertions(+), 9623 deletions(-)

diff --git a/.tarball-version b/.tarball-version
index 819e07a..e8cead2 100644
--- a/.tarball-version
+++ b/.tarball-version
@@ -1 +1 @@
-5.0
+5.99.1
diff --git a/.version b/.version
index 819e07a..e8cead2 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-5.0
+5.99.1
diff --git a/Makefile.am b/Makefile.am
index b0b2553..665736d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,6 +21,7 @@ EXTRA_DIST = \
 	bootstrap.sh \
 	git-version-gen \
 	LICENSE \
+	pulseaudio.supp \
 	GPL \
 	LGPL \
 	doxygen/Makefile.am \
@@ -29,7 +30,6 @@ EXTRA_DIST = \
 	PROTOCOL \
 	README \
 	todo \
-	shell-completion/pulseaudio-zsh-completion.zsh \
 	.gitignore \
 	doxygen/.gitignore \
 	m4/.gitignore \
@@ -47,7 +47,8 @@ noinst_DATA =
 vapidir = $(datadir)/vala/vapi
 dist_vapi_DATA = \
 		vala/libpulse.deps vala/libpulse.vapi \
-		vala/libpulse-mainloop-glib.deps vala/libpulse-mainloop-glib.vapi
+		vala/libpulse-mainloop-glib.deps vala/libpulse-mainloop-glib.vapi \
+		vala/libpulse-simple.deps vala/libpulse-simple.vapi
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libpulse.pc libpulse-simple.pc
@@ -61,7 +62,22 @@ cmakedir = $(libdir)/cmake/PulseAudio
 cmake_DATA = PulseAudioConfig.cmake PulseAudioConfigVersion.cmake
 
 bashcompletiondir=$(sysconfdir)/bash_completion.d
-dist_bashcompletion_DATA = shell-completion/pulseaudio-bash-completion.sh
+dist_bashcompletion_DATA = shell-completion/bash/pulseaudio
+
+install-bashcompletion-aliases:
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pactl
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pacmd
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pasuspender
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/padsp
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pacat
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/paplay
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/parec
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/parecord
+
+install-data-hook: install-bashcompletion-aliases
+
+zshcompletiondir=@zshcompletiondir@
+dist_zshcompletion_DATA = shell-completion/zsh/_pulseaudio
 
 homepage: all dist doxygen
 	test -d $$HOME/homepage/private
diff --git a/Makefile.in b/Makefile.in
index b3cc5d7..6f7adcf 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -107,8 +107,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
 	$(top_srcdir)/src/pulse/version.h.in \
 	$(srcdir)/PulseAudioConfig.cmake.in \
 	$(srcdir)/PulseAudioConfigVersion.cmake.in \
-	$(dist_bashcompletion_DATA) $(dist_vapi_DATA) ABOUT-NLS NEWS \
-	README build-aux/compile build-aux/config.guess \
+	$(dist_bashcompletion_DATA) $(dist_vapi_DATA) \
+	$(dist_zshcompletion_DATA) ABOUT-NLS NEWS README \
+	build-aux/compile build-aux/config.guess \
 	build-aux/config.rpath build-aux/config.sub \
 	build-aux/install-sh build-aux/missing build-aux/ltmain.sh \
 	$(top_srcdir)/build-aux/compile \
@@ -199,9 +200,9 @@ am__uninstall_files_from_dir = { \
   }
 am__installdirs = "$(DESTDIR)$(cmakedir)" \
 	"$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(vapidir)" \
-	"$(DESTDIR)$(pkgconfigdir)"
+	"$(DESTDIR)$(zshcompletiondir)" "$(DESTDIR)$(pkgconfigdir)"
 DATA = $(cmake_DATA) $(dist_bashcompletion_DATA) $(dist_vapi_DATA) \
-	$(noinst_DATA) $(pkgconfig_DATA)
+	$(dist_zshcompletion_DATA) $(noinst_DATA) $(pkgconfig_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
 am__recursive_targets = \
@@ -289,6 +290,8 @@ AUTOMAKE = @AUTOMAKE@
 AVAHI_CFLAGS = @AVAHI_CFLAGS@
 AVAHI_LIBS = @AVAHI_LIBS@
 AWK = @AWK@
+BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
+BLUEZ_LIBS = @BLUEZ_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -336,13 +339,16 @@ HAVE_AVAHI = @HAVE_AVAHI@
 HAVE_BLUEZ = @HAVE_BLUEZ@
 HAVE_BLUEZ_4 = @HAVE_BLUEZ_4@
 HAVE_BLUEZ_5 = @HAVE_BLUEZ_5@
+HAVE_BLUEZ_5_NATIVE_HEADSET = @HAVE_BLUEZ_5_NATIVE_HEADSET@
+HAVE_BLUEZ_5_OFONO_HEADSET = @HAVE_BLUEZ_5_OFONO_HEADSET@
 HAVE_DBUS = @HAVE_DBUS@
 HAVE_GLIB20 = @HAVE_GLIB20@
 HAVE_MKFIFO = @HAVE_MKFIFO@
 HAVE_NEON = @HAVE_NEON@
 HAVE_OSS_OUTPUT = @HAVE_OSS_OUTPUT@
-HAVE_SYSTEMD = @HAVE_SYSTEMD@
+HAVE_SYSTEMD_DAEMON = @HAVE_SYSTEMD_DAEMON@
 HAVE_SYSTEMD_JOURNAL = @HAVE_SYSTEMD_JOURNAL@
+HAVE_SYSTEMD_LOGIN = @HAVE_SYSTEMD_LOGIN@
 HAVE_SYS_RESOURCE_H = @HAVE_SYS_RESOURCE_H@
 HAVE_UDEV = @HAVE_UDEV@
 HAVE_WAVEOUT = @HAVE_WAVEOUT@
@@ -365,8 +371,6 @@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JACK_CFLAGS = @JACK_CFLAGS@
 JACK_LIBS = @JACK_LIBS@
-JOURNAL_CFLAGS = @JOURNAL_CFLAGS@
-JOURNAL_LIBS = @JOURNAL_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBASYNCNS_CFLAGS = @LIBASYNCNS_CFLAGS@
@@ -433,6 +437,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PA_ACCESS_GROUP = @PA_ACCESS_GROUP@
 PA_API_VERSION = @PA_API_VERSION@
 PA_BINARY = @PA_BINARY@
+PA_DEFAULT_AUTOSPAWN = @PA_DEFAULT_AUTOSPAWN@
 PA_DEFAULT_CONFIG_DIR = @PA_DEFAULT_CONFIG_DIR@
 PA_DLSEARCHPATH = @PA_DLSEARCHPATH@
 PA_INCDIR = @PA_INCDIR@
@@ -466,6 +471,12 @@ SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STOW = @STOW@
 STRIP = @STRIP@
+SYSTEMDDAEMON_CFLAGS = @SYSTEMDDAEMON_CFLAGS@
+SYSTEMDDAEMON_LIBS = @SYSTEMDDAEMON_LIBS@
+SYSTEMDJOURNAL_CFLAGS = @SYSTEMDJOURNAL_CFLAGS@
+SYSTEMDJOURNAL_LIBS = @SYSTEMDJOURNAL_LIBS@
+SYSTEMDLOGIN_CFLAGS = @SYSTEMDLOGIN_CFLAGS@
+SYSTEMDLOGIN_LIBS = @SYSTEMDLOGIN_LIBS@
 SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
 TDB_CFLAGS = @TDB_CFLAGS@
@@ -538,16 +549,19 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+systemduserunitdir = @systemduserunitdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 udevrulesdir = @udevrulesdir@
+zshcompletiondir = @zshcompletiondir@
 ACLOCAL_AMFLAGS = -I m4
 EXTRA_DIST = \
 	bootstrap.sh \
 	git-version-gen \
 	LICENSE \
+	pulseaudio.supp \
 	GPL \
 	LGPL \
 	doxygen/Makefile.am \
@@ -556,7 +570,6 @@ EXTRA_DIST = \
 	PROTOCOL \
 	README \
 	todo \
-	shell-completion/pulseaudio-zsh-completion.zsh \
 	.gitignore \
 	doxygen/.gitignore \
 	m4/.gitignore \
@@ -572,14 +585,16 @@ noinst_DATA =
 vapidir = $(datadir)/vala/vapi
 dist_vapi_DATA = \
 		vala/libpulse.deps vala/libpulse.vapi \
-		vala/libpulse-mainloop-glib.deps vala/libpulse-mainloop-glib.vapi
+		vala/libpulse-mainloop-glib.deps vala/libpulse-mainloop-glib.vapi \
+		vala/libpulse-simple.deps vala/libpulse-simple.vapi
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libpulse.pc libpulse-simple.pc $(am__append_1)
 cmakedir = $(libdir)/cmake/PulseAudio
 cmake_DATA = PulseAudioConfig.cmake PulseAudioConfigVersion.cmake
 bashcompletiondir = $(sysconfdir)/bash_completion.d
-dist_bashcompletion_DATA = shell-completion/pulseaudio-bash-completion.sh
+dist_bashcompletion_DATA = shell-completion/bash/pulseaudio
+dist_zshcompletion_DATA = shell-completion/zsh/_pulseaudio
 
 # see git-version-gen
 BUILT_SOURCES = $(top_srcdir)/.version
@@ -724,6 +739,27 @@ uninstall-dist_vapiDATA:
 	@list='$(dist_vapi_DATA)'; test -n "$(vapidir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(vapidir)'; $(am__uninstall_files_from_dir)
+install-dist_zshcompletionDATA: $(dist_zshcompletion_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_zshcompletion_DATA)'; test -n "$(zshcompletiondir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(zshcompletiondir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(zshcompletiondir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(zshcompletiondir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(zshcompletiondir)" || exit $$?; \
+	done
+
+uninstall-dist_zshcompletionDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_zshcompletion_DATA)'; test -n "$(zshcompletiondir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(zshcompletiondir)'; $(am__uninstall_files_from_dir)
 install-pkgconfigDATA: $(pkgconfig_DATA)
 	@$(NORMAL_INSTALL)
 	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
@@ -1048,7 +1084,7 @@ check: $(BUILT_SOURCES)
 all-am: Makefile $(DATA) config.h
 installdirs: installdirs-recursive
 installdirs-am:
-	for dir in "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(vapidir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+	for dir in "$(DESTDIR)$(cmakedir)" "$(DESTDIR)$(bashcompletiondir)" "$(DESTDIR)$(vapidir)" "$(DESTDIR)$(zshcompletiondir)" "$(DESTDIR)$(pkgconfigdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: $(BUILT_SOURCES)
@@ -1108,8 +1144,10 @@ info: info-recursive
 info-am:
 
 install-data-am: install-cmakeDATA install-dist_bashcompletionDATA \
-	install-dist_vapiDATA install-pkgconfigDATA
-
+	install-dist_vapiDATA install-dist_zshcompletionDATA \
+	install-pkgconfigDATA
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
 install-dvi: install-dvi-recursive
 
 install-dvi-am:
@@ -1155,10 +1193,11 @@ ps: ps-recursive
 ps-am:
 
 uninstall-am: uninstall-cmakeDATA uninstall-dist_bashcompletionDATA \
-	uninstall-dist_vapiDATA uninstall-pkgconfigDATA
+	uninstall-dist_vapiDATA uninstall-dist_zshcompletionDATA \
+	uninstall-pkgconfigDATA
 
 .MAKE: $(am__recursive_targets) all check install install-am \
-	install-strip
+	install-data-am install-strip
 
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
 	am--refresh check check-am clean clean-cscope clean-generic \
@@ -1169,7 +1208,8 @@ uninstall-am: uninstall-cmakeDATA uninstall-dist_bashcompletionDATA \
 	distclean-tags distcleancheck distdir distuninstallcheck dvi \
 	dvi-am html html-am info info-am install install-am \
 	install-cmakeDATA install-data install-data-am \
-	install-dist_bashcompletionDATA install-dist_vapiDATA \
+	install-data-hook install-dist_bashcompletionDATA \
+	install-dist_vapiDATA install-dist_zshcompletionDATA \
 	install-dvi install-dvi-am install-exec install-exec-am \
 	install-html install-html-am install-info install-info-am \
 	install-man install-pdf install-pdf-am install-pkgconfigDATA \
@@ -1179,8 +1219,20 @@ uninstall-am: uninstall-cmakeDATA uninstall-dist_bashcompletionDATA \
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am uninstall-cmakeDATA \
 	uninstall-dist_bashcompletionDATA uninstall-dist_vapiDATA \
-	uninstall-pkgconfigDATA
+	uninstall-dist_zshcompletionDATA uninstall-pkgconfigDATA
+
+
+install-bashcompletion-aliases:
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pactl
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pacmd
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pasuspender
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/padsp
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pacat
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/paplay
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/parec
+	$(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/parecord
 
+install-data-hook: install-bashcompletion-aliases
 
 homepage: all dist doxygen
 	test -d $$HOME/homepage/private
diff --git a/NEWS b/NEWS
index 782af5d..a86a33d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,64 @@
+PulseAudio 6.0
+
+Changes at a glance:
+
+  * Bluez 5 HSP (headset profile) support, both with and without oFono
+  * SystemD socket activation support
+  * Better support for multichannel and 2.1 profiles
+  * Protocol optimisations
+  * Zsh shell completion support
+  * Remap optimisations
+  * Lots of other enhancements, bug fixes, and documenation and i18n updates
+
+Detailed change log:
+
+  http://www.freedesktop.org/wiki/Software/PulseAudio/Notes/6.0
+
+Contributors:
+
+  Alexander Couzens
+  Alexander E. Patrakov
+  Alexander Kurtz
+  Alexander Potashev
+  Andrey Semashev
+  Arun Raghavan
+  Bradley Broom
+  Colin Guthrie
+  David Henningsson
+  Dimitris Spingos
+  Dušan Kazik
+  Evan Nemerson
+  Felipe Sateler
+  Hemanth Meenakshisundaram
+  Hui Wang
+  James Bunton
+  Javier Jardón
+  João Paulo Rechi Vita
+  Joe Marcus Clarke
+  Juho Hämäläinen
+  Luiz Augusto von Dentz
+  Lukas Peleska
+  Lukasz Marek
+  Mauro Guerrera
+  Michał Górny
+  Niels Ole Salscheider
+  Pali Rohár
+  Parin Porecha
+  Pete Beardmore
+  Peter Meerwald
+  Peter Ujfalusi
+  Pierre Ossman
+  poljar (Damir Jelić)
+  Rafael Ferreira
+  Rex Dieter
+  Ricardo Salveti de Araujo
+  Sajeesh Sidharthan
+  Sjoerd Simons
+  Tanu Kaskinen
+  Wim Taymans
+  Yuri Chornoivan
+
+
 PulseAudio 5.0
 
 Changes at a glance:
diff --git a/PROTOCOL b/PROTOCOL
index 0673d86..3c08fea 100644
--- a/PROTOCOL
+++ b/PROTOCOL
@@ -30,7 +30,7 @@ SHM data transfer support
 
 ### v11, implemented by >= 0.9.7
 
-Reply to to PA_COMMAND_GET_SINK_INPUT_INFO, PA_COMMAND_GET_SINK_INPUT_INFO_LIST gets new field at the end:
+Reply to PA_COMMAND_GET_SINK_INPUT_INFO, PA_COMMAND_GET_SINK_INPUT_INFO_LIST gets new field at the end:
 
  mute
 
@@ -351,6 +351,26 @@ New field in all commands that send/receive profile introspection data
 
 The field is added once for every profile.
 
+## v30, implemented by >= 6.0
+#
+A new protocol mechanism supported: Two ringbuffers in shared memory.
+Pulseaudio fdsem (wrappers around event file descriptors) are used for
+signalling new data.
+The protocol has a new SHM flag telling whether a SHM memblock is writable
+by both sides.
+
+PA_COMMAND_ENABLE_SRBCHANNEL
+First sent from server to client, tells the client to start listening on
+the additional SHM ringbuffer channel.
+This command also has ancillary data (two eventfds attached to it).
+Must be directly followed by a memblock which is the ringbuffer memory.
+When memblock is received by the client, it acks by sending
+PA_COMMAND_ENABLE_SRBCHANNEL back (without ancillary or memblock data).
+
+PA_COMMAND_DISABLE_SRBCHANNEL
+Tells the client to stop listening on the additional SHM ringbuffer channel.
+Acked by client by sending PA_COMMAND_DISABLE_SRBCHANNEL back.
+
 #### If you just changed the protocol, read this
 ## module-tunnel depends on the sink/source/sink-input/source-input protocol
 ## internals, so if you changed these, you might have broken module-tunnel.
diff --git a/README b/README
index 66c1847..470de40 100644
--- a/README
+++ b/README
@@ -21,9 +21,6 @@ TRAC/BUGZILLA TICKET CHANGES MAILING LIST:
 IRC:
 	#pulseaudio on irc.freenode.org
 
-CIA:
-	http://cia.navi.cx/stats/project/polypaudio
-
 FRESHMEAT:
 	http://freshmeat.net/projects/pulseaudio/
 
diff --git a/bootstrap.sh b/bootstrap.sh
index 08e0fa4..011aa13 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -47,10 +47,6 @@ fi
 intltoolize --version >/dev/null || DIE=1
 test "$DIE" = 1 && exit 1
 
-if type -p colorgcc > /dev/null ; then
-   export CC=colorgcc
-fi
-
 autopoint --force
 AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
 
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index bb5fa02..a356aca 100644
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -70,7 +70,7 @@
 #         compiler:		$LTCC
 #         compiler flags:		$LTCFLAGS
 #         linker:		$LD (gnu? $with_gnu_ld)
-#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.7
+#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
 #         automake:	$automake_version
 #         autoconf:	$autoconf_version
 #
@@ -80,7 +80,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.2 Debian-2.4.2-1.7"
+VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1"
 TIMESTAMP=""
 package_revision=1.3337
 
diff --git a/config.h.in b/config.h.in
index 86e4408..8aa2e1d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -68,6 +68,12 @@
 /* Define to 1 if you have the <atomic_ops.h> header file. */
 #undef HAVE_ATOMIC_OPS_H
 
+/* Bluez 5 native headset backend enabled */
+#undef HAVE_BLUEZ_5_NATIVE_HEADSET
+
+/* Bluez 5 ofono headset backend enabled */
+#undef HAVE_BLUEZ_5_OFONO_HEADSET
+
 /* Define to 1 if you have the <byteswap.h> header file. */
 #undef HAVE_BYTESWAP_H
 
@@ -108,6 +114,9 @@
    don't. */
 #undef HAVE_DECL_ENVIRON
 
+/* Have dladdr? */
+#undef HAVE_DLADDR
+
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
@@ -186,9 +195,6 @@
 /* Define this to enable IPv6 connection support */
 #undef HAVE_IPV6
 
-/* Have JOURNAL? */
-#undef HAVE_JOURNAL
-
 /* Define to 1 if you have the <langinfo.h> header file. */
 #undef HAVE_LANGINFO_H
 
@@ -408,8 +414,14 @@
 /* Define to 1 if you have the <syslog.h> header file. */
 #undef HAVE_SYSLOG_H
 
-/* Have SYSTEMD? */
-#undef HAVE_SYSTEMD
+/* Have SYSTEMDDAEMON? */
+#undef HAVE_SYSTEMD_DAEMON
+
+/* Have SYSTEMDJOURNAL? */
+#undef HAVE_SYSTEMD_JOURNAL
+
+/* Have SYSTEMDLOGIN? */
+#undef HAVE_SYSTEMD_LOGIN
 
 /* Define to 1 if you have the <sys/atomic.h> header file. */
 #undef HAVE_SYS_ATOMIC_H
@@ -658,9 +670,6 @@
 /* Version number of package */
 #undef VERSION
 
-/* Just a test. */
-#undef WIBBLE
-
 /* Needed to avoid including unnecessary headers on Windows */
 #undef WIN32_LEAN_AND_MEAN
 
diff --git a/configure b/configure
index f9c13a1..139ec1b 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for pulseaudio 5.0.
+# Generated by GNU Autoconf 2.69 for pulseaudio 5.99.1.
 #
 # Report bugs to <pulseaudio-discuss (at) lists (dot) freedesktop (dot) org>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='pulseaudio'
 PACKAGE_TARNAME='pulseaudio'
-PACKAGE_VERSION='5.0'
-PACKAGE_STRING='pulseaudio 5.0'
+PACKAGE_VERSION='5.99.1'
+PACKAGE_STRING='pulseaudio 5.99.1'
 PACKAGE_BUGREPORT='pulseaudio-discuss (at) lists (dot) freedesktop (dot) org'
 PACKAGE_URL='http://pulseaudio.org/'
 
@@ -643,6 +643,7 @@ PA_INCDIR
 PA_LIBDIR
 FORCE_PREOPEN_FALSE
 FORCE_PREOPEN_TRUE
+zshcompletiondir
 udevrulesdir
 PA_DLSEARCHPATH
 modlibexecdir
@@ -675,11 +676,20 @@ BUILD_MANPAGES_TRUE
 HAVE_SYSTEMD_JOURNAL_FALSE
 HAVE_SYSTEMD_JOURNAL_TRUE
 HAVE_SYSTEMD_JOURNAL
-JOURNAL_LIBS
-JOURNAL_CFLAGS
-HAVE_SYSTEMD_FALSE
-HAVE_SYSTEMD_TRUE
-HAVE_SYSTEMD
+SYSTEMDJOURNAL_LIBS
+SYSTEMDJOURNAL_CFLAGS
+HAVE_SYSTEMD_LOGIN_FALSE
+HAVE_SYSTEMD_LOGIN_TRUE
+HAVE_SYSTEMD_LOGIN
+SYSTEMDLOGIN_LIBS
+SYSTEMDLOGIN_CFLAGS
+HAVE_SYSTEMD_DAEMON_FALSE
+HAVE_SYSTEMD_DAEMON_TRUE
+HAVE_SYSTEMD_DAEMON
+PA_DEFAULT_AUTOSPAWN
+SYSTEMDDAEMON_LIBS
+SYSTEMDDAEMON_CFLAGS
+systemduserunitdir
 SYSTEMD_LIBS
 SYSTEMD_CFLAGS
 HAVE_ORCC_FALSE
@@ -717,6 +727,14 @@ HAVE_UDEV_TRUE
 HAVE_UDEV
 UDEV_LIBS
 UDEV_CFLAGS
+HAVE_BLUEZ_5_NATIVE_HEADSET_FALSE
+HAVE_BLUEZ_5_NATIVE_HEADSET_TRUE
+HAVE_BLUEZ_5_NATIVE_HEADSET
+BLUEZ_LIBS
+BLUEZ_CFLAGS
+HAVE_BLUEZ_5_OFONO_HEADSET_FALSE
+HAVE_BLUEZ_5_OFONO_HEADSET_TRUE
+HAVE_BLUEZ_5_OFONO_HEADSET
 HAVE_BLUEZ_FALSE
 HAVE_BLUEZ_TRUE
 HAVE_BLUEZ
@@ -843,7 +861,6 @@ MANIFEST_TOOL
 RANLIB
 ac_ct_AR
 AR
-LN_S
 NM
 ac_ct_DUMPBIN
 DUMPBIN
@@ -947,6 +964,7 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
+LN_S
 STOW
 host_os
 host_vendor
@@ -1072,6 +1090,8 @@ enable_lirc
 enable_dbus
 enable_bluez4
 enable_bluez5
+enable_bluez5_ofono_headset
+enable_bluez5_native_headset
 enable_udev
 enable_hal_compat
 enable_ipv6
@@ -1081,8 +1101,10 @@ with_speex
 enable_xen
 enable_gcov
 enable_orc
-enable_systemd
+enable_systemd_daemon
+enable_systemd_login
 enable_systemd_journal
+with_systemduserunitdir
 enable_manpages
 with_system_user
 with_system_group
@@ -1099,6 +1121,7 @@ enable_static_bins
 with_preopen_mods
 with_module_dir
 with_udev_rules_dir
+with_zsh_completion_dir
 enable_force_preopen
 '
       ac_precious_vars='build_alias
@@ -1147,6 +1170,8 @@ DBUS_CFLAGS
 DBUS_LIBS
 SBC_CFLAGS
 SBC_LIBS
+BLUEZ_CFLAGS
+BLUEZ_LIBS
 UDEV_CFLAGS
 UDEV_LIBS
 OPENSSL_CFLAGS
@@ -1159,8 +1184,12 @@ ORC_CFLAGS
 ORC_LIBS
 SYSTEMD_CFLAGS
 SYSTEMD_LIBS
-JOURNAL_CFLAGS
-JOURNAL_LIBS
+SYSTEMDDAEMON_CFLAGS
+SYSTEMDDAEMON_LIBS
+SYSTEMDLOGIN_CFLAGS
+SYSTEMDLOGIN_LIBS
+SYSTEMDJOURNAL_CFLAGS
+SYSTEMDJOURNAL_LIBS
 WEBRTC_CFLAGS
 WEBRTC_LIBS'
 
@@ -1703,7 +1732,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pulseaudio 5.0 to adapt to many kinds of systems.
+\`configure' configures pulseaudio 5.99.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1773,7 +1802,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pulseaudio 5.0:";;
+     short | recursive ) echo "Configuration of pulseaudio 5.99.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1823,6 +1852,12 @@ Optional Features:
   --disable-dbus          Disable optional D-Bus support
   --disable-bluez4        Disable optional BlueZ 4 support
   --disable-bluez5        Disable optional BlueZ 5 support
+  --disable-bluez5-ofono-headset
+                          Disable optional ofono headset backend support
+                          (Bluez 5)
+  --disable-bluez5-native-headset
+                          Disable optional native headset backend support
+                          (Bluez 5)
   --disable-udev          Disable optional UDEV support
   --disable-hal-compat    Disable optional HAL->udev transition compatibility
                           support
@@ -1831,7 +1866,10 @@ Optional Features:
   --disable-xen           Disable optional Xen paravirtualized driver
   --enable-gcov           Enable optional gcov coverage analysis
   --enable-orc            use Orc if installed
-  --disable-systemd       Disable optional systemd support
+  --disable-systemd-daemon
+                          Disable optional systemd daemon (socket activation)
+                          support
+  --disable-systemd-login Disable optional systemd login support
   --disable-systemd-journal
                           Disable optional systemd journal support
   --disable-manpages      Disable building and installation of man pages
@@ -1866,6 +1904,8 @@ Optional Packages:
                           Choose database backend.
   --without-fftw          Omit FFTW-using modules (equalizer)
   --without-speex         Omit speex (resampling, AEC)
+  --with-systemduserunitdir=DIR
+                          Directory for systemd user service files
   --with-system-user=<user>
                           User for running the PulseAudio daemon as a
                           system-wide instance (pulse)
@@ -1886,6 +1926,9 @@ Optional Packages:
                           to ${libdir}/pulse-${PA_MAJORMINOR}/modules
   --with-udev-rules-dir   Directory where to install udev rules to (defaults
                           to /lib/udev/rules.d)
+  --with-zsh-completion-dir
+                          Zsh completions directory (defaults to
+                          ${datadir}/zsh/site-functions)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1950,6 +1993,9 @@ Some influential environment variables:
   DBUS_LIBS   linker flags for DBUS, overriding pkg-config
   SBC_CFLAGS  C compiler flags for SBC, overriding pkg-config
   SBC_LIBS    linker flags for SBC, overriding pkg-config
+  BLUEZ_CFLAGS
+              C compiler flags for BLUEZ, overriding pkg-config
+  BLUEZ_LIBS  linker flags for BLUEZ, overriding pkg-config
   UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config
   UDEV_LIBS   linker flags for UDEV, overriding pkg-config
   OPENSSL_CFLAGS
@@ -1968,10 +2014,18 @@ Some influential environment variables:
               C compiler flags for SYSTEMD, overriding pkg-config
   SYSTEMD_LIBS
               linker flags for SYSTEMD, overriding pkg-config
-  JOURNAL_CFLAGS
-              C compiler flags for JOURNAL, overriding pkg-config
-  JOURNAL_LIBS
-              linker flags for JOURNAL, overriding pkg-config
+  SYSTEMDDAEMON_CFLAGS
+              C compiler flags for SYSTEMDDAEMON, overriding pkg-config
+  SYSTEMDDAEMON_LIBS
+              linker flags for SYSTEMDDAEMON, overriding pkg-config
+  SYSTEMDLOGIN_CFLAGS
+              C compiler flags for SYSTEMDLOGIN, overriding pkg-config
+  SYSTEMDLOGIN_LIBS
+              linker flags for SYSTEMDLOGIN, overriding pkg-config
+  SYSTEMDJOURNAL_CFLAGS
+              C compiler flags for SYSTEMDJOURNAL, overriding pkg-config
+  SYSTEMDJOURNAL_LIBS
+              linker flags for SYSTEMDJOURNAL, overriding pkg-config
   WEBRTC_CFLAGS
               C compiler flags for WEBRTC, overriding pkg-config
   WEBRTC_LIBS linker flags for WEBRTC, overriding pkg-config
@@ -2043,7 +2097,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pulseaudio configure 5.0
+pulseaudio configure 5.99.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2633,7 +2687,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by pulseaudio $as_me 5.0, which was
+It was created by pulseaudio $as_me 5.99.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3585,7 +3639,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='pulseaudio'
- VERSION='5.0'
+ VERSION='5.99.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3812,12 +3866,12 @@ PA_MAJORMINOR=`echo $VERSION | cut -d. -f1 | cut -d- -f1`.`echo $VERSION | cut -
 
 PA_API_VERSION=12
 
-PA_PROTOCOL_VERSION=29
+PA_PROTOCOL_VERSION=30
 
 
 # The stable ABI for client applications, for the version info x:y:z
 # always will hold y=z
-LIBPULSE_VERSION_INFO=17:3:17
+LIBPULSE_VERSION_INFO=18:0:18
 
 
 # A simplified, synchronous, ABI-stable interface for client
@@ -4001,6 +4055,20 @@ AM_BACKSLASH='\'
 
 
 
+# ln -s
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+
 # CC
 
 ac_ext=c
@@ -9002,7 +9070,7 @@ esac
 
 #### Compiler flags ####
 
-for flag in -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-par [...]
+for flag in -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-par [...]
    as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-pedantic -Werror_$flag" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
 $as_echo_n "checking whether C compiler accepts $flag... " >&6; }
@@ -9062,63 +9130,45 @@ fi
 done
 
 
-# Only enable fastpath asserts when doing a debug build, e.g. from bootstrap.sh.
 case " $CFLAGS " in #(
   *" -O0 "*) :
      ;; #(
   *) :
 
+    # Don't append the flag if it already exists.
+    # Only enable fastpath asserts when doing a debug build, e.g. from bootstrap.sh.
+
 if ${CPPFLAGS+:} false; then :
-  if $as_echo " $CPPFLAGS " | $GREP " "-DFASTPATH" " 2>&1 >/dev/null; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains \"-DFASTPATH\""; } >&5
-  (: CPPFLAGS already contains "-DFASTPATH") 2>&5
+  if $as_echo " $CPPFLAGS " | $GREP " -DFASTPATH " 2>&1 >/dev/null; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains -DFASTPATH"; } >&5
+  (: CPPFLAGS already contains -DFASTPATH) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS \"-DFASTPATH\"\""; } >&5
-  (: CPPFLAGS="$CPPFLAGS "-DFASTPATH"") 2>&5
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS -DFASTPATH\""; } >&5
+  (: CPPFLAGS="$CPPFLAGS -DFASTPATH") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-    as_fn_append CPPFLAGS " "-DFASTPATH""
+    as_fn_append CPPFLAGS " -DFASTPATH"
 fi
 else
-  CPPFLAGS="-DFASTPATH"
+  CPPFLAGS=-DFASTPATH
 fi
- ;;
-esac
 
-# Only set _FORTIFY_SOURCE when optimizations are enabled. If optimizations
-# are disabled, _FORTIFY_SOURCE doesn't do anything, and causes tons of
-# warnings during compiling on some distributions (at least Fedora).
-case " $CFLAGS " in #(
-  *" -O0 "*) :
-     ;; #(
-  *) :
 
-if ${CPPFLAGS+:} false; then :
-  if $as_echo " $CPPFLAGS " | $GREP " "-D_FORTIFY_SOURCE=2" " 2>&1 >/dev/null; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS already contains \"-D_FORTIFY_SOURCE=2\""; } >&5
-  (: CPPFLAGS already contains "-D_FORTIFY_SOURCE=2") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: : CPPFLAGS=\"\$CPPFLAGS \"-D_FORTIFY_SOURCE=2\"\""; } >&5
-  (: CPPFLAGS="$CPPFLAGS "-D_FORTIFY_SOURCE=2"") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-    as_fn_append CPPFLAGS " "-D_FORTIFY_SOURCE=2""
-fi
-else
-  CPPFLAGS="-D_FORTIFY_SOURCE=2"
-fi
+    # Cannot use AX_APPEND_FLAG here, as it assumes no space inside the added flags.
+    # Cannot append flags with AX_APPEND_FLAG one by one, as this would destroy all fortifications
+    # if CPPFLAGS already contain -D_FORTIFY_SOURCE=2.
+
+    # Warnings to be aware of that appear with -D_FORTIFY_SOURCE=2 but without -U_FORTIFY_SOURCE:
+    # On Fedora 20 with -O0: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
+    # On Gentoo with -O2:    "_FORTIFY_SOURCE" redefined [enabled by default]
+    as_fn_append CPPFLAGS " -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
  ;;
 esac
 
-
 #### Linker flags ####
 
 # Check whether the linker supports the -version-script option.
@@ -10184,17 +10234,6 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
 $as_echo "$lt_cv_nm_interface" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
 # find the maximum length of command line arguments
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
@@ -23196,7 +23235,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -23242,7 +23281,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -23266,7 +23305,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -23311,7 +23350,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -23335,7 +23374,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -23376,6 +23415,67 @@ fi
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dladdr" >&5
+$as_echo_n "checking for library containing dladdr... " >&6; }
+if ${ac_cv_search_dladdr+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dladdr ();
+int
+main ()
+{
+return dladdr ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_dladdr=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_dladdr+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_dladdr+:} false; then :
+
+else
+  ac_cv_search_dladdr=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dladdr" >&5
+$as_echo "$ac_cv_search_dladdr" >&6; }
+ac_res=$ac_cv_search_dladdr
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  HAVE_DLADDR=1
+else
+  HAVE_DLADDR=0
+fi
+
+
+$as_echo "#define HAVE_DLADDR 1" >>confdefs.h
+
 
 ###################################
 #      External libraries         #
@@ -24012,66 +24112,7 @@ fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBJSON_PKG_ERRORS" >&5
 
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBJSON" >&5
-$as_echo_n "checking for LIBJSON... " >&6; }
-
-if test -n "$LIBJSON_CFLAGS"; then
-    pkg_cv_LIBJSON_CFLAGS="$LIBJSON_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" json >= 0.9 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors " json >= 0.9 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBJSON_CFLAGS=`$PKG_CONFIG --cflags " json >= 0.9 " 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$LIBJSON_LIBS"; then
-    pkg_cv_LIBJSON_LIBS="$LIBJSON_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" json >= 0.9 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors " json >= 0.9 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBJSON_LIBS=`$PKG_CONFIG --libs " json >= 0.9 " 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        LIBJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " json >= 0.9 " 2>&1`
-        else
-	        LIBJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " json >= 0.9 " 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$LIBJSON_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ( json >= 0.9 ) were not met:
+	as_fn_error $? "Package requirements ( json-c >= 0.11 ) were not met:
 
 $LIBJSON_PKG_ERRORS
 
@@ -24103,107 +24144,6 @@ else
 $as_echo "yes" >&6; }
 
 fi
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBJSON" >&5
-$as_echo_n "checking for LIBJSON... " >&6; }
-
-if test -n "$LIBJSON_CFLAGS"; then
-    pkg_cv_LIBJSON_CFLAGS="$LIBJSON_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" json >= 0.9 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors " json >= 0.9 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBJSON_CFLAGS=`$PKG_CONFIG --cflags " json >= 0.9 " 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$LIBJSON_LIBS"; then
-    pkg_cv_LIBJSON_LIBS="$LIBJSON_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" json >= 0.9 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors " json >= 0.9 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_LIBJSON_LIBS=`$PKG_CONFIG --libs " json >= 0.9 " 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        LIBJSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " json >= 0.9 " 2>&1`
-        else
-	        LIBJSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " json >= 0.9 " 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$LIBJSON_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ( json >= 0.9 ) were not met:
-
-$LIBJSON_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables LIBJSON_CFLAGS
-and LIBJSON_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables LIBJSON_CFLAGS
-and LIBJSON_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	LIBJSON_CFLAGS=$pkg_cv_LIBJSON_CFLAGS
-	LIBJSON_LIBS=$pkg_cv_LIBJSON_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-else
-	LIBJSON_CFLAGS=$pkg_cv_LIBJSON_CFLAGS
-	LIBJSON_LIBS=$pkg_cv_LIBJSON_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
 
 #### Sound file ####
 
@@ -24432,6 +24372,11 @@ $as_echo "#define HAVE_LIBSAMPLERATE 1" >>confdefs.h
 
 fi
 
+if test "x$HAVE_LIBSAMPLERATE" = "x1"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Support for libsamplerate is DEPRECATED" >&5
+$as_echo "$as_me: WARNING: Support for libsamplerate is DEPRECATED" >&2;}
+fi
+
 #### Database support ####
 
 
@@ -26076,6 +26021,128 @@ else
 fi
 
 
+## Bluetooth Headset profiles backend ##
+
+# Check whether --enable-bluez5-ofono-headset was given.
+if test "${enable_bluez5_ofono_headset+set}" = set; then :
+  enableval=$enable_bluez5_ofono_headset;
+fi
+
+if test "x$HAVE_BLUEZ_5" = "x1" && test "x$enable_bluez5_ofono_headset" != "xno"; then :
+  HAVE_BLUEZ_5_OFONO_HEADSET=1
+fi
+
+ if test "x$HAVE_BLUEZ_5_OFONO_HEADSET" = x1; then
+  HAVE_BLUEZ_5_OFONO_HEADSET_TRUE=
+  HAVE_BLUEZ_5_OFONO_HEADSET_FALSE='#'
+else
+  HAVE_BLUEZ_5_OFONO_HEADSET_TRUE='#'
+  HAVE_BLUEZ_5_OFONO_HEADSET_FALSE=
+fi
+
+if test "x$HAVE_BLUEZ_5_OFONO_HEADSET" = "x1"; then :
+
+$as_echo "#define HAVE_BLUEZ_5_OFONO_HEADSET 1" >>confdefs.h
+
+fi
+
+# Check whether --enable-bluez5-native-headset was given.
+if test "${enable_bluez5_native_headset+set}" = set; then :
+  enableval=$enable_bluez5_native_headset;
+fi
+
+if test "x$HAVE_BLUEZ_5" = "x1" && test "x$enable_bluez5_native_headset" != "xno"; then :
+  HAVE_BLUEZ_5_NATIVE_HEADSET=1
+fi
+if test "x$HAVE_BLUEZ_5_NATIVE_HEADSET" = "x1"; then :
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BLUEZ" >&5
+$as_echo_n "checking for BLUEZ... " >&6; }
+
+if test -n "$BLUEZ_CFLAGS"; then
+    pkg_cv_BLUEZ_CFLAGS="$BLUEZ_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" bluez >= 4.101 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " bluez >= 4.101 ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_BLUEZ_CFLAGS=`$PKG_CONFIG --cflags " bluez >= 4.101 " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$BLUEZ_LIBS"; then
+    pkg_cv_BLUEZ_LIBS="$BLUEZ_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" bluez >= 4.101 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " bluez >= 4.101 ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_BLUEZ_LIBS=`$PKG_CONFIG --libs " bluez >= 4.101 " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        BLUEZ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " bluez >= 4.101 " 2>&1`
+        else
+	        BLUEZ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " bluez >= 4.101 " 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$BLUEZ_PKG_ERRORS" >&5
+
+	as_fn_error $? "*** Bluez library not found (required by native headset backend)" "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	as_fn_error $? "*** Bluez library not found (required by native headset backend)" "$LINENO" 5
+else
+	BLUEZ_CFLAGS=$pkg_cv_BLUEZ_CFLAGS
+	BLUEZ_LIBS=$pkg_cv_BLUEZ_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+fi
+
+
+ if test "x$HAVE_BLUEZ_5_NATIVE_HEADSET" = x1; then
+  HAVE_BLUEZ_5_NATIVE_HEADSET_TRUE=
+  HAVE_BLUEZ_5_NATIVE_HEADSET_FALSE='#'
+else
+  HAVE_BLUEZ_5_NATIVE_HEADSET_TRUE='#'
+  HAVE_BLUEZ_5_NATIVE_HEADSET_FALSE=
+fi
+
+if test "x$HAVE_BLUEZ_5_NATIVE_HEADSET" = "x1"; then :
+
+$as_echo "#define HAVE_BLUEZ_5_NATIVE_HEADSET 1" >>confdefs.h
+
+fi
+
 #### UDEV support (optional) ####
 
 # Check whether --enable-udev was given.
@@ -26861,13 +26928,28 @@ fi
 
 #### systemd support (optional) ####
 
-# Check whether --enable-systemd was given.
-if test "${enable_systemd+set}" = set; then :
-  enableval=$enable_systemd;
+# Check whether --enable-systemd-daemon was given.
+if test "${enable_systemd_daemon+set}" = set; then :
+  enableval=$enable_systemd_daemon;
+fi
+
+
+# Check whether --enable-systemd-login was given.
+if test "${enable_systemd_login+set}" = set; then :
+  enableval=$enable_systemd_login;
+fi
+
+
+# Check whether --enable-systemd-journal was given.
+if test "${enable_systemd_journal+set}" = set; then :
+  enableval=$enable_systemd_journal;
 fi
 
 
-if test "x$enable_systemd" != "xno"; then :
+# Newer systemd's combine their subcomponent libraries into one
+# If it exists, we should use it for the further checks
+
+if test "x$enable_systemd_daemon" != "xno" || test "x$enable_systemd_login" != "xno" || test "x$enable_systemd_journal" != "xno"; then :
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
@@ -26877,12 +26959,12 @@ if test -n "$SYSTEMD_CFLAGS"; then
     pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd-login \""; } >&5
-  ($PKG_CONFIG --exists --print-errors " libsystemd-login ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " libsystemd ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags " libsystemd-login " 2>/dev/null`
+  pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags " libsystemd " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -26894,12 +26976,12 @@ if test -n "$SYSTEMD_LIBS"; then
     pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd-login \""; } >&5
-  ($PKG_CONFIG --exists --print-errors " libsystemd-login ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " libsystemd ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs " libsystemd-login " 2>/dev/null`
+  pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs " libsystemd " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -26920,9 +27002,9 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libsystemd-login " 2>&1`
+	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libsystemd " 2>&1`
         else
-	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libsystemd-login " 2>&1`
+	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libsystemd " 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$SYSTEMD_PKG_ERRORS" >&5
@@ -26943,41 +27025,243 @@ else
   HAVE_SYSTEMD=0
 fi
 
-if test "x$enable_systemd" = "xyes" && test "x$HAVE_SYSTEMD" = "x0"; then :
-  as_fn_error $? "*** Needed systemd support not found" "$LINENO" 5
+if test "x$HAVE_SYSTEMD" = "x1"; then :
+
+        HAVE_SYSTEMD_DAEMON=1
+        HAVE_SYSTEMD_LOGIN=1
+        HAVE_SYSTEMD_JOURNAL=1
+
 fi
 
 
- if test "x$HAVE_SYSTEMD" = x1; then
-  HAVE_SYSTEMD_TRUE=
-  HAVE_SYSTEMD_FALSE='#'
+# Check whether --with-systemduserunitdir was given.
+if test "${with_systemduserunitdir+set}" = set; then :
+  withval=$with_systemduserunitdir;
 else
-  HAVE_SYSTEMD_TRUE='#'
-  HAVE_SYSTEMD_FALSE=
+  with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)
 fi
 
-if test "x$HAVE_SYSTEMD" = "x1"; then :
+if test "x$with_systemduserunitdir" != xno; then
+        systemduserunitdir=$with_systemduserunitdir
 
-$as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
+fi
+
+#### systemd daemon support (optional) ####
 
+if test "x$enable_systemd_daemon" != "xno"; then :
+  if test "x$HAVE_SYSTEMD_DAEMON" != "x1"; then :
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMDDAEMON" >&5
+$as_echo_n "checking for SYSTEMDDAEMON... " >&6; }
+
+if test -n "$SYSTEMDDAEMON_CFLAGS"; then
+    pkg_cv_SYSTEMDDAEMON_CFLAGS="$SYSTEMDDAEMON_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd-daemon \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " libsystemd-daemon ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMDDAEMON_CFLAGS=`$PKG_CONFIG --cflags " libsystemd-daemon " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SYSTEMDDAEMON_LIBS"; then
+    pkg_cv_SYSTEMDDAEMON_LIBS="$SYSTEMDDAEMON_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd-daemon \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " libsystemd-daemon ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMDDAEMON_LIBS=`$PKG_CONFIG --libs " libsystemd-daemon " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
 fi
 
-#### journal support (optional) ####
 
-# Check whether --enable-systemd-journal was given.
-if test "${enable_systemd_journal+set}" = set; then :
-  enableval=$enable_systemd_journal;
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SYSTEMDDAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libsystemd-daemon " 2>&1`
+        else
+	        SYSTEMDDAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libsystemd-daemon " 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SYSTEMDDAEMON_PKG_ERRORS" >&5
+
+	HAVE_SYSTEMD_DAEMON=0
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	HAVE_SYSTEMD_DAEMON=0
+else
+	SYSTEMDDAEMON_CFLAGS=$pkg_cv_SYSTEMDDAEMON_CFLAGS
+	SYSTEMDDAEMON_LIBS=$pkg_cv_SYSTEMDDAEMON_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	HAVE_SYSTEMD_DAEMON=1
+fi
+fi
+else
+  HAVE_SYSTEMD_DAEMON=0
+fi
+
+if test "x$enable_systemd_daemon" = "xyes" && test "x$HAVE_SYSTEMD_DAEMON" = "x0"; then :
+  as_fn_error $? "*** Needed systemd daemon support not found" "$LINENO" 5
+fi
+
+if test "x$HAVE_SYSTEMD_DAEMON" = "x1"; then :
+   PA_DEFAULT_AUTOSPAWN=no
+else
+   PA_DEFAULT_AUTOSPAWN=yes
+fi
+
+
+
+ if test "x$HAVE_SYSTEMD_DAEMON" = x1; then
+  HAVE_SYSTEMD_DAEMON_TRUE=
+  HAVE_SYSTEMD_DAEMON_FALSE='#'
+else
+  HAVE_SYSTEMD_DAEMON_TRUE='#'
+  HAVE_SYSTEMD_DAEMON_FALSE=
+fi
+
+if test "x$HAVE_SYSTEMD_DAEMON" = "x1"; then :
+
+$as_echo "#define HAVE_SYSTEMD_DAEMON 1" >>confdefs.h
+
 fi
 
+#### systemd login support (optional) ####
+
+if test "x$enable_systemd_login" != "xno"; then :
+  if test "x$HAVE_SYSTEMD_LOGIN" != "x1"; then :
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMDLOGIN" >&5
+$as_echo_n "checking for SYSTEMDLOGIN... " >&6; }
+
+if test -n "$SYSTEMDLOGIN_CFLAGS"; then
+    pkg_cv_SYSTEMDLOGIN_CFLAGS="$SYSTEMDLOGIN_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd-login \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " libsystemd-login ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMDLOGIN_CFLAGS=`$PKG_CONFIG --cflags " libsystemd-login " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SYSTEMDLOGIN_LIBS"; then
+    pkg_cv_SYSTEMDLOGIN_LIBS="$SYSTEMDLOGIN_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd-login \""; } >&5
+  ($PKG_CONFIG --exists --print-errors " libsystemd-login ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SYSTEMDLOGIN_LIBS=`$PKG_CONFIG --libs " libsystemd-login " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SYSTEMDLOGIN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libsystemd-login " 2>&1`
+        else
+	        SYSTEMDLOGIN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libsystemd-login " 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SYSTEMDLOGIN_PKG_ERRORS" >&5
+
+	HAVE_SYSTEMD_LOGIN=0
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	HAVE_SYSTEMD_LOGIN=0
+else
+	SYSTEMDLOGIN_CFLAGS=$pkg_cv_SYSTEMDLOGIN_CFLAGS
+	SYSTEMDLOGIN_LIBS=$pkg_cv_SYSTEMDLOGIN_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	HAVE_SYSTEMD_LOGIN=1
+fi
+fi
+else
+  HAVE_SYSTEMD_LOGIN=0
+fi
+
+if test "x$enable_systemd_login" = "xyes" && test "x$HAVE_SYSTEMD_LOGIN" = "x0"; then :
+  as_fn_error $? "*** Needed systemd login support not found" "$LINENO" 5
+fi
+
+
+ if test "x$HAVE_SYSTEMD_LOGIN" = x1; then
+  HAVE_SYSTEMD_LOGIN_TRUE=
+  HAVE_SYSTEMD_LOGIN_FALSE='#'
+else
+  HAVE_SYSTEMD_LOGIN_TRUE='#'
+  HAVE_SYSTEMD_LOGIN_FALSE=
+fi
+
+if test "x$HAVE_SYSTEMD_LOGIN" = "x1"; then :
+
+$as_echo "#define HAVE_SYSTEMD_LOGIN 1" >>confdefs.h
+
+fi
+
+#### systemd journal support (optional) ####
 
 if test "x$enable_systemd_journal" != "xno"; then :
+  if test "x$HAVE_SYSTEMD_JOURNAL" != "x1"; then :
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JOURNAL" >&5
-$as_echo_n "checking for JOURNAL... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMDJOURNAL" >&5
+$as_echo_n "checking for SYSTEMDJOURNAL... " >&6; }
 
-if test -n "$JOURNAL_CFLAGS"; then
-    pkg_cv_JOURNAL_CFLAGS="$JOURNAL_CFLAGS"
+if test -n "$SYSTEMDJOURNAL_CFLAGS"; then
+    pkg_cv_SYSTEMDJOURNAL_CFLAGS="$SYSTEMDJOURNAL_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd-journal \""; } >&5
@@ -26985,7 +27269,7 @@ if test -n "$JOURNAL_CFLAGS"; then
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_JOURNAL_CFLAGS=`$PKG_CONFIG --cflags " libsystemd-journal " 2>/dev/null`
+  pkg_cv_SYSTEMDJOURNAL_CFLAGS=`$PKG_CONFIG --cflags " libsystemd-journal " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -26993,8 +27277,8 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$JOURNAL_LIBS"; then
-    pkg_cv_JOURNAL_LIBS="$JOURNAL_LIBS"
+if test -n "$SYSTEMDJOURNAL_LIBS"; then
+    pkg_cv_SYSTEMDJOURNAL_LIBS="$SYSTEMDJOURNAL_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libsystemd-journal \""; } >&5
@@ -27002,7 +27286,7 @@ if test -n "$JOURNAL_LIBS"; then
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_JOURNAL_LIBS=`$PKG_CONFIG --libs " libsystemd-journal " 2>/dev/null`
+  pkg_cv_SYSTEMDJOURNAL_LIBS=`$PKG_CONFIG --libs " libsystemd-journal " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -27023,12 +27307,12 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        JOURNAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libsystemd-journal " 2>&1`
+	        SYSTEMDJOURNAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libsystemd-journal " 2>&1`
         else
-	        JOURNAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libsystemd-journal " 2>&1`
+	        SYSTEMDJOURNAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libsystemd-journal " 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$JOURNAL_PKG_ERRORS" >&5
+	echo "$SYSTEMDJOURNAL_PKG_ERRORS" >&5
 
 	HAVE_SYSTEMD_JOURNAL=0
 elif test $pkg_failed = untried; then
@@ -27036,12 +27320,13 @@ elif test $pkg_failed = untried; then
 $as_echo "no" >&6; }
 	HAVE_SYSTEMD_JOURNAL=0
 else
-	JOURNAL_CFLAGS=$pkg_cv_JOURNAL_CFLAGS
-	JOURNAL_LIBS=$pkg_cv_JOURNAL_LIBS
+	SYSTEMDJOURNAL_CFLAGS=$pkg_cv_SYSTEMDJOURNAL_CFLAGS
+	SYSTEMDJOURNAL_LIBS=$pkg_cv_SYSTEMDJOURNAL_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 	HAVE_SYSTEMD_JOURNAL=1
 fi
+fi
 else
   HAVE_SYSTEMD_JOURNAL=0
 fi
@@ -27061,7 +27346,7 @@ fi
 
 if test "x$HAVE_SYSTEMD_JOURNAL" = "x1"; then :
 
-$as_echo "#define HAVE_JOURNAL 1" >>confdefs.h
+$as_echo "#define HAVE_SYSTEMD_JOURNAL 1" >>confdefs.h
 
 fi
 
@@ -27463,9 +27748,6 @@ $as_echo "#define ENABLE_LEGACY_DATABASE_ENTRY_FORMAT 1" >>confdefs.h
 
 fi
 
-$as_echo "#define WIBBLE 1" >>confdefs.h
-
-
 # Check whether --enable-static-bins was given.
 if test "${enable_static_bins+set}" = set; then :
   enableval=$enable_static_bins;
@@ -27544,6 +27826,17 @@ fi
 
 
 
+
+# Check whether --with-zsh-completion-dir was given.
+if test "${with_zsh_completion_dir+set}" = set; then :
+  withval=$with_zsh_completion_dir; zshcompletiondir=$withval
+else
+  zshcompletiondir="${datadir}/zsh/site-functions"
+fi
+
+
+
+
 # Check whether --enable-force-preopen was given.
 if test "${enable_force_preopen+set}" = set; then :
   enableval=$enable_force_preopen;
@@ -27565,15 +27858,13 @@ else
 fi
 
 
-ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile libpulse.pc libpulse-simple.pc libpulse-mainloop-glib.pc doxygen/Makefile doxygen/doxygen.conf src/pulse/version.h po/Makefile.in man/pulseaudio.1.xml man/esdcompat.1.xml man/pax11publish.1.xml man/paplay.1.xml man/pacat.1.xml man/pacmd.1.xml man/pactl.1.xml man/pasuspender.1.xml man/padsp.1.xml man/pulse-daemon.conf.5.xml man/pulse-client.conf.5.xml man/default.pa.5.xml man/pulse-cli-syntax.5.xml man/start-pulseaudio-k [...]
+ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile libpulse.pc libpulse-simple.pc libpulse-mainloop-glib.pc doxygen/Makefile doxygen/doxygen.conf src/pulse/version.h po/Makefile.in man/pulseaudio.1.xml man/esdcompat.1.xml man/pax11publish.1.xml man/paplay.1.xml man/pacat.1.xml man/pacmd.1.xml man/pactl.1.xml man/pasuspender.1.xml man/padsp.1.xml man/pulse-daemon.conf.5.xml man/pulse-client.conf.5.xml man/default.pa.5.xml man/pulse-cli-syntax.5.xml man/start-pulseaudio-x [...]
 
 
 ac_config_files="$ac_config_files src/esdcompat:src/daemon/esdcompat.in"
 
 ac_config_files="$ac_config_files src/start-pulseaudio-x11:src/daemon/start-pulseaudio-x11.in"
 
-ac_config_files="$ac_config_files src/start-pulseaudio-kde:src/daemon/start-pulseaudio-kde.in"
-
 ac_config_files="$ac_config_files src/client.conf:src/pulse/client.conf.in"
 
 ac_config_files="$ac_config_files src/daemon.conf:src/daemon/daemon.conf.in"
@@ -27582,6 +27873,12 @@ ac_config_files="$ac_config_files src/default.pa:src/daemon/default.pa.in"
 
 ac_config_files="$ac_config_files src/system.pa:src/daemon/system.pa.in"
 
+if test "x$HAVE_SYSTEMD_DAEMON" = "x1"; then :
+
+        ac_config_files="$ac_config_files src/pulseaudio.service:src/daemon/systemd/user/pulseaudio.service.in"
+
+
+fi
 
 # CMake related ProjectConfig files
 PA_LIBDIR="$libdir"
@@ -27900,6 +28197,14 @@ if test -z "${HAVE_BLUEZ_TRUE}" && test -z "${HAVE_BLUEZ_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_BLUEZ\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_BLUEZ_5_OFONO_HEADSET_TRUE}" && test -z "${HAVE_BLUEZ_5_OFONO_HEADSET_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_BLUEZ_5_OFONO_HEADSET\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_BLUEZ_5_NATIVE_HEADSET_TRUE}" && test -z "${HAVE_BLUEZ_5_NATIVE_HEADSET_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_BLUEZ_5_NATIVE_HEADSET\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${HAVE_UDEV_TRUE}" && test -z "${HAVE_UDEV_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_UDEV\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -27936,8 +28241,12 @@ if test -z "${HAVE_ORCC_TRUE}" && test -z "${HAVE_ORCC_FALSE}"; then
   as_fn_error $? "conditional \"HAVE_ORCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then
-  as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined.
+if test -z "${HAVE_SYSTEMD_DAEMON_TRUE}" && test -z "${HAVE_SYSTEMD_DAEMON_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_SYSTEMD_DAEMON\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_SYSTEMD_LOGIN_TRUE}" && test -z "${HAVE_SYSTEMD_LOGIN_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_SYSTEMD_LOGIN\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_SYSTEMD_JOURNAL_TRUE}" && test -z "${HAVE_SYSTEMD_JOURNAL_FALSE}"; then
@@ -28369,7 +28678,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by pulseaudio $as_me 5.0, which was
+This file was extended by pulseaudio $as_me 5.99.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -28436,7 +28745,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-pulseaudio config.status 5.0
+pulseaudio config.status 5.99.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -28976,15 +29285,14 @@ do
     "man/pulse-client.conf.5.xml") CONFIG_FILES="$CONFIG_FILES man/pulse-client.conf.5.xml" ;;
     "man/default.pa.5.xml") CONFIG_FILES="$CONFIG_FILES man/default.pa.5.xml" ;;
     "man/pulse-cli-syntax.5.xml") CONFIG_FILES="$CONFIG_FILES man/pulse-cli-syntax.5.xml" ;;
-    "man/start-pulseaudio-kde.1.xml") CONFIG_FILES="$CONFIG_FILES man/start-pulseaudio-kde.1.xml" ;;
     "man/start-pulseaudio-x11.1.xml") CONFIG_FILES="$CONFIG_FILES man/start-pulseaudio-x11.1.xml" ;;
     "src/esdcompat") CONFIG_FILES="$CONFIG_FILES src/esdcompat:src/daemon/esdcompat.in" ;;
     "src/start-pulseaudio-x11") CONFIG_FILES="$CONFIG_FILES src/start-pulseaudio-x11:src/daemon/start-pulseaudio-x11.in" ;;
-    "src/start-pulseaudio-kde") CONFIG_FILES="$CONFIG_FILES src/start-pulseaudio-kde:src/daemon/start-pulseaudio-kde.in" ;;
     "src/client.conf") CONFIG_FILES="$CONFIG_FILES src/client.conf:src/pulse/client.conf.in" ;;
     "src/daemon.conf") CONFIG_FILES="$CONFIG_FILES src/daemon.conf:src/daemon/daemon.conf.in" ;;
     "src/default.pa") CONFIG_FILES="$CONFIG_FILES src/default.pa:src/daemon/default.pa.in" ;;
     "src/system.pa") CONFIG_FILES="$CONFIG_FILES src/system.pa:src/daemon/system.pa.in" ;;
+    "src/pulseaudio.service") CONFIG_FILES="$CONFIG_FILES src/pulseaudio.service:src/daemon/systemd/user/pulseaudio.service.in" ;;
     "PulseAudioConfig.cmake") CONFIG_FILES="$CONFIG_FILES PulseAudioConfig.cmake:PulseAudioConfig.cmake.in" ;;
     "PulseAudioConfigVersion.cmake") CONFIG_FILES="$CONFIG_FILES PulseAudioConfigVersion.cmake" ;;
     "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
@@ -30591,7 +30899,6 @@ _LT_EOF
  ;;
     "src/esdcompat":F) chmod +x src/esdcompat ;;
     "src/start-pulseaudio-x11":F) chmod +x src/start-pulseaudio-x11 ;;
-    "src/start-pulseaudio-kde":F) chmod +x src/start-pulseaudio-kde ;;
     "src/daemon.conf":F) m4 src/daemon.conf > src/daemon.conf.gen && mv src/daemon.conf.gen src/daemon.conf ;;
     "src/default.pa":F) m4 src/default.pa > src/default.pa.gen && mv src/default.pa.gen src/default.pa ;;
     "src/system.pa":F) m4 src/system.pa > src/system.pa.gen && mv src/system.pa.gen src/system.pa ;;
@@ -30742,10 +31049,15 @@ if test "x$HAVE_UDEV" = "x1"; then :
 else
   ENABLE_UDEV=no
 fi
-if test "x$HAVE_SYSTEMD" = "x1"; then :
-  ENABLE_SYSTEMD=yes
+if test "x$HAVE_SYSTEMD_DAEMON" = "x1"; then :
+  ENABLE_SYSTEMD_DAEMON=yes
+else
+  ENABLE_SYSTEMD_DAEMON=no
+fi
+if test "x$HAVE_SYSTEMD_LOGIN" = "x1"; then :
+  ENABLE_SYSTEMD_LOGIN=yes
 else
-  ENABLE_SYSTEMD=no
+  ENABLE_SYSTEMD_LOGIN=no
 fi
 if test "x$HAVE_SYSTEMD_JOURNAL" = "x1"; then :
   ENABLE_SYSTEMD_JOURNAL=yes
@@ -30762,6 +31074,16 @@ if test "x$HAVE_BLUEZ_5" = "x1"; then :
 else
   ENABLE_BLUEZ_5=no
 fi
+if test "x$HAVE_BLUEZ_5_OFONO_HEADSET" = "x1"; then :
+  ENABLE_BLUEZ_5_OFONO_HEADSET=yes
+else
+  ENABLE_BLUEZ_5_OFONO_HEADSET=no
+fi
+if test "x$HAVE_BLUEZ_5_NATIVE_HEADSET" = "x1"; then :
+  ENABLE_BLUEZ_5_NATIVE_HEADSET=yes
+else
+  ENABLE_BLUEZ_5_NATIVE_HEADSET=no
+fi
 if test "x$HAVE_HAL_COMPAT" = "x1"; then :
   ENABLE_HAL_COMPAT=yes
 else
@@ -30773,7 +31095,7 @@ else
   ENABLE_TCPWRAP=no
 fi
 if test "x$HAVE_LIBSAMPLERATE" = "x1"; then :
-  ENABLE_LIBSAMPLERATE=yes
+  ENABLE_LIBSAMPLERATE="yes (DEPRECATED)"
 else
   ENABLE_LIBSAMPLERATE=no
 fi
@@ -30863,6 +31185,7 @@ echo "
     System Runtime Path:           ${PA_SYSTEM_RUNTIME_PATH}
     System State Path:             ${PA_SYSTEM_STATE_PATH}
     System Config Path:            ${PA_SYSTEM_CONFIG_PATH}
+    Zsh completions directory:     ${zshcompletiondir}
     Compiler:                      ${CC}
     CFLAGS:                        ${CFLAGS}
     CPPFLAGS:                      ${CPPFLAGS}
@@ -30887,10 +31210,14 @@ echo "
     Enable D-Bus:                  ${ENABLE_DBUS}
       Enable BlueZ 4:              ${ENABLE_BLUEZ_4}
       Enable BlueZ 5:              ${ENABLE_BLUEZ_5}
+        Enable ofono headsets:     ${ENABLE_BLUEZ_5_OFONO_HEADSET}
+        Enable native headsets:    ${ENABLE_BLUEZ_5_NATIVE_HEADSET}
     Enable udev:                   ${ENABLE_UDEV}
       Enable HAL->udev compat:     ${ENABLE_HAL_COMPAT}
-    Enable systemd login:          ${ENABLE_SYSTEMD}
-    Enable systemd journal:        ${ENABLE_SYSTEMD_JOURNAL}
+    Enable systemd
+      Daemon (Socket Activation):  ${ENABLE_SYSTEMD_DAEMON}
+      Login (Session Tracking):    ${ENABLE_SYSTEMD_LOGIN}
+      Journal (Logging):           ${ENABLE_SYSTEMD_JOURNAL}
     Enable TCP Wrappers:           ${ENABLE_TCPWRAP}
     Enable libsamplerate:          ${ENABLE_LIBSAMPLERATE}
     Enable IPv6:                   ${ENABLE_IPV6}
diff --git a/configure.ac b/configure.ac
index 4854711..433236b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,11 +41,11 @@ AC_SUBST(PA_MINOR, pa_minor)
 AC_SUBST(PA_MAJORMINOR, pa_major.pa_minor)
 
 AC_SUBST(PA_API_VERSION, 12)
-AC_SUBST(PA_PROTOCOL_VERSION, 29)
+AC_SUBST(PA_PROTOCOL_VERSION, 30)
 
 # The stable ABI for client applications, for the version info x:y:z
 # always will hold y=z
-AC_SUBST(LIBPULSE_VERSION_INFO, [17:3:17])
+AC_SUBST(LIBPULSE_VERSION_INFO, [18:0:18])
 
 # A simplified, synchronous, ABI-stable interface for client
 # applications, for the version info x:y:z always will hold y=z
@@ -74,6 +74,10 @@ AM_SILENT_RULES([yes])
 
 AC_PROG_MKDIR_P
 
+# ln -s
+
+AC_PROG_LN_S
+
 # CC
 
 AC_PROG_CC
@@ -174,17 +178,23 @@ esac
 #### Compiler flags ####
 
 AX_APPEND_COMPILE_FLAGS(
-    [-Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter  [...]
+    [-Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter  [...]
     [], [-pedantic -Werror])
 
-# Only enable fastpath asserts when doing a debug build, e.g. from bootstrap.sh.
-AS_CASE([" $CFLAGS "], [*" -O0 "*], [], [AX_APPEND_FLAG(["-DFASTPATH"], [CPPFLAGS])])
+AS_CASE([" $CFLAGS "], [*" -O0 "*], [], [
+    # Don't append the flag if it already exists.
+    # Only enable fastpath asserts when doing a debug build, e.g. from bootstrap.sh.
+    AX_APPEND_FLAG([-DFASTPATH], [CPPFLAGS])
 
-# Only set _FORTIFY_SOURCE when optimizations are enabled. If optimizations
-# are disabled, _FORTIFY_SOURCE doesn't do anything, and causes tons of
-# warnings during compiling on some distributions (at least Fedora).
-AS_CASE([" $CFLAGS "], [*" -O0 "*], [], [AX_APPEND_FLAG(["-D_FORTIFY_SOURCE=2"], [CPPFLAGS])])
+    # Cannot use AX_APPEND_FLAG here, as it assumes no space inside the added flags.
+    # Cannot append flags with AX_APPEND_FLAG one by one, as this would destroy all fortifications
+    # if CPPFLAGS already contain -D_FORTIFY_SOURCE=2.
 
+    # Warnings to be aware of that appear with -D_FORTIFY_SOURCE=2 but without -U_FORTIFY_SOURCE:
+    # On Fedora 20 with -O0: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
+    # On Gentoo with -O2:    "_FORTIFY_SOURCE" redefined [enabled by default]
+    AS_VAR_APPEND([CPPFLAGS],[" -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"])
+])
 
 #### Linker flags ####
 
@@ -574,6 +584,8 @@ AC_SYS_LARGEFILE
 # Check for open64 to know if the current system does have open64() and similar functions
 AC_CHECK_FUNCS_ONCE([open64])
 
+AC_SEARCH_LIBS([dladdr], [dl], [HAVE_DLADDR=1], [HAVE_DLADDR=0])
+AC_DEFINE(HAVE_DLADDR, [1], [Have dladdr?])
 
 ###################################
 #      External libraries         #
@@ -636,8 +648,7 @@ AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_LIBCHECK" = x1])
 
 #### json parsing ####
 
-PKG_CHECK_MODULES(LIBJSON, [ json-c >= 0.11 ], [],
-		  [PKG_CHECK_MODULES(LIBJSON, [ json >= 0.9 ])])
+PKG_CHECK_MODULES(LIBJSON, [ json-c >= 0.11 ])
 
 #### Sound file ####
 
@@ -673,6 +684,8 @@ AS_IF([test "x$enable_samplerate" = "xyes" && test "x$HAVE_LIBSAMPLERATE" = "x0"
 AM_CONDITIONAL([HAVE_LIBSAMPLERATE], [test "x$HAVE_LIBSAMPLERATE" = x1])
 AS_IF([test "x$HAVE_LIBSAMPLERATE" = "x1"], AC_DEFINE([HAVE_LIBSAMPLERATE], 1, [Have libsamplerate?]))
 
+AS_IF([test "x$HAVE_LIBSAMPLERATE" = "x1"], AC_MSG_WARN([Support for libsamplerate is DEPRECATED]))
+
 #### Database support ####
 
 AC_ARG_WITH([database],
@@ -1022,6 +1035,25 @@ AS_IF([test "x$HAVE_BLUEZ_4" = "x1" || test "x$HAVE_BLUEZ_5" = "x1"], HAVE_BLUEZ
 AC_SUBST(HAVE_BLUEZ)
 AM_CONDITIONAL([HAVE_BLUEZ], [test "x$HAVE_BLUEZ" = x1])
 
+## Bluetooth Headset profiles backend ##
+
+AC_ARG_ENABLE([bluez5-ofono-headset],
+    AS_HELP_STRING([--disable-bluez5-ofono-headset],[Disable optional ofono headset backend support (Bluez 5)]))
+AS_IF([test "x$HAVE_BLUEZ_5" = "x1" && test "x$enable_bluez5_ofono_headset" != "xno"], HAVE_BLUEZ_5_OFONO_HEADSET=1)
+AC_SUBST(HAVE_BLUEZ_5_OFONO_HEADSET)
+AM_CONDITIONAL([HAVE_BLUEZ_5_OFONO_HEADSET], [test "x$HAVE_BLUEZ_5_OFONO_HEADSET" = x1])
+AS_IF([test "x$HAVE_BLUEZ_5_OFONO_HEADSET" = "x1"], AC_DEFINE([HAVE_BLUEZ_5_OFONO_HEADSET], 1, [Bluez 5 ofono headset backend enabled]))
+
+AC_ARG_ENABLE([bluez5-native-headset],
+    AS_HELP_STRING([--disable-bluez5-native-headset],[Disable optional native headset backend support (Bluez 5)]))
+AS_IF([test "x$HAVE_BLUEZ_5" = "x1" && test "x$enable_bluez5_native_headset" != "xno"], HAVE_BLUEZ_5_NATIVE_HEADSET=1)
+AS_IF([test "x$HAVE_BLUEZ_5_NATIVE_HEADSET" = "x1"], [PKG_CHECK_MODULES(BLUEZ, [ bluez >= 4.101 ], [],
+    [AC_MSG_ERROR([*** Bluez library not found (required by native headset backend)])])])
+
+AC_SUBST(HAVE_BLUEZ_5_NATIVE_HEADSET)
+AM_CONDITIONAL([HAVE_BLUEZ_5_NATIVE_HEADSET], [test "x$HAVE_BLUEZ_5_NATIVE_HEADSET" = x1])
+AS_IF([test "x$HAVE_BLUEZ_5_NATIVE_HEADSET" = "x1"], AC_DEFINE([HAVE_BLUEZ_5_NATIVE_HEADSET], 1, [Bluez 5 native headset backend enabled]))
+
 #### UDEV support (optional) ####
 
 AC_ARG_ENABLE([udev],
@@ -1154,27 +1186,69 @@ ORC_CHECK([0.4.11])
 
 #### systemd support (optional) ####
 
-AC_ARG_ENABLE([systemd],
-    AS_HELP_STRING([--disable-systemd],[Disable optional systemd support]))
+AC_ARG_ENABLE([systemd-daemon],
+    AS_HELP_STRING([--disable-systemd-daemon],[Disable optional systemd daemon (socket activation) support]))
 
-AS_IF([test "x$enable_systemd" != "xno"],
-    [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd-login ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)],
+AC_ARG_ENABLE([systemd-login],
+    AS_HELP_STRING([--disable-systemd-login],[Disable optional systemd login support]))
+
+AC_ARG_ENABLE([systemd-journal],
+    AS_HELP_STRING([--disable-systemd-journal],[Disable optional systemd journal support]))
+
+# Newer systemd's combine their subcomponent libraries into one
+# If it exists, we should use it for the further checks
+
+AS_IF([test "x$enable_systemd_daemon" != "xno" || test "x$enable_systemd_login" != "xno" || test "x$enable_systemd_journal" != "xno"],
+    [PKG_CHECK_MODULES(SYSTEMD, [ libsystemd ], HAVE_SYSTEMD=1, HAVE_SYSTEMD=0)],
     HAVE_SYSTEMD=0)
 
-AS_IF([test "x$enable_systemd" = "xyes" && test "x$HAVE_SYSTEMD" = "x0"],
-    [AC_MSG_ERROR([*** Needed systemd support not found])])
+AS_IF([test "x$HAVE_SYSTEMD" = "x1"],
+    [
+        HAVE_SYSTEMD_DAEMON=1
+        HAVE_SYSTEMD_LOGIN=1
+        HAVE_SYSTEMD_JOURNAL=1
+    ])
 
-AC_SUBST(HAVE_SYSTEMD)
-AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$HAVE_SYSTEMD" = x1])
-AS_IF([test "x$HAVE_SYSTEMD" = "x1"], AC_DEFINE([HAVE_SYSTEMD], 1, [Have SYSTEMD?]))
+AC_ARG_WITH([systemduserunitdir],
+        AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd user service files]),
+        [], [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)])
+if test "x$with_systemduserunitdir" != xno; then
+        AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
+fi
 
-#### journal support (optional) ####
+#### systemd daemon support (optional) ####
 
-AC_ARG_ENABLE([systemd-journal],
-    AS_HELP_STRING([--disable-systemd-journal],[Disable optional systemd journal support]))
+AS_IF([test "x$enable_systemd_daemon" != "xno"],
+    [AS_IF([test "x$HAVE_SYSTEMD_DAEMON" != "x1"], [PKG_CHECK_MODULES(SYSTEMDDAEMON, [ libsystemd-daemon ], HAVE_SYSTEMD_DAEMON=1, HAVE_SYSTEMD_DAEMON=0)])],
+    HAVE_SYSTEMD_DAEMON=0)
+
+AS_IF([test "x$enable_systemd_daemon" = "xyes" && test "x$HAVE_SYSTEMD_DAEMON" = "x0"],
+    [AC_MSG_ERROR([*** Needed systemd daemon support not found])])
+
+AS_IF([test "x$HAVE_SYSTEMD_DAEMON" = "x1"], [ PA_DEFAULT_AUTOSPAWN=no ], [ PA_DEFAULT_AUTOSPAWN=yes ])
+AC_SUBST(PA_DEFAULT_AUTOSPAWN)
+
+AC_SUBST(HAVE_SYSTEMD_DAEMON)
+AM_CONDITIONAL([HAVE_SYSTEMD_DAEMON], [test "x$HAVE_SYSTEMD_DAEMON" = x1])
+AS_IF([test "x$HAVE_SYSTEMD_DAEMON" = "x1"], AC_DEFINE([HAVE_SYSTEMD_DAEMON], 1, [Have SYSTEMDDAEMON?]))
+
+#### systemd login support (optional) ####
+
+AS_IF([test "x$enable_systemd_login" != "xno"],
+    [AS_IF([test "x$HAVE_SYSTEMD_LOGIN" != "x1"], [PKG_CHECK_MODULES(SYSTEMDLOGIN, [ libsystemd-login ], HAVE_SYSTEMD_LOGIN=1, HAVE_SYSTEMD_LOGIN=0)])],
+    HAVE_SYSTEMD_LOGIN=0)
+
+AS_IF([test "x$enable_systemd_login" = "xyes" && test "x$HAVE_SYSTEMD_LOGIN" = "x0"],
+    [AC_MSG_ERROR([*** Needed systemd login support not found])])
+
+AC_SUBST(HAVE_SYSTEMD_LOGIN)
+AM_CONDITIONAL([HAVE_SYSTEMD_LOGIN], [test "x$HAVE_SYSTEMD_LOGIN" = x1])
+AS_IF([test "x$HAVE_SYSTEMD_LOGIN" = "x1"], AC_DEFINE([HAVE_SYSTEMD_LOGIN], 1, [Have SYSTEMDLOGIN?]))
+
+#### systemd journal support (optional) ####
 
 AS_IF([test "x$enable_systemd_journal" != "xno"],
-    [PKG_CHECK_MODULES(JOURNAL, [ libsystemd-journal ], HAVE_SYSTEMD_JOURNAL=1, HAVE_SYSTEMD_JOURNAL=0)],
+    [AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" != "x1"], [PKG_CHECK_MODULES(SYSTEMDJOURNAL, [ libsystemd-journal ], HAVE_SYSTEMD_JOURNAL=1, HAVE_SYSTEMD_JOURNAL=0)])],
     HAVE_SYSTEMD_JOURNAL=0)
 
 AS_IF([test "x$enable_systemd_journal" = "xyes" && test "x$HAVE_SYSTEMD_JOURNAL" = "x0"],
@@ -1182,7 +1256,7 @@ AS_IF([test "x$enable_systemd_journal" = "xyes" && test "x$HAVE_SYSTEMD_JOURNAL"
 
 AC_SUBST(HAVE_SYSTEMD_JOURNAL)
 AM_CONDITIONAL([HAVE_SYSTEMD_JOURNAL], [test "x$HAVE_SYSTEMD_JOURNAL" = x1])
-AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" = "x1"], AC_DEFINE([HAVE_JOURNAL], 1, [Have JOURNAL?]))
+AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" = "x1"], AC_DEFINE([HAVE_SYSTEMD_JOURNAL], 1, [Have SYSTEMDJOURNAL?]))
 
 #### Build and Install man pages ####
 
@@ -1312,7 +1386,6 @@ AC_ARG_ENABLE([legacy-database-entry-format],
 if test "x$enable_legacy_database_entry_format" != "xno" ; then
         AC_DEFINE(ENABLE_LEGACY_DATABASE_ENTRY_FORMAT, [1], [Legacy database entry format])
 fi
-AC_DEFINE([WIBBLE], 1, [Just a test.])
 
 AC_ARG_ENABLE([static-bins],
     AS_HELP_STRING([--enable-static-bins],[Statically link executables.]))
@@ -1347,6 +1420,13 @@ AC_ARG_WITH(
 
 AC_SUBST(udevrulesdir)
 
+AC_ARG_WITH(
+        [zsh-completion-dir],
+        AS_HELP_STRING([--with-zsh-completion-dir], [Zsh completions directory (defaults to ${datadir}/zsh/site-functions)]),
+        [zshcompletiondir=$withval], [zshcompletiondir="${datadir}/zsh/site-functions"])
+
+AC_SUBST(zshcompletiondir)
+
 AC_ARG_ENABLE([force-preopen],
     AS_HELP_STRING([--enable-force-preopen],[Preopen modules, even when dlopen() is supported.]))
 
@@ -1382,13 +1462,11 @@ man/pulse-daemon.conf.5.xml
 man/pulse-client.conf.5.xml
 man/default.pa.5.xml
 man/pulse-cli-syntax.5.xml
-man/start-pulseaudio-kde.1.xml
 man/start-pulseaudio-x11.1.xml
 ])
 
 AC_CONFIG_FILES([src/esdcompat:src/daemon/esdcompat.in], [chmod +x src/esdcompat])
 AC_CONFIG_FILES([src/start-pulseaudio-x11:src/daemon/start-pulseaudio-x11.in], [chmod +x src/start-pulseaudio-x11])
-AC_CONFIG_FILES([src/start-pulseaudio-kde:src/daemon/start-pulseaudio-kde.in], [chmod +x src/start-pulseaudio-kde])
 AC_CONFIG_FILES([src/client.conf:src/pulse/client.conf.in])
 AC_CONFIG_FILES([src/daemon.conf:src/daemon/daemon.conf.in],
     [m4 src/daemon.conf > src/daemon.conf.gen && mv src/daemon.conf.gen src/daemon.conf])
@@ -1396,6 +1474,10 @@ AC_CONFIG_FILES([src/default.pa:src/daemon/default.pa.in],
     [m4 src/default.pa > src/default.pa.gen && mv src/default.pa.gen src/default.pa])
 AC_CONFIG_FILES([src/system.pa:src/daemon/system.pa.in],
     [m4 src/system.pa > src/system.pa.gen && mv src/system.pa.gen src/system.pa])
+AS_IF([test "x$HAVE_SYSTEMD_DAEMON" = "x1"],
+    [
+        AC_CONFIG_FILES([src/pulseaudio.service:src/daemon/systemd/user/pulseaudio.service.in])
+    ])
 
 # CMake related ProjectConfig files
 PA_LIBDIR="$libdir"
@@ -1428,13 +1510,16 @@ AS_IF([test "x$HAVE_LIRC" = "x1"], ENABLE_LIRC=yes, ENABLE_LIRC=no)
 AS_IF([test "x$HAVE_XEN" = "x1"], ENABLE_XEN=yes, ENABLE_XEN=no)
 AS_IF([test "x$HAVE_DBUS" = "x1"], ENABLE_DBUS=yes, ENABLE_DBUS=no)
 AS_IF([test "x$HAVE_UDEV" = "x1"], ENABLE_UDEV=yes, ENABLE_UDEV=no)
-AS_IF([test "x$HAVE_SYSTEMD" = "x1"], ENABLE_SYSTEMD=yes, ENABLE_SYSTEMD=no)
+AS_IF([test "x$HAVE_SYSTEMD_DAEMON" = "x1"], ENABLE_SYSTEMD_DAEMON=yes, ENABLE_SYSTEMD_DAEMON=no)
+AS_IF([test "x$HAVE_SYSTEMD_LOGIN" = "x1"], ENABLE_SYSTEMD_LOGIN=yes, ENABLE_SYSTEMD_LOGIN=no)
 AS_IF([test "x$HAVE_SYSTEMD_JOURNAL" = "x1"], ENABLE_SYSTEMD_JOURNAL=yes, ENABLE_SYSTEMD_JOURNAL=no)
 AS_IF([test "x$HAVE_BLUEZ_4" = "x1"], ENABLE_BLUEZ_4=yes, ENABLE_BLUEZ_4=no)
 AS_IF([test "x$HAVE_BLUEZ_5" = "x1"], ENABLE_BLUEZ_5=yes, ENABLE_BLUEZ_5=no)
+AS_IF([test "x$HAVE_BLUEZ_5_OFONO_HEADSET" = "x1"], ENABLE_BLUEZ_5_OFONO_HEADSET=yes, ENABLE_BLUEZ_5_OFONO_HEADSET=no)
+AS_IF([test "x$HAVE_BLUEZ_5_NATIVE_HEADSET" = "x1"], ENABLE_BLUEZ_5_NATIVE_HEADSET=yes, ENABLE_BLUEZ_5_NATIVE_HEADSET=no)
 AS_IF([test "x$HAVE_HAL_COMPAT" = "x1"], ENABLE_HAL_COMPAT=yes, ENABLE_HAL_COMPAT=no)
 AS_IF([test "x$HAVE_TCPWRAP" = "x1"], ENABLE_TCPWRAP=yes, ENABLE_TCPWRAP=no)
-AS_IF([test "x$HAVE_LIBSAMPLERATE" = "x1"], ENABLE_LIBSAMPLERATE=yes, ENABLE_LIBSAMPLERATE=no)
+AS_IF([test "x$HAVE_LIBSAMPLERATE" = "x1"], ENABLE_LIBSAMPLERATE="yes (DEPRECATED)", ENABLE_LIBSAMPLERATE=no)
 AS_IF([test "x$HAVE_IPV6" = "x1"], ENABLE_IPV6=yes, ENABLE_IPV6=no)
 AS_IF([test "x$HAVE_OPENSSL" = "x1"], ENABLE_OPENSSL=yes, ENABLE_OPENSSL=no)
 AS_IF([test "x$HAVE_FFTW" = "x1"], ENABLE_FFTW=yes, ENABLE_FFTW=no)
@@ -1461,6 +1546,7 @@ echo "
     System Runtime Path:           ${PA_SYSTEM_RUNTIME_PATH}
     System State Path:             ${PA_SYSTEM_STATE_PATH}
     System Config Path:            ${PA_SYSTEM_CONFIG_PATH}
+    Zsh completions directory:     ${zshcompletiondir}
     Compiler:                      ${CC}
     CFLAGS:                        ${CFLAGS}
     CPPFLAGS:                      ${CPPFLAGS}
@@ -1485,10 +1571,14 @@ echo "
     Enable D-Bus:                  ${ENABLE_DBUS}
       Enable BlueZ 4:              ${ENABLE_BLUEZ_4}
       Enable BlueZ 5:              ${ENABLE_BLUEZ_5}
+        Enable ofono headsets:     ${ENABLE_BLUEZ_5_OFONO_HEADSET}
+        Enable native headsets:    ${ENABLE_BLUEZ_5_NATIVE_HEADSET}
     Enable udev:                   ${ENABLE_UDEV}
       Enable HAL->udev compat:     ${ENABLE_HAL_COMPAT}
-    Enable systemd login:          ${ENABLE_SYSTEMD}
-    Enable systemd journal:        ${ENABLE_SYSTEMD_JOURNAL}
+    Enable systemd
+      Daemon (Socket Activation):  ${ENABLE_SYSTEMD_DAEMON}
+      Login (Session Tracking):    ${ENABLE_SYSTEMD_LOGIN}
+      Journal (Logging):           ${ENABLE_SYSTEMD_JOURNAL}
     Enable TCP Wrappers:           ${ENABLE_TCPWRAP}
     Enable libsamplerate:          ${ENABLE_LIBSAMPLERATE}
     Enable IPv6:                   ${ENABLE_IPV6}
diff --git a/doxygen/Makefile.in b/doxygen/Makefile.in
index 1389d94..379a54d 100644
--- a/doxygen/Makefile.in
+++ b/doxygen/Makefile.in
@@ -154,6 +154,8 @@ AUTOMAKE = @AUTOMAKE@
 AVAHI_CFLAGS = @AVAHI_CFLAGS@
 AVAHI_LIBS = @AVAHI_LIBS@
 AWK = @AWK@
+BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
+BLUEZ_LIBS = @BLUEZ_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -201,13 +203,16 @@ HAVE_AVAHI = @HAVE_AVAHI@
 HAVE_BLUEZ = @HAVE_BLUEZ@
 HAVE_BLUEZ_4 = @HAVE_BLUEZ_4@
 HAVE_BLUEZ_5 = @HAVE_BLUEZ_5@
+HAVE_BLUEZ_5_NATIVE_HEADSET = @HAVE_BLUEZ_5_NATIVE_HEADSET@
+HAVE_BLUEZ_5_OFONO_HEADSET = @HAVE_BLUEZ_5_OFONO_HEADSET@
 HAVE_DBUS = @HAVE_DBUS@
 HAVE_GLIB20 = @HAVE_GLIB20@
 HAVE_MKFIFO = @HAVE_MKFIFO@
 HAVE_NEON = @HAVE_NEON@
 HAVE_OSS_OUTPUT = @HAVE_OSS_OUTPUT@
-HAVE_SYSTEMD = @HAVE_SYSTEMD@
+HAVE_SYSTEMD_DAEMON = @HAVE_SYSTEMD_DAEMON@
 HAVE_SYSTEMD_JOURNAL = @HAVE_SYSTEMD_JOURNAL@
+HAVE_SYSTEMD_LOGIN = @HAVE_SYSTEMD_LOGIN@
 HAVE_SYS_RESOURCE_H = @HAVE_SYS_RESOURCE_H@
 HAVE_UDEV = @HAVE_UDEV@
 HAVE_WAVEOUT = @HAVE_WAVEOUT@
@@ -230,8 +235,6 @@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JACK_CFLAGS = @JACK_CFLAGS@
 JACK_LIBS = @JACK_LIBS@
-JOURNAL_CFLAGS = @JOURNAL_CFLAGS@
-JOURNAL_LIBS = @JOURNAL_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBASYNCNS_CFLAGS = @LIBASYNCNS_CFLAGS@
@@ -298,6 +301,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PA_ACCESS_GROUP = @PA_ACCESS_GROUP@
 PA_API_VERSION = @PA_API_VERSION@
 PA_BINARY = @PA_BINARY@
+PA_DEFAULT_AUTOSPAWN = @PA_DEFAULT_AUTOSPAWN@
 PA_DEFAULT_CONFIG_DIR = @PA_DEFAULT_CONFIG_DIR@
 PA_DLSEARCHPATH = @PA_DLSEARCHPATH@
 PA_INCDIR = @PA_INCDIR@
@@ -331,6 +335,12 @@ SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STOW = @STOW@
 STRIP = @STRIP@
+SYSTEMDDAEMON_CFLAGS = @SYSTEMDDAEMON_CFLAGS@
+SYSTEMDDAEMON_LIBS = @SYSTEMDDAEMON_LIBS@
+SYSTEMDJOURNAL_CFLAGS = @SYSTEMDJOURNAL_CFLAGS@
+SYSTEMDJOURNAL_LIBS = @SYSTEMDJOURNAL_LIBS@
+SYSTEMDLOGIN_CFLAGS = @SYSTEMDLOGIN_CFLAGS@
+SYSTEMDLOGIN_LIBS = @SYSTEMDLOGIN_LIBS@
 SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
 TDB_CFLAGS = @TDB_CFLAGS@
@@ -403,11 +413,13 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+systemduserunitdir = @systemduserunitdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 udevrulesdir = @udevrulesdir@
+zshcompletiondir = @zshcompletiondir@
 all: all-am
 
 .SUFFIXES:
diff --git a/doxygen/doxygen.conf.in b/doxygen/doxygen.conf.in
index a078e27..82ccad6 100644
--- a/doxygen/doxygen.conf.in
+++ b/doxygen/doxygen.conf.in
@@ -1,21 +1,30 @@
-# Doxyfile 1.3.8
+# Doxyfile 1.8.3.1
 
 # This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
+# doxygen (www.doxygen.org) for a project.
 #
-# All text after a hash (#) is considered a comment and will be ignored
+# All text after a hash (#) is considered a comment and will be ignored.
 # The format is:
 #       TAG = value [value, ...]
 # For lists items can also be appended using:
 #       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
+# Values that contain spaces should be placed between quotes (" ").
 
 #---------------------------------------------------------------------------
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or sequence of words) that should
+# identify the project. Note that if you do not use Doxywizard you need
+# to put quotes around the project name if it contains spaces.
 
 PROJECT_NAME           = PulseAudio
 
@@ -25,6 +34,19 @@ PROJECT_NAME           = PulseAudio
 
 PROJECT_NUMBER         = @PACKAGE_VERSION@
 
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is
+# included in the documentation. The maximum height of the logo should not
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO           =
+
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
 # If a relative path is entered, it will be relative to the location
@@ -35,9 +57,9 @@ OUTPUT_DIRECTORY       =
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
 # 4096 sub-directories (in 2 levels) under the output directory of each output
 # format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of source
-# files, where putting all generated files in the same directory would otherwise
-# cause performance problems for the file system.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
 
 CREATE_SUBDIRS         = NO
 
@@ -45,24 +67,15 @@ CREATE_SUBDIRS         = NO
 # documentation generated by doxygen is written. Doxygen will use this
 # information to generate all constant output in the proper language.
 # The default language is English, other supported languages are:
-# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
-# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
-# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
-# Swedish, and Ukrainian.
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
 
 OUTPUT_LANGUAGE        = English
 
-# This tag can be used to specify the encoding used in the generated output.
-# The encoding is not always determined by the language that is chosen,
-# but also whether or not the output is meant for Windows or non-Windows users.
-# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
-# forces the Windows encoding (this is the default for the Windows binary),
-# whereas setting the tag to NO uses a Unix-style encoding (the default for
-# all platforms other than Windows).
-
-USE_WINDOWS_ENCODING   = NO
-
 # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
 # include brief member descriptions after the members that are listed in
 # the file and class documentation (similar to JavaDoc).
@@ -80,11 +93,12 @@ REPEAT_BRIEF           = YES
 # This tag implements a quasi-intelligent brief description abbreviator
 # that is used to form the text in various listings. Each string
 # in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is used
-# as the annotated text. Otherwise, the brief description is used as-is. If left
-# blank, the following values are used ("$name" is automatically replaced with the
-# name of the entity): "The $name class" "The $name widget" "The $name file"
-# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
 
 ABBREVIATE_BRIEF       =
 
@@ -94,10 +108,10 @@ ABBREVIATE_BRIEF       =
 
 ALWAYS_DETAILED_SEC    = NO
 
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
-# members of a class in the documentation of that class as if those members were
-# ordinary class members. Constructors, destructors and assignment operators of
-# the base classes will not be shown.
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
 
 INLINE_INHERITED_MEMB  = NO
 
@@ -112,7 +126,9 @@ FULL_PATH_NAMES        = NO
 # only done if one of the specified strings matches the left-hand part of
 # the path. The tag can be used to show relative paths in the file list.
 # If left blank the directory from which doxygen is run is used as the
-# path to strip.
+# path to strip. Note that you specify absolute paths here, but also
+# relative paths, which will be relative from the directory where doxygen is
+# started.
 
 STRIP_FROM_PATH        =
 
@@ -126,7 +142,7 @@ STRIP_FROM_PATH        =
 STRIP_FROM_INC_PATH    =
 
 # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
+# (but less readable) file names. This can be useful if your file system
 # doesn't support long names like on DOS, Mac, or CD-ROM.
 
 SHORT_NAMES            = NO
@@ -134,11 +150,19 @@ SHORT_NAMES            = NO
 # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
 # will interpret the first line (until the first dot) of a JavaDoc-style
 # comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like the Qt-style comments (thus requiring an
-# explicit @brief command for a brief description.
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
 
 JAVADOC_AUTOBRIEF      = YES
 
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
 # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
 # treat a multi-line C++ special comment block (i.e. a block of //! or ///
 # comments) as a brief description. This used to be the default behaviour.
@@ -147,25 +171,17 @@ JAVADOC_AUTOBRIEF      = YES
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
 # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
 # member inherits the documentation from any documented member that it
 # re-implements.
 
 INHERIT_DOCS           = YES
 
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
 
-DISTRIBUTE_GROUP_DOC   = NO
+SEPARATE_MEMBER_PAGES  = NO
 
 # The TAB_SIZE tag can be used to set the number of spaces in a tab.
 # Doxygen uses this value to replace tabs by spaces in code fragments.
@@ -181,20 +197,104 @@ TAB_SIZE               = 4
 
 ALIASES                =
 
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C.
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding
+# "class=itcl::class" will allow you to use the command class in the
+# itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
 # For instance, some of the names that are used will be different. The list
 # of all members will be omitted, etc.
 
 OPTIMIZE_OUTPUT_FOR_C  = YES
 
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
-# only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
-# will look different, etc.
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
 
 OPTIMIZE_OUTPUT_JAVA   = NO
 
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension,
+# and language is one of the parsers supported by doxygen: IDL, Java,
+# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,
+# C++. For instance to make doxygen treat .inc files as Fortran files (default
+# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note
+# that for custom extensions you also need to set FILE_PATTERNS otherwise the
+# files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
+# comments according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you
+# can mix doxygen, HTML, and XML commands with Markdown formatting.
+# Disable only in case of backward compatibilities issues.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented classes,
+# or namespaces to their corresponding documentation. Such a link can be
+# prevented in individual cases by by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also makes the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES (the
+# default) will make doxygen replace the get and set methods by a property in
+# the documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
 # Set the SUBGROUPING tag to YES (the default) to allow class member groups of
 # the same type (for instance a group of public functions) to be put as a
 # subgroup of that type (e.g. under the Public Functions section). Set it to
@@ -203,6 +303,59 @@ OPTIMIZE_OUTPUT_JAVA   = NO
 
 SUBGROUPING            = YES
 
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
+# unions are shown inside the group in which they are included (e.g. using
+# @ingroup) instead of on a separate page (for HTML and Man pages) or
+# section (for LaTeX and RTF).
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
+# unions with only public data fields will be shown inline in the documentation
+# of the scope in which they are defined (i.e. file, namespace, or group
+# documentation), provided this scope is documented. If set to NO (the default),
+# structs, classes, and unions are shown on a separate page (for HTML and Man
+# pages) or section (for LaTeX and RTF).
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penalty.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will roughly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols.
+
+SYMBOL_CACHE_SIZE      = 0
+
+# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
+# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
+# their name and scope. Since this can be an expensive process and often the
+# same symbol appear multiple times in the code, doxygen keeps a cache of
+# pre-resolved symbols. If the cache is too small doxygen will become slower.
+# If the cache is too large, memory is wasted. The cache size is given by this
+# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols.
+
+LOOKUP_CACHE_SIZE      = 0
+
 #---------------------------------------------------------------------------
 # Build related configuration options
 #---------------------------------------------------------------------------
@@ -219,6 +372,11 @@ EXTRACT_ALL            = YES
 
 EXTRACT_PRIVATE        = NO
 
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+
+EXTRACT_PACKAGE        = NO
+
 # If the EXTRACT_STATIC tag is set to YES all static members of a file
 # will be included in the documentation.
 
@@ -237,6 +395,14 @@ EXTRACT_LOCAL_CLASSES  = YES
 
 EXTRACT_LOCAL_METHODS  = NO
 
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespaces are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
 # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
 # undocumented members of documented classes, files or namespaces.
 # If set to NO (the default) these members will be included in the
@@ -293,6 +459,12 @@ HIDE_SCOPE_NAMES       = NO
 
 SHOW_INCLUDE_FILES     = NO
 
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
 # If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
 # is inserted in the documentation for inline members.
 
@@ -312,6 +484,22 @@ SORT_MEMBER_DOCS       = YES
 
 SORT_BRIEF_DOCS        = NO
 
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
 # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
 # sorted by fully-qualified names, including namespaces. If set to
 # NO (the default), the class list will be sorted only by class name,
@@ -322,6 +510,15 @@ SORT_BRIEF_DOCS        = NO
 
 SORT_BY_SCOPE_NAME     = NO
 
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
+# do proper type resolution of all parameters of a function it will reject a
+# match between the prototype and the implementation of a member function even
+# if there is only one candidate or it is obvious which candidate to choose
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING  = NO
+
 # The GENERATE_TODOLIST tag can be used to enable (YES) or
 # disable (NO) the todo list. This list is created by putting \todo
 # commands in the documentation.
@@ -344,18 +541,19 @@ GENERATE_BUGLIST       = NO
 # disable (NO) the deprecated list. This list is created by putting
 # \deprecated commands in the documentation.
 
-GENERATE_DEPRECATEDLIST= NO
+GENERATE_DEPRECATEDLIST= YES
 
 # The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
+# documentation sections, marked by \if section-label ... \endif
+# and \cond section-label ... \endcond blocks.
 
 ENABLED_SECTIONS       =
 
 # The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
+# the initial value of a variable or macro consists of for it to appear in
 # the documentation. If the initializer consists of more lines than specified
 # here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
+# The appearance of the initializer of individual variables and macros in the
 # documentation can be controlled using \showinitializer or \hideinitializer
 # command in the documentation regardless of this setting.
 
@@ -367,6 +565,49 @@ MAX_INITIALIZER_LINES  = 30
 
 SHOW_USED_FILES        = YES
 
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files
+# containing the references data. This must be a list of .bib files. The
+# .bib extension is automatically appended if omitted. Using this command
+# requires the bibtex tool to be installed. See also
+# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
+# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
+# feature you need bibtex and perl available in the search path. Do not use
+# file names with spaces, bibtex cannot handle them.
+
+CITE_BIB_FILES         =
+
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
@@ -395,10 +636,20 @@ WARN_IF_UNDOCUMENTED   = YES
 
 WARN_IF_DOC_ERROR      = YES
 
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
 # The WARN_FORMAT tag determines the format of the warning messages that
 # doxygen can produce. The string should contain the $file, $line, and $text
 # tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text.
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
 
 WARN_FORMAT            = "$file:$line: $text"
 
@@ -417,44 +668,53 @@ WARN_LOGFILE           =
 # directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT = \
-    @srcdir@/../src/pulse/channelmap.h \
-    @srcdir@/../src/pulse/context.h \
-    @srcdir@/../src/pulse/def.h \
-    @srcdir@/../src/pulse/error.h \
-    @srcdir@/../src/pulse/ext-stream-restore.h \
-    @srcdir@/../src/pulse/ext-device-manager.h \
-    @srcdir@/../src/pulse/ext-device-restore.h \
-    @srcdir@/../src/pulse/format.h \
-    @srcdir@/../src/pulse/gccmacro.h \
-    @srcdir@/../src/pulse/glib-mainloop.h \
-    @srcdir@/../src/pulse/introspect.h \
-    @srcdir@/../src/pulse/mainloop-api.h \
-    @srcdir@/../src/pulse/mainloop-signal.h \
-    @srcdir@/../src/pulse/mainloop.h \
-    @srcdir@/../src/pulse/operation.h \
-    @srcdir@/../src/pulse/proplist.h \
-    @srcdir@/../src/pulse/pulseaudio.h \
-    @srcdir@/../src/pulse/rtclock.h \
-    @srcdir@/../src/pulse/sample.h \
-    @srcdir@/../src/pulse/scache.h \
-    @srcdir@/../src/pulse/simple.h \
-    @srcdir@/../src/pulse/stream.h \
-    @srcdir@/../src/pulse/subscribe.h \
-    @srcdir@/../src/pulse/thread-mainloop.h \
-    @srcdir@/../src/pulse/timeval.h \
-    @srcdir@/../src/pulse/utf8.h \
-    @srcdir@/../src/pulse/util.h \
-    @srcdir@/../src/pulse/version.h \
-    @srcdir@/../src/pulse/volume.h \
-    @srcdir@/../src/pulse/xmalloc.h \
+INPUT                  = @srcdir@/../src/pulse/channelmap.h \
+                         @srcdir@/../src/pulse/context.h \
+                         @srcdir@/../src/pulse/def.h \
+                         @srcdir@/../src/pulse/direction.h \
+                         @srcdir@/../src/pulse/error.h \
+                         @srcdir@/../src/pulse/ext-stream-restore.h \
+                         @srcdir@/../src/pulse/ext-device-manager.h \
+                         @srcdir@/../src/pulse/ext-device-restore.h \
+                         @srcdir@/../src/pulse/format.h \
+                         @srcdir@/../src/pulse/gccmacro.h \
+                         @srcdir@/../src/pulse/glib-mainloop.h \
+                         @srcdir@/../src/pulse/introspect.h \
+                         @srcdir@/../src/pulse/mainloop-api.h \
+                         @srcdir@/../src/pulse/mainloop-signal.h \
+                         @srcdir@/../src/pulse/mainloop.h \
+                         @srcdir@/../src/pulse/operation.h \
+                         @srcdir@/../src/pulse/proplist.h \
+                         @srcdir@/../src/pulse/pulseaudio.h \
+                         @srcdir@/../src/pulse/rtclock.h \
+                         @srcdir@/../src/pulse/sample.h \
+                         @srcdir@/../src/pulse/scache.h \
+                         @srcdir@/../src/pulse/simple.h \
+                         @srcdir@/../src/pulse/stream.h \
+                         @srcdir@/../src/pulse/subscribe.h \
+                         @srcdir@/../src/pulse/thread-mainloop.h \
+                         @srcdir@/../src/pulse/timeval.h \
+                         @srcdir@/../src/pulse/utf8.h \
+                         @srcdir@/../src/pulse/util.h \
+                         @srcdir@/../src/pulse/version.h \
+                         @srcdir@/../src/pulse/volume.h \
+                         @srcdir@/../src/pulse/xmalloc.h
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
 
 # If the value of the INPUT tag contains directories, you can use the
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
 # and *.h) to filter out the source-files in the directories. If left
 # blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
-# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
+# *.f90 *.f *.for *.vhd *.vhdl
 
 FILE_PATTERNS          =
 
@@ -464,28 +724,42 @@ FILE_PATTERNS          =
 
 RECURSIVE              = NO
 
-# The EXCLUDE tag can be used to specify files and/or directories that should
+# The EXCLUDE tag can be used to specify files and/or directories that should be
 # excluded from the INPUT source files. This way you can easily exclude a
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
 
 EXCLUDE                =
 
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
-# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
 
 EXCLUDE_SYMLINKS       = NO
 
 # If the value of the INPUT tag contains directories, you can use the
 # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
 
 EXCLUDE_PATTERNS       =
 
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        =
+
 # The EXAMPLE_PATH tag can be used to specify one or more files or
 # directories that contain example code fragments that are included (see
 # the \include command).
 
-EXAMPLE_PATH           = @srcdir@/../src/utils @srcdir@/../src/tests
+EXAMPLE_PATH           = @srcdir@/../src/utils \
+                         @srcdir@/../src/tests
 
 # If the value of the EXAMPLE_PATH tag contains directories, you can use the
 # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
@@ -512,17 +786,20 @@ IMAGE_PATH             =
 # by executing (via popen()) the command <filter> <input-file>, where <filter>
 # is the value of the INPUT_FILTER tag, and <input-file> is the name of an
 # input file. Doxygen will then use the output that the filter program writes
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
 # ignored.
 
 INPUT_FILTER           =
 
 # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.  Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.  The filters are a list of the form:
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
 # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
+# info on how filters are used. If FILTER_PATTERNS is empty or if
+# non of the patterns match the file name, INPUT_FILTER is applied.
 
 FILTER_PATTERNS        =
 
@@ -532,6 +809,21 @@ FILTER_PATTERNS        =
 
 FILTER_SOURCE_FILES    = NO
 
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
+# and it is also possible to disable source filtering for a specific pattern
+# using *.ext= (so without naming a filter). This option only has effect when
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page (index.html).
+# This can be useful if you have a project on for instance GitHub and want reuse
+# the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
 #---------------------------------------------------------------------------
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
@@ -550,22 +842,38 @@ INLINE_SOURCES         = NO
 
 # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
 # doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
+# fragments. Normal C, C++ and Fortran comments will always remain visible.
 
 STRIP_CODE_COMMENTS    = YES
 
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# If the REFERENCED_BY_RELATION tag is set to YES
 # then for each documented function all documented
 # functions referencing it will be listed.
 
 REFERENCED_BY_RELATION = YES
 
-# If the REFERENCES_RELATION tag is set to YES (the default)
+# If the REFERENCES_RELATION tag is set to YES
 # then for each documented function all documented entities
 # called/used by that function will be listed.
 
 REFERENCES_RELATION    = YES
 
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
 # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
 # will generate a verbatim copy of the header file for each class for
 # which an include is specified. Set to NO to disable this.
@@ -593,7 +901,8 @@ COLS_IN_ALPHA_INDEX    = 5
 # The IGNORE_PREFIX tag can be used to specify one or more prefixes that
 # should be ignored while generating the index headers.
 
-IGNORE_PREFIX          = pa_ PA_
+IGNORE_PREFIX          = pa_ \
+                         PA_
 
 #---------------------------------------------------------------------------
 # configuration options related to the HTML output
@@ -618,7 +927,14 @@ HTML_FILE_EXTENSION    = .html
 
 # The HTML_HEADER tag can be used to specify a personal HTML header for
 # each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
+# standard header. Note that when using a custom header you are responsible
+#  for the proper inclusion of any scripts and style sheets that doxygen
+# needs, which is dependent on the configuration options used.
+# It is advised to generate a default header using "doxygen -w html
+# header.html footer.html stylesheet.css YourConfigFile" and then modify
+# that header. Note that the header is subject to change so you typically
+# have to redo this when upgrading to a newer version of doxygen or when
+# changing the value of configuration settings such as GENERATE_TREEVIEW!
 
 HTML_HEADER            =
 
@@ -630,22 +946,120 @@ HTML_FOOTER            =
 
 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
 # style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
+# fine-tune the look of the HTML output. If left blank doxygen will
+# generate a default style sheet. Note that it is recommended to use
+# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this
+# tag will in the future become obsolete.
 
 HTML_STYLESHEET        =
 
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional
+# user-defined cascading style sheet that is included after the standard
+# style sheets created by doxygen. Using this option one can overrule
+# certain style aspects. This is preferred over using HTML_STYLESHEET
+# since it does not replace the standard style sheet and is therefor more
+# robust against future updates. Doxygen will copy the style sheet file to
+# the output directory.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that
+# the files will be copied as-is; there are no commands or markers available.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the style sheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
+# entries shown in the various tree structured indices initially; the user
+# can expand and collapse entries dynamically later on. Doxygen will expand
+# the tree to such a level that at most the specified number of entries are
+# visible (unless a fully collapsed tree already exceeds this amount).
+# So setting the number of entries 1 will produce a full collapsed tree by
+# default. 0 is a special value representing an infinite number of entries
+# and will result in a full expanded tree by default.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
 
-HTML_ALIGN_MEMBERS     = YES
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely
+# identify the documentation publisher. This should be a reverse domain-name
+# style string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
 
 # If the GENERATE_HTMLHELP tag is set to YES, additional index files
 # will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
 # of the generated HTML documentation.
 
 GENERATE_HTMLHELP      = NO
@@ -670,6 +1084,12 @@ HHC_LOCATION           =
 
 GENERATE_CHI           = NO
 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
 # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
 # controls whether a binary table of contents is generated (YES) or a
 # normal table of contents (NO) in the .chm file.
@@ -681,32 +1101,223 @@ BINARY_TOC             = NO
 
 TOC_EXPAND             = NO
 
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
 
-DISABLE_INDEX          = NO
+GENERATE_QHP           = NO
 
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
 
-ENUM_VALUES_PER_LINE   = 1
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+#  will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
 
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
+# at top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it. Since the tabs have the same information as the
+# navigation tree you can set this option to NO if you already set
+# GENERATE_TREEVIEW to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
 # is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+# Since the tree basically has the same information as the tab index you
+# could consider to set DISABLE_INDEX to NO when enabling this option.
 
 GENERATE_TREEVIEW      = YES
 
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML
+# documentation. Note that a value of 0 will completely suppress the enum
+# values from appearing in the overview section.
+
+ENUM_VALUES_PER_LINE   = 1
+
 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
 # used to set the initial width (in pixels) of the frame in which the tree
 # is shown.
 
 TREEVIEW_WIDTH         = 250
 
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
+# (see http://www.mathjax.org) which uses client side Javascript for the
+# rendering instead of using prerendered bitmaps. Use this if you do not
+# have LaTeX installed or if you want to formulas look prettier in the HTML
+# output. When enabled you may also need to install MathJax separately and
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
+# SVG. The default value is HTML-CSS, which is slower, but has the best
+# compatibility.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the
+# HTML output directory using the MATHJAX_RELPATH option. The destination
+# directory should contain the MathJax.js script. For instance, if the mathjax
+# directory is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to
+# the MathJax Content Delivery Network so you can quickly see the result without
+# installing MathJax.
+# However, it is strongly recommended to install a local
+# copy of MathJax from http://www.mathjax.org before deployment.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
+# names that should be enabled during MathJax rendering.
+
+MATHJAX_EXTENSIONS     =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript.
+# There are two flavours of web server based search depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools.
+# See the manual for details.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain
+# the search results. Doxygen ships with an example indexer (doxyindexer) and
+# search engine (doxysearch.cgi) which are based on the open source search engine
+# library Xapian. See the manual for configuration details.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will returned the search results when EXTERNAL_SEARCH is enabled.
+# Doxygen ships with an example search engine (doxysearch) which is based on
+# the open source search engine library Xapian. See the manual for configuration
+# details.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id
+# of to a relative location where the documentation can be found.
+# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ...
+
+EXTRA_SEARCH_MAPPINGS  =
+
 #---------------------------------------------------------------------------
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
@@ -724,6 +1335,9 @@ LATEX_OUTPUT           = latex
 
 # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
 # invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
 
 LATEX_CMD_NAME         = latex
 
@@ -740,7 +1354,7 @@ MAKEINDEX_CMD_NAME     = makeindex
 COMPACT_LATEX          = NO
 
 # The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
+# by the printer. Possible values are: a4, letter, legal and
 # executive. If left blank a4wide will be used.
 
 PAPER_TYPE             = a4wide
@@ -757,6 +1371,13 @@ EXTRA_PACKAGES         =
 
 LATEX_HEADER           =
 
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
+# the generated latex document. The footer should contain everything after
+# the last chapter. If it is left blank doxygen will generate a
+# standard footer. Notice: only use this tag if you know what you are doing!
+
+LATEX_FOOTER           =
+
 # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
 # is prepared for conversion to pdf (using ps2pdf). The pdf file will
 # contain links (just like the HTML output) instead of page references
@@ -783,6 +1404,19 @@ LATEX_BATCHMODE        = NO
 
 LATEX_HIDE_INDICES     = NO
 
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
+# http://en.wikipedia.org/wiki/BibTeX for more info.
+
+LATEX_BIB_STYLE        = plain
+
 #---------------------------------------------------------------------------
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
@@ -814,7 +1448,7 @@ COMPACT_RTF            = NO
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# Load style sheet definitions from file. Syntax is similar to doxygen's
 # config file, i.e. a series of assignments. You only have to provide
 # replacements, missing definitions are set to their default value.
 
@@ -919,8 +1553,10 @@ GENERATE_PERLMOD       = NO
 PERLMOD_LATEX          = NO
 
 # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.  This is useful
-# if you want to understand what is going on.  On the other hand, if this
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
 # tag is set to NO the size of the Perl module output will be much smaller
 # and Perl will parse it just the same.
 
@@ -952,12 +1588,12 @@ MACRO_EXPANSION        = YES
 
 # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
 # then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+# PREDEFINED and EXPAND_AS_DEFINED tags.
 
 EXPAND_ONLY_PREDEF     = YES
 
 # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
+# pointed to by INCLUDE_PATH will be searched when a #include is found.
 
 SEARCH_INCLUDES        = YES
 
@@ -978,22 +1614,25 @@ INCLUDE_FILE_PATTERNS  =
 # are defined before the preprocessor is started (similar to the -D option of
 # gcc). The argument of the tag is a list of macros of the form: name
 # or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed.
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
 
-PREDEFINED             = PA_C_DECL_BEGIN= PA_C_DECL_END=
+PREDEFINED             = PA_C_DECL_BEGIN= \
+                         PA_C_DECL_END=
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
 # this tag can be used to specify a list of macro names that should be expanded.
 # The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
+# Use the PREDEFINED tag if you want to use a different macro definition that
+# overrules the definition found in the source code.
 
-#EXPAND_AS_DEFINED      = PA_C_DECL_BEGIN, PA_C_DECL_END
+EXPAND_AS_DEFINED      =
 
 # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse the
-# parser if not removed.
+# doxygen's preprocessor will remove all references to function-like macros
+# that are alone on a line, have an all uppercase name, and do not end with a
+# semicolon, because these will confuse the parser if not removed.
 
 SKIP_FUNCTION_MACROS   = YES
 
@@ -1001,20 +1640,18 @@ SKIP_FUNCTION_MACROS   = YES
 # Configuration::additions related to external references
 #---------------------------------------------------------------------------
 
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#   TAGFILES = file1 file2 ...
+# The TAGFILES option can be used to specify one or more tagfiles. For each
+# tag file the location of the external documentation should be added. The
+# format of a tag file without this location is as follows:
+#
+# TAGFILES = file1 file2 ...
 # Adding location for the tag files is done as follows:
-#   TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths
+# or URLs. Note that each tag file must have a unique name (where the name does
+# NOT include the path). If a tag file is not located in the directory in which
+# doxygen is run, you must also specify the path to the tagfile here.
 
 TAGFILES               =
 
@@ -1045,13 +1682,22 @@ PERL_PATH              = /usr/bin/perl
 #---------------------------------------------------------------------------
 
 # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
-# super classes. Setting the tag to NO turns the diagrams off. Note that this
-# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
-# recommended to install and use dot, since it yields more powerful graphs.
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option also works with HAVE_DOT disabled, but it is recommended to
+# install and use dot, since it yields more powerful graphs.
 
 CLASS_DIAGRAMS         = YES
 
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
 # If set to YES, the inheritance and collaboration graphs will hide
 # inheritance and usage relations if the target is undocumented
 # or is not a class.
@@ -1065,10 +1711,38 @@ HIDE_UNDOC_RELATIONS   = YES
 
 HAVE_DOT               = NO
 
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will use the Helvetica font for all dot files that
+# doxygen generates. When you want a differently looking font you can specify
+# the font name using DOT_FONTNAME. You need to make sure dot is able to find
+# the font, which can be done by putting it in a standard location or by setting
+# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
+# directory containing the font.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the Helvetica font.
+# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
+# set the path where dot can find it.
+
+DOT_FONTPATH           =
+
 # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
 # will generate a graph for each documented class showing the direct and
 # indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
+# CLASS_DIAGRAMS tag to NO.
 
 CLASS_GRAPH            = YES
 
@@ -1079,12 +1753,26 @@ CLASS_GRAPH            = YES
 
 COLLABORATION_GRAPH    = YES
 
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
 # If the UML_LOOK tag is set to YES doxygen will generate inheritance and
 # collaboration diagrams in a style similar to the OMG's Unified Modeling
 # Language.
 
 UML_LOOK               = NO
 
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside
+# the class node. If there are many fields or methods and many nodes the
+# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
+# threshold limits the number of items for each type to make the size more
+# managable. Set this to 0 for no limit. Note that the threshold may be
+# exceeded by 50% before the limit is enforced.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
 # If set to YES, the inheritance and collaboration graphs will show the
 # relations between templates and their instances.
 
@@ -1104,27 +1792,53 @@ INCLUDE_GRAPH          = YES
 
 INCLUDED_BY_GRAPH      = YES
 
-# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
 
 CALL_GRAPH             = NO
 
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
 # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
+# will generate a graphical hierarchy of all classes instead of a textual one.
 
 GRAPHICAL_HIERARCHY    = YES
 
+# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
 # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
+# generated by dot. Possible values are svg, png, jpg, or gif.
+# If left blank png will be used. If you choose svg you need to set
+# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
+# visible in IE 9+ (other browsers do not have this requirement).
 
 DOT_IMAGE_FORMAT       = png
 
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+# Note that this requires a modern browser other than Internet Explorer.
+# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
+# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
+# visible. Older versions of IE do not have SVG support.
+
+INTERACTIVE_SVG        = NO
+
 # The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found on the path.
+# found. If left blank, it is assumed the dot tool can be found in the path.
 
 DOT_PATH               =
 
@@ -1134,33 +1848,47 @@ DOT_PATH               =
 
 DOTFILE_DIRS           =
 
-# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the
+# \mscfile command).
 
-MAX_DOT_GRAPH_WIDTH    = 1024
+MSCFILE_DIRS           =
 
-# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
-# (in pixels) of the graphs generated by dot. If a graph becomes larger than
-# this value, doxygen will try to truncate the graph, so that it fits within
-# the specified constraint. Beware that most browsers cannot cope with very
-# large images.
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
 
-MAX_DOT_GRAPH_HEIGHT   = 1024
+DOT_GRAPH_MAX_NODES    = 50
 
 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
 # graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes that
-# lay further from the root node will be omitted. Note that setting this option to
-# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
-# note that a graph may be further truncated if the graph's image dimensions are
-# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
-# If 0 is used for the depth value (the default), the graph is not depth-constrained.
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
 
 MAX_DOT_GRAPH_DEPTH    = 0
 
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
 # generate a legend page explaining the meaning of the various boxes and
 # arrows in the dot generated graphs.
@@ -1172,14 +1900,3 @@ GENERATE_LEGEND        = YES
 # the various graphs.
 
 DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
-
-SHOW_DIRECTORIES=NO
diff --git a/man/Makefile.am b/man/Makefile.am
index d0cc8e7..d80ba6a 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -32,7 +32,6 @@ noinst_DATA = \
 	pulse-client.conf.5.xml \
 	default.pa.5.xml \
 	pulse-cli-syntax.5.xml \
-	start-pulseaudio-kde.1.xml \
 	start-pulseaudio-x11.1.xml
 
 xmllint: $(noinst_DATA)
@@ -56,7 +55,6 @@ dist_man_MANS = \
 	pulse-client.conf.5 \
 	default.pa.5 \
 	pulse-cli-syntax.5 \
-	start-pulseaudio-kde.1 \
 	start-pulseaudio-x11.1
 
 CLEANFILES = \
@@ -81,7 +79,6 @@ EXTRA_DIST = \
 	pulse-client.conf.5.xml.in \
 	default.pa.5.xml.in \
 	pulse-cli-syntax.5.xml.in \
-	start-pulseaudio-kde.1.xml.in \
 	start-pulseaudio-x11.1.xml.in \
 	xmltoman \
 	xmltoman.css \
diff --git a/man/Makefile.in b/man/Makefile.in
index aa1c594..af32f02 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -105,7 +105,6 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
 	$(srcdir)/pulse-client.conf.5.xml.in \
 	$(srcdir)/default.pa.5.xml.in \
 	$(srcdir)/pulse-cli-syntax.5.xml.in \
-	$(srcdir)/start-pulseaudio-kde.1.xml.in \
 	$(srcdir)/start-pulseaudio-x11.1.xml.in $(dist_man_MANS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_libwrap.m4 \
@@ -131,7 +130,7 @@ CONFIG_CLEAN_FILES = pulseaudio.1.xml esdcompat.1.xml \
 	pactl.1.xml pasuspender.1.xml padsp.1.xml \
 	pulse-daemon.conf.5.xml pulse-client.conf.5.xml \
 	default.pa.5.xml pulse-cli-syntax.5.xml \
-	start-pulseaudio-kde.1.xml start-pulseaudio-x11.1.xml
+	start-pulseaudio-x11.1.xml
 CONFIG_CLEAN_VPATH_FILES =
 AM_V_P = $(am__v_P_ at AM_V@)
 am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
@@ -202,6 +201,8 @@ AUTOMAKE = @AUTOMAKE@
 AVAHI_CFLAGS = @AVAHI_CFLAGS@
 AVAHI_LIBS = @AVAHI_LIBS@
 AWK = @AWK@
+BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
+BLUEZ_LIBS = @BLUEZ_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -249,13 +250,16 @@ HAVE_AVAHI = @HAVE_AVAHI@
 HAVE_BLUEZ = @HAVE_BLUEZ@
 HAVE_BLUEZ_4 = @HAVE_BLUEZ_4@
 HAVE_BLUEZ_5 = @HAVE_BLUEZ_5@
+HAVE_BLUEZ_5_NATIVE_HEADSET = @HAVE_BLUEZ_5_NATIVE_HEADSET@
+HAVE_BLUEZ_5_OFONO_HEADSET = @HAVE_BLUEZ_5_OFONO_HEADSET@
 HAVE_DBUS = @HAVE_DBUS@
 HAVE_GLIB20 = @HAVE_GLIB20@
 HAVE_MKFIFO = @HAVE_MKFIFO@
 HAVE_NEON = @HAVE_NEON@
 HAVE_OSS_OUTPUT = @HAVE_OSS_OUTPUT@
-HAVE_SYSTEMD = @HAVE_SYSTEMD@
+HAVE_SYSTEMD_DAEMON = @HAVE_SYSTEMD_DAEMON@
 HAVE_SYSTEMD_JOURNAL = @HAVE_SYSTEMD_JOURNAL@
+HAVE_SYSTEMD_LOGIN = @HAVE_SYSTEMD_LOGIN@
 HAVE_SYS_RESOURCE_H = @HAVE_SYS_RESOURCE_H@
 HAVE_UDEV = @HAVE_UDEV@
 HAVE_WAVEOUT = @HAVE_WAVEOUT@
@@ -278,8 +282,6 @@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JACK_CFLAGS = @JACK_CFLAGS@
 JACK_LIBS = @JACK_LIBS@
-JOURNAL_CFLAGS = @JOURNAL_CFLAGS@
-JOURNAL_LIBS = @JOURNAL_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBASYNCNS_CFLAGS = @LIBASYNCNS_CFLAGS@
@@ -346,6 +348,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PA_ACCESS_GROUP = @PA_ACCESS_GROUP@
 PA_API_VERSION = @PA_API_VERSION@
 PA_BINARY = @PA_BINARY@
+PA_DEFAULT_AUTOSPAWN = @PA_DEFAULT_AUTOSPAWN@
 PA_DEFAULT_CONFIG_DIR = @PA_DEFAULT_CONFIG_DIR@
 PA_DLSEARCHPATH = @PA_DLSEARCHPATH@
 PA_INCDIR = @PA_INCDIR@
@@ -379,6 +382,12 @@ SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STOW = @STOW@
 STRIP = @STRIP@
+SYSTEMDDAEMON_CFLAGS = @SYSTEMDDAEMON_CFLAGS@
+SYSTEMDDAEMON_LIBS = @SYSTEMDDAEMON_LIBS@
+SYSTEMDJOURNAL_CFLAGS = @SYSTEMDJOURNAL_CFLAGS@
+SYSTEMDJOURNAL_LIBS = @SYSTEMDJOURNAL_LIBS@
+SYSTEMDLOGIN_CFLAGS = @SYSTEMDLOGIN_CFLAGS@
+SYSTEMDLOGIN_LIBS = @SYSTEMDLOGIN_LIBS@
 SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
 TDB_CFLAGS = @TDB_CFLAGS@
@@ -451,11 +460,13 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+systemduserunitdir = @systemduserunitdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 udevrulesdir = @udevrulesdir@
+zshcompletiondir = @zshcompletiondir@
 DISTCLEANFILES = \
 	$(noinst_DATA)
 
@@ -473,7 +484,6 @@ noinst_DATA = \
 	pulse-client.conf.5.xml \
 	default.pa.5.xml \
 	pulse-cli-syntax.5.xml \
-	start-pulseaudio-kde.1.xml \
 	start-pulseaudio-x11.1.xml
 
 @BUILD_MANPAGES_TRUE at dist_man_MANS = \
@@ -490,7 +500,6 @@ noinst_DATA = \
 @BUILD_MANPAGES_TRUE@	pulse-client.conf.5 \
 @BUILD_MANPAGES_TRUE@	default.pa.5 \
 @BUILD_MANPAGES_TRUE@	pulse-cli-syntax.5 \
- at BUILD_MANPAGES_TRUE@	start-pulseaudio-kde.1 \
 @BUILD_MANPAGES_TRUE@	start-pulseaudio-x11.1
 
 @BUILD_MANPAGES_TRUE at CLEANFILES = \
@@ -510,7 +519,6 @@ EXTRA_DIST = \
 	pulse-client.conf.5.xml.in \
 	default.pa.5.xml.in \
 	pulse-cli-syntax.5.xml.in \
-	start-pulseaudio-kde.1.xml.in \
 	start-pulseaudio-x11.1.xml.in \
 	xmltoman \
 	xmltoman.css \
@@ -576,8 +584,6 @@ default.pa.5.xml: $(top_builddir)/config.status $(srcdir)/default.pa.5.xml.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 pulse-cli-syntax.5.xml: $(top_builddir)/config.status $(srcdir)/pulse-cli-syntax.5.xml.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-start-pulseaudio-kde.1.xml: $(top_builddir)/config.status $(srcdir)/start-pulseaudio-kde.1.xml.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 start-pulseaudio-x11.1.xml: $(top_builddir)/config.status $(srcdir)/start-pulseaudio-x11.1.xml.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
diff --git a/man/default.pa.5 b/man/default.pa.5
index 76ba8d6..f71afb2 100644
--- a/man/default.pa.5
+++ b/man/default.pa.5
@@ -4,10 +4,10 @@ default.pa \- PulseAudio Sound Server Startup Script
 .SH SYNOPSIS
 \fB\fI~/.config/pulse/default.pa\fB
 
-\fI/etc/pulse/default.pa\fB
+\fI/usr/local/etc/pulse/default.pa\fB
 \f1
 .SH DESCRIPTION
-The PulseAudio sound server interprets the file \fI~/.config/pulse/default.pa\f1 on startup, and when that file doesn't exist \fI/etc/pulse/default.pa\f1. It should contain directives in the PulseAudio CLI language, as documented in \fBpulse-cli-syntax(5)\f1.
+The PulseAudio sound server interprets the file \fI~/.config/pulse/default.pa\f1 on startup, and when that file doesn't exist \fI/usr/local/etc/pulse/default.pa\f1. It should contain directives in the PulseAudio CLI language, as documented in \fBpulse-cli-syntax(5)\f1.
 
 The same commands can also be entered during runtime in the \fBpacmd(1)\f1 tool, allowing flexible runtime reconfiguration.
 .SH AUTHORS
diff --git a/man/pactl.1 b/man/pactl.1
index 13abdef..76783ef 100644
--- a/man/pactl.1
+++ b/man/pactl.1
@@ -27,8 +27,8 @@ Choose the server to connect to.
 Specify the client name \fIpactl\f1 shall pass to the server when connecting.
 .SH COMMANDS
 .TP
-\fBstat\f1 [\fIshort\f1]
-Dump a few statistics about the memory usage of the PulseAudio daemon. (Note: for backwards compatibility, we also show the output of the \fIinfo\f1 command. In order to only show statistics, use the optional \fIshort\f1 argument. In a future version of PA we will make this the default)
+\fBstat\f1
+Dump a few statistics about the memory usage of the PulseAudio daemon.
 .TP
 \fBinfo\f1
 Dump some info about the PulseAudio daemon.
@@ -84,17 +84,17 @@ Set the specified source (identified by its symbolic name or numerical index) to
 \fBset-port-latency-offset\f1 \fICARD\f1 \fIPORT\f1 \fIOFFSET\f1
 Set a latency offset to a specified port (identified by its symbolic name) that belongs to a card (identified by its symbolic name or numerical index). \fIOFFSET\f1 is a number which represents the latency offset in microseconds
 .TP
-\fBset-sink-volume\f1 \fISINK\f1 \fIVOLUME\f1
-Set the volume of the specified sink (identified by its symbolic name or numerical index). \fIVOLUME\f1 can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current sink volume.
+\fBset-sink-volume\f1 \fISINK\f1 \fIVOLUME [VOLUME ...]\f1
+Set the volume of the specified sink (identified by its symbolic name or numerical index). \fIVOLUME\f1 can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current sink volume. A single volume value affects all channels; if multiple volume values are given their number has to match the sink's num [...]
 .TP
-\fBset-source-volume\f1 \fISOURCE\f1 \fIVOLUME\f1
-Set the volume of the specified source (identified by its symbolic name or numerical index). \fIVOLUME\f1 can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current source volume.
+\fBset-source-volume\f1 \fISOURCE\f1 \fIVOLUME [VOLUME ...]\f1
+Set the volume of the specified source (identified by its symbolic name or numerical index). \fIVOLUME\f1 can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current source volume. A single volume value affects all channels; if multiple volume values are given their number has to match the source [...]
 .TP
-\fBset-sink-input-volume\f1 \fIINPUT\f1 \fIVOLUME\f1
-Set the volume of the specified sink input (identified by its numerical index). \fIVOLUME\f1 can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current sink input volume.
+\fBset-sink-input-volume\f1 \fIINPUT\f1 \fIVOLUME [VOLUME ...]\f1
+Set the volume of the specified sink input (identified by its numerical index). \fIVOLUME\f1 can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current sink input volume. A single volume value affects all channels; if multiple volume values are given their number has to match the sink input's nu [...]
 .TP
-\fBset-source-output-volume\f1 \fIOUTPUT\f1 \fIVOLUME\f1
-Set the volume of the specified source output (identified by its numerical index). \fIVOLUME\f1 can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current source output volume.
+\fBset-source-output-volume\f1 \fIOUTPUT\f1 \fIVOLUME [VOLUME ...]\f1
+Set the volume of the specified source output (identified by its numerical index). \fIVOLUME\f1 can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage (e.g. 10%, 100%) or a decibel value (e.g. 0dB, 20dB). If the volume specification start with a + or - the volume adjustment will be relative to the current source output volume. A single volume value affects all channels; if multiple volume values are given their number has to match the source ou [...]
 .TP
 \fBset-sink-mute\f1 \fISINK\f1 \fI1|0|toggle\f1
 Set the mute status of the specified sink (identified by its symbolic name or numerical index).
diff --git a/man/pactl.1.xml.in b/man/pactl.1.xml.in
index 29071b3..cf6570e 100644
--- a/man/pactl.1.xml.in
+++ b/man/pactl.1.xml.in
@@ -66,11 +66,8 @@ USA.
   <section name="Commands">
 
     <option>
-      <p><opt>stat</opt> [<arg>short</arg>]</p>
-      <optdesc><p>Dump a few statistics about the memory usage of the PulseAudio daemon. (Note: for backwards
-      compatibility, we also show the output of the <arg>info</arg> command. In order to only show
-      statistics, use the optional <arg>short</arg> argument. In a future version of PA we will
-      make this the default)</p></optdesc>
+      <p><opt>stat</opt></p>
+      <optdesc><p>Dump a few statistics about the memory usage of the PulseAudio daemon.</p></optdesc>
     </option>
 
     <option>
@@ -189,33 +186,37 @@ USA.
     </option>
 
     <option>
-      <p><opt>set-sink-volume</opt> <arg>SINK</arg> <arg>VOLUME</arg></p>
+      <p><opt>set-sink-volume</opt> <arg>SINK</arg> <arg>VOLUME [VOLUME ...]</arg></p>
       <optdesc><p>Set the volume of the specified sink (identified by its symbolic name or numerical index).
       <arg>VOLUME</arg> can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage
       (e.g.  10%, 100%) or a decibel value (e.g. 0dB, 20dB).  If the volume specification start with a + or - the volume
-      adjustment will be relative to the current sink volume.</p></optdesc>
+      adjustment will be relative to the current sink volume.  A single volume value affects all channels; if multiple
+      volume values are given their number has to match the sink's number of channels.</p></optdesc>
     </option>
 
     <option>
-      <p><opt>set-source-volume</opt> <arg>SOURCE</arg> <arg>VOLUME</arg></p>
+      <p><opt>set-source-volume</opt> <arg>SOURCE</arg> <arg>VOLUME [VOLUME ...]</arg></p>
       <optdesc><p>Set the volume of the specified source (identified by its symbolic name or numerical index).
       <arg>VOLUME</arg> can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage
       (e.g.  10%, 100%) or a decibel value (e.g. 0dB, 20dB).  If the volume specification start with a + or - the volume
-      adjustment will be relative to the current source volume.</p></optdesc> </option>
+      adjustment will be relative to the current source volume.  A single volume value affects all channels; if multiple
+      volume values are given their number has to match the source's number of channels.</p></optdesc> </option>
 
     <option>
-      <p><opt>set-sink-input-volume</opt> <arg>INPUT</arg> <arg>VOLUME</arg></p>
+      <p><opt>set-sink-input-volume</opt> <arg>INPUT</arg> <arg>VOLUME [VOLUME ...]</arg></p>
       <optdesc><p>Set the volume of the specified sink input (identified by its numerical index).
       <arg>VOLUME</arg> can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage
       (e.g.  10%, 100%) or a decibel value (e.g. 0dB, 20dB).  If the volume specification start with a + or - the volume
-      adjustment will be relative to the current sink input volume.</p></optdesc> </option>
+      adjustment will be relative to the current sink input volume.  A single volume value affects all channels; if multiple
+      volume values are given their number has to match the sink input's number of channels.</p></optdesc> </option>
 
     <option>
-      <p><opt>set-source-output-volume</opt> <arg>OUTPUT</arg> <arg>VOLUME</arg></p>
+      <p><opt>set-source-output-volume</opt> <arg>OUTPUT</arg> <arg>VOLUME [VOLUME ...]</arg></p>
       <optdesc><p>Set the volume of the specified source output (identified by its numerical index).
       <arg>VOLUME</arg> can be specified as an integer (e.g. 2000, 16384), a linear factor (e.g. 0.4, 1.100), a percentage
       (e.g.  10%, 100%) or a decibel value (e.g. 0dB, 20dB).  If the volume specification start with a + or - the volume
-      adjustment will be relative to the current source output volume.</p></optdesc>
+      adjustment will be relative to the current source output volume.  A single volume value affects all channels; if multiple
+      volume values are given their number has to match the source output's number of channels.</p></optdesc>
     </option>
 
     <option>
diff --git a/man/pax11publish.1 b/man/pax11publish.1
index e0e578d..ec241b9 100644
--- a/man/pax11publish.1
+++ b/man/pax11publish.1
@@ -32,7 +32,7 @@ Read the PulseAudio server credentials currently set on the X11 root window and
 Similar to \fB-d\f1, however dumps them in a Bourne shell compatible format so they may be used together with the \fIeval\f1 shell command to set the $PULSE_SERVER, $PULSE_SINK, $PULSE_SOURCE environment variables. Also reads the authentication cookie from the root window and stores it in \fI~/.config/pulse/cookie\f1. 
 .TP
 \fB-e\f1
-Export the currently locally used sound server, sink, source configuration to the X11 root window. This takes the data from the $PULSE_SERVER, $PULSE_SINK, $PULSE_SOURCE environment variables and combines them with the data from \fI~/.config/pulse/client.conf\f1 (or \fI/etc/pulse/client.conf\f1 if that file does not exist). If specific options are passed on the command line (\fB-S\f1, \fB-O\f1, \fB-I\f1, \fB-c\f1, see below), they take precedence. Also uploads the local authentication co [...]
+Export the currently locally used sound server, sink, source configuration to the X11 root window. This takes the data from the $PULSE_SERVER, $PULSE_SINK, $PULSE_SOURCE environment variables and combines them with the data from \fI~/.config/pulse/client.conf\f1 (or \fI/usr/local/etc/pulse/client.conf\f1 if that file does not exist). If specific options are passed on the command line (\fB-S\f1, \fB-O\f1, \fB-I\f1, \fB-c\f1, see below), they take precedence. Also uploads the local authent [...]
 .TP
 \fB-r\f1
 Removes the configured PulseAudio configuration from the X11 root window.
diff --git a/man/pulse-cli-syntax.5 b/man/pulse-cli-syntax.5
index 8112d89..ea9d892 100644
--- a/man/pulse-cli-syntax.5
+++ b/man/pulse-cli-syntax.5
@@ -4,9 +4,9 @@ pulse-cli-syntax \- PulseAudio Command Line Interface Syntax
 .SH SYNOPSIS
 \fB\fI~/.config/pulse/default.pa\fB
 
-\fI/etc/pulse/default.pa\fB
+\fI/usr/local/etc/pulse/default.pa\fB
 
-\fI/etc/pulse/system.pa\fB
+\fI/usr/local/etc/pulse/system.pa\fB
 \f1
 .SH DESCRIPTION
 PulseAudio provides a simple command line language used by configuration scripts, the pacmd interactive shell, and the modules module-cli and module-cli-protocol-{unix,tcp}. Empty lines and lines beginning with a hashmark (#) are silently ignored. Several commands are supported. 
diff --git a/man/pulse-client.conf.5 b/man/pulse-client.conf.5
index 0d88270..77ca52f 100644
--- a/man/pulse-client.conf.5
+++ b/man/pulse-client.conf.5
@@ -4,10 +4,10 @@ pulse-client.conf \- PulseAudio client configuration file
 .SH SYNOPSIS
 \fB\fI~/.config/pulse/client.conf\fB
 
-\fI/etc/pulse/client.conf\fB
+\fI/usr/local/etc/pulse/client.conf\fB
 \f1
 .SH DESCRIPTION
-The PulseAudio client library reads configuration directives from a file \fI~/.config/pulse/client.conf\f1 on startup and when that file doesn't exist from \fI/etc/pulse/client.conf\f1.
+The PulseAudio client library reads configuration directives from a file \fI~/.config/pulse/client.conf\f1 on startup and when that file doesn't exist from \fI/usr/local/etc/pulse/client.conf\f1.
 
 The configuration file is a simple collection of variable declarations. If the configuration file parser encounters either ; or # it ignores the rest of the line until its end.
 
@@ -20,7 +20,7 @@ For the settings that take a boolean argument the values \fBtrue\f1, \fByes\f1,
 .TP
 \fBdefault-server=\f1 The default sever to connect to. The environment variable \fB$PULSE_SERVER\f1 takes precedence.
 .TP
-\fBautospawn=\f1 Autospawn a PulseAudio daemon when needed. Takes a boolean value, defaults to \fByes\f1.
+\fBautospawn=\f1 Autospawn a PulseAudio daemon when needed. Takes a boolean value, defaults to \fBno\f1.
 .TP
 \fBdaemon-binary=\f1 Path to the PulseAudio daemon to run when autospawning. Defaults to a path configured at compile time.
 .TP
diff --git a/man/pulse-client.conf.5.xml.in b/man/pulse-client.conf.5.xml.in
index 45f02da..7025df7 100644
--- a/man/pulse-client.conf.5.xml.in
+++ b/man/pulse-client.conf.5.xml.in
@@ -69,7 +69,7 @@ USA.
 
     <option>
       <p><opt>autospawn=</opt> Autospawn a PulseAudio daemon when
-      needed. Takes a boolean value, defaults to <opt>yes</opt>.</p>
+      needed. Takes a boolean value, defaults to <opt>@PA_DEFAULT_AUTOSPAWN@</opt>.</p>
     </option>
 
     <option>
diff --git a/man/pulse-daemon.conf.5 b/man/pulse-daemon.conf.5
index 2519d69..0a80e2b 100644
--- a/man/pulse-daemon.conf.5
+++ b/man/pulse-daemon.conf.5
@@ -4,10 +4,10 @@ pulse-daemon.conf \- PulseAudio daemon configuration file
 .SH SYNOPSIS
 \fB\fI~/.config/pulse/daemon.conf\fB
 
-\fI/etc/pulse/daemon.conf\fB
+\fI/usr/local/etc/pulse/daemon.conf\fB
 \f1
 .SH DESCRIPTION
-The PulseAudio sound server reads configuration directives from a file \fI~/.config/pulse/daemon.conf\f1 on startup and when that file doesn't exist from \fI/etc/pulse/daemon.conf\f1. Please note that the server also reads a configuration script on startup \fIdefault.pa\f1 which also contains runtime configuration directives.
+The PulseAudio sound server reads configuration directives from a file \fI~/.config/pulse/daemon.conf\f1 on startup and when that file doesn't exist from \fI/usr/local/etc/pulse/daemon.conf\f1. Please note that the server also reads a configuration script on startup \fIdefault.pa\f1 which also contains runtime configuration directives.
 
 The configuration file is a simple collection of variable declarations. If the configuration file parser encounters either ; or # it ignores the rest of the line until its end.
 
@@ -28,7 +28,7 @@ For the settings that take a boolean argument the values \fBtrue\f1, \fByes\f1,
 .TP
 \fBenable-lfe-remixing=\f1 If disabled when upmixing or downmixing ignore LFE channels. When this option is disabled the output LFE channel will only get a signal when an input LFE channel is available as well. If no input LFE channel is available the output LFE channel will always be 0. If no output LFE channel is available the signal on the input LFE channel will be ignored. Defaults to \fBno\f1.
 .TP
-\fBuse-pid-file=\f1 Create a PID file in the runtime directory (\fI$XDG_RUNTIMEDIR/pulse/pid\f1). If this is enabled you may use commands like \fB--kill\f1 or \fB--check\f1. If you are planning to start more than one PulseAudio process per user, you better disable this option since it effectively disables multiple instances. Takes a boolean argument, defaults to \fByes\f1. The \fB--use-pid-file\f1 command line option takes precedence.
+\fBuse-pid-file=\f1 Create a PID file in the runtime directory (\fI$XDG_RUNTIME_DIR/pulse/pid\f1). If this is enabled you may use commands like \fB--kill\f1 or \fB--check\f1. If you are planning to start more than one PulseAudio process per user, you better disable this option since it effectively disables multiple instances. Takes a boolean argument, defaults to \fByes\f1. The \fB--use-pid-file\f1 command line option takes precedence.
 .TP
 \fBcpu-limit=\f1 If disabled do not install the CPU load limiter, even on platforms where it is supported. This option is useful when debugging/profiling PulseAudio to disable disturbing SIGXCPU signals. Takes a boolean argument, defaults to \fBno\f1. The \fB--no-cpu-limit\f1 command line argument takes precedence.
 .TP
@@ -59,9 +59,9 @@ For the settings that take a boolean argument the values \fBtrue\f1, \fByes\f1,
 \fBscache-idle-time=\f1 Unload autoloaded sample cache entries after being idle for this time in seconds. Defaults to 20. The \fB--scache-idle-time\f1 command line option takes precedence.
 .SH PATHS
 .TP
-\fBdl-search-path=\f1 The path were to look for dynamic shared objects (DSOs/plugins). You may specify more than one path separated by colons. The default path depends on compile time settings. The \fB--dl-search-path\f1 command line option takes precedence. 
+\fBdl-search-path=\f1 The path where to look for dynamic shared objects (DSOs/plugins). You may specify more than one path separated by colons. The default path depends on compile time settings. The \fB--dl-search-path\f1 command line option takes precedence. 
 .TP
-\fBdefault-script-file=\f1 The default configuration script file to load. Specify an empty string for not loading a default script file. The default behaviour is to load \fI~/.config/pulse/default.pa\f1, and if that file does not exist fall back to the system wide installed version \fI/etc/pulse/default.pa\f1. If run in system-wide mode the file \fI/etc/pulse/system.pa\f1 is used instead. If \fB-n\f1 is passed on the command line or \fBdefault-script-file=\f1 is disabled the default conf [...]
+\fBdefault-script-file=\f1 The default configuration script file to load. Specify an empty string for not loading a default script file. The default behaviour is to load \fI~/.config/pulse/default.pa\f1, and if that file does not exist fall back to the system wide installed version \fI/usr/local/etc/pulse/default.pa\f1. If run in system-wide mode the file \fI/usr/local/etc/pulse/system.pa\f1 is used instead. If \fB-n\f1 is passed on the command line or \fBdefault-script-file=\f1 is disab [...]
 .TP
 \fBload-default-script-file=\f1 Load the default configuration script file as specified in \fBdefault-script-file=\f1. Defaults to \fByes\f1.
 .SH LOGGING
@@ -72,7 +72,7 @@ For the settings that take a boolean argument the values \fBtrue\f1, \fByes\f1,
 .TP
 \fBlog-meta=\f1 With each logged message log the code location the message was generated from. Defaults to \fBno\f1.
 .TP
-\fBlog-time=\f1 With each logged messages log the relative time since startup. Defaults to \fBno\f1.
+\fBlog-time=\f1 With each logged message log the relative time since startup. Defaults to \fBno\f1.
 .TP
 \fBlog-backtrace=\f1 When greater than 0, with each logged message log a code stack trace up the specified number of stack frames. Defaults to \fB0\f1.
 .SH RESOURCE LIMITS
@@ -104,7 +104,7 @@ See \fBgetrlimit(2)\f1 for more information. Set to -1 if PulseAudio shall not t
 .TP
 \fBrlimit-nice\f1 Defaults to 31. Please make sure that the default nice level as configured with \fBnice-level\f1 fits in this resource limit, if \fBhigh-priority\f1 is enabled.
 .TP
-\fBrlimit-rtprio\f1 Defaults to 9. Please make sure that the default real-time priority level as configured with \fBrealtime-priority=\f1 fits in this resource limit, if \fBrealtime-scheduling\f1 is enabled. The JACK client libraries require a real-time prority of 9 by default. 
+\fBrlimit-rtprio\f1 Defaults to 9. Please make sure that the default real-time priority level as configured with \fBrealtime-priority=\f1 fits in this resource limit, if \fBrealtime-scheduling\f1 is enabled. The JACK client libraries require a real-time priority of 9 by default.
 .TP
 \fBrlimit-rttime\f1 Defaults to 1000000.
 .SH DEFAULT DEVICE SETTINGS
@@ -118,9 +118,9 @@ Most drivers try to open the audio device with these settings and then fall back
 .TP
 \fBdefault-channel-map\f1 The default channel map.
 .TP
-\fBalternate-sample-rate\f1 The alternate sample frequency. Sinks and sources will use either the default-rate-rate value or this alternate value, typically 44.1 or 48kHz. Switching between default and alternate values is enabled only when the sinks/sources are suspended. This option is ignored in passthrough mode where the stream rate will be used. If set to the same as the default sample rate, this feature is disabled.
+\fBalternate-sample-rate\f1 The alternate sample frequency. Sinks and sources will use either the default-sample-rate value or this alternate value, typically 44.1 or 48kHz. Switching between default and alternate values is enabled only when the sinks/sources are suspended. This option is ignored in passthrough mode where the stream rate will be used. If set to the same value as the default sample rate, this feature is disabled.
 .SH DEFAULT FRAGMENT SETTINGS
-Some hardware drivers require the hardware playback buffer to be subdivided into several fragments. It is possible to change these buffer metrics for machines with high scheduling latencies. Not all possible values that may be configured here are available in all hardware. The driver will to find the nearest setting supported. Modern drivers that support timer-based scheduling ignore these options.
+Some hardware drivers require the hardware playback buffer to be subdivided into several fragments. It is possible to change these buffer metrics for machines with high scheduling latencies. Not all possible values that may be configured here are available in all hardware. The driver will find the nearest setting supported. Modern drivers that support timer-based scheduling ignore these options.
 .TP
 \fBdefault-fragments=\f1 The default number of fragments. Defaults to 4.
 .TP
diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index 9596738..754312e 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
@@ -124,7 +124,7 @@ USA.
 
     <option>
       <p><opt>use-pid-file=</opt> Create a PID file in the runtime directory
-      (<file>$XDG_RUNTIMEDIR/pulse/pid</file>). If this is enabled you may
+      (<file>$XDG_RUNTIME_DIR/pulse/pid</file>). If this is enabled you may
       use commands like <opt>--kill</opt> or <opt>--check</opt>. If
       you are planning to start more than one PulseAudio process per
       user, you better disable this option since it effectively
@@ -265,7 +265,7 @@ USA.
   <section name="Paths">
 
     <option>
-      <p><opt>dl-search-path=</opt> The path were to look for dynamic
+      <p><opt>dl-search-path=</opt> The path where to look for dynamic
       shared objects (DSOs/plugins). You may specify more than one
       path separated by colons. The default path depends on compile
       time settings. The <opt>--dl-search-path</opt> command line
@@ -326,7 +326,7 @@ USA.
     </option>
 
     <option>
-      <p><opt>log-time=</opt> With each logged messages log the
+      <p><opt>log-time=</opt> With each logged message log the
       relative time since startup. Defaults to <opt>no</opt>.</p>
     </option>
 
@@ -394,7 +394,7 @@ USA.
       the default real-time priority level as configured with
       <opt>realtime-priority=</opt> fits in this resource limit, if
       <opt>realtime-scheduling</opt> is enabled. The JACK client
-      libraries require a real-time prority of 9 by default. </p>
+      libraries require a real-time priority of 9 by default.</p>
     </option>
     <option>
       <p><opt>rlimit-rttime</opt> Defaults to 1000000.</p>
@@ -437,11 +437,11 @@ USA.
     <option>
       <p><opt>alternate-sample-rate</opt> The alternate sample
       frequency. Sinks and sources will use either the
-      default-rate-rate value or this alternate value, typically 44.1
+      default-sample-rate value or this alternate value, typically 44.1
       or 48kHz. Switching between default and alternate values is
       enabled only when the sinks/sources are suspended. This option
       is ignored in passthrough mode where the stream rate will be used.
-      If set to the same as the default sample rate, this feature is
+      If set to the same value as the default sample rate, this feature is
       disabled.</p>
     </option>
 
@@ -453,7 +453,7 @@ USA.
     be subdivided into several fragments. It is possible to change
     these buffer metrics for machines with high scheduling
     latencies. Not all possible values that may be configured here are
-    available in all hardware. The driver will to find the nearest
+    available in all hardware. The driver will find the nearest
     setting supported. Modern drivers that support timer-based
     scheduling ignore these options.</p>
 
diff --git a/man/pulseaudio.1 b/man/pulseaudio.1
index fdcc44b..7f928b7 100644
--- a/man/pulseaudio.1
+++ b/man/pulseaudio.1
@@ -125,11 +125,11 @@ Open a command interpreter on STDIN/STDOUT after startup. This may be used to co
 \fB-n\f1
 Don't load default script file \fIdefault.pa\f1 (see below) on startup. Useful in conjunction with \fB-C\f1 or \fB--file\f1.
 .SH FILES
-\fI~/.config/pulse/daemon.conf\f1, \fI/etc/pulse/daemon.conf\f1: configuration settings for the PulseAudio daemon. If the version in the user's home directory does not exist the global configuration file is loaded. See \fBpulse-daemon.conf(5)\f1 for more information.
+\fI~/.config/pulse/daemon.conf\f1, \fI/usr/local/etc/pulse/daemon.conf\f1: configuration settings for the PulseAudio daemon. If the version in the user's home directory does not exist the global configuration file is loaded. See \fBpulse-daemon.conf(5)\f1 for more information.
 
-\fI~/.config/pulse/default.pa\f1, \fI/etc/pulse/default.pa\f1: the default configuration script to execute when the PulseAudio daemon is started. If the version in the user's home directory does not exist the global configuration script is loaded. See \fBdefault.pa(5)\f1 for more information.
+\fI~/.config/pulse/default.pa\f1, \fI/usr/local/etc/pulse/default.pa\f1: the default configuration script to execute when the PulseAudio daemon is started. If the version in the user's home directory does not exist the global configuration script is loaded. See \fBdefault.pa(5)\f1 for more information.
 
-\fI~/.config/pulse/client.conf\f1, \fI/etc/pulse/client.conf\f1: configuration settings for PulseAudio client applications. If the version in the user's home directory does not exist the global configuration file is loaded. See \fBpulse-client.conf(5)\f1 for more information.
+\fI~/.config/pulse/client.conf\f1, \fI/usr/local/etc/pulse/client.conf\f1: configuration settings for PulseAudio client applications. If the version in the user's home directory does not exist the global configuration file is loaded. See \fBpulse-client.conf(5)\f1 for more information.
 .SH SIGNALS
 \fISIGINT, SIGTERM\f1: the PulseAudio daemon will shut down (Same as \fB--kill\f1).
 
diff --git a/man/start-pulseaudio-kde.1 b/man/start-pulseaudio-kde.1
deleted file mode 100644
index 0b472ee..0000000
--- a/man/start-pulseaudio-kde.1
+++ /dev/null
@@ -1,14 +0,0 @@
-.TH start-pulseaudio-kde 1 User Manuals
-.SH NAME
-start-pulseaudio-kde \- PulseAudio Sound Server KDE Startup Script
-.SH SYNOPSIS
-\fBstart-pulseaudio-kde [\fIpulseaudio options\fB]
-\f1
-.SH DESCRIPTION
-This script starts pulseaudio (if not already running) and loads module-device-manager to use KDE routing policies.
-
-All arguments are directly passed to pulseaudio.
-.SH AUTHORS
-The PulseAudio Developers <pulseaudio-discuss (at) lists (dot) freedesktop (dot) org>; PulseAudio is available from \fBhttp://pulseaudio.org/\f1
-.SH SEE ALSO
-\fBpulseaudio(1)\f1
diff --git a/man/start-pulseaudio-kde.1.xml.in b/man/start-pulseaudio-kde.1.xml.in
deleted file mode 100644
index ef32906..0000000
--- a/man/start-pulseaudio-kde.1.xml.in
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?><!--*-nxml-*-->
-<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
-<?xml-stylesheet type="text/xsl" href="xmltoman.xsl" ?>
-
-<!--
-This file is part of PulseAudio.
-
-PulseAudio is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of the
-License, or (at your option) any later version.
-
-PulseAudio is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
-Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with PulseAudio; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-USA.
--->
-
-<manpage name="start-pulseaudio-kde" section="1" desc="PulseAudio Sound Server KDE Startup Script">
-
-  <synopsis>
-    <cmd>start-pulseaudio-kde [<arg>pulseaudio options</arg>]</cmd>
-  </synopsis>
-
-  <description>
-    <p>This script starts pulseaudio (if not already running) and loads
-    module-device-manager to use KDE routing policies.</p>
-
-    <p>All arguments are directly passed to pulseaudio.</p>
-  </description>
-
-  <section name="Authors">
-    <p>The PulseAudio Developers <@PACKAGE_BUGREPORT@>;
-    PulseAudio is available from <url href="@PACKAGE_URL@"/></p>
-  </section>
-
-  <section name="See also">
-    <p>
-      <manref name="pulseaudio" section="1"/>
-    </p>
-  </section>
-
-</manpage>
diff --git a/po/LINGUAS b/po/LINGUAS
index 3e3d9de..addf24a 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -25,6 +25,7 @@ pl
 pt_BR
 pt
 ru
+sk
 sr at latin
 sr
 sv
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d06932f..0903741 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,7 +6,7 @@ src/daemon/dumpmodules.c
 src/daemon/ltdl-bind-now.c
 src/daemon/main.c
 src/daemon/pulseaudio.desktop.in
-src/daemon/pulseaudio-kde.desktop.in
+src/daemon/systemd/user/pulseaudio.service.in
 src/modules/alsa/alsa-mixer.c
 src/modules/alsa/alsa-sink.c
 src/modules/alsa/alsa-source.c
@@ -73,6 +73,7 @@ src/pulse/channelmap.c
 src/pulse/client-conf.c
 src/pulse/client-conf-x11.c
 src/pulse/context.c
+src/pulse/direction.c
 src/pulsecore/asyncmsgq.c
 src/pulsecore/asyncq.c
 src/pulsecore/auth-cookie.c
@@ -88,6 +89,7 @@ src/pulsecore/core-error.c
 src/pulsecore/core-scache.c
 src/pulsecore/core-subscribe.c
 src/pulsecore/core-util.c
+src/pulsecore/core-util.h
 src/pulsecore/dbus-util.c
 src/pulsecore/dllmain.c
 src/pulsecore/dynarray.c
diff --git a/po/el.po b/po/el.po
index dedd12e..8b3b475 100644
--- a/po/el.po
+++ b/po/el.po
@@ -1,115 +1,478 @@
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
-#
 # Dimitris Glezos <dimitris at glezos.com>, 2008.
 # Thalia Papoutsaki <saliyath at gmail.com>, 2009, 2012.
-#
+# Dimitris Spingos (Δημήτρης Σπίγγος) <dmtrs32 at gmail.com>, 2013, 2014.
 msgid ""
 msgstr ""
 "Project-Id-Version: el\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-01-30 10:10+0000\n"
-"PO-Revision-Date: 2012-01-30 09:53+0000\n"
-"Last-Translator: Thalia Papoutsaki <saliyath at gmail.com>\n"
-"Language-Team: Greek <fedora-trans-el at redhat.com>\n"
+"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?product=Pul"
+"seAudio&keywords=I18N+L10N&component=misc\n"
+"POT-Creation-Date: 2014-05-02 22:03+0000\n"
+"PO-Revision-Date: 2014-05-08 09:53+0300\n"
+"Last-Translator: Dimitris Spingos (Δημήτρης Σπίγγος) <dmtrs32 at gmail.com>\n"
+"Language-Team: team at lists.gnome.gr\n"
 "Language: el\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: KAider 0.1\n"
+"X-Generator: Virtaal 0.7.0\n"
 
-#: ../src/modules/alsa/alsa-util.c:1136 ../src/modules/alsa/alsa-util.c:1204
+#: ../src/daemon/caps.c:54
+msgid "Cleaning up privileges."
+msgstr "Εκκαθάριση δικαιωμάτων."
+
+#: ../src/daemon/cmdline.c:113
 #, c-format
+#| msgid ""
+#| "%s [options]\n"
+#| "\n"
+#| "COMMANDS:\n"
+#| "  -h, --help                            Show this help\n"
+#| "      --version                         Show version\n"
+#| "      --dump-conf                       Dump default configuration\n"
+#| "      --dump-modules                    Dump list of available modules\n"
+#| "      --dump-resample-methods           Dump available resample methods\n"
+#| "      --cleanup-shm                     Cleanup stale shared memory "
+#| "segments\n"
+#| "      --start                           Start the daemon if it is not "
+#| "running\n"
+#| "  -k  --kill                            Kill a running daemon\n"
+#| "      --check                           Check for a running daemon (only "
+#| "returns exit code)\n"
+#| "\n"
+#| "OPTIONS:\n"
+#| "      --system[=BOOL]                   Run as system-wide instance\n"
+#| "  -D, --daemonize[=BOOL]                Daemonize after startup\n"
+#| "      --fail[=BOOL]                     Quit when startup fails\n"
+#| "      --high-priority[=BOOL]            Try to set high nice level\n"
+#| "                                        (only available as root, when "
+#| "SUID or\n"
+#| "                                        with elevated RLIMIT_NICE)\n"
+#| "      --realtime[=BOOL]                 Try to enable realtime "
+#| "scheduling\n"
+#| "                                        (only available as root, when "
+#| "SUID or\n"
+#| "                                        with elevated RLIMIT_RTPRIO)\n"
+#| "      --disallow-module-loading[=BOOL]  Disallow module user requested "
+#| "module\n"
+#| "                                        loading/unloading after startup\n"
+#| "      --disallow-exit[=BOOL]            Disallow user requested exit\n"
+#| "      --exit-idle-time=SECS             Terminate the daemon when idle "
+#| "and this\n"
+#| "                                        time passed\n"
+#| "      --scache-idle-time=SECS           Unload autoloaded samples when "
+#| "idle and\n"
+#| "                                        this time passed\n"
+#| "      --log-level[=LEVEL]               Increase or set verbosity level\n"
+#| "  -v                                    Increase the verbosity level\n"
+#| "      --log-target={auto,syslog,stderr,file:PATH,newfile:PATH}\n"
+#| "                                        Specify the log target\n"
+#| "      --log-meta[=BOOL]                 Include code location in log "
+#| "messages\n"
+#| "      --log-time[=BOOL]                 Include timestamps in log "
+#| "messages\n"
+#| "      --log-backtrace=FRAMES            Include a backtrace in log "
+#| "messages\n"
+#| "  -p, --dl-search-path=PATH             Set the search path for dynamic "
+#| "shared\n"
+#| "                                        objects (plugins)\n"
+#| "      --resample-method=METHOD          Use the specified resampling "
+#| "method\n"
+#| "                                        (See --dump-resample-methods for\n"
+#| "                                        possible values)\n"
+#| "      --use-pid-file[=BOOL]             Create a PID file\n"
+#| "      --no-cpu-limit[=BOOL]             Do not install CPU load limiter "
+#| "on\n"
+#| "                                        platforms that support it.\n"
+#| "      --disable-shm[=BOOL]              Disable shared memory support.\n"
+#| "\n"
+#| "STARTUP SCRIPT:\n"
+#| "  -L, --load=\"MODULE ARGUMENTS\"         Load the specified plugin "
+#| "module with\n"
+#| "                                        the specified argument\n"
+#| "  -F, --file=FILENAME                   Run the specified script\n"
+#| "  -C                                    Open a command line on the "
+#| "running TTY\n"
+#| "                                        after startup\n"
+#| "\n"
+#| "  -n                                    Don't load default script file\n"
 msgid ""
-"snd_pcm_avail() returned a value that is exceptionally large: %lu bytes (%lu "
-"ms).\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers."
+"%s [options]\n"
+"\n"
+"COMMANDS:\n"
+"  -h, --help                            Show this help\n"
+"      --version                         Show version\n"
+"      --dump-conf                       Dump default configuration\n"
+"      --dump-modules                    Dump list of available modules\n"
+"      --dump-resample-methods           Dump available resample methods\n"
+"      --cleanup-shm                     Cleanup stale shared memory "
+"segments\n"
+"      --start                           Start the daemon if it is not "
+"running\n"
+"  -k  --kill                            Kill a running daemon\n"
+"      --check                           Check for a running daemon (only "
+"returns exit code)\n"
+"\n"
+"OPTIONS:\n"
+"      --system[=BOOL]                   Run as system-wide instance\n"
+"  -D, --daemonize[=BOOL]                Daemonize after startup\n"
+"      --fail[=BOOL]                     Quit when startup fails\n"
+"      --high-priority[=BOOL]            Try to set high nice level\n"
+"                                        (only available as root, when SUID "
+"or\n"
+"                                        with elevated RLIMIT_NICE)\n"
+"      --realtime[=BOOL]                 Try to enable realtime scheduling\n"
+"                                        (only available as root, when SUID "
+"or\n"
+"                                        with elevated RLIMIT_RTPRIO)\n"
+"      --disallow-module-loading[=BOOL]  Disallow module user requested "
+"module\n"
+"                                        loading/unloading after startup\n"
+"      --disallow-exit[=BOOL]            Disallow user requested exit\n"
+"      --exit-idle-time=SECS             Terminate the daemon when idle and "
+"this\n"
+"                                        time passed\n"
+"      --scache-idle-time=SECS           Unload autoloaded samples when idle "
+"and\n"
+"                                        this time passed\n"
+"      --log-level[=LEVEL]               Increase or set verbosity level\n"
+"  -v  --verbose                         Increase the verbosity level\n"
+"      --log-target={auto,syslog,stderr,file:PATH,newfile:PATH}\n"
+"                                        Specify the log target\n"
+"      --log-meta[=BOOL]                 Include code location in log "
+"messages\n"
+"      --log-time[=BOOL]                 Include timestamps in log messages\n"
+"      --log-backtrace=FRAMES            Include a backtrace in log messages\n"
+"  -p, --dl-search-path=PATH             Set the search path for dynamic "
+"shared\n"
+"                                        objects (plugins)\n"
+"      --resample-method=METHOD          Use the specified resampling method\n"
+"                                        (See --dump-resample-methods for\n"
+"                                        possible values)\n"
+"      --use-pid-file[=BOOL]             Create a PID file\n"
+"      --no-cpu-limit[=BOOL]             Do not install CPU load limiter on\n"
+"                                        platforms that support it.\n"
+"      --disable-shm[=BOOL]              Disable shared memory support.\n"
+"\n"
+"STARTUP SCRIPT:\n"
+"  -L, --load=\"MODULE ARGUMENTS\"         Load the specified plugin module "
+"with\n"
+"                                        the specified argument\n"
+"  -F, --file=FILENAME                   Run the specified script\n"
+"  -C                                    Open a command line on the running "
+"TTY\n"
+"                                        after startup\n"
+"\n"
+"  -n                                    Don't load default script file\n"
 msgstr ""
+"%s [options]\n"
+"\n"
+"ΕΝΤΟΛΕΣ:\n"
+"  -h, --help                            Εμφάνιση της βοήθειας\n"
+"      --version                         Εμφάνιση της έκδοσης\n"
+"      --dump-conf                       Ρύθμιση προεπιλεγμένης αποτύπωσης\n"
+"      --dump-modules                    Λίστα αποτύπωσης διαθέσιμων ενοτήτων\n"
+"      --dump-resample-methods           Διαθέσιμη αποτύπωση μεθόδων "
+"επαναδειγματοληψίας\n"
+"      --cleanup-shm                     Καθαρισμός παλιών κοινόχρηστων "
+"τμημάτων μνήμης\n"
+"      --start                           Έναρξη του δαίμονα αν δεν εκτελείται\n"
+"  -k  --kill                            Τερματισμός εκτελούμενου δαίμονα\n"
+"      --check                           Έλεγχος για εκτελούμενο δαίμονα "
+"(επιστρέφει μόνο κώδικα εξόδου)\n"
+"\n"
+"ΕΠΙΛΟΓΕΣ:\n"
+"      --system[=BOOL]                   Εκτέλεση ως στιγμιοτύπου ολόκληρου "
+"του συστήματος\n"
+"  -D, --daemonize[=BOOL]                Ο δαίμονας μετά την εκκίνηση\n"
+"      --fail[=BOOL]                     Έξοδος όταν η εκκίνηση αποτυγχάνει\n"
+"      --high-priority[=BOOL]            Προσπάθεια ορισμού υψηλού επιπέδου "
+"nice\n"
+"                                        (διαθέσιμο μόνο ως υπερχρήστης, με "
+"SUID ή\n"
+"                                        με ανεβασμένο RLIMIT_NICE)\n"
+"      --realtime[=BOOL]                 Προσπάθεια ενεργοποίησης σχεδιασμού "
+"πραγματικού χρόνου\n"
+"                                        (διαθέσιμο μόνο ως υπερχρήστης, με "
+"SUID ή\n"
+"                                        με ανεβασμένο RLIMIT_RTPRIO)\n"
+"      --disallow-module-loading[=BOOL]  Απαγόρευση ενότητας που ζητήθηκε από "
+"τον χρήστη\n"
+"                                        για φόρτωση/εκφόρτωση μετά την "
+"εκκίνηση\n"
+"      --disallow-exit[=BOOL]            Απαγόρευση εξόδου που ζητήθηκε από "
+"τον χρήστη\n"
+"      --exit-idle-time=SECS             Τερματισμός του δαίμονα όταν είναι "
+"αδρανής και πέρασε\n"
+"                                        αυτός ο χρόνος\n"
+"      --scache-idle-time=SECS           Εκφόρτωση αυτόματα φορτωμένων "
+"δειγμάτων όταν είναι αδρανή και\n"
+"                                        πέρασε αυτός ο χρόνος\n"
+"      --log-level[=LEVEL]               Αύξηση ή ορισμός  επιπέδου "
+"λεπτομέρειας\n"
+"  -v                                    Αύξηση του επιπέδου λεπτομέρειας\n"
+"      --log-target={auto,syslog,stderr,file:PATH,newfile:PATH}\n"
+"                                        Ορισμός του προορισμού καταγραφής\n"
+"      --log-meta[=BOOL]                 Συμπερίληψη θέσης κώδικα σε μηνύματα "
+"καταγραφής\n"
+"      --log-time[=BOOL]                 Συμπερίληψη χρονικών σημάνσεων σε "
+"μηνύματα καταγραφής\n"
+"      --log-backtrace=FRAMES            Συμπερίληψη οπισθοανίχνευσης σε "
+"μηνύματα καταγραφής\n"
+"  -p, --dl-search-path=PATH             Ορισμός της διαδρομής ανίχνευσης για "
+"δυναμικά κοινόχρηστα\n"
+"                                        αντικείμενα (πρόσθετα)\n"
+"      --resample-method=METHOD          Χρήση της ειδικής μεθόδου "
+"επαναδειγματοληψίας\n"
+"                                        (Δείτε --dump-resample-methods για\n"
+"                                        πιθανές τιμές)\n"
+"      --use-pid-file[=BOOL]             Δημιουργία αρχείου PID\n"
+"      --no-cpu-limit[=BOOL]             Να μην εγκαθίστανται οριοθέτες "
+"φόρτωσης CPU σε\n"
+"                                        λειτουργικά που το υποστηρίζουν.\n"
+"      --disable-shm[=BOOL]              Απενεργοποίηση κοινόχρηστης "
+"υποστήριξης μνήμης.\n"
+"\n"
+"STARTUP SCRIPT:\n"
+"  -L, --load=\"MODULE ARGUMENTS\"         Φόρτωση της συγκεκριμένης ενότητας "
+"προσθέτου\n"
+"                                        με το συγκεκριμένο όρισμα\n"
+"  -F, --file=FILENAME                   Εκτέλεση του συγκεκριμένου σεναρίου\n"
+"  -C                                    Άνοιγμα μιας γραμμής εντολών στο "
+"εκτελούμενο TTY\n"
+"                                        μετά την εκκίνηση\n"
+"\n"
+"  -n                                    Να μην φορτώνεται το προεπιλεγμένο "
+"αρχείο σεναρίου\n"
 
-#: ../src/modules/alsa/alsa-util.c:1179
-#, c-format
+#: ../src/daemon/cmdline.c:245
+msgid "--daemonize expects boolean argument"
+msgstr "Το --daemonize περιμένει όρισμα τιμής Μπουλ"
+
+#: ../src/daemon/cmdline.c:253
+msgid "--fail expects boolean argument"
+msgstr "Το --fail περιμένει όρισμα τιμής Μπουλ"
+
+#: ../src/daemon/cmdline.c:264
 msgid ""
-"snd_pcm_delay() returned a value that is exceptionally large: %li bytes (%s"
-"%lu ms).\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers."
+"--log-level expects log level argument (either numeric in range 0..4 or one "
+"of debug, info, notice, warn, error)."
 msgstr ""
+"Το --log-level περιμένει όρισμα επιπέδου καταγραφής (είτε αριθμητικό σε "
+"διάστημα 0..4 ή ένα όρισμα αποσφαλμάτωσης, πληροφορίας, ειδοποίησης, "
+"προειδοποίησης, σφάλματος)."
 
-#: ../src/modules/alsa/alsa-util.c:1220
-#, c-format
+#: ../src/daemon/cmdline.c:276
+msgid "--high-priority expects boolean argument"
+msgstr "Το --high-priority περιμένει όρισμα τιμής Μπουλ"
+
+#: ../src/daemon/cmdline.c:284
+msgid "--realtime expects boolean argument"
+msgstr "Το --realtime αναμένει όρισμα τιμής Μπουλ"
+
+#: ../src/daemon/cmdline.c:292
+msgid "--disallow-module-loading expects boolean argument"
+msgstr "Το --disallow-module-loading περιμένει όρισμα τιμής Μπουλ"
+
+#: ../src/daemon/cmdline.c:300
+msgid "--disallow-exit expects boolean argument"
+msgstr "Το --disallow-exit περιμένει όρισμα τιμής Μπουλ"
+
+#: ../src/daemon/cmdline.c:308
+msgid "--use-pid-file expects boolean argument"
+msgstr "Το --use-pid-file περιμένει όρισμα τιμής Μπουλ"
+
+#: ../src/daemon/cmdline.c:327
+#| msgid ""
+#| "Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid "
+#| "file name 'file:<path>', 'newfile:<path>'."
 msgid ""
-"snd_pcm_avail_delay() returned strange values: delay %lu is less than avail "
-"%lu.\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers."
+"Invalid log target: use either 'syslog', 'journal','stderr' or 'auto' or a "
+"valid file name 'file:<path>', 'newfile:<path>'."
 msgstr ""
+"Άκυρος προορισμός καταγραφής: χρησιμοποιήστε είτε 'syslog', 'journal' "
+"'stderr' είτε 'auto' ή ένα έγκυρο όνομα αρχείου 'file:<path>', "
+"'newfile:<path>'."
 
-#: ../src/modules/alsa/alsa-util.c:1263
-#, c-format
+#: ../src/daemon/cmdline.c:329
 msgid ""
-"snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes "
-"(%lu ms).\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers."
+"Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file "
+"name 'file:<path>', 'newfile:<path>'."
 msgstr ""
+"Άκυρος προορισμός καταγραφής: χρησιμοποιήστε είτε 'syslog', 'stderr' είτε "
+"'auto' ή ένα έγκυρο όνομα αρχείου 'file:<path>', 'newfile:<path>'."
 
-#: ../src/modules/module-always-sink.c:38
-msgid "Always keeps at least one sink loaded even if it's a null one"
-msgstr ""
+#: ../src/daemon/cmdline.c:337
+msgid "--log-time expects boolean argument"
+msgstr "Το --log-time περιμένει όρισμα τιμής Μπουλ"
 
-#: ../src/modules/module-always-sink.c:82
-msgid "Dummy Output"
-msgstr ""
+#: ../src/daemon/cmdline.c:345
+msgid "--log-meta expects boolean argument"
+msgstr "Το --log-meta περιμένει όρισμα τιμής Μπουλ"
 
-#: ../src/modules/module-ladspa-sink.c:48
-msgid "Virtual LADSPA sink"
-msgstr ""
+#: ../src/daemon/cmdline.c:365
+#, c-format
+msgid "Invalid resample method '%s'."
+msgstr "Άκυρη μέθοδος επαναδειγματοληψίας '%s'."
+
+#: ../src/daemon/cmdline.c:372
+msgid "--system expects boolean argument"
+msgstr "Το --system περιμένει όρισμα τιμής Μπουλ"
+
+#: ../src/daemon/cmdline.c:380
+msgid "--no-cpu-limit expects boolean argument"
+msgstr "Το --no-cpu-limit περιμένει όρισμα τιμής Μπουλ"
 
-#: ../src/modules/module-ladspa-sink.c:52
+#: ../src/daemon/cmdline.c:388
+msgid "--disable-shm expects boolean argument"
+msgstr "Το --disable-shm περιμένει όρισμα τιμής Μπουλ"
+
+#: ../src/daemon/daemon-conf.c:260
+#, c-format
+msgid "[%s:%u] Invalid log target '%s'."
+msgstr "[%s:%u] Άκυρος προορισμός καταγραφής '%s'."
+
+#: ../src/daemon/daemon-conf.c:275
+#, c-format
+msgid "[%s:%u] Invalid log level '%s'."
+msgstr "[%s:%u] Άκυρο επίπεδο καταγραφής '%s'."
+
+#: ../src/daemon/daemon-conf.c:290
+#, c-format
+msgid "[%s:%u] Invalid resample method '%s'."
+msgstr "[%s:%u] Άκυρη μέθοδος επαναδειγματοληψίας '%s'."
+
+#: ../src/daemon/daemon-conf.c:312
+#, c-format
+msgid "[%s:%u] Invalid rlimit '%s'."
+msgstr "[%s:%u] Άκυρο rlimit '%s'."
+
+#: ../src/daemon/daemon-conf.c:332
+#, c-format
+msgid "[%s:%u] Invalid sample format '%s'."
+msgstr "[%s:%u] Άκυρη μορφή δείγματος '%s'."
+
+#: ../src/daemon/daemon-conf.c:350 ../src/daemon/daemon-conf.c:368
+#, c-format
+msgid "[%s:%u] Invalid sample rate '%s'."
+msgstr "[%s:%u] Άκυρος ρυθμός δειγμάτων '%s'."
+
+#: ../src/daemon/daemon-conf.c:391
+#, c-format
+msgid "[%s:%u] Invalid sample channels '%s'."
+msgstr "[%s:%u] Άκυρα κανάλια δείγματος '%s'."
+
+#: ../src/daemon/daemon-conf.c:408
+#, c-format
+msgid "[%s:%u] Invalid channel map '%s'."
+msgstr "[%s:%u] Άκυρη απεικόνιση καναλιού '%s'."
+
+#: ../src/daemon/daemon-conf.c:425
+#, c-format
+msgid "[%s:%u] Invalid number of fragments '%s'."
+msgstr "[%s:%u] Άκυρος αριθμός τμημάτων '%s'."
+
+#: ../src/daemon/daemon-conf.c:442
+#, c-format
+msgid "[%s:%u] Invalid fragment size '%s'."
+msgstr "[%s:%u] Άκυρο μέγεθος τμήματος '%s'."
+
+#: ../src/daemon/daemon-conf.c:459
+#, c-format
+msgid "[%s:%u] Invalid nice level '%s'."
+msgstr "[%s:%u] Άκυρο επίπεδο nice '%s'."
+
+#: ../src/daemon/daemon-conf.c:502
+#, c-format
+msgid "[%s:%u] Invalid server type '%s'."
+msgstr "[%s:%u] Άκυρος τύπος διακομιστή '%s'."
+
+#: ../src/daemon/daemon-conf.c:615
+#, c-format
+msgid "Failed to open configuration file: %s"
+msgstr "Αποτυχία ανοίγματος αρχείου ρυθμίσεων: %s"
+
+#: ../src/daemon/daemon-conf.c:631
 msgid ""
-"sink_name=<name for the sink> sink_properties=<properties for the sink> "
-"master=<name of sink to filter> format=<sample format> rate=<sample rate> "
-"channels=<number of channels> channel_map=<input channel map> plugin=<ladspa "
-"plugin name> label=<ladspa plugin label> control=<comma separated list of "
-"input control values> input_ladspaport_map=<comma separated list of input "
-"LADSPA port names> output_ladspaport_map=<comma separated list of output "
-"LADSPA port names> "
+"The specified default channel map has a different number of channels than "
+"the specified default number of channels."
 msgstr ""
+"Η συγκεκριμένη προεπιλεγμένη απεικόνιση καναλιού έχει έναν διαφορετικό "
+"αριθμό καναλιών από τον συγκεκριμένο προεπιλεγμένο αριθμό καναλιών."
 
-#: ../src/modules/module-null-sink.c:49
-msgid "Clocked NULL sink"
-msgstr ""
+#: ../src/daemon/daemon-conf.c:718
+#, c-format
+msgid "### Read from configuration file: %s ###\n"
+msgstr "### Ανάγνωση από το αρχείο ρυθμίσεων: %s ###\n"
 
-#: ../src/modules/module-null-sink.c:284
-msgid "Null Output"
-msgstr ""
+#: ../src/daemon/dumpmodules.c:59
+#, c-format
+msgid "Name: %s\n"
+msgstr "Όνομα: %s\n"
 
-#: ../src/pulsecore/sink.c:3349
-msgid "Built-in Audio"
-msgstr "Εσωτερικός ήχος"
+#: ../src/daemon/dumpmodules.c:62
+#, c-format
+msgid "No module information available\n"
+msgstr "Δεν υπάρχουν διαθέσιμες πληροφορίες για την ενότητα\n"
 
-#: ../src/pulsecore/sink.c:3354
-msgid "Modem"
-msgstr "Modem"
+#: ../src/daemon/dumpmodules.c:65
+#, c-format
+msgid "Version: %s\n"
+msgstr "Έκδοση: %s\n"
+
+#: ../src/daemon/dumpmodules.c:67
+#, c-format
+msgid "Description: %s\n"
+msgstr "Περιγραφή: %s\n"
+
+#: ../src/daemon/dumpmodules.c:69
+#, c-format
+msgid "Author: %s\n"
+msgstr "Συγγραφέας: %s\n"
+
+#: ../src/daemon/dumpmodules.c:71
+#, c-format
+msgid "Usage: %s\n"
+msgstr "Χρήση: %s\n"
+
+#: ../src/daemon/dumpmodules.c:72
+#, c-format
+msgid "Load Once: %s\n"
+msgstr "Φόρτωση μια φορά: %s\n"
+
+#: ../src/daemon/dumpmodules.c:74
+#, c-format
+msgid "DEPRECATION WARNING: %s\n"
+msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ ΠΑΡΩΧΗΜΕΝΟΥ: %s\n"
+
+#: ../src/daemon/dumpmodules.c:78
+#, c-format
+msgid "Path: %s\n"
+msgstr "Διαδρομή: %s\n"
+
+#: ../src/daemon/ltdl-bind-now.c:77
+#, c-format
+msgid "Failed to open module %s: %s"
+msgstr "Αποτυχία ανοίγματος ενότητας %s: %s"
 
-#: ../src/daemon/ltdl-bind-now.c:127
+#: ../src/daemon/ltdl-bind-now.c:128
 msgid "Failed to find original lt_dlopen loader."
-msgstr ""
+msgstr "Αποτυχία εύρεσης αρχικού φορτωτή lt_dlopen."
 
-#: ../src/daemon/ltdl-bind-now.c:132
+#: ../src/daemon/ltdl-bind-now.c:133
 msgid "Failed to allocate new dl loader."
-msgstr ""
+msgstr "Αποτυχία κατανομής νέου φορτωτή dl."
 
-#: ../src/daemon/ltdl-bind-now.c:145
+#: ../src/daemon/ltdl-bind-now.c:146
 msgid "Failed to add bind-now-loader."
-msgstr ""
+msgstr "Αποτυχία προσθήκης φορτωτή άμεσης σύνδεσης."
 
 #: ../src/daemon/main.c:139
 #, c-format
 msgid "Got signal %s."
-msgstr "Έγινε λήψη σήματος %s."
+msgstr "Ελήφθη σήμα %s."
 
 #: ../src/daemon/main.c:166
 msgid "Exiting."
@@ -123,256 +486,272 @@ msgstr "Αποτυχία εύρεσης χρήστη '%s'."
 #: ../src/daemon/main.c:189
 #, c-format
 msgid "Failed to find group '%s'."
-msgstr "Αποτυχία εύρεσης ομάδας χρηστών '%s'."
+msgstr "Αποτυχία εύρεσης ομάδας '%s'."
 
 #: ../src/daemon/main.c:193
 #, c-format
 msgid "Found user '%s' (UID %lu) and group '%s' (GID %lu)."
-msgstr ""
+msgstr "Βρέθηκε χρήστης '%s' (UID %lu) και ομάδα '%s' (GID %lu)."
 
 #: ../src/daemon/main.c:198
 #, c-format
 msgid "GID of user '%s' and of group '%s' don't match."
-msgstr ""
+msgstr "Το GID του χρήστη '%s' και της ομάδας '%s' δεν ταιριάζουν."
 
 #: ../src/daemon/main.c:203
 #, c-format
 msgid "Home directory of user '%s' is not '%s', ignoring."
-msgstr ""
+msgstr "Ο προσωπικός κατάλογος του χρήστη '%s' δεν είναι '%s', παράβλεψη."
 
 #: ../src/daemon/main.c:206 ../src/daemon/main.c:211
 #, c-format
 msgid "Failed to create '%s': %s"
-msgstr ""
+msgstr "Αποτυχία δημιουργίας '%s': %s"
 
 #: ../src/daemon/main.c:218
 #, c-format
 msgid "Failed to change group list: %s"
-msgstr ""
+msgstr "Αποτυχία αλλαγής του καταλόγου ομάδας: %s"
 
 #: ../src/daemon/main.c:234
 #, c-format
 msgid "Failed to change GID: %s"
-msgstr ""
+msgstr "Αποτυχία αλλαγής GID: %s"
 
 #: ../src/daemon/main.c:250
 #, c-format
 msgid "Failed to change UID: %s"
-msgstr ""
+msgstr "Αποτυχία αλλαγής UID: %s"
 
-#: ../src/daemon/main.c:269
-msgid "Successfully dropped root privileges."
-msgstr ""
+#: ../src/daemon/main.c:271
+msgid "Successfully changed user to \""
+msgstr "Πετυχημένη αλλαγή χρήστη σε \""
 
-#: ../src/daemon/main.c:277
+#: ../src/daemon/main.c:279
 msgid "System wide mode unsupported on this platform."
-msgstr ""
+msgstr "Η κατάσταση συστήματος δεν υποστηρίζεται σε αυτό το λειτουργικό."
 
-#: ../src/daemon/main.c:295
+#: ../src/daemon/main.c:297
 #, c-format
 msgid "setrlimit(%s, (%u, %u)) failed: %s"
-msgstr ""
+msgstr "Αποτυχία setrlimit(%s, (%u, %u)): %s"
 
-#: ../src/daemon/main.c:496
+#: ../src/daemon/main.c:498
 msgid "Failed to parse command line."
-msgstr ""
+msgstr "Αποτυχία ανάλυσης γραμμής εντολών."
 
-#: ../src/daemon/main.c:529
+#: ../src/daemon/main.c:537
 msgid ""
 "System mode refused for non-root user. Only starting the D-Bus server lookup "
 "service."
 msgstr ""
+"Άρνηση κατάστασης συστήματος για μη υπερχρήστη. Εκκίνηση μόνο της υπηρεσίας "
+"αναζήτησης διακομιστή διαύλου δεδομένων."
 
-#: ../src/daemon/main.c:611
+#: ../src/daemon/main.c:619
 msgid "Daemon not running"
-msgstr ""
+msgstr "Ο δαίμονας δεν εκτελείται"
 
-#: ../src/daemon/main.c:613
+#: ../src/daemon/main.c:621
 #, c-format
 msgid "Daemon running as PID %u"
-msgstr ""
+msgstr "Ο δαίμονας εκτελείται ως PID %u"
 
-#: ../src/daemon/main.c:628
+#: ../src/daemon/main.c:636
 #, c-format
 msgid "Failed to kill daemon: %s"
-msgstr ""
+msgstr "Αποτυχία τερματισμού δαίμονα: %s"
 
-#: ../src/daemon/main.c:657
+#: ../src/daemon/main.c:665
 msgid ""
 "This program is not intended to be run as root (unless --system is "
 "specified)."
 msgstr ""
+"Αυτό το πρόγραμμα δεν προορίζεται να εκτελεστεί από υπερχρήστη (εκτός και "
+"οριστεί --system)."
 
-#: ../src/daemon/main.c:660
+#: ../src/daemon/main.c:668
 msgid "Root privileges required."
-msgstr ""
+msgstr "Απαιτούνται δικαιώματα υπερχρήστη."
 
-#: ../src/daemon/main.c:667
+#: ../src/daemon/main.c:675
 msgid "--start not supported for system instances."
-msgstr ""
+msgstr "Δεν υποστηρίζεται το --start για στιγμιότυπα συστήματος."
 
-#: ../src/daemon/main.c:707
+#: ../src/daemon/main.c:715
 #, c-format
 msgid "User-configured server at %s, refusing to start/autospawn."
 msgstr ""
+"Ο ρυθμισμένος από τον χρήστη διακομιστής στο %s, αρνιέται να ξεκινήσει/να "
+"παράξει αυτόματα."
 
-#: ../src/daemon/main.c:713
+#: ../src/daemon/main.c:721
 #, c-format
 msgid ""
 "User-configured server at %s, which appears to be local. Probing deeper."
 msgstr ""
+"Ο ρυθμισμένος από τον χρήστη διακομιστής στο %s, φαίνεται να είναι τοπικός. "
+"Βαθύτερη διερεύνηση."
 
-#: ../src/daemon/main.c:718
+#: ../src/daemon/main.c:726
 msgid "Running in system mode, but --disallow-exit not set!"
 msgstr ""
+"Εκτελείται σε λειτουργία συστήματος, αλλά δεν ορίστηκε η --disallow-exit!"
 
-#: ../src/daemon/main.c:721
+#: ../src/daemon/main.c:729
 msgid "Running in system mode, but --disallow-module-loading not set!"
 msgstr ""
+"Εκτελείται σε λειτουργία συστήματος, αλλά δεν ορίστηκε η --disallow-module-"
+"loading!"
 
-#: ../src/daemon/main.c:724
+#: ../src/daemon/main.c:732
 msgid "Running in system mode, forcibly disabling SHM mode!"
 msgstr ""
+"Εκτελείται σε λειτουργία συστήματος, απενεργοποιώντας αναγκαστικά τη "
+"λειτουργία SHM!"
 
-#: ../src/daemon/main.c:729
+#: ../src/daemon/main.c:737
 msgid "Running in system mode, forcibly disabling exit idle time!"
 msgstr ""
+"Εκτελείται σε λειτουργία συστήματος, απενεργοποιώντας αναγκαστικά τον αδρανή "
+"χρόνο εξόδου!"
 
-#: ../src/daemon/main.c:757
+#: ../src/daemon/main.c:765
 msgid "Failed to acquire stdio."
-msgstr ""
+msgstr "Αποτυχία λήψης τυπικής εισόδου/εξόδου."
 
-#: ../src/daemon/main.c:763 ../src/daemon/main.c:828
+#: ../src/daemon/main.c:771 ../src/daemon/main.c:842
 #, c-format
 msgid "pipe() failed: %s"
-msgstr ""
+msgstr "Αποτυχία pipe(): %s"
 
-#: ../src/daemon/main.c:768 ../src/daemon/main.c:833
+#: ../src/daemon/main.c:776 ../src/daemon/main.c:847
 #, c-format
 msgid "fork() failed: %s"
-msgstr ""
+msgstr "αποτυχία fork(): %s"
 
-#: ../src/daemon/main.c:783 ../src/daemon/main.c:848 ../src/utils/pacat.c:550
+#: ../src/daemon/main.c:791 ../src/daemon/main.c:862 ../src/utils/pacat.c:569
 #, c-format
 msgid "read() failed: %s"
-msgstr ""
+msgstr "Αποτυχία read(): %s"
 
-#: ../src/daemon/main.c:789
+#: ../src/daemon/main.c:797
 msgid "Daemon startup failed."
-msgstr ""
+msgstr "Αποτυχία έναρξης δαίμονα."
 
-#: ../src/daemon/main.c:791
+#: ../src/daemon/main.c:799
 msgid "Daemon startup successful."
-msgstr ""
+msgstr "Πετυχημένη έναρξη δαίμονα."
 
-#: ../src/daemon/main.c:816
-#, fuzzy, c-format
+#: ../src/daemon/main.c:830
+#, c-format
 msgid "setsid() failed: %s"
-msgstr "Αποτυχία σύνδεσης: %s"
+msgstr "Αποτυχία setsid(): %s"
 
-#: ../src/daemon/main.c:901
+#: ../src/daemon/main.c:916
 #, c-format
 msgid "This is PulseAudio %s"
 msgstr "Αυτό είναι το PulseAudio %s"
 
-#: ../src/daemon/main.c:902
+#: ../src/daemon/main.c:917
 #, c-format
 msgid "Compilation host: %s"
-msgstr ""
+msgstr "Οικοδεσπότης μεταγλώττισης: %s"
 
-#: ../src/daemon/main.c:903 ../src/tests/resampler-test.c:418
+#: ../src/daemon/main.c:918 ../src/tests/resampler-test.c:418
 #, c-format
 msgid "Compilation CFLAGS: %s"
-msgstr ""
+msgstr "CFLAGS μεταγλώττισης: %s"
 
-#: ../src/daemon/main.c:906
+#: ../src/daemon/main.c:921
 #, c-format
 msgid "Running on host: %s"
-msgstr ""
+msgstr "Εκτελείται στον οικοδεσπότη: %s"
 
-#: ../src/daemon/main.c:909
+#: ../src/daemon/main.c:924
 #, c-format
 msgid "Found %u CPUs."
-msgstr ""
+msgstr "Βρέθηκαν %u CPUs."
 
-#: ../src/daemon/main.c:911
+#: ../src/daemon/main.c:926
 #, c-format
 msgid "Page size is %lu bytes"
-msgstr ""
+msgstr "Το μέγεθος της σελίδας είναι %lu ψηφιολέξεις"
 
-#: ../src/daemon/main.c:914
+#: ../src/daemon/main.c:929
 msgid "Compiled with Valgrind support: yes"
-msgstr ""
+msgstr "Μεταγλωττισμένο με υποστήριξη Valgrind: ναι"
 
-#: ../src/daemon/main.c:916
+#: ../src/daemon/main.c:931
 msgid "Compiled with Valgrind support: no"
-msgstr ""
+msgstr "Μεταγλωττισμένο με υποστήριξη Valgrind: όχι"
 
-#: ../src/daemon/main.c:919
+#: ../src/daemon/main.c:934
 #, c-format
 msgid "Running in valgrind mode: %s"
-msgstr ""
+msgstr "Εκτελείται σε κατάσταση valgrind: %s"
 
-#: ../src/daemon/main.c:921
+#: ../src/daemon/main.c:936
 #, c-format
 msgid "Running in VM: %s"
-msgstr ""
+msgstr "Εκτελείται σε VM: %s"
 
-#: ../src/daemon/main.c:924
+#: ../src/daemon/main.c:939
 msgid "Optimized build: yes"
-msgstr ""
+msgstr "Βελτιστοποιημένη δόμηση: ναι"
 
-#: ../src/daemon/main.c:926
+#: ../src/daemon/main.c:941
 msgid "Optimized build: no"
-msgstr ""
+msgstr "Βελτιστοποιημένη δόμηση: όχι"
 
-#: ../src/daemon/main.c:930
+#: ../src/daemon/main.c:945
 msgid "NDEBUG defined, all asserts disabled."
-msgstr ""
+msgstr "Ορίστηκε NDEBUG, όλες οι διεκδικήσεις απενεργοποιήθηκαν."
 
-#: ../src/daemon/main.c:932
+#: ../src/daemon/main.c:947
 msgid "FASTPATH defined, only fast path asserts disabled."
 msgstr ""
+"Ορίστηκε FASTPATH, μόνο οι γρήγορες διεκδικήσεις διαδρομής απενεργοποιήθηκαν."
 
-#: ../src/daemon/main.c:934
+#: ../src/daemon/main.c:949
 msgid "All asserts enabled."
-msgstr ""
+msgstr "Όλες οι διεκδικήσεις ενεργοποιήθηκαν."
 
-#: ../src/daemon/main.c:938
+#: ../src/daemon/main.c:953
 msgid "Failed to get machine ID"
-msgstr ""
+msgstr "Αποτυχία λήψης αναγνωριστικού μηχανής"
 
-#: ../src/daemon/main.c:941
+#: ../src/daemon/main.c:956
 #, c-format
 msgid "Machine ID is %s."
-msgstr ""
+msgstr "Το αναγνωριστικό μηχανής είναι %s."
 
-#: ../src/daemon/main.c:945
+#: ../src/daemon/main.c:960
 #, c-format
 msgid "Session ID is %s."
-msgstr ""
+msgstr "Το αναγνωριστικό συνεδρίας είναι %s."
 
-#: ../src/daemon/main.c:951
+#: ../src/daemon/main.c:966
 #, c-format
 msgid "Using runtime directory %s."
-msgstr ""
+msgstr "Χρήση καταλόγου χρόνου εκτέλεσης %s."
 
-#: ../src/daemon/main.c:956
+#: ../src/daemon/main.c:971
 #, c-format
 msgid "Using state directory %s."
-msgstr ""
+msgstr "Χρήση καταλόγου κατάστασης %s."
 
-#: ../src/daemon/main.c:959
+#: ../src/daemon/main.c:974
 #, c-format
 msgid "Using modules directory %s."
-msgstr ""
+msgstr "Χρήση καταλόγου ενοτήτων %s."
 
-#: ../src/daemon/main.c:961
+#: ../src/daemon/main.c:976
 #, c-format
 msgid "Running in system mode: %s"
-msgstr ""
+msgstr "Εκτελείται σε κατάσταση συστήματος: %s"
 
-#: ../src/daemon/main.c:964
+#: ../src/daemon/main.c:979
 msgid ""
 "OK, so you are running PA in system mode. Please note that you most likely "
 "shouldn't be doing that.\n"
@@ -381,559 +760,915 @@ msgid ""
 "Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an "
 "explanation why system mode is usually a bad idea."
 msgstr ""
+"Εντάξει, εκτελείτε PA σε λειτουργία συστήματος. Παρακαλούμε, σημειώστε ότι "
+"κατά πάσα πιθανότητα δεν θα έπρεπε να το κάνετε.\n"
+"Αν παρόλα αυτά το κάνετε, τότε είναι δικό σας σφάλμα, αν τα πράγματα δεν "
+"δουλέψουν όπως αναμενόταν.\n"
+"Παρακαλούμε, διαβάστε http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode "
+"για μια εξήγηση γιατί η λειτουργία συστήματος είναι συνήθως μια άσχημη ιδέα."
 
-#: ../src/daemon/main.c:981
+#: ../src/daemon/main.c:996
 msgid "pa_pid_file_create() failed."
-msgstr ""
+msgstr "Αποτυχία pa_pid_file_create()."
 
-#: ../src/daemon/main.c:991
+#: ../src/daemon/main.c:1006
 msgid "Fresh high-resolution timers available! Bon appetit!"
-msgstr ""
+msgstr "Καινούργιοι χρονιστές υψηλής ανάλυσης είναι διαθέσιμοι! Καλή όρεξη!"
 
-#: ../src/daemon/main.c:993
+#: ../src/daemon/main.c:1008
 msgid ""
 "Dude, your kernel stinks! The chef's recommendation today is Linux with high-"
 "resolution timers enabled!"
 msgstr ""
 "Δικέ μου, ο πυρήνας σου είναι για τα μπάζα! Η πρόταση του σεφ σήμερα είναι "
-"Linux με ενεργοποιημένα τα high-resolution timers!"
+"Λίνουξ με ενεργοποιημένους τους χρονιστές υψηλής ανάλυσης!"
 
-#: ../src/daemon/main.c:1011
+#: ../src/daemon/main.c:1026
 msgid "pa_core_new() failed."
-msgstr ""
+msgstr "Αποτυχία pa_core_new()."
 
-#: ../src/daemon/main.c:1087
+#: ../src/daemon/main.c:1104
 msgid "Failed to initialize daemon."
-msgstr ""
+msgstr "Αποτυχία αρχικοποίησης του δαίμονα."
 
-#: ../src/daemon/main.c:1092
+#: ../src/daemon/main.c:1109
 msgid "Daemon startup without any loaded modules, refusing to work."
 msgstr ""
+"Ο δαίμονας ξεκίνησε χωρίς οποιεσδήποτε φορτωμένες ενότητες, αρνούμενος να "
+"δουλέψει."
 
-#: ../src/daemon/main.c:1130
+#: ../src/daemon/main.c:1147
 msgid "Daemon startup complete."
-msgstr ""
+msgstr "Ολοκληρώθηκε η έναρξη του δαίμονα."
 
-#: ../src/daemon/main.c:1136
+#: ../src/daemon/main.c:1153
 msgid "Daemon shutdown initiated."
-msgstr ""
+msgstr "Άρχισε ο τερματισμός του δαίμονα."
 
-#: ../src/daemon/main.c:1167
+#: ../src/daemon/main.c:1184
 msgid "Daemon terminated."
-msgstr ""
+msgstr "Ο δαίμονας τελείωσε."
 
-#: ../src/daemon/cmdline.c:113
-#, c-format
-msgid ""
-"%s [options]\n"
-"\n"
-"COMMANDS:\n"
-"  -h, --help                            Show this help\n"
-"      --version                         Show version\n"
-"      --dump-conf                       Dump default configuration\n"
-"      --dump-modules                    Dump list of available modules\n"
-"      --dump-resample-methods           Dump available resample methods\n"
-"      --cleanup-shm                     Cleanup stale shared memory "
-"segments\n"
-"      --start                           Start the daemon if it is not "
-"running\n"
-"  -k  --kill                            Kill a running daemon\n"
-"      --check                           Check for a running daemon (only "
-"returns exit code)\n"
-"\n"
-"OPTIONS:\n"
-"      --system[=BOOL]                   Run as system-wide instance\n"
-"  -D, --daemonize[=BOOL]                Daemonize after startup\n"
-"      --fail[=BOOL]                     Quit when startup fails\n"
-"      --high-priority[=BOOL]            Try to set high nice level\n"
-"                                        (only available as root, when SUID "
-"or\n"
-"                                        with elevated RLIMIT_NICE)\n"
-"      --realtime[=BOOL]                 Try to enable realtime scheduling\n"
-"                                        (only available as root, when SUID "
-"or\n"
-"                                        with elevated RLIMIT_RTPRIO)\n"
-"      --disallow-module-loading[=BOOL]  Disallow module user requested "
-"module\n"
-"                                        loading/unloading after startup\n"
-"      --disallow-exit[=BOOL]            Disallow user requested exit\n"
-"      --exit-idle-time=SECS             Terminate the daemon when idle and "
-"this\n"
-"                                        time passed\n"
-"      --scache-idle-time=SECS           Unload autoloaded samples when idle "
-"and\n"
-"                                        this time passed\n"
-"      --log-level[=LEVEL]               Increase or set verbosity level\n"
-"  -v                                    Increase the verbosity level\n"
-"      --log-target={auto,syslog,stderr,file:PATH}\n"
-"                                        Specify the log target\n"
-"      --log-meta[=BOOL]                 Include code location in log "
-"messages\n"
-"      --log-time[=BOOL]                 Include timestamps in log messages\n"
-"      --log-backtrace=FRAMES            Include a backtrace in log messages\n"
-"  -p, --dl-search-path=PATH             Set the search path for dynamic "
-"shared\n"
-"                                        objects (plugins)\n"
-"      --resample-method=METHOD          Use the specified resampling method\n"
-"                                        (See --dump-resample-methods for\n"
-"                                        possible values)\n"
-"      --use-pid-file[=BOOL]             Create a PID file\n"
-"      --no-cpu-limit[=BOOL]             Do not install CPU load limiter on\n"
-"                                        platforms that support it.\n"
-"      --disable-shm[=BOOL]              Disable shared memory support.\n"
-"\n"
-"STARTUP SCRIPT:\n"
-"  -L, --load=\"MODULE ARGUMENTS\"         Load the specified plugin module "
-"with\n"
-"                                        the specified argument\n"
-"  -F, --file=FILENAME                   Run the specified script\n"
-"  -C                                    Open a command line on the running "
-"TTY\n"
-"                                        after startup\n"
-"\n"
-"  -n                                    Don't load default script file\n"
-msgstr ""
+#: ../src/daemon/pulseaudio.desktop.in.h:1
+msgid "PulseAudio Sound System"
+msgstr "Σύστημα ήχου PulseAudio"
 
-#: ../src/daemon/cmdline.c:244
-msgid "--daemonize expects boolean argument"
-msgstr ""
+#: ../src/daemon/pulseaudio.desktop.in.h:2
+msgid "Start the PulseAudio Sound System"
+msgstr "Έναρξη του συστήματος ήχου PulseAudio"
 
-#: ../src/daemon/cmdline.c:251
-msgid "--fail expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2251
+msgid "Input"
+msgstr "Εισαγωγή"
 
-#: ../src/daemon/cmdline.c:261
-msgid ""
-"--log-level expects log level argument (either numeric in range 0..4 or one "
-"of debug, info, notice, warn, error)."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2252
+msgid "Docking Station Input"
+msgstr "Είσοδος σταθμού αγκύρωσης"
 
-#: ../src/daemon/cmdline.c:273
-msgid "--high-priority expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2253
+msgid "Docking Station Microphone"
+msgstr "Μικρόφωνο σταθμού αγκύρωσης"
 
-#: ../src/daemon/cmdline.c:280
-msgid "--realtime expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2254
+msgid "Docking Station Line In"
+msgstr "Γραμμή εισόδου σταθμού αγκύρωσης"
 
-#: ../src/daemon/cmdline.c:287
-msgid "--disallow-module-loading expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2255 ../src/modules/alsa/alsa-mixer.c:2340
+msgid "Line In"
+msgstr "Γραμμή εισόδου"
 
-#: ../src/daemon/cmdline.c:294
-msgid "--disallow-exit expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2256 ../src/modules/alsa/alsa-mixer.c:2334
+#: ../src/modules/bluetooth/module-bluez4-device.c:2101
+#: ../src/modules/bluetooth/module-bluez5-device.c:1451
+msgid "Microphone"
+msgstr "Μικρόφωνο"
 
-#: ../src/daemon/cmdline.c:301
-msgid "--use-pid-file expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2257 ../src/modules/alsa/alsa-mixer.c:2335
+msgid "Front Microphone"
+msgstr "Μπροστινό μικρόφωνο"
 
-#: ../src/daemon/cmdline.c:318
-msgid ""
-"Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file "
-"name 'file:<path>'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2258 ../src/modules/alsa/alsa-mixer.c:2336
+msgid "Rear Microphone"
+msgstr "Πίσω μικρόφωνο"
 
-#: ../src/daemon/cmdline.c:325
-msgid "--log-time expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2259
+msgid "External Microphone"
+msgstr "Εξωτερικό μικρόφωνο"
 
-#: ../src/daemon/cmdline.c:332
-msgid "--log-meta expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2260 ../src/modules/alsa/alsa-mixer.c:2338
+msgid "Internal Microphone"
+msgstr "Εσωτερικό μικρόφωνο"
 
-#: ../src/daemon/cmdline.c:351
-#, c-format
-msgid "Invalid resample method '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2261 ../src/modules/alsa/alsa-mixer.c:2341
+msgid "Radio"
+msgstr "Ραδιόφωνο"
 
-#: ../src/daemon/cmdline.c:358
-msgid "--system expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2262 ../src/modules/alsa/alsa-mixer.c:2342
+msgid "Video"
+msgstr "Βίντεο"
 
-#: ../src/daemon/cmdline.c:365
-msgid "--no-cpu-limit expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2263
+msgid "Automatic Gain Control"
+msgstr "Αυτόματος έλεγχος απολαβής"
 
-#: ../src/daemon/cmdline.c:372
-msgid "--disable-shm expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2264
+msgid "No Automatic Gain Control"
+msgstr "Χωρίς αυτόματο έλεγχο απολαβής"
 
-#: ../src/daemon/dumpmodules.c:59
-#, c-format
-msgid "Name: %s\n"
-msgstr "Όνομα: %s\n"
+#: ../src/modules/alsa/alsa-mixer.c:2265
+msgid "Boost"
+msgstr "Ενίσχυση"
 
-#: ../src/daemon/dumpmodules.c:62
-#, c-format
-msgid "No module information available\n"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2266
+msgid "No Boost"
+msgstr "Χωρίς ενίσχυση"
 
-#: ../src/daemon/dumpmodules.c:65
-#, c-format
-msgid "Version: %s\n"
-msgstr "Έκδοση: %s\n"
+#: ../src/modules/alsa/alsa-mixer.c:2267
+msgid "Amplifier"
+msgstr "Ενισχυτή"
 
-#: ../src/daemon/dumpmodules.c:67
-#, c-format
-msgid "Description: %s\n"
-msgstr "Περιγραφή: %s\n"
+#: ../src/modules/alsa/alsa-mixer.c:2268
+msgid "No Amplifier"
+msgstr "Χωρίς ενισχυτή"
 
-#: ../src/daemon/dumpmodules.c:69
-#, c-format
-msgid "Author: %s\n"
-msgstr "Συγγραφέας: %s\n"
+#: ../src/modules/alsa/alsa-mixer.c:2269
+msgid "Bass Boost"
+msgstr "Ενίσχυση μπάσων"
 
-#: ../src/daemon/dumpmodules.c:71
-#, c-format
-msgid "Usage: %s\n"
-msgstr "Χρήση: %s\n"
+#: ../src/modules/alsa/alsa-mixer.c:2270
+msgid "No Bass Boost"
+msgstr "Χωρίς ενίσχυση μπάσων"
 
-#: ../src/daemon/dumpmodules.c:72
-#, c-format
-msgid "Load Once: %s\n"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2271
+#: ../src/modules/bluetooth/module-bluez4-device.c:2106
+#: ../src/modules/bluetooth/module-bluez5-device.c:1458
+msgid "Speaker"
+msgstr "Ηχείο"
 
-#: ../src/daemon/dumpmodules.c:74
-#, c-format
-msgid "DEPRECATION WARNING: %s\n"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2272 ../src/modules/alsa/alsa-mixer.c:2344
+msgid "Headphones"
+msgstr "Ακουστικά"
 
-#: ../src/daemon/dumpmodules.c:78
-#, c-format
-msgid "Path: %s\n"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2333
+msgid "Analog Input"
+msgstr "Αναλογική είσοδος"
 
-#: ../src/daemon/daemon-conf.c:275
-#, c-format
-msgid "[%s:%u] Invalid log target '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2337
+msgid "Dock Microphone"
+msgstr "Μικρόφωνο σταθμού αγκύρωσης"
 
-#: ../src/daemon/daemon-conf.c:291
-#, c-format
-msgid "[%s:%u] Invalid log level '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2339
+msgid "Headset Microphone"
+msgstr "Μικρόφωνο ακουστικού"
 
-#: ../src/daemon/daemon-conf.c:307
-#, c-format
-msgid "[%s:%u] Invalid resample method '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2343
+msgid "Analog Output"
+msgstr "Αναλογική έξοδος"
 
-#: ../src/daemon/daemon-conf.c:330
-#, c-format
-msgid "[%s:%u] Invalid rlimit '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2345
+msgid "LFE on Separate Mono Output"
+msgstr "LFE σε ξεχωριστή μονοφωνική έξοδο"
 
-#: ../src/daemon/daemon-conf.c:351
-#, c-format
-msgid "[%s:%u] Invalid sample format '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2346
+msgid "Line Out"
+msgstr "Γραμμή εξόδου"
 
-#: ../src/daemon/daemon-conf.c:370 ../src/daemon/daemon-conf.c:389
-#, c-format
-msgid "[%s:%u] Invalid sample rate '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2347
+msgid "Analog Mono Output"
+msgstr "Αναλογική μονοφωνική έξοδος"
 
-#: ../src/daemon/daemon-conf.c:413
-#, c-format
-msgid "[%s:%u] Invalid sample channels '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2348
+msgid "Speakers"
+msgstr "Ηχεία"
 
-#: ../src/daemon/daemon-conf.c:431
-#, c-format
-msgid "[%s:%u] Invalid channel map '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2349
+msgid "HDMI / DisplayPort"
+msgstr "HDMI / Θύρα εμφάνισης"
 
-#: ../src/daemon/daemon-conf.c:449
-#, c-format
-msgid "[%s:%u] Invalid number of fragments '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2350
+msgid "Digital Output (S/PDIF)"
+msgstr "Ψηφιακή έξοδος (S/PDIF)"
 
-#: ../src/daemon/daemon-conf.c:467
-#, c-format
-msgid "[%s:%u] Invalid fragment size '%s'."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2351
+msgid "Digital Input (S/PDIF)"
+msgstr "Ψηφιακή είσοδος (S/PDIF)"
 
-#: ../src/daemon/daemon-conf.c:485
-#, c-format
-msgid "[%s:%u] Invalid nice level '%s'."
+#: ../src/modules/alsa/alsa-mixer.c:2352
+msgid "Digital Passthrough (S/PDIF)"
+msgstr "Ψηφιακή διέλευση (S/PDIF)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3807
+msgid "Analog Mono"
+msgstr "Αναλογικό μονοφωνικό"
+
+#: ../src/modules/alsa/alsa-mixer.c:3808
+msgid "Analog Stereo"
+msgstr "Αναλογικό στερεοφωνικό"
+
+#: ../src/modules/alsa/alsa-mixer.c:3809
+msgid "Analog Surround 2.1"
+msgstr "Αναλογικός περιφερειακός ήχος 2.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3810
+msgid "Analog Surround 3.0"
+msgstr "Αναλογικός περιφερειακός ήχος 3.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3811
+msgid "Analog Surround 3.1"
+msgstr "Αναλογικός περιφερειακός ήχος 3.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3812
+msgid "Analog Surround 4.0"
+msgstr "Αναλογικός περιφερειακός ήχος 4.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3813
+msgid "Analog Surround 4.1"
+msgstr "Αναλογικός περιφερειακός ήχος 4.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3814
+msgid "Analog Surround 5.0"
+msgstr "Αναλογικός περιφερειακός ήχος 5.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3815
+msgid "Analog Surround 5.1"
+msgstr "Αναλογικός περιφερειακός ήχος 5.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3816
+msgid "Analog Surround 6.0"
+msgstr "Αναλογικός περιφερειακός ήχος 6.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3817
+msgid "Analog Surround 6.1"
+msgstr "Αναλογικός περιφερειακός ήχος 6.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3818
+msgid "Analog Surround 7.0"
+msgstr "Αναλογικός περιφερειακός ήχος 7.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3819
+msgid "Analog Surround 7.1"
+msgstr "Αναλογικός περιφερειακός ήχος 7.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3820
+msgid "Analog 4-channel Input"
+msgstr "Αναλογική 4κάναλη είσοδος"
+
+#: ../src/modules/alsa/alsa-mixer.c:3821
+msgid "Digital Stereo (IEC958)"
+msgstr "Ψηφιακό στερεοφωνικό (IEC958)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3822
+msgid "Digital Passthrough  (IEC958)"
+msgstr "Ψηφιακή διέλευση (IEC958)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3823
+msgid "Digital Surround 4.0 (IEC958/AC3)"
+msgstr "Ψηφιακός περιφερειακός ήχος 4.0 (IEC958/AC3)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3824
+msgid "Digital Surround 5.1 (IEC958/AC3)"
+msgstr "Ψηφιακός περιφερειακός ήχος 5.1 (IEC958/AC3)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3825
+msgid "Digital Surround 5.1 (IEC958/DTS)"
+msgstr "Ψηφιακός περιφερειακός ήχος 5.1 (IEC958/DTS)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3826
+msgid "Digital Stereo (HDMI)"
+msgstr "Ψηφιακός στερεοφωνικός (HDMI)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3827
+msgid "Digital Surround 5.1 (HDMI)"
+msgstr "Ψηφιακός περιφερειακός ήχος 5.1 (HDMI)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3956
+msgid "Analog Mono Duplex"
+msgstr "Αναλογικός μονοφωνικός αμφίδρομος"
+
+#: ../src/modules/alsa/alsa-mixer.c:3957
+msgid "Analog Stereo Duplex"
+msgstr "Αναλογικός στερεοφωνικός αμφίδρομος"
+
+#: ../src/modules/alsa/alsa-mixer.c:3958
+msgid "Digital Stereo Duplex (IEC958)"
+msgstr "Ψηφιακός στερεοφωνικός αμφίδρομος (IEC958)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3959
+#: ../src/modules/alsa/module-alsa-card.c:193
+#: ../src/modules/bluetooth/module-bluez4-device.c:2297
+#: ../src/modules/bluetooth/module-bluez5-device.c:1656
+msgid "Off"
+msgstr "Ανενεργό"
+
+#: ../src/modules/alsa/alsa-mixer.c:4058
+#, c-format
+msgid "%s Output"
+msgstr "Έξοδος %s"
+
+#: ../src/modules/alsa/alsa-mixer.c:4066
+#, c-format
+msgid "%s Input"
+msgstr "Είσοδος %s"
+
+#: ../src/modules/alsa/alsa-sink.c:570 ../src/modules/alsa/alsa-sink.c:748
+#, c-format
+msgid ""
+"ALSA woke us up to write new data to the device, but there was actually "
+"nothing to write!\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers.\n"
+"We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() "
+"returned 0 or another value < min_avail."
 msgstr ""
+"Η ALSA ενεργοποιήθηκε για εγγραφή νέων δεδομένων στη συσκευή, αλλά δεν "
+"υπήρχε στην πραγματικότητα τίποτα για να γραφτεί!\n"
+"Κατά πάσα πιθανότητα αυτό είναι ένα σφάλμα του οδηγού ALSA '%s'. Παρακαλούμε "
+"αναφέρτε αυτό το θέμα στους προγραμματιστές ALSA.\n"
+"Ενεργοποίηση με ορισμό POLLOUT -- όμως η επόμενη snd_pcm_avail() επέστρεψε 0 "
+"ή άλλη τιμή < min_avail."
 
-#: ../src/daemon/daemon-conf.c:528
+#: ../src/modules/alsa/alsa-source.c:529 ../src/modules/alsa/alsa-source.c:681
 #, c-format
-msgid "[%s:%u] Invalid server type '%s'."
+msgid ""
+"ALSA woke us up to read new data from the device, but there was actually "
+"nothing to read!\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers.\n"
+"We were woken up with POLLIN set -- however a subsequent snd_pcm_avail() "
+"returned 0 or another value < min_avail."
 msgstr ""
+"Η ALSA ενεργοποιήθηκε για ανάγνωση νέων δεδομένων από τη συσκευή, αλλά δεν "
+"υπήρχε στην πραγματικότητα τίποτα για να διαβαστεί!\n"
+"Κατά πάσα πιθανότητα αυτό είναι ένα σφάλμα του οδηγού ALSA '%s'. Παρακαλούμε "
+"αναφέρτε αυτό το θέμα στους προγραμματιστές ALSA.\n"
+"Ενεργοποίηση με ορισμό POLLIN -- όμως η επόμενη snd_pcm_avail() επέστρεψε 0 "
+"ή άλλη τιμή < min_avail."
 
-#: ../src/daemon/daemon-conf.c:641
+#: ../src/modules/alsa/alsa-util.c:1135 ../src/modules/alsa/alsa-util.c:1210
 #, c-format
-msgid "Failed to open configuration file: %s"
+msgid ""
+"snd_pcm_avail() returned a value that is exceptionally large: %lu bytes (%lu "
+"ms).\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers."
 msgstr ""
+"Το snd_pcm_avail() επέστρεψε μια τιμή που είναι πολύ μεγάλη: %lu ψηφιολέξεις "
+"(%lu ms).\n"
+"Το πιθανότερο αυτό είναι ένα σφάλμα στον οδηγό ALSA '%s'. Παρακαλούμε, "
+"αναφέρτε αυτό το θέμα στους προγραμματιστές ALSA."
 
-#: ../src/daemon/daemon-conf.c:657
+#: ../src/modules/alsa/alsa-util.c:1185
+#, c-format
 msgid ""
-"The specified default channel map has a different number of channels than "
-"the specified default number of channels."
+"snd_pcm_delay() returned a value that is exceptionally large: %li bytes (%s"
+"%lu ms).\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers."
 msgstr ""
+"Το snd_pcm_delay() επέστρεψε μια τιμή που είναι πολύ μεγάλη: %li ψηφιολέξεις "
+"(%s%lu ms).\n"
+"Το πιθανότερο αυτό είναι ένα σφάλμα στον οδηγό ALSA '%s'. Παρακαλούμε, "
+"αναφέρτε αυτό το θέμα στους προγραμματιστές ALSA."
 
-#: ../src/daemon/daemon-conf.c:743
+#: ../src/modules/alsa/alsa-util.c:1226
 #, c-format
-msgid "### Read from configuration file: %s ###\n"
+msgid ""
+"snd_pcm_avail_delay() returned strange values: delay %lu is less than avail "
+"%lu.\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers."
 msgstr ""
+"Το snd_pcm_avail_delay() επέστρεψε περίεργες τιμές: η καθυστέρηση %lu είναι "
+"μικρότερη από το avail %lu.\n"
+"Το πιθανότερο αυτό είναι ένα σφάλμα στον οδηγό ALSA '%s'. Παρακαλούμε, "
+"αναφέρτε αυτό το θέμα στους προγραμματιστές ALSA."
 
-#: ../src/daemon/caps.c:58
-msgid "Cleaning up privileges."
+#: ../src/modules/alsa/alsa-util.c:1269
+#, c-format
+msgid ""
+"snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes "
+"(%lu ms).\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers."
 msgstr ""
+"Το snd_pcm_mmap_begin() επέστρεψε μια τιμή που είναι πολύ μεγάλη: %lu "
+"ψηφιολέξεις (%lu ms).\n"
+"Το πιθανότερο αυτό είναι ένα σφάλμα στον οδηγό ALSA '%s'. Παρακαλούμε, "
+"αναφέρτε αυτό το θέμα στους προγραμματιστές ALSA."
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2091
+#: ../src/modules/bluetooth/module-bluez5-device.c:1441
+msgid "Headset"
+msgstr "Ακουστικά"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2096
+#: ../src/modules/bluetooth/module-bluez5-device.c:1446
+msgid "Handsfree"
+msgstr "Ανοιχτής ακρόασης"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2111
+#: ../src/modules/bluetooth/module-bluez5-device.c:1464
+msgid "Headphone"
+msgstr "Ακουστικό"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2116
+#: ../src/modules/bluetooth/module-bluez5-device.c:1469
+msgid "Portable"
+msgstr "Φορητό"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2121
+#: ../src/modules/bluetooth/module-bluez5-device.c:1474
+msgid "Car"
+msgstr "Αυτοκίνητο"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2126
+#: ../src/modules/bluetooth/module-bluez5-device.c:1479
+msgid "HiFi"
+msgstr "Υψηλή πιστότητα"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2131
+#: ../src/modules/bluetooth/module-bluez5-device.c:1484
+msgid "Phone"
+msgstr "Τηλέφωνο"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2139
+#: ../src/modules/bluetooth/module-bluez5-device.c:1436
+#: ../src/modules/bluetooth/module-bluez5-device.c:1452
+#: ../src/modules/bluetooth/module-bluez5-device.c:1490
+msgid "Bluetooth Output"
+msgstr "Έξοδος μπλουτούθ"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2142
+#: ../src/modules/bluetooth/module-bluez5-device.c:1435
+#: ../src/modules/bluetooth/module-bluez5-device.c:1457
+#: ../src/modules/bluetooth/module-bluez5-device.c:1463
+#: ../src/modules/bluetooth/module-bluez5-device.c:1489
+msgid "Bluetooth Input"
+msgstr "Είσοδος μπλουτούθ"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2178
+msgid "High Fidelity Playback (A2DP)"
+msgstr "Αναπαραγωγή υψηλής ποιότητα (A2DP)"
 
-#: ../src/daemon/pulseaudio.desktop.in.h:1
-msgid "PulseAudio Sound System"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2189
+msgid "High Fidelity Capture (A2DP)"
+msgstr "Λήψη υψηλής ποιότητας (A2DP)"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2200
+msgid "Telephony Duplex (HSP/HFP)"
+msgstr "Αμφίδρομη τηλεφωνία (HSP/HFP)"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2212
+msgid "Handsfree Gateway"
+msgstr "Πύλη ανοιχτής ακρόασης"
+
+#. TODO: Change this profile's name to a2dp_sink, to reflect the remote
+#. * device's role and be consistent with the a2dp source profile
+#: ../src/modules/bluetooth/module-bluez5-device.c:1529
+#| msgid "High Fidelity Playback (A2DP)"
+msgid "High Fidelity Playback (A2DP Sink)"
+msgstr "Αναπαραγωγή υψηλής ποιότητας (δέκτης A2DP)"
+
+#: ../src/modules/bluetooth/module-bluez5-device.c:1540
+#| msgid "High Fidelity Capture (A2DP)"
+msgid "High Fidelity Capture (A2DP Source)"
+msgstr "Λήψη υψηλής ποιότητας (πηγή A2DP)"
+
+#: ../src/modules/echo-cancel/module-echo-cancel.c:63
+msgid ""
+"source_name=<name for the source> source_properties=<properties for the "
+"source> source_master=<name of source to filter> sink_name=<name for the "
+"sink> sink_properties=<properties for the sink> sink_master=<name of sink to "
+"filter> adjust_time=<how often to readjust rates in s> adjust_threshold=<how "
+"much drift to readjust after in ms> format=<sample format> rate=<sample "
+"rate> channels=<number of channels> channel_map=<channel map> "
+"aec_method=<implementation to use> aec_args=<parameters for the AEC engine> "
+"save_aec=<save AEC data in /tmp> autoloaded=<set if this module is being "
+"loaded automatically> use_volume_sharing=<yes or no> "
 msgstr ""
+"source_name=<όνομα πηγής> source_properties=<ιδιότητες πηγής> "
+"source_master=<όνομα πηγής για φιλτράρισμα> sink_name=<όνομα δέκτη> "
+"sink_properties=<ιδιότητες δέκτη> sink_master=<όνομα δέκτη για φιλτράρισμα> "
+"adjust_time=<συχνότητα επαναρύθμισης ρυθμών σε s> adjust_threshold=<πόση "
+"μετατόπιση να επαναρυθμίσετε κατόπιν σε ms> format=<μορφή δείγματος> "
+"rate=<ρυθμός δειγμάτων> channels=<αριθμός καναλιών> channel_map=<απεικόνιση "
+"καναλιού> aec_method=<υλοποίηση για χρήση> aec_args=<παράμετροι για την "
+"μηχανή AEC> save_aec=<αποθήκευση δεδομένων AEC σε /tmp> autoloaded=<ορίστε "
+"αν αυτή η ενότητα είναι αυτόματα φορτωμένη> use_volume_sharing=<ναι ή όχι> "
+
+#. add on profile
+#: ../src/modules/macosx/module-coreaudio-device.c:756
+msgid "On"
+msgstr "Ενεργό"
 
-#: ../src/daemon/pulseaudio.desktop.in.h:2
-msgid "Start the PulseAudio Sound System"
+#: ../src/modules/module-always-sink.c:38
+msgid "Always keeps at least one sink loaded even if it's a null one"
+msgstr ""
+"Κρατά πάντα τουλάχιστον έναν φορτωμένο δέκτη ακόμα κι αν είναι ένας μηδενικός"
+
+#: ../src/modules/module-always-sink.c:82
+msgid "Dummy Output"
+msgstr "Εικονική έξοδος"
+
+#: ../src/modules/module-equalizer-sink.c:72
+msgid "General Purpose Equalizer"
+msgstr "Ισοσταθμιστής γενικής χρήσης"
+
+#: ../src/modules/module-equalizer-sink.c:76
+msgid ""
+"sink_name=<name of the sink> sink_properties=<properties for the sink> "
+"sink_master=<sink to connect to> format=<sample format> rate=<sample rate> "
+"channels=<number of channels> channel_map=<channel map> autoloaded=<set if "
+"this module is being loaded automatically> use_volume_sharing=<yes or no> "
 msgstr ""
+"sink_name=<όνομα δέκτη> sink_properties=<ιδιότητες δέκτη> "
+"sink_master=<δέκτης για σύνδεση> format=<μορφή δείγματος> rate=<ρυθμός "
+"δειγμάτων> channels=<αριθμός καναλιών> channel_map=<απεικόνιση καναλιού> "
+"autoloaded=<πρίστε αν αυτή η ενότητα θα φορτώνεται αυτόματα> "
+"use_volume_sharing=<ναι ή όχι> "
+
+#: ../src/modules/module-filter-apply.c:48
+msgid "autoclean=<automatically unload unused filters?>"
+msgstr "autoclean=<αυτόματη εκφόρτωση αχρησιμοποίητων φίλτρων;>"
+
+#: ../src/modules/module-ladspa-sink.c:53
+msgid "Virtual LADSPA sink"
+msgstr "Εικονικός δέκτης LADSPA"
 
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:1
-msgid "PulseAudio Sound System KDE Routing Policy"
+#: ../src/modules/module-ladspa-sink.c:57
+msgid ""
+"sink_name=<name for the sink> sink_properties=<properties for the sink> "
+"master=<name of sink to filter> format=<sample format> rate=<sample rate> "
+"channels=<number of channels> channel_map=<input channel map> plugin=<ladspa "
+"plugin name> label=<ladspa plugin label> control=<comma separated list of "
+"input control values> input_ladspaport_map=<comma separated list of input "
+"LADSPA port names> output_ladspaport_map=<comma separated list of output "
+"LADSPA port names> "
 msgstr ""
+"sink_name=<όνομα του δέκτη> sink_properties=<ιδιότητες δέκτη> master=<όνομα "
+"δέκτη για φιλτράρισμα> format=<μορφή δείγματος> rate=<ρυθμός δείγματος> "
+"channels=<αριθμός καναλιών> channel_map=<απεικόνιση καναλιού εισόδου> "
+"plugin=<όνομα προσθέτου ladspa> label=<ετικέτα προσθέτου ladspa> "
+"control=<κατάλογος που χωρίζεται με κόμματα των τιμών ελέγχου εισόδου> "
+"input_ladspaport_map=<κατάλογος που χωρίζεται με κόμματα των ονομάτων θυρών "
+"LADSPA> output_ladspaport_map=<κατάλογος που χωρίζεται με κόμματα των "
+"ονομάτων θυρών εξόδου LADSPA> "
+
+#: ../src/modules/module-null-sink.c:49
+msgid "Clocked NULL sink"
+msgstr "Δέκτης NULL με χρονιστή"
+
+#: ../src/modules/module-null-sink.c:280
+msgid "Null Output"
+msgstr "Μηδενική έξοδος"
+
+#: ../src/modules/module-rygel-media-server.c:510
+#: ../src/modules/module-rygel-media-server.c:548
+#: ../src/modules/module-rygel-media-server.c:907
+msgid "Output Devices"
+msgstr "Συσκευές εξόδου"
+
+#: ../src/modules/module-rygel-media-server.c:511
+#: ../src/modules/module-rygel-media-server.c:549
+#: ../src/modules/module-rygel-media-server.c:908
+msgid "Input Devices"
+msgstr "Συσκευές εισόδου"
+
+#: ../src/modules/module-rygel-media-server.c:1065
+msgid "Audio on @HOSTNAME@"
+msgstr "Ήχος στο @HOSTNAME@"
+
+#. TODO: old tunnel put here the remote sink_name into stream name e.g. 'Null Output for lynxis at lazus'
+#. TODO: old tunnel put here the remote source_name into stream name e.g. 'Null Output for lynxis at lazus'
+#: ../src/modules/module-tunnel-sink-new.c:293
+#: ../src/modules/module-tunnel-source-new.c:294
+#, c-format
+msgid "Tunnel for %s@%s"
+msgstr "Διόδευση για %s@%s"
+
+#: ../src/modules/module-tunnel-sink-new.c:483
+#: ../src/modules/module-tunnel-source-new.c:485
+#, c-format
+msgid "Tunnel to %s/%s"
+msgstr "Διόδευση για %s/%s"
+
+#: ../src/modules/module-virtual-surround-sink.c:49
+msgid "Virtual surround sink"
+msgstr "Εικονικός περιφερειακός ήχος δέκτη"
 
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:2
-msgid "Start the PulseAudio Sound System with KDE Routing Policy"
+#: ../src/modules/module-virtual-surround-sink.c:53
+msgid ""
+"sink_name=<name for the sink> sink_properties=<properties for the sink> "
+"master=<name of sink to filter> format=<sample format> rate=<sample rate> "
+"channels=<number of channels> channel_map=<channel map> "
+"use_volume_sharing=<yes or no> force_flat_volume=<yes or no> hrir=/path/to/"
+"left_hrir.wav "
 msgstr ""
+"sink_name=<όνομα δέκτη> sink_properties=<ιδιότητες δέκτη> master=<όνομα "
+"δέκτη για φιλτράρισμα> format=<μορφή δείγματος> rate=<ρυθμός δειγμάτων> "
+"channels=<αριθμός καναλιών> channel_map=<απεικόνιση καναλιού> "
+"use_volume_sharing=<ναι ή όχι> force_flat_volume=<ναι ή όχι> hrir=/path/to/"
+"left_hrir.wav "
+
+#: ../src/modules/reserve-wrap.c:151
+msgid "PulseAudio Sound Server"
+msgstr "Διακομιστής ήχου PulseAudio"
 
-#: ../src/pulse/channelmap.c:105 ../src/pulse/channelmap.c:757
+#: ../src/pulse/channelmap.c:105 ../src/pulse/channelmap.c:754
 msgid "Mono"
-msgstr "Mono"
+msgstr "Μονοφωνικό"
 
 #: ../src/pulse/channelmap.c:107
 msgid "Front Center"
-msgstr ""
+msgstr "Μπροστά κέντρο"
 
 #: ../src/pulse/channelmap.c:108
 msgid "Front Left"
-msgstr ""
+msgstr "Μπροστά αριστερά"
 
 #: ../src/pulse/channelmap.c:109
 msgid "Front Right"
-msgstr ""
+msgstr "Μπροστά δεξιά"
 
 #: ../src/pulse/channelmap.c:111
 msgid "Rear Center"
-msgstr ""
+msgstr "Πίσω κέντρο"
 
 #: ../src/pulse/channelmap.c:112
 msgid "Rear Left"
-msgstr ""
+msgstr "Πίσω αριστερά"
 
 #: ../src/pulse/channelmap.c:113
 msgid "Rear Right"
-msgstr ""
+msgstr "Πίσω δεξιά"
 
 #: ../src/pulse/channelmap.c:115
 msgid "Subwoofer"
-msgstr ""
+msgstr "Υποβαθύφωνο"
 
 #: ../src/pulse/channelmap.c:117
 msgid "Front Left-of-center"
-msgstr ""
+msgstr "Μπροστά αριστερά από το κέντρο"
 
 #: ../src/pulse/channelmap.c:118
 msgid "Front Right-of-center"
-msgstr ""
+msgstr "Μπροστά δεξιά από το κέντρο"
 
 #: ../src/pulse/channelmap.c:120
 msgid "Side Left"
-msgstr ""
+msgstr "Πλάγια αριστερά"
 
 #: ../src/pulse/channelmap.c:121
 msgid "Side Right"
-msgstr ""
+msgstr "Πλάγια δεξιά"
 
 #: ../src/pulse/channelmap.c:123
 msgid "Auxiliary 0"
-msgstr "Auxiliary 0"
+msgstr "Βοηθητικό 0"
 
 #: ../src/pulse/channelmap.c:124
 msgid "Auxiliary 1"
-msgstr "Auxiliary 1"
+msgstr "Βοηθητικό 1"
 
 #: ../src/pulse/channelmap.c:125
 msgid "Auxiliary 2"
-msgstr "Auxiliary 2"
+msgstr "Βοηθητικό 2"
 
 #: ../src/pulse/channelmap.c:126
 msgid "Auxiliary 3"
-msgstr "Auxiliary 3"
+msgstr "Βοηθητικό 3"
 
 #: ../src/pulse/channelmap.c:127
 msgid "Auxiliary 4"
-msgstr "Auxiliary 4"
+msgstr "Βοηθητικό 4"
 
 #: ../src/pulse/channelmap.c:128
 msgid "Auxiliary 5"
-msgstr "Auxiliary 5"
+msgstr "Βοηθητικό 5"
 
 #: ../src/pulse/channelmap.c:129
 msgid "Auxiliary 6"
-msgstr "Auxiliary 6"
+msgstr "Βοηθητικό 6"
 
 #: ../src/pulse/channelmap.c:130
 msgid "Auxiliary 7"
-msgstr "Auxiliary 7"
+msgstr "Βοηθητικό 7"
 
 #: ../src/pulse/channelmap.c:131
 msgid "Auxiliary 8"
-msgstr "Auxiliary 8"
+msgstr "Βοηθητικό 8"
 
 #: ../src/pulse/channelmap.c:132
 msgid "Auxiliary 9"
-msgstr "Auxiliary 9"
+msgstr "Βοηθητικό 9"
 
 #: ../src/pulse/channelmap.c:133
 msgid "Auxiliary 10"
-msgstr "Auxiliary 10"
+msgstr "Βοηθητικό 10"
 
 #: ../src/pulse/channelmap.c:134
 msgid "Auxiliary 11"
-msgstr "Auxiliary 11"
+msgstr "Βοηθητικό 11"
 
 #: ../src/pulse/channelmap.c:135
 msgid "Auxiliary 12"
-msgstr "Auxiliary 12"
+msgstr "Βοηθητικό 12"
 
 #: ../src/pulse/channelmap.c:136
 msgid "Auxiliary 13"
-msgstr "Auxiliary 13"
+msgstr "Βοηθητικό 13"
 
 #: ../src/pulse/channelmap.c:137
 msgid "Auxiliary 14"
-msgstr "Auxiliary 14"
+msgstr "Βοηθητικό 14"
 
 #: ../src/pulse/channelmap.c:138
 msgid "Auxiliary 15"
-msgstr "Auxiliary 15"
+msgstr "Βοηθητικό 15"
 
 #: ../src/pulse/channelmap.c:139
 msgid "Auxiliary 16"
-msgstr "Auxiliary 16"
+msgstr "Βοηθητικό 16"
 
 #: ../src/pulse/channelmap.c:140
 msgid "Auxiliary 17"
-msgstr "Auxiliary 17"
+msgstr "Βοηθητικό 17"
 
 #: ../src/pulse/channelmap.c:141
 msgid "Auxiliary 18"
-msgstr "Auxiliary 18"
+msgstr "Βοηθητικό 18"
 
 #: ../src/pulse/channelmap.c:142
 msgid "Auxiliary 19"
-msgstr "Auxiliary 19"
+msgstr "Βοηθητικό 19"
 
 #: ../src/pulse/channelmap.c:143
 msgid "Auxiliary 20"
-msgstr "Auxiliary 20"
+msgstr "Βοηθητικό 20"
 
 #: ../src/pulse/channelmap.c:144
 msgid "Auxiliary 21"
-msgstr "Auxiliary 21"
+msgstr "Βοηθητικό 21"
 
 #: ../src/pulse/channelmap.c:145
 msgid "Auxiliary 22"
-msgstr "Auxiliary 22"
+msgstr "Βοηθητικό 22"
 
 #: ../src/pulse/channelmap.c:146
 msgid "Auxiliary 23"
-msgstr "Auxiliary 23"
+msgstr "Βοηθητικό 23"
 
 #: ../src/pulse/channelmap.c:147
 msgid "Auxiliary 24"
-msgstr "Auxiliary 24"
+msgstr "Βοηθητικό 24"
 
 #: ../src/pulse/channelmap.c:148
 msgid "Auxiliary 25"
-msgstr "Auxiliary 25"
+msgstr "Βοηθητικό 25"
 
 #: ../src/pulse/channelmap.c:149
 msgid "Auxiliary 26"
-msgstr "Auxiliary 26"
+msgstr "Βοηθητικό 26"
 
 #: ../src/pulse/channelmap.c:150
 msgid "Auxiliary 27"
-msgstr "Auxiliary 27"
+msgstr "Βοηθητικό 27"
 
 #: ../src/pulse/channelmap.c:151
 msgid "Auxiliary 28"
-msgstr "Auxiliary 28"
+msgstr "Βοηθητικό 28"
 
 #: ../src/pulse/channelmap.c:152
 msgid "Auxiliary 29"
-msgstr "Auxiliary 29"
+msgstr "Βοηθητικό 29"
 
 #: ../src/pulse/channelmap.c:153
 msgid "Auxiliary 30"
-msgstr "Auxiliary 30"
+msgstr "Βοηθητικό 30"
 
 #: ../src/pulse/channelmap.c:154
 msgid "Auxiliary 31"
-msgstr "Auxiliary 31"
+msgstr "Βοηθητικό 31"
 
 #: ../src/pulse/channelmap.c:156
 msgid "Top Center"
-msgstr ""
+msgstr "Επάνω στο κέντρο"
 
 #: ../src/pulse/channelmap.c:158
 msgid "Top Front Center"
-msgstr ""
+msgstr "Πάνω εμπρός στο κέντρο"
 
 #: ../src/pulse/channelmap.c:159
 msgid "Top Front Left"
-msgstr ""
+msgstr "Πάνω εμπρός αριστερά"
 
 #: ../src/pulse/channelmap.c:160
 msgid "Top Front Right"
-msgstr ""
+msgstr "Πάνω εμπρός δεξιά"
 
 #: ../src/pulse/channelmap.c:162
 msgid "Top Rear Center"
-msgstr ""
+msgstr "Πάνω πίσω στο κέντρο"
 
 #: ../src/pulse/channelmap.c:163
 msgid "Top Rear Left"
-msgstr ""
+msgstr "Πάνω πίσω αριστερά"
 
 #: ../src/pulse/channelmap.c:164
 msgid "Top Rear Right"
-msgstr ""
+msgstr "Πάνω πίσω δεξιά"
 
-#: ../src/pulse/channelmap.c:484 ../src/pulse/sample.c:169
-#: ../src/pulse/volume.c:297 ../src/pulse/volume.c:323
-#: ../src/pulse/volume.c:343 ../src/pulse/volume.c:373
-#: ../src/pulse/format.c:125
+#: ../src/pulse/channelmap.c:481 ../src/pulse/format.c:123
+#: ../src/pulse/sample.c:177 ../src/pulse/volume.c:296
+#: ../src/pulse/volume.c:322 ../src/pulse/volume.c:342
+#: ../src/pulse/volume.c:374 ../src/pulse/volume.c:414
+#: ../src/pulse/volume.c:433
 msgid "(invalid)"
-msgstr "(μη έγκυρο)"
+msgstr "(άκυρο)"
 
-#: ../src/pulse/channelmap.c:761
+#: ../src/pulse/channelmap.c:758
 msgid "Stereo"
-msgstr "Stereo"
+msgstr "Στερεοφωνικό"
 
-#: ../src/pulse/channelmap.c:766
+#: ../src/pulse/channelmap.c:763
 msgid "Surround 4.0"
-msgstr "Surround 4.0"
+msgstr "Περιφερειακός ήχος 4.0"
 
-#: ../src/pulse/channelmap.c:772
+#: ../src/pulse/channelmap.c:769
 msgid "Surround 4.1"
-msgstr "Surround 4.1"
+msgstr "Περιφερειακός ήχος 4.1"
 
-#: ../src/pulse/channelmap.c:778
+#: ../src/pulse/channelmap.c:775
 msgid "Surround 5.0"
-msgstr "Surround 5.0"
+msgstr "Περιφερειακός ήχος 5.0"
 
-#: ../src/pulse/channelmap.c:784
+#: ../src/pulse/channelmap.c:781
 msgid "Surround 5.1"
-msgstr "Surround 5.1"
+msgstr "Περιφερειακός ήχος 5.1"
 
-#: ../src/pulse/channelmap.c:791
+#: ../src/pulse/channelmap.c:788
 msgid "Surround 7.1"
-msgstr "Surround 7.1"
+msgstr "Περιφερειακός ήχος 7.1"
+
+#: ../src/pulse/client-conf-x11.c:55 ../src/utils/pax11publish.c:99
+msgid "xcb_connect() failed"
+msgstr "Αποτυχία xcb_connect()"
+
+#: ../src/pulse/client-conf-x11.c:60 ../src/utils/pax11publish.c:104
+msgid "xcb_connection_has_error() returned true"
+msgstr "Επιστροφή αληθούς της xcb_connection_has_error()"
+
+#: ../src/pulse/client-conf-x11.c:96
+msgid "Failed to parse cookie data"
+msgstr "Αποτυχία ανάλυσης δεδομένων μπισκότου"
+
+#: ../src/pulse/context.c:529
+msgid "No cookie loaded. Attempting to connect without."
+msgstr "Δεν φορτώθηκαν μπισκότα. Προσπάθεια για σύνδεση χωρίς μπισκότα."
+
+#: ../src/pulse/context.c:610
+#, c-format
+msgid "fork(): %s"
+msgstr "fork(): %s"
+
+#: ../src/pulse/context.c:665
+#, c-format
+msgid "waitpid(): %s"
+msgstr "waitpid(): %s"
+
+#: ../src/pulse/context.c:1366
+#, c-format
+msgid "Received message for unknown extension '%s'"
+msgstr "Ελήφθη μήνυμα για άγνωστη επέκταση '%s'"
+
+#: ../src/pulsecore/lock-autospawn.c:143 ../src/pulsecore/lock-autospawn.c:229
+msgid "Cannot access autospawn lock."
+msgstr "Αδύνατη η πρόσβαση κλειδώματος αυτόματης δημιουργίας."
+
+#: ../src/pulsecore/log.c:155
+#, c-format
+msgid "Failed to open target file '%s'."
+msgstr "Αποτυχία ανοίγματος αρχείου προορισμού '%s'."
+
+#: ../src/pulsecore/log.c:178
+#, c-format
+msgid ""
+"Tried to open target file '%s', '%s.1', '%s.2' ... '%s.%d', but all failed."
+msgstr ""
+"Δοκιμάστηκε το άνοιγμα αρχείου προορισμού '%s', '%s.1', '%s.2' ... '%s.%d', "
+"αλλά όλα απέτυχαν."
+
+#: ../src/pulsecore/log.c:633
+msgid "Invalid log target."
+msgstr "Άκυρος προορισμός καταγραφής."
+
+#: ../src/pulsecore/sink.c:3428
+msgid "Built-in Audio"
+msgstr "Εσωτερικός ήχος"
+
+#: ../src/pulsecore/sink.c:3433
+msgid "Modem"
+msgstr "Μόντεμ"
 
 #: ../src/pulse/error.c:40
 msgid "OK"
@@ -941,343 +1676,444 @@ msgstr "Εντάξει"
 
 #: ../src/pulse/error.c:41
 msgid "Access denied"
-msgstr ""
+msgstr "Άρνηση πρόσβασης"
 
 #: ../src/pulse/error.c:42
 msgid "Unknown command"
-msgstr ""
+msgstr "Άγνωστη εντολή"
 
 #: ../src/pulse/error.c:43
 msgid "Invalid argument"
-msgstr ""
+msgstr "Άκυρο όρισμα"
 
 #: ../src/pulse/error.c:44
 msgid "Entity exists"
-msgstr ""
+msgstr "Ύπαρξη οντότητας"
 
 #: ../src/pulse/error.c:45
 msgid "No such entity"
-msgstr ""
+msgstr "Ανυπαρξία τέτοιας οντότητας"
 
 #: ../src/pulse/error.c:46
 msgid "Connection refused"
-msgstr ""
+msgstr "Άρνηση σύνδεσης"
 
 #: ../src/pulse/error.c:47
 msgid "Protocol error"
-msgstr ""
+msgstr "Σφάλμα πρωτοκόλου"
 
 #: ../src/pulse/error.c:48
 msgid "Timeout"
-msgstr ""
+msgstr "Λήξη χρόνου"
 
 #: ../src/pulse/error.c:49
 msgid "No authorization key"
-msgstr ""
+msgstr "Χωρίς κλειδί εξουσιοδότησης"
 
 #: ../src/pulse/error.c:50
 msgid "Internal error"
-msgstr ""
+msgstr "Εσωτερικό σφάλμα"
 
 #: ../src/pulse/error.c:51
 msgid "Connection terminated"
-msgstr ""
+msgstr "Τερματισμός σύνδεσης"
 
 #: ../src/pulse/error.c:52
 msgid "Entity killed"
-msgstr ""
+msgstr "Τερματισμός οντότητας"
 
 #: ../src/pulse/error.c:53
 msgid "Invalid server"
-msgstr ""
+msgstr "Άκυρος διακομιστής"
 
 #: ../src/pulse/error.c:54
 msgid "Module initialization failed"
-msgstr ""
+msgstr "Αποτυχία αρχικοποίησης ενότητας"
 
 #: ../src/pulse/error.c:55
 msgid "Bad state"
-msgstr ""
+msgstr "Κακή κατάσταση"
 
 #: ../src/pulse/error.c:56
 msgid "No data"
-msgstr ""
+msgstr "Χωρίς δεδομένα"
 
 #: ../src/pulse/error.c:57
 msgid "Incompatible protocol version"
-msgstr ""
+msgstr "Ασύμβατη έκδοση πρωτοκόλλου"
 
 #: ../src/pulse/error.c:58
 msgid "Too large"
-msgstr ""
+msgstr "Υπερβολικά μεγάλο"
 
 #: ../src/pulse/error.c:59
 msgid "Not supported"
-msgstr ""
+msgstr "Δεν υποστηρίζεται"
 
 #: ../src/pulse/error.c:60
 msgid "Unknown error code"
-msgstr ""
+msgstr "Άγνωστος κωδικός σφάλματος"
 
 #: ../src/pulse/error.c:61
 msgid "No such extension"
-msgstr ""
+msgstr "Ανυπαρξία τέτοιας επέκτασης"
 
 #: ../src/pulse/error.c:62
 msgid "Obsolete functionality"
-msgstr ""
+msgstr "Παλιά λειτουργία"
 
 #: ../src/pulse/error.c:63
 msgid "Missing implementation"
-msgstr ""
+msgstr "Έλλειψη υλοποίησης"
 
 #: ../src/pulse/error.c:64
 msgid "Client forked"
-msgstr ""
+msgstr "Διακλαδωμένος πελάτης"
 
 #: ../src/pulse/error.c:65
 msgid "Input/Output error"
-msgstr ""
+msgstr "Σφάλμα εισόδου/εξόδου"
 
 #: ../src/pulse/error.c:66
 msgid "Device or resource busy"
-msgstr ""
+msgstr "Συσκευή ή πόροι είναι απασχολημένοι"
 
-#: ../src/pulse/sample.c:171
+#: ../src/pulse/sample.c:179
 #, c-format
 msgid "%s %uch %uHz"
 msgstr "%s %uch %uHz"
 
-#: ../src/pulse/sample.c:183
+#: ../src/pulse/sample.c:191
 #, c-format
 msgid "%0.1f GiB"
 msgstr "%0.1f GiB"
 
-#: ../src/pulse/sample.c:185
+#: ../src/pulse/sample.c:193
 #, c-format
 msgid "%0.1f MiB"
 msgstr "%0.1f MiB"
 
-#: ../src/pulse/sample.c:187
+#: ../src/pulse/sample.c:195
 #, c-format
 msgid "%0.1f KiB"
 msgstr "%0.1f KiB"
 
-#: ../src/pulse/sample.c:189
+#: ../src/pulse/sample.c:197
 #, c-format
 msgid "%u B"
 msgstr "%u B"
 
-#: ../src/pulse/client-conf-x11.c:54 ../src/utils/pax11publish.c:100
-#, fuzzy
-msgid "xcb_connect() failed"
-msgstr "σύνδεση(): %s"
-
-#: ../src/pulse/client-conf-x11.c:59 ../src/utils/pax11publish.c:105
-msgid "xcb_connection_has_error() returned true"
-msgstr ""
-
-#: ../src/pulse/client-conf-x11.c:97
-msgid "Failed to parse cookie data"
-msgstr ""
-
-#: ../src/pulse/client-conf.c:117
+#: ../src/tests/resampler-test.c:257
 #, c-format
-msgid "Failed to open configuration file '%s': %s"
-msgstr ""
-
-#: ../src/pulse/context.c:528
-msgid "No cookie loaded. Attempting to connect without."
+msgid ""
+"%s [options]\n"
+"\n"
+"-h, --help                            Show this help\n"
+"-v, --verbose                         Print debug messages\n"
+"      --from-rate=SAMPLERATE          From sample rate in Hz (defaults to "
+"44100)\n"
+"      --from-format=SAMPLEFORMAT      From sample type (defaults to s16le)\n"
+"      --from-channels=CHANNELS        From number of channels (defaults to "
+"1)\n"
+"      --to-rate=SAMPLERATE            To sample rate in Hz (defaults to "
+"44100)\n"
+"      --to-format=SAMPLEFORMAT        To sample type (defaults to s16le)\n"
+"      --to-channels=CHANNELS          To number of channels (defaults to 1)\n"
+"      --resample-method=METHOD        Resample method (defaults to auto)\n"
+"      --seconds=SECONDS               From stream duration (defaults to 60)\n"
+"\n"
+"If the formats are not specified, the test performs all formats "
+"combinations,\n"
+"back and forth.\n"
+"\n"
+"Sample type must be one of s16le, s16be, u8, float32le, float32be, ulaw, "
+"alaw,\n"
+"s24le, s24be, s24-32le, s24-32be, s32le, s32be (defaults to s16ne)\n"
+"\n"
+"See --dump-resample-methods for possible values of resample methods.\n"
 msgstr ""
+"%s [options]\n"
+"\n"
+"-h, --help                            Εμφάνιση της βοήθειας\n"
+"-v, --verbose                         Εκτύπωση μηνυμάτων αποσφαλμάτωσης\n"
+"      --from-rate=SAMPLERATE          Από ρυθμό δειγμάτων σε Hz (προεπιλογή "
+"44100)\n"
+"      --from-format=SAMPLEFORMAT      Από τύπο δείγματος (προεπιλογή s16le)\n"
+"      --from-channels=CHANNELS        Από αριθμό καναλιών (προεπιλογή 1)\n"
+"      --to-rate=SAMPLERATE            Σε ρυθμό δειγμάτων σε Hz (προεπιλογή "
+"44100)\n"
+"      --to-format=SAMPLEFORMAT        Σε τύπο δείγματος (προεπιλογή s16le)\n"
+"      --to-channels=CHANNELS          Σε αριθμό καναλιών (προεπιλογή 1)\n"
+"      --resample-method=METHOD        Μέθοδος επαναδειγματοληψίας "
+"(προεπιλογή αυτόματο)\n"
+"      --seconds=SECONDS               Από διάρκεια ροής (προεπιλογή 60)\n"
+"\n"
+"Αν οι μορφές δεν ορίζονται, η δοκιμή εκτελεί όλους τους συνδυασμούς "
+"μορφών, \n"
+"πίσω και μπρος.\n"
+"\n"
+"Ο τύπος δείγματος πρέπει να είναι ένας από s16le, s16be, u8, float32le, "
+"float32be, ulaw, alaw,\n"
+"s24le, s24be, s24-32le, s24-32be, s32le, s32be (προεπιλογή s16ne)\n"
+"\n"
+"Δείτε --dump-resample-methods για πιθανές τιμές των μεθόδων "
+"επαναδειγματοληψίας.\n"
 
-#: ../src/pulse/context.c:675
-#, fuzzy, c-format
-msgid "fork(): %s"
-msgstr "fork(): %s"
-
-#: ../src/pulse/context.c:730
-#, fuzzy, c-format
-msgid "waitpid(): %s"
-msgstr "waitpid(): %s"
+#: ../src/tests/resampler-test.c:356
+#, c-format
+msgid "%s %s\n"
+msgstr "%s %s\n"
 
-#: ../src/pulse/context.c:1431
+#: ../src/tests/resampler-test.c:419
 #, c-format
-msgid "Received message for unknown extension '%s'"
-msgstr ""
+msgid "=== %d seconds: %d Hz %d ch (%s) -> %d Hz %d ch (%s)"
+msgstr "=== %d seconds: %d Hz %d ch (%s) -> %d Hz %d ch (%s)"
 
-#: ../src/utils/pacat.c:112
-#, fuzzy, c-format
+#: ../src/utils/pacat.c:118
+#, c-format
 msgid "Failed to drain stream: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία εκκένωσης ροής: %s"
 
-#: ../src/utils/pacat.c:117
+#: ../src/utils/pacat.c:123
 msgid "Playback stream drained."
-msgstr ""
+msgstr "Εκκενώθηκε η ροή αναπαραγωγής."
 
-#: ../src/utils/pacat.c:128
+#: ../src/utils/pacat.c:134
 msgid "Draining connection to server."
-msgstr ""
+msgstr "Εκκενώνεται η σύνδεση στον διακομιστή."
 
-#: ../src/utils/pacat.c:141
+#: ../src/utils/pacat.c:147
 #, c-format
 msgid "pa_stream_drain(): %s"
-msgstr ""
+msgstr "pa_stream_drain(): %s"
 
-#: ../src/utils/pacat.c:164
+#: ../src/utils/pacat.c:170
 #, c-format
 msgid "pa_stream_write() failed: %s"
-msgstr ""
+msgstr "Αποτυχία της pa_stream_write(): %s"
 
-#: ../src/utils/pacat.c:205
+#: ../src/utils/pacat.c:211
 #, c-format
 msgid "pa_stream_begin_write() failed: %s"
-msgstr ""
+msgstr "Αποτυχία της pa_stream_begin_write(): %s"
 
-#: ../src/utils/pacat.c:255 ../src/utils/pacat.c:285
+#: ../src/utils/pacat.c:261 ../src/utils/pacat.c:291
 #, c-format
 msgid "pa_stream_peek() failed: %s"
-msgstr ""
+msgstr "Αποτυχία της pa_stream_peek(): %s"
 
-#: ../src/utils/pacat.c:325
+#: ../src/utils/pacat.c:341
 msgid "Stream successfully created."
-msgstr ""
+msgstr "Η ροή δημιουργήθηκε με επιτυχία."
 
-#: ../src/utils/pacat.c:328
+#: ../src/utils/pacat.c:344
 #, c-format
 msgid "pa_stream_get_buffer_attr() failed: %s"
-msgstr ""
+msgstr "Αποτυχία της pa_stream_get_buffer_attr(): %s"
 
-#: ../src/utils/pacat.c:332
+#: ../src/utils/pacat.c:348
 #, c-format
 msgid "Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u"
 msgstr ""
+"Μετρικά ενδιάμεσης μνήμης: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u"
 
-#: ../src/utils/pacat.c:335
+#: ../src/utils/pacat.c:351
 #, c-format
 msgid "Buffer metrics: maxlength=%u, fragsize=%u"
-msgstr ""
+msgstr "Μετρικά ενδιάμεσης μνήμης: maxlength=%u, fragsize=%u"
 
-#: ../src/utils/pacat.c:339
+#: ../src/utils/pacat.c:355
 #, c-format
 msgid "Using sample spec '%s', channel map '%s'."
-msgstr ""
+msgstr "Χρήση της προδιαγραφής δείγματος '%s', απεικόνιση καναλιού '%s'."
 
-#: ../src/utils/pacat.c:343
+#: ../src/utils/pacat.c:359
 #, c-format
-msgid "Connected to device %s (%u, %ssuspended)."
-msgstr ""
+#| msgid "Connected to device %s (%u, %ssuspended)."
+msgid "Connected to device %s (index: %u, suspended: %s)."
+msgstr "Σύνδεση με τη συσκευή %s (δείκτης: %u, σε αναστολή: %s)."
 
-#: ../src/utils/pacat.c:353
+#: ../src/utils/pacat.c:369
 #, c-format
 msgid "Stream error: %s"
-msgstr ""
+msgstr "Σφάλμα ροής: %s"
 
-#: ../src/utils/pacat.c:363
+#: ../src/utils/pacat.c:379
 #, c-format
 msgid "Stream device suspended.%s"
-msgstr ""
+msgstr "Αναστολή συσκευή ροής.%s"
 
-#: ../src/utils/pacat.c:365
+#: ../src/utils/pacat.c:381
 #, c-format
 msgid "Stream device resumed.%s"
-msgstr ""
+msgstr "Συνέχιση συσκευής ροής.%s"
 
-#: ../src/utils/pacat.c:373
+#: ../src/utils/pacat.c:389
 #, c-format
 msgid "Stream underrun.%s"
-msgstr ""
+msgstr "Ανεπάρκεια ροής.%s"
 
-#: ../src/utils/pacat.c:380
+#: ../src/utils/pacat.c:396
 #, c-format
 msgid "Stream overrun.%s"
-msgstr ""
+msgstr "Υπέρβαση ροής.%s"
 
-#: ../src/utils/pacat.c:387
+#: ../src/utils/pacat.c:403
 #, c-format
 msgid "Stream started.%s"
-msgstr ""
+msgstr "Εκκίνηση ροής.%s"
 
-#: ../src/utils/pacat.c:394
+#: ../src/utils/pacat.c:410
 #, c-format
 msgid "Stream moved to device %s (%u, %ssuspended).%s"
-msgstr ""
+msgstr "Η ροή μετακινήθηκε στη συσκευή %s (%u, %s αναστολή).%s"
 
-#: ../src/utils/pacat.c:394
+#: ../src/utils/pacat.c:410
 msgid "not "
-msgstr ""
+msgstr "όχι "
 
-#: ../src/utils/pacat.c:401
+#: ../src/utils/pacat.c:417
 #, c-format
 msgid "Stream buffer attributes changed.%s"
-msgstr ""
+msgstr "Αλλαγή γνωρισμάτων ενδιάμεσης μνήμης ροής.%s"
 
-#: ../src/utils/pacat.c:416
+#: ../src/utils/pacat.c:432
 msgid "Cork request stack is empty: corking stream"
-msgstr ""
+msgstr "Η στοίβα αίτησης κλεισίματος είναι κενή: ροή κλεισίματος"
 
-#: ../src/utils/pacat.c:422
+#: ../src/utils/pacat.c:438
 msgid "Cork request stack is empty: uncorking stream"
-msgstr ""
+msgstr "Η στοίβα αίτησης κλεισίματος είναι κενή: ροή ανοίγματος"
 
-#: ../src/utils/pacat.c:426
+#: ../src/utils/pacat.c:442
 msgid "Warning: Received more uncork requests than cork requests!"
 msgstr ""
+"Προειδοποίηση: Ελήφθησαν περισσότερες αιτήσεις ανοίγματος από κλεισίματα!"
 
-#: ../src/utils/pacat.c:451
+#: ../src/utils/pacat.c:467
 #, c-format
 msgid "Connection established.%s"
-msgstr ""
+msgstr "Επίτευξη σύνδεσης.%s"
 
-#: ../src/utils/pacat.c:454
+#: ../src/utils/pacat.c:470
 #, c-format
 msgid "pa_stream_new() failed: %s"
-msgstr ""
+msgstr "Αποτυχία pa_stream_new(): %s"
 
-#: ../src/utils/pacat.c:492
+#: ../src/utils/pacat.c:508
 #, c-format
 msgid "pa_stream_connect_playback() failed: %s"
-msgstr ""
+msgstr "Αποτυχία pa_stream_connect_playback(): %s"
+
+#: ../src/utils/pacat.c:514
+#, c-format
+msgid "Failed to set monitor stream: %s"
+msgstr "Αποτυχία ορισμού ροής οθόνης: %s"
 
-#: ../src/utils/pacat.c:498
+#: ../src/utils/pacat.c:518
 #, c-format
 msgid "pa_stream_connect_record() failed: %s"
-msgstr ""
+msgstr "Αποτυχία pa_stream_connect_record(): %s"
 
-#: ../src/utils/pacat.c:512 ../src/utils/pactl.c:1252
+#: ../src/utils/pacat.c:531 ../src/utils/pactl.c:1455
 #, c-format
 msgid "Connection failure: %s"
 msgstr "Αποτυχία σύνδεσης: %s"
 
-#: ../src/utils/pacat.c:545
+#: ../src/utils/pacat.c:564
 msgid "Got EOF."
-msgstr ""
+msgstr "Ελήφθη EOF."
 
-#: ../src/utils/pacat.c:582
+#: ../src/utils/pacat.c:601
 #, c-format
 msgid "write() failed: %s"
-msgstr ""
+msgstr "Αποτυχία write(): %s"
 
-#: ../src/utils/pacat.c:603
+#: ../src/utils/pacat.c:622
 msgid "Got signal, exiting."
-msgstr ""
+msgstr "Ελήφθη σήμα, έξοδος."
 
-#: ../src/utils/pacat.c:617
-#, fuzzy, c-format
+#: ../src/utils/pacat.c:636
+#, c-format
 msgid "Failed to get latency: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης λανθάνοντος χρόνου: %s"
 
-#: ../src/utils/pacat.c:622
+#: ../src/utils/pacat.c:641
 #, c-format
 msgid "Time: %0.3f sec; Latency: %0.0f usec."
-msgstr ""
+msgstr "Χρόνος: %0.3f sec; λανθάνων χρόνος %0.0f usec."
 
-#: ../src/utils/pacat.c:643
+#: ../src/utils/pacat.c:662
 #, c-format
 msgid "pa_stream_update_timing_info() failed: %s"
-msgstr ""
-
-#: ../src/utils/pacat.c:653
-#, c-format
+msgstr "Αποτυχία pa_stream_update_timing_info(): %s"
+
+#: ../src/utils/pacat.c:672
+#, c-format
+#| msgid ""
+#| "%s [options]\n"
+#| "\n"
+#| "  -h, --help                            Show this help\n"
+#| "      --version                         Show version\n"
+#| "\n"
+#| "  -r, --record                          Create a connection for "
+#| "recording\n"
+#| "  -p, --playback                        Create a connection for playback\n"
+#| "\n"
+#| "  -v, --verbose                         Enable verbose operations\n"
+#| "\n"
+#| "  -s, --server=SERVER                   The name of the server to connect "
+#| "to\n"
+#| "  -d, --device=DEVICE                   The name of the sink/source to "
+#| "connect to\n"
+#| "  -n, --client-name=NAME                How to call this client on the "
+#| "server\n"
+#| "      --stream-name=NAME                How to call this stream on the "
+#| "server\n"
+#| "      --volume=VOLUME                   Specify the initial (linear) "
+#| "volume in range 0...65536\n"
+#| "      --rate=SAMPLERATE                 The sample rate in Hz (defaults "
+#| "to 44100)\n"
+#| "      --format=SAMPLEFORMAT             The sample type, one of s16le, "
+#| "s16be, u8, float32le,\n"
+#| "                                        float32be, ulaw, alaw, s32le, "
+#| "s32be, s24le, s24be,\n"
+#| "                                        s24-32le, s24-32be (defaults to "
+#| "s16ne)\n"
+#| "      --channels=CHANNELS               The number of channels, 1 for "
+#| "mono, 2 for stereo\n"
+#| "                                        (defaults to 2)\n"
+#| "      --channel-map=CHANNELMAP          Channel map to use instead of the "
+#| "default\n"
+#| "      --fix-format                      Take the sample format from the "
+#| "sink the stream is\n"
+#| "                                        being connected to.\n"
+#| "      --fix-rate                        Take the sampling rate from the "
+#| "sink the stream is\n"
+#| "                                        being connected to.\n"
+#| "      --fix-channels                    Take the number of channels and "
+#| "the channel map\n"
+#| "                                        from the sink the stream is being "
+#| "connected to.\n"
+#| "      --no-remix                        Don't upmix or downmix channels.\n"
+#| "      --no-remap                        Map channels by index instead of "
+#| "name.\n"
+#| "      --latency=BYTES                   Request the specified latency in "
+#| "bytes.\n"
+#| "      --process-time=BYTES              Request the specified process "
+#| "time per request in bytes.\n"
+#| "      --latency-msec=MSEC               Request the specified latency in "
+#| "msec.\n"
+#| "      --process-time-msec=MSEC          Request the specified process "
+#| "time per request in msec.\n"
+#| "      --property=PROPERTY=VALUE         Set the specified property to the "
+#| "specified value.\n"
+#| "      --raw                             Record/play raw PCM data.\n"
+#| "      --passthrough                     passthrough data \n"
+#| "      --file-format[=FFORMAT]           Record/play formatted PCM data.\n"
+#| "      --list-file-formats               List available file formats.\n"
+#| "      --monitor-stream=INDEX            Record from the sink input with "
+#| "index INDEX.\n"
 msgid ""
 "%s [options]\n"
 "\n"
@@ -1312,16 +2148,16 @@ msgid ""
 "                                        (defaults to 2)\n"
 "      --channel-map=CHANNELMAP          Channel map to use instead of the "
 "default\n"
-"      --fix-format                      Take the sample format from the sink "
-"the stream is\n"
+"      --fix-format                      Take the sample format from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
-"      --fix-rate                        Take the sampling rate from the sink "
-"the stream is\n"
+"      --fix-rate                        Take the sampling rate from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
 "      --fix-channels                    Take the number of channels and the "
 "channel map\n"
-"                                        from the sink the stream is being "
-"connected to.\n"
+"                                        from the sink/source the stream is "
+"being connected to.\n"
 "      --no-remix                        Don't upmix or downmix channels.\n"
 "      --no-remap                        Map channels by index instead of "
 "name.\n"
@@ -1336,247 +2172,400 @@ msgid ""
 "      --property=PROPERTY=VALUE         Set the specified property to the "
 "specified value.\n"
 "      --raw                             Record/play raw PCM data.\n"
-"      --passthrough                     passthrough data \n"
+"      --passthrough                     Passthrough data.\n"
 "      --file-format[=FFORMAT]           Record/play formatted PCM data.\n"
 "      --list-file-formats               List available file formats.\n"
+"      --monitor-stream=INDEX            Record from the sink input with "
+"index INDEX.\n"
 msgstr ""
-
-#: ../src/utils/pacat.c:786
+"%s [options]\n"
+"\n"
+"  -h, --help                            Εμφάνιση της βοήθειας\n"
+"      --version                         Εμφάνιση έκδοσης\n"
+"\n"
+"  -r, --record                          Δημιουργία σύνδεσης για εγγραφή\n"
+"  -p, --playback                        Δημιουργία σύνδεσης για αναπαραγωγή\n"
+"\n"
+"  -v, --verbose                         Ενεργοποίηση λεπτομερών λειτουργιών\n"
+"\n"
+"  -s, --server=SERVER                   Το όνομα του διακομιστή για σύνδεση\n"
+"  -d, --device=DEVICE                   Το όνομα του δέκτη/προέλευσης για "
+"σύνδεση\n"
+"  -n, --client-name=NAME                Πώς να κληθεί ο πελάτης στον "
+"διακομιστή\n"
+"      --stream-name=NAME                Πώς να κληθεί η ροή στον διακομιστή\n"
+"      --volume=VOLUME                   Ορισμός της αρχικής (γραμμικής) "
+"έντασης στην περιοχή 0...65536\n"
+"      --rate=SAMPLERATE                 Ο ρυθμός δειγμάτων σε Hz (προεπιλογή "
+"το 44100)\n"
+"      --format=SAMPLEFORMAT             Ο τύπος δείγματος, ένας από s16le, "
+"s16be, u8, float32le,\n"
+"                                        float32be, ulaw, alaw, s32le, s32be, "
+"s24le, s24be,\n"
+"                                        s24-32le, s24-32be (προεπιλογή το "
+"s16ne)\n"
+"      --channels=CHANNELS               Ο αριθμός των καναλιών, 1 για "
+"μονοφωνικό, 2 για στερεοφωνικό\n"
+"                                        (προεπιλογή το 2)\n"
+"      --channel-map=CHANNELMAP          Απεικόνιση καναλιού για χρήση αντί "
+"για την προεπιλογή\n"
+"      --fix-format                      Λήψη της μορφής δείγματος από τον "
+"δέκτη στον οποίον \n"
+"                                        συνδέεται η ροή.\n"
+"      --fix-rate                        Λήψη του ρυθμού δειγμάτων από τον "
+"δέκτη στον οποίο\n"
+"                                        συνδέεται η ροή.\n"
+"      --fix-channels                    Λήψη του αριθμού των καναλιών και "
+"της απεικόνισης καναλιού\n"
+"                                        από τον δέκτη στον οποίο συνδέεται η "
+"ροή.\n"
+"      --no-remix                        Να μην αναβαθμίζονται ή "
+"υποβαθμίζονται κανάλια.\n"
+"      --no-remap                        Απεικόνιση καναλιών με δείκτη αντί "
+"για όνομα.\n"
+"      --latency=BYTES                   Αίτηση του συγκεκριμένου λανθάνοντος "
+"χρόνου σε ψηφιολέξεις.\n"
+"      --process-time=BYTES              Αίτηση του συγκεκριμένου χρόνου "
+"διαδικασίας ανά αίτηση σε ψηφιολέξεις. \n"
+"      --latency-msec=MSEC               Αίτηση του συγκεκριμένου λανθάνοντος "
+"χρόνου σε msec.\n"
+"      --process-time-msec=MSEC          Αίτηση του συγκεκριμένου χρόνου "
+"διεργασίας ανά αίτηση σε msec.\n"
+"      --property=PROPERTY=VALUE         Ορισμός της συγκεκριμένης ιδιότητας "
+"στη συγκεκριμένη τιμή.\n"
+"      --raw                             Εγγραφή/αναπαραγωγή  ακατέργαστων "
+"δεδομένων PCM.\n"
+"      --passthrough                     διέλευση δεδομένων \n"
+"      --file-format[=FFORMAT]           Εγγραφή/αναπαραγωγή μορφοποιημένων "
+"δεδομένων PCM.\n"
+"      --list-file-formats               Κατάλογος διαθέσιμος μορφών αρχείων.\n"
+"      --monitor-stream=INDEX            Εγγραφή από την είσοδο του δέκτη με "
+"δείκτη INDEX.\n"
+
+#: ../src/utils/pacat.c:810
 #, c-format
 msgid ""
 "pacat %s\n"
 "Compiled with libpulse %s\n"
 "Linked with libpulse %s\n"
 msgstr ""
+"pacat %s\n"
+"Μεταγλωττισμένο με libpulse %s\n"
+"Συνδεμένο με libpulse %s\n"
 
-#: ../src/utils/pacat.c:819 ../src/utils/pactl.c:1400
+#: ../src/utils/pacat.c:843 ../src/utils/pactl.c:1651
 #, c-format
 msgid "Invalid client name '%s'"
-msgstr ""
+msgstr "Άκυρο όνομα πελάτη '%s'"
 
-#: ../src/utils/pacat.c:834
+#: ../src/utils/pacat.c:858
 #, c-format
 msgid "Invalid stream name '%s'"
-msgstr ""
+msgstr "Άκυρο όνομα ροής '%s'"
 
-#: ../src/utils/pacat.c:871
+#: ../src/utils/pacat.c:895
 #, c-format
 msgid "Invalid channel map '%s'"
-msgstr ""
+msgstr "Άκυρη απεικόνιση καναλιού '%s'"
 
-#: ../src/utils/pacat.c:900 ../src/utils/pacat.c:914
+#: ../src/utils/pacat.c:924 ../src/utils/pacat.c:938
 #, c-format
 msgid "Invalid latency specification '%s'"
-msgstr ""
+msgstr "Άκυρη προδιαγραφή λανθάνοντος χρόνου '%s'"
 
-#: ../src/utils/pacat.c:907 ../src/utils/pacat.c:921
+#: ../src/utils/pacat.c:931 ../src/utils/pacat.c:945
 #, c-format
 msgid "Invalid process time specification '%s'"
-msgstr ""
+msgstr "Άκυρη προδιαγραφή χρόνου επεξεργασίας '%s'"
 
-#: ../src/utils/pacat.c:933
+#: ../src/utils/pacat.c:957
 #, c-format
 msgid "Invalid property '%s'"
-msgstr ""
+msgstr "Άκυρη ιδιότητα '%s'"
 
-#: ../src/utils/pacat.c:952
+#: ../src/utils/pacat.c:976
 #, c-format
 msgid "Unknown file format %s."
-msgstr ""
+msgstr "Άγνωστη μορφή αρχείου %s."
 
-#: ../src/utils/pacat.c:971
+#: ../src/utils/pacat.c:991
+msgid "Failed to parse the argument for --monitor-stream"
+msgstr "Αποτυχία ανάλυσης του ορίσματος για --monitor-stream"
+
+#: ../src/utils/pacat.c:1002
 msgid "Invalid sample specification"
-msgstr ""
+msgstr "Άκυρη προδιαγραφή δείγματος"
 
-#: ../src/utils/pacat.c:981
+#: ../src/utils/pacat.c:1012
 #, c-format
 msgid "open(): %s"
-msgstr ""
+msgstr "open(): %s"
 
-#: ../src/utils/pacat.c:986
+#: ../src/utils/pacat.c:1017
 #, c-format
 msgid "dup2(): %s"
-msgstr ""
+msgstr "dup2(): %s"
 
-#: ../src/utils/pacat.c:993
+#: ../src/utils/pacat.c:1024
 msgid "Too many arguments."
-msgstr ""
+msgstr "Υπερβολικά ορίσματα."
 
-#: ../src/utils/pacat.c:1004
+#: ../src/utils/pacat.c:1035
 msgid "Failed to generate sample specification for file."
-msgstr ""
+msgstr "Αποτυχία δημιουργίας προδιαγραφής δείγματος για αρχείο."
 
-#: ../src/utils/pacat.c:1030
+#: ../src/utils/pacat.c:1061
 msgid "Failed to open audio file."
-msgstr ""
+msgstr "Αποτυχία ανοίγματος αρχείου ήχου."
 
-#: ../src/utils/pacat.c:1036
+#: ../src/utils/pacat.c:1067
 msgid ""
 "Warning: specified sample specification will be overwritten with "
 "specification from file."
 msgstr ""
+"Προειδοποίηση: η συγκεκριμένη προδιαγραφή δείγματος θα αντικατασταθεί με την "
+"προδιαγραφή από το αρχείο."
 
-#: ../src/utils/pacat.c:1039 ../src/utils/pactl.c:1467
+#: ../src/utils/pacat.c:1070 ../src/utils/pactl.c:1718
 msgid "Failed to determine sample specification from file."
-msgstr ""
+msgstr "Αποτυχία προσδιορισμού προδιαγραφής δείγματος από το αρχείο."
 
-#: ../src/utils/pacat.c:1048
+#: ../src/utils/pacat.c:1079
 msgid "Warning: Failed to determine channel map from file."
-msgstr ""
+msgstr "Προειδοποίηση: Αποτυχία προσδιορισμού απεικόνισης καναλιού από αρχείο."
 
-#: ../src/utils/pacat.c:1059
+#: ../src/utils/pacat.c:1090
 msgid "Channel map doesn't match sample specification"
-msgstr ""
+msgstr "Η απεικόνιση καναλιού δεν ταιριάζει στην προδιαγραφή του δείγματος"
 
-#: ../src/utils/pacat.c:1070
+#: ../src/utils/pacat.c:1101
 msgid "Warning: failed to write channel map to file."
-msgstr ""
+msgstr "Προειδοποίηση: αποτυχία εγγραφής απεικόνισης καναλιού σε αρχείο."
 
-#: ../src/utils/pacat.c:1085
+#: ../src/utils/pacat.c:1116
 #, c-format
 msgid ""
 "Opening a %s stream with sample specification '%s' and channel map '%s'."
 msgstr ""
+"Άνοιγμα ροής %s με προδιαγραφή δείγματος '%s' και απεικόνιση καναλιού '%s'."
 
-#: ../src/utils/pacat.c:1086
+#: ../src/utils/pacat.c:1117
 msgid "recording"
-msgstr ""
+msgstr "Ηχογράφηση"
 
-#: ../src/utils/pacat.c:1086
+#: ../src/utils/pacat.c:1117
 msgid "playback"
-msgstr ""
+msgstr "Αναπαραγωγή"
 
-#: ../src/utils/pacat.c:1110
-#, fuzzy
+#: ../src/utils/pacat.c:1141
 msgid "Failed to set media name."
-msgstr "Αποτυχία ανοίγματος αρχείου ήχου."
+msgstr "Αποτυχία ορισμού ονόματος μέσων."
 
-#: ../src/utils/pacat.c:1117 ../src/utils/pactl.c:1777
+#: ../src/utils/pacat.c:1148 ../src/utils/pactl.c:2068
 msgid "pa_mainloop_new() failed."
-msgstr ""
+msgstr "Αποτυχία pa_mainloop_new()."
 
-#: ../src/utils/pacat.c:1136
+#: ../src/utils/pacat.c:1171
 msgid "io_new() failed."
-msgstr ""
+msgstr "Αποτυχία io_new()."
 
-#: ../src/utils/pacat.c:1143 ../src/utils/pactl.c:1789
+#: ../src/utils/pacat.c:1178 ../src/utils/pactl.c:2080
 msgid "pa_context_new() failed."
-msgstr ""
+msgstr "Αποτυχία pa_context_new()."
 
-#: ../src/utils/pacat.c:1151 ../src/utils/pactl.c:1795
+#: ../src/utils/pacat.c:1186 ../src/utils/pactl.c:2086
 #, c-format
 msgid "pa_context_connect() failed: %s"
-msgstr ""
+msgstr "Αποτυχία pa_context_connect(): %s"
 
-#: ../src/utils/pacat.c:1157
+#: ../src/utils/pacat.c:1192
 msgid "pa_context_rttime_new() failed."
-msgstr ""
+msgstr "Αποτυχία pa_context_rttime_new()."
 
-#: ../src/utils/pacat.c:1164 ../src/utils/pactl.c:1800
+#: ../src/utils/pacat.c:1199 ../src/utils/pactl.c:2091
 msgid "pa_mainloop_run() failed."
-msgstr ""
+msgstr "Αποτυχία pa_mainloop_run()."
 
-#: ../src/utils/pasuspender.c:79
-#, fuzzy, c-format
-msgid "fork(): %s\n"
-msgstr "fork(): %s\n"
+#: ../src/utils/pacmd.c:53 ../src/utils/pactl.c:1573
+msgid "NAME [ARGS ...]"
+msgstr "ΟΝΟΜΑ [ΟΡΙΣΜΑΤΑ ...]"
 
-#: ../src/utils/pasuspender.c:90
-#, fuzzy, c-format
-msgid "execvp(): %s\n"
-msgstr "execvp(): %s\n"
+#: ../src/utils/pacmd.c:54 ../src/utils/pacmd.c:62 ../src/utils/pactl.c:1574
+msgid "NAME|#N"
+msgstr "ΟΝΟΜΑ|#Ν"
 
-#: ../src/utils/pasuspender.c:107
-#, c-format
-msgid "Failure to suspend: %s\n"
-msgstr ""
+#: ../src/utils/pacmd.c:55 ../src/utils/pacmd.c:65 ../src/utils/pactl.c:1572
+#: ../src/utils/pactl.c:1578
+msgid "NAME"
+msgstr "ΟΝΟΜΑ"
 
-#: ../src/utils/pasuspender.c:122
-#, c-format
-msgid "Failure to resume: %s\n"
-msgstr ""
+#: ../src/utils/pacmd.c:56
+msgid "NAME|#N VOLUME"
+msgstr "ΟΝΟΜΑ| ΕΝΤΑΣΗ #Ν"
 
-#: ../src/utils/pasuspender.c:145
-#, c-format
-msgid "WARNING: Sound server is not local, not suspending.\n"
-msgstr ""
+#: ../src/utils/pacmd.c:57
+msgid "#N VOLUME"
+msgstr "#Ν ΕΝΤΑΣΗ"
 
-#: ../src/utils/pasuspender.c:157
-#, c-format
-msgid "Connection failure: %s\n"
-msgstr ""
+#: ../src/utils/pacmd.c:58 ../src/utils/pacmd.c:72 ../src/utils/pactl.c:1576
+msgid "NAME|#N 1|0"
+msgstr "ΟΝΟΜΑ|#Ν 1|0"
 
-#: ../src/utils/pasuspender.c:174
-#, c-format
-msgid "Got SIGINT, exiting.\n"
-msgstr ""
+#: ../src/utils/pacmd.c:59
+msgid "#N 1|0"
+msgstr "#Ν 1|0"
 
-#: ../src/utils/pasuspender.c:192
-#, c-format
-msgid "WARNING: Child process terminated by signal %u\n"
-msgstr ""
+#: ../src/utils/pacmd.c:60
+msgid "NAME|#N KEY=VALUE"
+msgstr "ΟΝΟΜΑ|#Ν KEY=VALUE"
+
+#: ../src/utils/pacmd.c:61
+msgid "#N KEY=VALUE"
+msgstr "#N KEY=VALUE"
+
+#: ../src/utils/pacmd.c:63
+msgid "#N"
+msgstr "#N"
+
+#: ../src/utils/pacmd.c:64
+msgid "NAME SINK|#N"
+msgstr "ΟΝΟΜΑ ΔΕΚΤΗ|#Ν"
+
+#: ../src/utils/pacmd.c:66 ../src/utils/pacmd.c:67
+msgid "NAME FILENAME"
+msgstr "ΟΝΟΜΑΣΙΑ ΟΝΟΜΑΤΟΣ ΑΡΧΕΙΟΥ"
+
+#: ../src/utils/pacmd.c:68
+msgid "PATHNAME"
+msgstr "ΟΝΟΜΑ ΔΙΑΔΡΟΜΗΣ"
+
+#: ../src/utils/pacmd.c:69
+msgid "FILENAME SINK|#N"
+msgstr "ΟΝΟΜΑ ΑΡΧΕΙΟΥ ΔΕΚΤΗ|#Ν"
+
+#: ../src/utils/pacmd.c:71 ../src/utils/pactl.c:1575
+msgid "#N SINK|SOURCE"
+msgstr "#Ν ΔΕΚΤΗΣ|ΠΗΓΗ"
+
+#: ../src/utils/pacmd.c:73 ../src/utils/pacmd.c:79 ../src/utils/pacmd.c:80
+msgid "1|0"
+msgstr "1|0"
+
+#: ../src/utils/pacmd.c:74 ../src/utils/pactl.c:1577
+msgid "CARD PROFILE"
+msgstr "ΚΑΤΑΤΟΜΗ ΚΑΡΤΑΣ"
+
+#: ../src/utils/pacmd.c:75 ../src/utils/pactl.c:1579
+msgid "NAME|#N PORT"
+msgstr "ΟΝΟΜΑ|ΘΥΡΑ #Ν"
+
+#: ../src/utils/pacmd.c:76 ../src/utils/pactl.c:1585
+msgid "CARD-NAME|CARD-#N PORT OFFSET"
+msgstr "ΟΝΟΜΑ ΚΑΡΤΑΣ|ΚΑΡΤΑ-#Ν ΑΝΤΙΣΤΑΘΜΙΣΗ ΘΥΡΑΣ"
+
+#: ../src/utils/pacmd.c:77
+msgid "TARGET"
+msgstr "ΠΡΟΟΡΙΣΝΟΣ"
+
+#: ../src/utils/pacmd.c:78
+msgid "NUMERIC LEVEL"
+msgstr "ΑΡΙΘΜΗΤΙΚΟ ΕΠΙΠΕΔΟ"
 
-#: ../src/utils/pasuspender.c:210
+#: ../src/utils/pacmd.c:81
+msgid "FRAMES"
+msgstr "ΠΛΑΙΣΙΑ"
+
+#: ../src/utils/pacmd.c:83
 #, c-format
 msgid ""
-"%s [options] ... \n"
 "\n"
 "  -h, --help                            Show this help\n"
 "      --version                         Show version\n"
-"  -s, --server=SERVER                   The name of the server to connect "
-"to\n"
-"\n"
+"When no command is given pacmd starts in the interactive mode.\n"
 msgstr ""
+"\n"
+"  -h, --help                            Εμφάνιση της βοήθειας\n"
+"      --version                         Εμφάνιση έκδοσης\n"
+"Όταν δεν δίνεται καμιά εντολή pacmd ξεκινά στην διαδραστική λειτουργία.\n"
 
-#: ../src/utils/pasuspender.c:248
+#: ../src/utils/pacmd.c:130
 #, c-format
 msgid ""
-"pasuspender %s\n"
+"pacmd %s\n"
 "Compiled with libpulse %s\n"
 "Linked with libpulse %s\n"
 msgstr ""
+"pacmd %s\n"
+"Μεταγλωττισμένο με libpulse %s\n"
+"Συνδεμένο με libpulse %s\n"
 
-#: ../src/utils/pasuspender.c:277
-#, c-format
-msgid "pa_mainloop_new() failed.\n"
+#: ../src/utils/pacmd.c:144
+msgid "No PulseAudio daemon running, or not running as session daemon."
 msgstr ""
+"Δεν εκτελείται ο δαίμονας PulseAudio, ή δεν εκτελείται ως δαίμονας συνεδρίας."
 
-#: ../src/utils/pasuspender.c:290
+#: ../src/utils/pacmd.c:149
 #, c-format
-msgid "pa_context_new() failed.\n"
-msgstr ""
+msgid "socket(PF_UNIX, SOCK_STREAM, 0): %s"
+msgstr "socket(PF_UNIX, SOCK_STREAM, 0): %s"
 
-#: ../src/utils/pasuspender.c:298
+#: ../src/utils/pacmd.c:166
 #, c-format
-msgid "pa_mainloop_run() failed.\n"
-msgstr ""
+msgid "connect(): %s"
+msgstr "connect(): %s"
+
+#: ../src/utils/pacmd.c:174
+msgid "Failed to kill PulseAudio daemon."
+msgstr "Αποτυχία τερματισμού δαίμονα PulseAudio."
+
+#: ../src/utils/pacmd.c:182
+msgid "Daemon not responding."
+msgstr "Ο δαίμονας δεν απαντά."
+
+#: ../src/utils/pacmd.c:214 ../src/utils/pacmd.c:323 ../src/utils/pacmd.c:341
+#, c-format
+msgid "write(): %s"
+msgstr "write(): %s"
+
+#: ../src/utils/pacmd.c:270
+#, c-format
+msgid "poll(): %s"
+msgstr "poll(): %s"
+
+#: ../src/utils/pacmd.c:281 ../src/utils/pacmd.c:301
+#, c-format
+msgid "read(): %s"
+msgstr "read(): %s"
 
-#: ../src/utils/pactl.c:150
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:166
+#, c-format
 msgid "Failed to get statistics: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης στατιστικών: %s"
 
-#: ../src/utils/pactl.c:156
+#: ../src/utils/pactl.c:172
 #, c-format
 msgid "Currently in use: %u blocks containing %s bytes total.\n"
 msgstr ""
+"Χρησιμοποιούνται τώρα: %u ομάδες που περιέχουν συνολικά %s ψηφιολέξεις.\n"
 
-#: ../src/utils/pactl.c:159
+#: ../src/utils/pactl.c:175
 #, c-format
 msgid "Allocated during whole lifetime: %u blocks containing %s bytes total.\n"
 msgstr ""
+"Κατανεμημένα κατά τη διάρκεια του συνολικού χρόνου ζωής: %u ομάδες που "
+"περιέχουν συνολικά %s ψηφιολέξεις.\n"
 
-#: ../src/utils/pactl.c:162
+#: ../src/utils/pactl.c:178
 #, c-format
 msgid "Sample cache size: %s\n"
-msgstr ""
+msgstr "μέγεθος κρυφής μνήμης δείγματος: %s\n"
 
-#: ../src/utils/pactl.c:171
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:187
+#, c-format
 msgid "Failed to get server information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης πληροφοριών διακομιστή: %s"
 
-#: ../src/utils/pactl.c:176
+#: ../src/utils/pactl.c:192
 #, c-format
 msgid ""
 "Server String: %s\n"
@@ -1586,8 +2575,14 @@ msgid ""
 "Client Index: %u\n"
 "Tile Size: %zu\n"
 msgstr ""
+"Συμβολοσειρά διακομιστή: %s\n"
+"Έκδοση πρωτοκόλλου βιβλιοθήκης: %u\n"
+"Έκδοση πρωτοκόλλου διακομιστή: %u\n"
+"Είναι τοπικό: %s\n"
+"Δείκτης πελάτη: %u\n"
+"Μέγεθος παράθεσης: %zu\n"
 
-#: ../src/utils/pactl.c:192
+#: ../src/utils/pactl.c:208
 #, c-format
 msgid ""
 "User Name: %s\n"
@@ -1600,13 +2595,22 @@ msgid ""
 "Default Source: %s\n"
 "Cookie: %04x:%04x\n"
 msgstr ""
+"Όνομα χρήστη: %s\n"
+"Όνομα οικοδεσπότη: %s\n"
+"Όνομα διακομιστή: %s\n"
+"Έκδοση διακομιστή: %s\n"
+"Προεπιλεγμένη προδιαγραφή δείγματος: %s\n"
+"Προεπιλεγμένη απεικόνιση καναλιού: %s\n"
+"Προεπιλεγμένος δέκτης: %s\n"
+"Προεπιλεγμένη πηγή: %s\n"
+"Μπισκότο: %04x:%04x\n"
 
-#: ../src/utils/pactl.c:244 ../src/utils/pactl.c:830
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:257 ../src/utils/pactl.c:902 ../src/utils/pactl.c:980
+#, c-format
 msgid "Failed to get sink information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης πληροφοριών δέκτη: %s"
 
-#: ../src/utils/pactl.c:270
+#: ../src/utils/pactl.c:283
 #, c-format
 msgid ""
 "Sink #%u\n"
@@ -1618,37 +2622,54 @@ msgid ""
 "\tChannel Map: %s\n"
 "\tOwner Module: %u\n"
 "\tMute: %s\n"
-"\tVolume: %s%s%s\n"
+"\tVolume: %s\n"
 "\t        balance %0.2f\n"
-"\tBase Volume: %s%s%s\n"
+"\tBase Volume: %s\n"
 "\tMonitor Source: %s\n"
 "\tLatency: %0.0f usec, configured %0.0f usec\n"
 "\tFlags: %s%s%s%s%s%s%s\n"
 "\tProperties:\n"
 "\t\t%s\n"
 msgstr ""
+"Δέκτης #%u\n"
+"\tΚατάσταση: %s\n"
+"\tΌνομα: %s\n"
+"\tΠεριγραφή: %s\n"
+"\tΟδηγός: %s\n"
+"\tΠροδιαγραφή δείγματος: %s\n"
+"\tΑπεικόνιση καναλιού: %s\n"
+"\tΕνότητα κατόχου: %u\n"
+"\tΣίγαση: %s\n"
+"\tΈνταση: %s\n"
+"\t        ισορροπία %0.2f\n"
+"\tΒασική ένταση: %s\n"
+"\tΠηγή οθόνης: %s\n"
+"\tΛανθάνων χρόνος: %0.0f usec, ρυθμισμένο %0.0f usec\n"
+"\tΣημαίες: %s%s%s%s%s%s%s\n"
+"\tΙδιότητες:\n"
+"\t\t%s\n"
 
-#: ../src/utils/pactl.c:318 ../src/utils/pactl.c:430
+#: ../src/utils/pactl.c:327 ../src/utils/pactl.c:433 ../src/utils/pactl.c:594
 #, c-format
 msgid "\tPorts:\n"
-msgstr ""
+msgstr "\tΘύρες:\n"
 
-#: ../src/utils/pactl.c:325 ../src/utils/pactl.c:437
+#: ../src/utils/pactl.c:334 ../src/utils/pactl.c:440
 #, c-format
 msgid "\tActive Port: %s\n"
-msgstr ""
+msgstr "\tΕνεργή θύρα: %s\n"
 
-#: ../src/utils/pactl.c:331 ../src/utils/pactl.c:443
+#: ../src/utils/pactl.c:340 ../src/utils/pactl.c:446
 #, c-format
 msgid "\tFormats:\n"
-msgstr ""
+msgstr "\tΜορφές:\n"
 
-#: ../src/utils/pactl.c:357 ../src/utils/pactl.c:849
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:364 ../src/utils/pactl.c:922 ../src/utils/pactl.c:995
+#, c-format
 msgid "Failed to get source information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης πληροφοριών πηγής: %s"
 
-#: ../src/utils/pactl.c:383
+#: ../src/utils/pactl.c:390
 #, c-format
 msgid ""
 "Source #%u\n"
@@ -1660,30 +2681,47 @@ msgid ""
 "\tChannel Map: %s\n"
 "\tOwner Module: %u\n"
 "\tMute: %s\n"
-"\tVolume: %s%s%s\n"
+"\tVolume: %s\n"
 "\t        balance %0.2f\n"
-"\tBase Volume: %s%s%s\n"
+"\tBase Volume: %s\n"
 "\tMonitor of Sink: %s\n"
 "\tLatency: %0.0f usec, configured %0.0f usec\n"
 "\tFlags: %s%s%s%s%s%s\n"
 "\tProperties:\n"
 "\t\t%s\n"
 msgstr ""
+"Πηγή #%u\n"
+"\tΚατάσταση: %s\n"
+"\tΌνομα: %s\n"
+"\tΠεριγραφή: %s\n"
+"\tΟδηγός: %s\n"
+"\tΠροδιαγραφή δείγματος: %s\n"
+"\tΑπεικόνιση καναλιού: %s\n"
+"\tΕνότητα κατόχου: %u\n"
+"\tΣίγαση: %s\n"
+"\tΈνταση: %s\n"
+"\t        ισορροπία %0.2f\n"
+"\tΒασική ένταση: %s\n"
+"\tΟθόνη δέκτη: %s\n"
+"\tΛανθάνων χρόνος: %0.0f usec, ρυθμισμένο %0.0f usec\n"
+"\tΣημαίες: %s%s%s%s%s%s\n"
+"\tΙδιότητες:\n"
+"\t\t%s\n"
 
-#: ../src/utils/pactl.c:415 ../src/utils/pactl.c:485 ../src/utils/pactl.c:528
-#: ../src/utils/pactl.c:570 ../src/utils/pactl.c:640 ../src/utils/pactl.c:641
-#: ../src/utils/pactl.c:652 ../src/utils/pactl.c:711 ../src/utils/pactl.c:712
-#: ../src/utils/pactl.c:723 ../src/utils/pactl.c:775 ../src/utils/pactl.c:776
-#: ../src/utils/pactl.c:783
+#: ../src/utils/pactl.c:418 ../src/utils/pactl.c:488 ../src/utils/pactl.c:531
+#: ../src/utils/pactl.c:573 ../src/utils/pactl.c:671 ../src/utils/pactl.c:672
+#: ../src/utils/pactl.c:683 ../src/utils/pactl.c:741 ../src/utils/pactl.c:742
+#: ../src/utils/pactl.c:753 ../src/utils/pactl.c:804 ../src/utils/pactl.c:805
+#: ../src/utils/pactl.c:811
 msgid "n/a"
-msgstr ""
+msgstr "μη διαθέσιμο"
 
-#: ../src/utils/pactl.c:454
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:457 ../src/utils/pactl.c:861
+#, c-format
 msgid "Failed to get module information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης πληροφοριών ενότητας: %s"
 
-#: ../src/utils/pactl.c:477
+#: ../src/utils/pactl.c:480
 #, c-format
 msgid ""
 "Module #%u\n"
@@ -1693,13 +2731,19 @@ msgid ""
 "\tProperties:\n"
 "\t\t%s\n"
 msgstr ""
+"Ενότητα #%u\n"
+"\tΌνομα: %s\n"
+"\tΌρισμα: %s\n"
+"\tΜετρητής χρήσης: %s\n"
+"\tΙδιότητες:\n"
+"\t\t%s\n"
 
-#: ../src/utils/pactl.c:496
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:499
+#, c-format
 msgid "Failed to get client information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης πληροφοριών πελάτη: %s"
 
-#: ../src/utils/pactl.c:522
+#: ../src/utils/pactl.c:525
 #, c-format
 msgid ""
 "Client #%u\n"
@@ -1708,13 +2752,18 @@ msgid ""
 "\tProperties:\n"
 "\t\t%s\n"
 msgstr ""
+"Πελάτης #%u\n"
+"\tΟδηγός: %s\n"
+"\tΕνότητα κατόχου: %s\n"
+"\tΙδιότητες:\n"
+"\t\t%s\n"
 
-#: ../src/utils/pactl.c:539
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:542
+#, c-format
 msgid "Failed to get card information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης πληροφοριών κάρτας: %s"
 
-#: ../src/utils/pactl.c:562
+#: ../src/utils/pactl.c:565
 #, c-format
 msgid ""
 "Card #%u\n"
@@ -1724,23 +2773,43 @@ msgid ""
 "\tProperties:\n"
 "\t\t%s\n"
 msgstr ""
+"Κάρτα #%u\n"
+"\tΌνομα: %s\n"
+"\tΟδηγός: %s\n"
+"\tΕνότητα κατόχου: %s\n"
+"\tΙδιότητες:\n"
+"\t\t%s\n"
 
-#: ../src/utils/pactl.c:576
+#: ../src/utils/pactl.c:581
 #, c-format
 msgid "\tProfiles:\n"
-msgstr ""
+msgstr "\tΚατατομές:\n"
 
-#: ../src/utils/pactl.c:582
+#: ../src/utils/pactl.c:588
 #, c-format
 msgid "\tActive Profile: %s\n"
+msgstr "\tΕνεργή κατατομή: %s\n"
+
+#: ../src/utils/pactl.c:602
+#, c-format
+msgid ""
+"\t\t\tProperties:\n"
+"\t\t\t\t%s\n"
 msgstr ""
+"\t\t\tΙδιότητες:\n"
+"\t\t\t\t%s\n"
+
+#: ../src/utils/pactl.c:607
+#, c-format
+msgid "\t\t\tPart of profile(s): %s"
+msgstr "\t\t\tΤμήμα των κατατομών: %s"
 
-#: ../src/utils/pactl.c:593 ../src/utils/pactl.c:868
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:624 ../src/utils/pactl.c:942 ../src/utils/pactl.c:1010
+#, c-format
 msgid "Failed to get sink input information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης πληροφοριών εισόδου δέκτη: %s"
 
-#: ../src/utils/pactl.c:622
+#: ../src/utils/pactl.c:653
 #, c-format
 msgid ""
 "Sink Input #%u\n"
@@ -1751,9 +2820,9 @@ msgid ""
 "\tSample Specification: %s\n"
 "\tChannel Map: %s\n"
 "\tFormat: %s\n"
+"\tCorked: %s\n"
 "\tMute: %s\n"
 "\tVolume: %s\n"
-"\t        %s\n"
 "\t        balance %0.2f\n"
 "\tBuffer Latency: %0.0f usec\n"
 "\tSink Latency: %0.0f usec\n"
@@ -1761,13 +2830,30 @@ msgid ""
 "\tProperties:\n"
 "\t\t%s\n"
 msgstr ""
+"Είσοδος δέκτη #%u\n"
+"\tΟδηγός: %s\n"
+"\tΕνότητα κατόχου: %s\n"
+"\tΠελάτης: %s\n"
+"\tΔέκτης: %u\n"
+"\tΠροδιαγραφή δείγματος: %s\n"
+"\tΑπεικόνιση καναλιού: %s\n"
+"\tΜορφή: %s\n"
+"\tCorked: %s\n"
+"\tΣίγαση: %s\n"
+"\tΈνταση: %s\n"
+"\t        ισορροπία %0.2f\n"
+"\tΛανθάνων χρόνος ενδιάμεσης μνήμης: %0.0f usec\n"
+"\tΛανθάνων χρόνος δέκτη: %0.0f usec\n"
+"\tΜέθοδος επαναδειγματοληψίας: %s\n"
+"\tΙδιότητες:\n"
+"\t\t%s\n"
 
-#: ../src/utils/pactl.c:663 ../src/utils/pactl.c:887
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:694 ../src/utils/pactl.c:962 ../src/utils/pactl.c:1025
+#, c-format
 msgid "Failed to get source output information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης πληροφοριών εξόδου πηγής: %s"
 
-#: ../src/utils/pactl.c:693
+#: ../src/utils/pactl.c:723
 #, c-format
 msgid ""
 "Source Output #%u\n"
@@ -1778,9 +2864,9 @@ msgid ""
 "\tSample Specification: %s\n"
 "\tChannel Map: %s\n"
 "\tFormat: %s\n"
+"\tCorked: %s\n"
 "\tMute: %s\n"
 "\tVolume: %s\n"
-"\t        %s\n"
 "\t        balance %0.2f\n"
 "\tBuffer Latency: %0.0f usec\n"
 "\tSource Latency: %0.0f usec\n"
@@ -1788,13 +2874,30 @@ msgid ""
 "\tProperties:\n"
 "\t\t%s\n"
 msgstr ""
+"Έξοδος πηγής #%u\n"
+"\tΟδηγός: %s\n"
+"\tΕνότητα κατόχου: %s\n"
+"\tΠελάτης: %s\n"
+"\tΔέκτης: %u\n"
+"\tΠροδιαγραφή δείγματος: %s\n"
+"\tΑπεικόνιση καναλιού: %s\n"
+"\tΜορφή: %s\n"
+"\tCorked: %s\n"
+"\tΣίγαση: %s\n"
+"\tΈνταση: %s\n"
+"\t        ισορροπία %0.2f\n"
+"\tΛανθάνων χρόνος ενδιάμεσης μνήμης: %0.0f usec\n"
+"\tΛανθάνων χρόνος δέκτη: %0.0f usec\n"
+"\tΜέθοδος επαναδειγματοληψίας: %s\n"
+"\tΙδιότητες:\n"
+"\t\t%s\n"
 
-#: ../src/utils/pactl.c:734
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:764
+#, c-format
 msgid "Failed to get sample information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Αποτυχία λήψης πληροφοριών δείγματος: %s"
 
-#: ../src/utils/pactl.c:761
+#: ../src/utils/pactl.c:791
 #, c-format
 msgid ""
 "Sample #%u\n"
@@ -1802,7 +2905,6 @@ msgid ""
 "\tSample Specification: %s\n"
 "\tChannel Map: %s\n"
 "\tVolume: %s\n"
-"\t        %s\n"
 "\t        balance %0.2f\n"
 "\tDuration: %0.1fs\n"
 "\tSize: %s\n"
@@ -1811,161 +2913,190 @@ msgid ""
 "\tProperties:\n"
 "\t\t%s\n"
 msgstr ""
+"Δείγμα #%u\n"
+"\tΌνομα: %s\n"
+"\tΠροδιαγραφή δείγματος: %s\n"
+"\tΑπεικόνιση καναλιού: %s\n"
+"\tΈνταση: %s\n"
+"\t        ισορροπία %0.2f\n"
+"\tΔιάρκεια: %0.1fs\n"
+"\tΜέγεθος: %s\n"
+"\tΟκνηρότητα: %s\n"
+"\tΌνομα αρχείου: %s\n"
+"\tΙδιότητες:\n"
+"\t\t%s\n"
 
-#: ../src/utils/pactl.c:791 ../src/utils/pactl.c:801
+#: ../src/utils/pactl.c:819 ../src/utils/pactl.c:829
 #, c-format
 msgid "Failure: %s"
 msgstr "Αποτυχία: %s"
 
-#: ../src/utils/pactl.c:915
-#, fuzzy, c-format
-msgid "Failed to set format: invalid format string %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+#: ../src/utils/pactl.c:868
+#, c-format
+msgid "Failed to unload module: Module %s not loaded"
+msgstr "Αποτυχία εκφόρτωσης ενότητας: η ενότητα %s δεν φορτώθηκε"
 
-#: ../src/utils/pactl.c:954
-#, fuzzy, c-format
-msgid "Failed to upload sample: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+#: ../src/utils/pactl.c:886
+#, c-format
+msgid ""
+"Failed to set volume: You tried to set volumes for %d channels, whereas "
+"channel/s supported = %d\n"
+msgstr "Αποτυχία ορισμού έντασης: Προσπαθήσατε να ορίσετε εντάσεις για %d κανάλια, "
+"ενώ τα υποστηριζόμενα κανάλια είναι %d\n"
+
+#: ../src/utils/pactl.c:1052
+#, c-format
+msgid "Failed to set format: invalid format string %s"
+msgstr "Αποτυχία ορισμού μορφής: άκυρη συμβολοσειρά μορφής %s"
 
-#: ../src/utils/pactl.c:971
+#: ../src/utils/pactl.c:1095
+#, c-format
+msgid "Failed to upload sample: %s"
+msgstr "Αποτυχία αποστολής δείγματος: %s"
+
+#: ../src/utils/pactl.c:1112
 msgid "Premature end of file"
-msgstr ""
+msgstr "Πρόωρο τέλος του αρχείου"
 
-#: ../src/utils/pactl.c:991
+#: ../src/utils/pactl.c:1132
 msgid "new"
-msgstr ""
+msgstr "νέο"
 
-#: ../src/utils/pactl.c:994
+#: ../src/utils/pactl.c:1135
 msgid "change"
-msgstr ""
+msgstr "αλλαγή"
 
-#: ../src/utils/pactl.c:997
+#: ../src/utils/pactl.c:1138
 msgid "remove"
-msgstr ""
+msgstr "αφαίρεση"
 
-#: ../src/utils/pactl.c:1000 ../src/utils/pactl.c:1035
+#: ../src/utils/pactl.c:1141 ../src/utils/pactl.c:1176
 msgid "unknown"
-msgstr ""
+msgstr "άγνωστο"
 
-#: ../src/utils/pactl.c:1008
+#: ../src/utils/pactl.c:1149
 msgid "sink"
-msgstr ""
+msgstr "δέκτης"
 
-#: ../src/utils/pactl.c:1011
+#: ../src/utils/pactl.c:1152
 msgid "source"
-msgstr ""
+msgstr "πηγή"
 
-#: ../src/utils/pactl.c:1014
+#: ../src/utils/pactl.c:1155
 msgid "sink-input"
-msgstr ""
+msgstr "είσοδος δέκτη"
 
-#: ../src/utils/pactl.c:1017
+#: ../src/utils/pactl.c:1158
 msgid "source-output"
-msgstr ""
+msgstr "έξοδος πηγής"
 
-#: ../src/utils/pactl.c:1020
+#: ../src/utils/pactl.c:1161
 msgid "module"
-msgstr ""
+msgstr "ενότητα"
 
-#: ../src/utils/pactl.c:1023
+#: ../src/utils/pactl.c:1164
 msgid "client"
-msgstr ""
+msgstr "πελάτης"
 
-#: ../src/utils/pactl.c:1026
+#: ../src/utils/pactl.c:1167
 msgid "sample-cache"
-msgstr ""
+msgstr "κρυφή μνήμη δείγματος"
 
-#: ../src/utils/pactl.c:1029 ../src/utils/pactl.c:1032
+#: ../src/utils/pactl.c:1170
 msgid "server"
-msgstr ""
+msgstr "διακομιστής"
 
-#: ../src/utils/pactl.c:1041
+#: ../src/utils/pactl.c:1173
+msgid "card"
+msgstr "κάρτα"
+
+#: ../src/utils/pactl.c:1182
 #, c-format
 msgid "Event '%s' on %s #%u\n"
-msgstr ""
+msgstr "Συμβάν '%s' στο %s #%u\n"
 
-#: ../src/utils/pactl.c:1258
+#: ../src/utils/pactl.c:1461
 msgid "Got SIGINT, exiting."
-msgstr ""
+msgstr "Ελήφθη SIGINT, έξοδος."
 
-#: ../src/utils/pactl.c:1285
+#: ../src/utils/pactl.c:1488
 msgid "Invalid volume specification"
-msgstr ""
+msgstr "Άκυρη προδιαγραφή έντασης"
 
-#: ../src/utils/pactl.c:1308
+#: ../src/utils/pactl.c:1511
 msgid "Volume outside permissible range.\n"
-msgstr ""
-
-#: ../src/utils/pactl.c:1319 ../src/utils/pactl.c:1320
-#: ../src/utils/pactl.c:1321 ../src/utils/pactl.c:1322
-#: ../src/utils/pactl.c:1323 ../src/utils/pactl.c:1324
-#: ../src/utils/pactl.c:1325 ../src/utils/pactl.c:1326
-#: ../src/utils/pactl.c:1327 ../src/utils/pactl.c:1328
-#: ../src/utils/pactl.c:1329 ../src/utils/pactl.c:1330
-#: ../src/utils/pactl.c:1331 ../src/utils/pactl.c:1332
-#: ../src/utils/pactl.c:1333 ../src/utils/pactl.c:1334
-#: ../src/utils/pactl.c:1335 ../src/utils/pactl.c:1336
-#: ../src/utils/pactl.c:1337
+msgstr "Η ένταση εκτός επιτρεπτής περιοχής.\n"
+
+#: ../src/utils/pactl.c:1524
+#| msgid "Invalid volume specification"
+msgid "Invalid number of volume specifications.\n"
+msgstr "Άκυρος αριθμός προδιαγραφών έντασης.\n"
+
+#: ../src/utils/pactl.c:1536
+#| msgid "Invalid volume specification"
+msgid "Inconsistent volume specification.\n"
+msgstr "Ασύμβατη προδιαγραφή έντασης.\n"
+
+#: ../src/utils/pactl.c:1566 ../src/utils/pactl.c:1567
+#: ../src/utils/pactl.c:1568 ../src/utils/pactl.c:1569
+#: ../src/utils/pactl.c:1570 ../src/utils/pactl.c:1571
+#: ../src/utils/pactl.c:1572 ../src/utils/pactl.c:1573
+#: ../src/utils/pactl.c:1574 ../src/utils/pactl.c:1575
+#: ../src/utils/pactl.c:1576 ../src/utils/pactl.c:1577
+#: ../src/utils/pactl.c:1578 ../src/utils/pactl.c:1579
+#: ../src/utils/pactl.c:1580 ../src/utils/pactl.c:1581
+#: ../src/utils/pactl.c:1582 ../src/utils/pactl.c:1583
+#: ../src/utils/pactl.c:1584 ../src/utils/pactl.c:1585
+#: ../src/utils/pactl.c:1586
 msgid "[options]"
-msgstr ""
+msgstr "[επιλογές]"
 
-#: ../src/utils/pactl.c:1321
+#: ../src/utils/pactl.c:1568
 msgid "[TYPE]"
-msgstr ""
+msgstr "[ΤΥΠΟΣ]"
 
-#: ../src/utils/pactl.c:1323
+#: ../src/utils/pactl.c:1570
 msgid "FILENAME [NAME]"
-msgstr ""
+msgstr "ΟΝΟΜΑΑΡΧΕΙΟΥ [ΟΝΟΜΑ]"
 
-#: ../src/utils/pactl.c:1324
+#: ../src/utils/pactl.c:1571
 msgid "NAME [SINK]"
-msgstr ""
-
-#: ../src/utils/pactl.c:1325
-msgid "NAME"
-msgstr ""
-
-#: ../src/utils/pactl.c:1326
-msgid "NAME [ARGS ...]"
-msgstr ""
-
-#: ../src/utils/pactl.c:1327
-msgid "#N"
-msgstr ""
-
-#: ../src/utils/pactl.c:1328
-msgid "#N SINK|SOURCE"
-msgstr ""
+msgstr "ΟΝΟΜΑ [ΔΕΚΤΗΣ]"
 
-#: ../src/utils/pactl.c:1329 ../src/utils/pactl.c:1334
-msgid "NAME|#N 1|0"
-msgstr ""
+#: ../src/utils/pactl.c:1580
+#| msgid "NAME|#N VOLUME"
+msgid "NAME|#N VOLUME [VOLUME ...]"
+msgstr "ΟΝΟΜΑ| ΕΝΤΑΣΗ #Ν [ΕΝΤΑΣΗ ...]"
 
-#: ../src/utils/pactl.c:1330
-msgid "CARD PROFILE"
-msgstr ""
-
-#: ../src/utils/pactl.c:1331
-msgid "NAME|#N PORT"
-msgstr ""
+#: ../src/utils/pactl.c:1581
+msgid "#N VOLUME [VOLUME ...]"
+msgstr "#N ΕΝΤΑΣΗ [ΕΝΤΑΣΗ ...]"
 
-#: ../src/utils/pactl.c:1332
-msgid "NAME|#N VOLUME"
-msgstr ""
+#: ../src/utils/pactl.c:1582
+msgid "NAME|#N 1|0|toggle"
+msgstr "ΟΝΟΜΑ|#Ν 1|0|εναλλαγή"
 
-#: ../src/utils/pactl.c:1333
-msgid "#N VOLUME"
-msgstr ""
+#: ../src/utils/pactl.c:1583
+msgid "#N 1|0|toggle"
+msgstr "#Ν 1|0|εναλλαγή"
 
-#: ../src/utils/pactl.c:1335
-msgid "#N 1|0"
-msgstr ""
-
-#: ../src/utils/pactl.c:1336
+#: ../src/utils/pactl.c:1584
 msgid "#N FORMATS"
+msgstr "ΜΟΡΦΕΣ #Ν"
+
+#: ../src/utils/pactl.c:1587
+#, c-format
+msgid ""
+"\n"
+"The special names @DEFAULT_SINK@, @DEFAULT_SOURCE@ and @DEFAULT_MONITOR@\n"
+"can be used to specify the default sink, source and monitor.\n"
 msgstr ""
+"\n"
+"Τα ειδικά ονόματα @DEFAULT_SINK@, @DEFAULT_SOURCE@ και @DEFAULT_MONITOR@\n"
+"μπορούν να χρησιμοποιηθούν ορίζοντας τον προεπιλεγμένο δέκτη, πηγή και "
+"οθόνη.\n"
 
-#: ../src/utils/pactl.c:1339
+#: ../src/utils/pactl.c:1590
 #, c-format
 msgid ""
 "\n"
@@ -1977,619 +3108,355 @@ msgid ""
 "  -n, --client-name=NAME                How to call this client on the "
 "server\n"
 msgstr ""
+"\n"
+"  -h, --help                            Εμφάνιση αυτής της βοήθειας\n"
+"      --version                         Εμφάνιση έκδοσης\n"
+"\n"
+"  -s, --server=SERVER                   Το όνομα του διακομιστή για σύνδεση\n"
+"  -n, --client-name=NAME                Πώς να κληθεί αυτός ο πελάτης στον "
+"διακομιστή\n"
 
-#: ../src/utils/pactl.c:1380
+#: ../src/utils/pactl.c:1631
 #, c-format
 msgid ""
 "pactl %s\n"
 "Compiled with libpulse %s\n"
 "Linked with libpulse %s\n"
 msgstr ""
+"pactl %s\n"
+"Μεταγλωττισμένο με libpulse %s\n"
+"Συνδεμένο με libpulse %s\n"
 
-#: ../src/utils/pactl.c:1439
+#: ../src/utils/pactl.c:1690
 #, c-format
 msgid "Specify nothing, or one of: %s"
-msgstr ""
+msgstr "Ορίστε τίποτα, ή ένα από τα: %s"
 
-#: ../src/utils/pactl.c:1449
+#: ../src/utils/pactl.c:1700
 msgid "Please specify a sample file to load"
-msgstr ""
+msgstr "Παρακαλούμε ορίστε ένα αρχείο δείγματος για φόρτωση"
 
-#: ../src/utils/pactl.c:1462
+#: ../src/utils/pactl.c:1713
 msgid "Failed to open sound file."
 msgstr "Αποτυχία ανοίγματος αρχείου ήχου."
 
-#: ../src/utils/pactl.c:1474
+#: ../src/utils/pactl.c:1725
 msgid "Warning: Failed to determine sample specification from file."
 msgstr ""
+"Προειδοποίηση: Αποτυχία προσδιορισμού προδιαγραφής δείγματος από αρχείο."
 
-#: ../src/utils/pactl.c:1484
+#: ../src/utils/pactl.c:1735
 msgid "You have to specify a sample name to play"
-msgstr ""
+msgstr "Πρέπει να ορίσετε ένα όνομα δείγματος για αναπαραγωγή"
 
-#: ../src/utils/pactl.c:1496
+#: ../src/utils/pactl.c:1747
 msgid "You have to specify a sample name to remove"
-msgstr ""
+msgstr "Πρέπει να ορίσετε ένα όνομα δείγματος για αφαίρεση"
 
-#: ../src/utils/pactl.c:1505
+#: ../src/utils/pactl.c:1756
 msgid "You have to specify a sink input index and a sink"
-msgstr ""
+msgstr "Πρέπει να ορίσετε έναν δείκτη εισόδου δέκτη και έναν δέκτη"
 
-#: ../src/utils/pactl.c:1515
+#: ../src/utils/pactl.c:1766
 msgid "You have to specify a source output index and a source"
-msgstr ""
+msgstr "Πρέπει να ορίσετε έναν δείκτη εξόδου πηγής και μια πηγή"
 
-#: ../src/utils/pactl.c:1530
+#: ../src/utils/pactl.c:1781
 msgid "You have to specify a module name and arguments."
-msgstr ""
+msgstr "Πρέπει να ορίσετε ένα όνομα ενότητας και ορίσματα."
 
-#: ../src/utils/pactl.c:1550
-msgid "You have to specify a module index"
-msgstr ""
+#: ../src/utils/pactl.c:1801
+msgid "You have to specify a module index or name"
+msgstr "Πρέπει να ορίσετε έναν δείκτη ενότητας ή όνομα"
 
-#: ../src/utils/pactl.c:1560
+#: ../src/utils/pactl.c:1814
 msgid ""
 "You may not specify more than one sink. You have to specify a boolean value."
 msgstr ""
+"Δεν μπορείτε να ορίσετε περισσότερους από έναν δέκτη. Πρέπει να ορίσετε μια "
+"τιμή Μπουλ."
+
+#: ../src/utils/pactl.c:1819 ../src/utils/pactl.c:1839
+msgid "Invalid suspend specification."
+msgstr "Άκυρη προδιαγραφή αναστολής."
 
-#: ../src/utils/pactl.c:1573
+#: ../src/utils/pactl.c:1834
 msgid ""
 "You may not specify more than one source. You have to specify a boolean "
 "value."
 msgstr ""
+"Δεν μπορείτε να ορίσετε περισσότερες από μία πηγές. Πρέπει να ορίσετε μια "
+"τιμή Μπουλ."
 
-#: ../src/utils/pactl.c:1585
+#: ../src/utils/pactl.c:1851
 msgid "You have to specify a card name/index and a profile name"
-msgstr ""
+msgstr "Πρέπει να ορίσετε ένα όνομα/δείκτη κάρτας και ένα όνομα κατατομής"
 
-#: ../src/utils/pactl.c:1596
+#: ../src/utils/pactl.c:1862
 msgid "You have to specify a sink name/index and a port name"
-msgstr ""
+msgstr "Πρέπει να ορίσετε ένα όνομα/δείκτη δέκτη και ένα όνομα θύρας"
+
+#: ../src/utils/pactl.c:1873
+msgid "You have to specify a sink name"
+msgstr "Πρέπει να ορίσετε ένα όνομα δέκτη"
 
-#: ../src/utils/pactl.c:1607
+#: ../src/utils/pactl.c:1883
 msgid "You have to specify a source name/index and a port name"
-msgstr ""
+msgstr "Πρέπει να ορίσετε ένα όνομα/δείκτη πηγής και ένα όνομα θύρας"
+
+#: ../src/utils/pactl.c:1894
+msgid "You have to specify a source name"
+msgstr "Πρέπει να ορίσετε ένα όνομα πηγής"
 
-#: ../src/utils/pactl.c:1618
+#: ../src/utils/pactl.c:1904
 msgid "You have to specify a sink name/index and a volume"
-msgstr ""
+msgstr "Πρέπει να ορίσετε ένα όνομα/δείκτη δέκτη και μια ένταση"
 
-#: ../src/utils/pactl.c:1631
+#: ../src/utils/pactl.c:1917
 msgid "You have to specify a source name/index and a volume"
-msgstr ""
+msgstr "Πρέπει να ορίσετε ένα όνομα/δείκτη πηγής και μια ένταση"
 
-#: ../src/utils/pactl.c:1644
+#: ../src/utils/pactl.c:1930
 msgid "You have to specify a sink input index and a volume"
-msgstr ""
+msgstr "Πρέπει να ορίσετε έναν δείκτη εισόδου δέκτη και μια ένταση"
 
-#: ../src/utils/pactl.c:1649
+#: ../src/utils/pactl.c:1935
 msgid "Invalid sink input index"
-msgstr ""
+msgstr "Άκυρος δείκτης εισόδου δέκτη"
 
-#: ../src/utils/pactl.c:1660
+#: ../src/utils/pactl.c:1946
 msgid "You have to specify a source output index and a volume"
-msgstr ""
+msgstr "Πρέπει να ορίσετε έναν δείκτη εξόδου πηγής και μια ένταση"
 
-#: ../src/utils/pactl.c:1665
+#: ../src/utils/pactl.c:1951
 msgid "Invalid source output index"
-msgstr ""
+msgstr "Άκυρος δείκτης εξόδου πηγής"
 
-#: ../src/utils/pactl.c:1677
+#: ../src/utils/pactl.c:1962
 msgid "You have to specify a sink name/index and a mute boolean"
-msgstr ""
+msgstr "Πρέπει να ορίσετε έναν δείκτη/όνομα δέκτη και μια τιμή Μπουλ σίγασης"
 
-#: ../src/utils/pactl.c:1682 ../src/utils/pactl.c:1699
-#: ../src/utils/pactl.c:1721 ../src/utils/pactl.c:1742
+#: ../src/utils/pactl.c:1967 ../src/utils/pactl.c:1982
+#: ../src/utils/pactl.c:2002 ../src/utils/pactl.c:2020
 msgid "Invalid mute specification"
-msgstr ""
+msgstr "Άκυρη προδιαγραφή σίγασης"
 
-#: ../src/utils/pactl.c:1694
+#: ../src/utils/pactl.c:1977
 msgid "You have to specify a source name/index and a mute boolean"
-msgstr ""
+msgstr "Πρέπει να ορίσετε ένα όνομα/δείκτη πηγής και μια τιμή Μπουλ σίγασης"
 
-#: ../src/utils/pactl.c:1711
+#: ../src/utils/pactl.c:1992
 msgid "You have to specify a sink input index and a mute boolean"
-msgstr ""
+msgstr "Πρέπει να ορίσετε έναν δείκτη εισόδου δέκτη και μια τιμή Μπουλ σίγασης"
 
-#: ../src/utils/pactl.c:1716
+#: ../src/utils/pactl.c:1997
 msgid "Invalid sink input index specification"
-msgstr ""
+msgstr "Άκυρη προδιαγραφή δείκτη εισόδου δέκτη"
 
-#: ../src/utils/pactl.c:1732
+#: ../src/utils/pactl.c:2010
 msgid "You have to specify a source output index and a mute boolean"
-msgstr ""
+msgstr "Πρέπει να ορίσετε έναν δείκτη εξόδου πηγής και μια τιμή Μπουλ σίγασης"
 
-#: ../src/utils/pactl.c:1737
-#, fuzzy
+#: ../src/utils/pactl.c:2015
 msgid "Invalid source output index specification"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr "Άκυρη προδιαγραφή δείκτη εξόδου πηγής"
 
-#: ../src/utils/pactl.c:1756
+#: ../src/utils/pactl.c:2032
 msgid ""
 "You have to specify a sink index and a semicolon-separated list of supported "
 "formats"
 msgstr ""
+"Πρέπει να ορίσετε έναν δείκτη δέκτη και έναν κατάλογο χωριζόμενο με ; των "
+"υποστηριζόμενων μορφών"
 
-#: ../src/utils/pactl.c:1772
-msgid "No valid command specified."
+#: ../src/utils/pactl.c:2044
+msgid "You have to specify a card name/index, a port name and a latency offset"
 msgstr ""
+"Πρέπει να ορίσετε ένα όνομα/δείκτη κάρτας, ένα όνομα θύρας και μια "
+"μετατόπιση λανθάνοντος χρόνου"
 
-#: ../src/utils/pax11publish.c:61
-#, c-format
-msgid ""
-"%s [-D display] [-S server] [-O sink] [-I source] [-c file]  [-d|-e|-i|-r]\n"
-"\n"
-" -d    Show current PulseAudio data attached to X11 display (default)\n"
-" -e    Export local PulseAudio data to X11 display\n"
-" -i    Import PulseAudio data from X11 display to local environment "
-"variables and cookie file.\n"
-" -r    Remove PulseAudio data from X11 display\n"
-msgstr ""
+#: ../src/utils/pactl.c:2051
+msgid "Could not parse latency offset"
+msgstr "Αδύνατη η ανάλυση μετατόπισης λανθάνοντος χρόνου"
 
-#: ../src/utils/pax11publish.c:94
-#, c-format
-msgid "Failed to parse command line.\n"
-msgstr ""
+#: ../src/utils/pactl.c:2063
+msgid "No valid command specified."
+msgstr "Δεν ορίστηκε έγκυρη εντολή."
 
-#: ../src/utils/pax11publish.c:113
+#: ../src/utils/pasuspender.c:81
 #, c-format
-msgid "Server: %s\n"
-msgstr ""
+msgid "fork(): %s\n"
+msgstr "fork(): %s\n"
 
-#: ../src/utils/pax11publish.c:115
+#: ../src/utils/pasuspender.c:94
 #, c-format
-msgid "Source: %s\n"
-msgstr ""
+msgid "execvp(): %s\n"
+msgstr "execvp(): %s\n"
 
-#: ../src/utils/pax11publish.c:117
+#: ../src/utils/pasuspender.c:113
 #, c-format
-msgid "Sink: %s\n"
-msgstr ""
+msgid "Failure to resume: %s\n"
+msgstr "Αποτυχία συνέχισης: %s\n"
 
-#: ../src/utils/pax11publish.c:119
+#: ../src/utils/pasuspender.c:147
 #, c-format
-msgid "Cookie: %s\n"
-msgstr ""
+msgid "Failure to suspend: %s\n"
+msgstr "Αποτυχία αναστολής: %s\n"
 
-#: ../src/utils/pax11publish.c:137
+#: ../src/utils/pasuspender.c:172
 #, c-format
-msgid "Failed to parse cookie data\n"
+msgid "WARNING: Sound server is not local, not suspending.\n"
 msgstr ""
+"ΠΡΟΕΙΔΟΠΟΙΗΣΗ: Ο διακομιστής ήχου δεν είναι τοπικός, δεν αναστέλλεται.\n"
 
-#: ../src/utils/pax11publish.c:142
+#: ../src/utils/pasuspender.c:185
 #, c-format
-msgid "Failed to save cookie data\n"
-msgstr ""
+msgid "Connection failure: %s\n"
+msgstr "Αποτυχία σύνδεσης: %s\n"
 
-#: ../src/utils/pax11publish.c:157
+#: ../src/utils/pasuspender.c:203
 #, c-format
-msgid "Failed to load client configuration file.\n"
-msgstr ""
+msgid "Got SIGINT, exiting.\n"
+msgstr "Ελήφθη SIGINT, έξοδος.\n"
 
-#: ../src/utils/pax11publish.c:162
+#: ../src/utils/pasuspender.c:221
 #, c-format
-msgid "Failed to read environment configuration data.\n"
-msgstr ""
+msgid "WARNING: Child process terminated by signal %u\n"
+msgstr "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: Η θυγατρική διεργασία τελείωσε με σήμα %u\n"
 
-#: ../src/utils/pax11publish.c:179
+#: ../src/utils/pasuspender.c:230
 #, c-format
-msgid "Failed to get FQDN.\n"
+msgid ""
+"%s [options] ... \n"
+"\n"
+"  -h, --help                            Show this help\n"
+"      --version                         Show version\n"
+"  -s, --server=SERVER                   The name of the server to connect "
+"to\n"
+"\n"
 msgstr ""
+"%s [options] ... \n"
+"\n"
+"  -h, --help                            Εμφάνιση της βοήθειας\n"
+"      --version                         Εμφάνιση έκδοσης\n"
+"  -s, --server=SERVER                   Το όνομα του διακομιστή για σύνδεση\n"
+"\n"
 
-#: ../src/utils/pax11publish.c:199
+#: ../src/utils/pasuspender.c:268
 #, c-format
-msgid "Failed to load cookie data\n"
+msgid ""
+"pasuspender %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
 msgstr ""
+"pasuspender %s\n"
+"Μεταγλωττισμένο με libpulse %s\n"
+"Συνδεμένο με libpulse %s\n"
 
-#: ../src/utils/pax11publish.c:217
+#: ../src/utils/pasuspender.c:297
 #, c-format
-msgid "Not yet implemented.\n"
-msgstr ""
-
-#: ../src/utils/pacmd.c:66
-msgid "No PulseAudio daemon running, or not running as session daemon."
-msgstr ""
+msgid "pa_mainloop_new() failed.\n"
+msgstr "Αποτυχία pa_mainloop_new().\n"
 
-#: ../src/utils/pacmd.c:71
+#: ../src/utils/pasuspender.c:310
 #, c-format
-msgid "socket(PF_UNIX, SOCK_STREAM, 0): %s"
-msgstr ""
+msgid "pa_context_new() failed.\n"
+msgstr "Αποτυχία pa_context_new().\n"
 
-#: ../src/utils/pacmd.c:88
+#: ../src/utils/pasuspender.c:322
 #, c-format
-msgid "connect(): %s"
-msgstr "σύνδεση(): %s"
-
-#: ../src/utils/pacmd.c:96
-msgid "Failed to kill PulseAudio daemon."
-msgstr ""
-
-#: ../src/utils/pacmd.c:104
-msgid "Daemon not responding."
-msgstr ""
+msgid "pa_mainloop_run() failed.\n"
+msgstr "Αποτυχία pa_mainloop_run().\n"
 
-#: ../src/utils/pacmd.c:184
+#: ../src/utils/pax11publish.c:60
 #, c-format
-msgid "poll(): %s"
+msgid ""
+"%s [-D display] [-S server] [-O sink] [-I source] [-c file]  [-d|-e|-i|-r]\n"
+"\n"
+" -d    Show current PulseAudio data attached to X11 display (default)\n"
+" -e    Export local PulseAudio data to X11 display\n"
+" -i    Import PulseAudio data from X11 display to local environment "
+"variables and cookie file.\n"
+" -r    Remove PulseAudio data from X11 display\n"
 msgstr ""
+"%s [-D display] [-S server] [-O sink] [-I source] [-c file]  [-d|-e|-i|-r]\n"
+"\n"
+" -d    Εμφάνιση τρεχόντων δεδομένων PulseAudio που είναι προσαρτημένα σε "
+"προβολή X11 (προεπιλογή)\n"
+" -e    Εξαγωγή τοπικών δεδομένων PulseAudio σε προβολή X11\n"
+" -i    Εισαγωγή δεδομένων PulseAudio από προβολή X11 σε τοπικές μεταβλητές "
+"περιβάλλοντος και αρχείου μπισκότων.\n"
+" -r    Αφαίρεση δεδομένων PulseAudio από προβολή X11\n"
 
-#: ../src/utils/pacmd.c:195 ../src/utils/pacmd.c:215
+#: ../src/utils/pax11publish.c:93
 #, c-format
-msgid "read(): %s"
-msgstr ""
+msgid "Failed to parse command line.\n"
+msgstr "Αποτυχία ανάλυσης γραμμής εντολών.\n"
 
-#: ../src/utils/pacmd.c:237 ../src/utils/pacmd.c:255
+#: ../src/utils/pax11publish.c:112
 #, c-format
-msgid "write(): %s"
-msgstr ""
-
-#: ../src/pulsecore/lock-autospawn.c:136 ../src/pulsecore/lock-autospawn.c:222
-msgid "Cannot access autospawn lock."
-msgstr ""
+msgid "Server: %s\n"
+msgstr "Διακομιστής: %s\n"
 
-#: ../src/modules/alsa/alsa-sink.c:560 ../src/modules/alsa/alsa-sink.c:726
+#: ../src/utils/pax11publish.c:114
 #, c-format
-msgid ""
-"ALSA woke us up to write new data to the device, but there was actually "
-"nothing to write!\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers.\n"
-"We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() "
-"returned 0 or another value < min_avail."
-msgstr ""
+msgid "Source: %s\n"
+msgstr "Πηγή: %s\n"
 
-#: ../src/modules/alsa/alsa-source.c:519 ../src/modules/alsa/alsa-source.c:672
+#: ../src/utils/pax11publish.c:116
 #, c-format
-msgid ""
-"ALSA woke us up to read new data from the device, but there was actually "
-"nothing to read!\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers.\n"
-"We were woken up with POLLIN set -- however a subsequent snd_pcm_avail() "
-"returned 0 or another value < min_avail."
-msgstr ""
-
-#: ../src/modules/alsa/module-alsa-card.c:167
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2796
-#: ../src/modules/alsa/alsa-mixer.c:3898
-msgid "Off"
-msgstr ""
-
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2738
-msgid "High Fidelity Playback (A2DP)"
-msgstr ""
-
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2752
-msgid "High Fidelity Capture (A2DP)"
-msgstr ""
-
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2767
-msgid "Telephony Duplex (HSP/HFP)"
-msgstr ""
-
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2781
-msgid "Handsfree Gateway"
-msgstr ""
-
-#: ../src/modules/reserve-wrap.c:151
-msgid "PulseAudio Sound Server"
-msgstr ""
-
-#: ../src/modules/module-rygel-media-server.c:510
-#: ../src/modules/module-rygel-media-server.c:548
-#: ../src/modules/module-rygel-media-server.c:903
-msgid "Output Devices"
-msgstr ""
-
-#: ../src/modules/module-rygel-media-server.c:511
-#: ../src/modules/module-rygel-media-server.c:549
-#: ../src/modules/module-rygel-media-server.c:904
-msgid "Input Devices"
-msgstr ""
-
-#: ../src/modules/module-rygel-media-server.c:1056
-msgid "Audio on @HOSTNAME@"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2219
-msgid "Input"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2220
-msgid "Docking Station Input"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2221
-msgid "Docking Station Microphone"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2222
-msgid "Docking Station Line In"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2223 ../src/modules/alsa/alsa-mixer.c:2307
-msgid "Line In"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2224 ../src/modules/alsa/alsa-mixer.c:2302
-msgid "Microphone"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2225 ../src/modules/alsa/alsa-mixer.c:2303
-msgid "Front Microphone"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2226 ../src/modules/alsa/alsa-mixer.c:2304
-msgid "Rear Microphone"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2227
-msgid "External Microphone"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2228 ../src/modules/alsa/alsa-mixer.c:2306
-msgid "Internal Microphone"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2229 ../src/modules/alsa/alsa-mixer.c:2308
-msgid "Radio"
-msgstr "Radio"
-
-#: ../src/modules/alsa/alsa-mixer.c:2230 ../src/modules/alsa/alsa-mixer.c:2309
-msgid "Video"
-msgstr "Video"
-
-#: ../src/modules/alsa/alsa-mixer.c:2231
-msgid "Automatic Gain Control"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2232
-msgid "No Automatic Gain Control"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2233
-msgid "Boost"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2234
-msgid "No Boost"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2235
-msgid "Amplifier"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2236
-msgid "No Amplifier"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2237
-msgid "Bass Boost"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2238
-msgid "No Bass Boost"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2239
-msgid "Speaker"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2240 ../src/modules/alsa/alsa-mixer.c:2311
-msgid "Headphones"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2301
-msgid "Analog Input"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2305
-msgid "Dock Microphone"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2310
-msgid "Analog Output"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2312
-msgid "LFE on Separate Mono Output"
-msgstr "Analog Output (LFE)"
-
-#: ../src/modules/alsa/alsa-mixer.c:2313
-msgid "Line Out"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2314
-msgid "Analog Mono Output"
-msgstr "Analog Mono Output"
-
-#: ../src/modules/alsa/alsa-mixer.c:2315
-#, fuzzy
-msgid "Speakers"
-msgstr "Analog Stereo"
-
-#: ../src/modules/alsa/alsa-mixer.c:2316
-msgid "HDMI / DisplayPort"
-msgstr ""
-
-#: ../src/modules/alsa/alsa-mixer.c:2317
-#, fuzzy
-msgid "Digital Output (S/PDIF)"
-msgstr "Digital Stereo (HDMI)"
-
-#: ../src/modules/alsa/alsa-mixer.c:2318
-#, fuzzy
-msgid "Digital Passthrough (S/PDIF)"
-msgstr "Digital Stereo (HDMI)"
-
-#: ../src/modules/alsa/alsa-mixer.c:3756
-msgid "Analog Mono"
-msgstr "Analog Mono"
-
-#: ../src/modules/alsa/alsa-mixer.c:3757
-msgid "Analog Stereo"
-msgstr "Analog Stereo"
-
-#: ../src/modules/alsa/alsa-mixer.c:3758
-msgid "Analog Surround 2.1"
-msgstr "Analog Surround 2.1"
-
-#: ../src/modules/alsa/alsa-mixer.c:3759
-msgid "Analog Surround 3.0"
-msgstr "Analog Surround 3.0"
-
-#: ../src/modules/alsa/alsa-mixer.c:3760
-msgid "Analog Surround 3.1"
-msgstr "Analog Surround 3.1"
-
-#: ../src/modules/alsa/alsa-mixer.c:3761
-msgid "Analog Surround 4.0"
-msgstr "Analog Surround 4.0"
-
-#: ../src/modules/alsa/alsa-mixer.c:3762
-msgid "Analog Surround 4.1"
-msgstr "Analog Surround 4.1"
-
-#: ../src/modules/alsa/alsa-mixer.c:3763
-msgid "Analog Surround 5.0"
-msgstr "Analog Surround 5.0"
-
-#: ../src/modules/alsa/alsa-mixer.c:3764
-msgid "Analog Surround 5.1"
-msgstr "Analog Surround 5.1"
-
-#: ../src/modules/alsa/alsa-mixer.c:3765
-msgid "Analog Surround 6.0"
-msgstr "Analog Surround 6.0"
-
-#: ../src/modules/alsa/alsa-mixer.c:3766
-msgid "Analog Surround 6.1"
-msgstr "Analog Surround 6.1"
-
-#: ../src/modules/alsa/alsa-mixer.c:3767
-msgid "Analog Surround 7.0"
-msgstr "Analog Surround 7.0"
-
-#: ../src/modules/alsa/alsa-mixer.c:3768
-msgid "Analog Surround 7.1"
-msgstr "Analog Surround 7.1"
-
-#: ../src/modules/alsa/alsa-mixer.c:3769
-msgid "Digital Stereo (IEC958)"
-msgstr "Digital Stereo (IEC958)"
-
-#: ../src/modules/alsa/alsa-mixer.c:3770
-#, fuzzy
-msgid "Digital Passthrough  (IEC958)"
-msgstr "Digital Stereo (IEC958)"
-
-#: ../src/modules/alsa/alsa-mixer.c:3771
-msgid "Digital Surround 4.0 (IEC958/AC3)"
-msgstr "Digital Surround 4.0 (IEC958/AC3)"
-
-#: ../src/modules/alsa/alsa-mixer.c:3772
-msgid "Digital Surround 5.1 (IEC958/AC3)"
-msgstr "Digital Surround 5.1 (IEC958/AC3)"
-
-#: ../src/modules/alsa/alsa-mixer.c:3773
-msgid "Digital Stereo (HDMI)"
-msgstr "Digital Stereo (HDMI)"
-
-#: ../src/modules/alsa/alsa-mixer.c:3774
-#, fuzzy
-msgid "Digital Surround 5.1 (HDMI)"
-msgstr "Digital Surround 5.1 (IEC958/AC3)"
-
-#: ../src/modules/alsa/alsa-mixer.c:3895
-msgid "Analog Mono Duplex"
-msgstr "Analog Mono Duplex"
-
-#: ../src/modules/alsa/alsa-mixer.c:3896
-msgid "Analog Stereo Duplex"
-msgstr "Analog Stereo Duplex"
+msgid "Sink: %s\n"
+msgstr "Δέκτης: %s\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:3897
-msgid "Digital Stereo Duplex (IEC958)"
-msgstr "Digital Stereo Duplex (IEC958)"
+#: ../src/utils/pax11publish.c:118
+#, c-format
+msgid "Cookie: %s\n"
+msgstr "Μπισκότο: %s\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:3997
+#: ../src/utils/pax11publish.c:136
 #, c-format
-msgid "%s Output"
-msgstr ""
+msgid "Failed to parse cookie data\n"
+msgstr "Αποτυχία ανάλυσης δεδομένων μπισκότου\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:4005
+#: ../src/utils/pax11publish.c:141
 #, c-format
-msgid "%s Input"
-msgstr ""
+msgid "Failed to save cookie data\n"
+msgstr "Αποτυχία αποθήκευσης δεδομένων μπισκότου\n"
 
-#: ../src/modules/echo-cancel/module-echo-cancel.c:63
-msgid ""
-"source_name=<name for the source> source_properties=<properties for the "
-"source> source_master=<name of source to filter> sink_name=<name for the "
-"sink> sink_properties=<properties for the sink> sink_master=<name of sink to "
-"filter> adjust_time=<how often to readjust rates in s> adjust_threshold=<how "
-"much drift to readjust after in ms> format=<sample format> rate=<sample "
-"rate> channels=<number of channels> channel_map=<channel map> "
-"aec_method=<implementation to use> aec_args=<parameters for the AEC engine> "
-"save_aec=<save AEC data in /tmp> autoloaded=<set if this module is being "
-"loaded automatically> use_volume_sharing=<yes or no> "
-msgstr ""
+#: ../src/utils/pax11publish.c:156
+#, c-format
+msgid "Failed to load client configuration file.\n"
+msgstr "Αποτυχία φόρτωσης αρχείου ρυθμίσεων πελάτη.\n"
 
-#: ../src/modules/module-equalizer-sink.c:72
-msgid "General Purpose Equalizer"
-msgstr ""
+#: ../src/utils/pax11publish.c:161
+#, c-format
+msgid "Failed to read environment configuration data.\n"
+msgstr "Αποτυχία ανάγνωσης δεδομένων διαμόρφωσης περιβάλλοντος.\n"
 
-#: ../src/modules/module-equalizer-sink.c:76
-msgid ""
-"sink_name=<name of the sink> sink_properties=<properties for the sink> "
-"sink_master=<sink to connect to> format=<sample format> rate=<sample rate> "
-"channels=<number of channels> channel_map=<channel map> autoloaded=<set if "
-"this module is being loaded automatically> use_volume_sharing=<yes or no> "
-msgstr ""
+#: ../src/utils/pax11publish.c:178
+#, c-format
+msgid "Failed to get FQDN.\n"
+msgstr "Αποτυχία λήψης FQDN.\n"
 
-#: ../src/modules/module-filter-apply.c:48
-msgid "autoclean=<automatically unload unused filters?>"
-msgstr ""
+#: ../src/utils/pax11publish.c:198
+#, c-format
+msgid "Failed to load cookie data\n"
+msgstr "Αποτυχία φόρτωσης δεδομένων μπισκότου\n"
 
-#: ../src/tests/resampler-test.c:257
+#: ../src/utils/pax11publish.c:216
 #, c-format
-msgid ""
-"%s [options]\n"
-"\n"
-"-h, --help                            Show this help\n"
-"-v, --verbose                         Print debug messages\n"
-"      --from-rate=SAMPLERATE          From sample rate in Hz (defaults to "
-"44100)\n"
-"      --from-format=SAMPLEFORMAT      From sample type (defaults to s16le)\n"
-"      --from-channels=CHANNELS        From number of channels (defaults to "
-"1)\n"
-"      --to-rate=SAMPLERATE            To sample rate in Hz (defaults to "
-"44100)\n"
-"      --to-format=SAMPLEFORMAT        To sample type (defaults to s16le)\n"
-"      --to-channels=CHANNELS          To number of channels (defaults to 1)\n"
-"      --resample-method=METHOD        Resample method (defaults to auto)\n"
-"      --seconds=SECONDS               From stream duration (defaults to 60)\n"
-"\n"
-"If the formats are not specified, the test performs all formats "
-"combinations,\n"
-"back and forth.\n"
-"\n"
-"Sample type must be one of s16le, s16be, u8, float32le, float32be, ulaw, "
-"alaw,\n"
-"32le, s32be (defaults to s16ne)\n"
-"\n"
-"See --dump-resample-methods for possible values of resample methods.\n"
-msgstr ""
+msgid "Not yet implemented.\n"
+msgstr "Δεν έχει υλοποιηθεί ακόμα.\n"
 
-#: ../src/tests/resampler-test.c:356
-#, fuzzy, c-format
-msgid "%s %s\n"
-msgstr "%s %s"
+#~ msgid "PulseAudio Sound System KDE Routing Policy"
+#~ msgstr "Η πολιτική δρομολόγησης KDE συστήματος ήχου PulseAudio"
 
-#: ../src/tests/resampler-test.c:419
-#, c-format
-msgid "=== %d seconds: %d Hz %d ch (%s) -> %d Hz %d ch (%s)"
-msgstr ""
+#~ msgid "Start the PulseAudio Sound System with KDE Routing Policy"
+#~ msgstr ""
+#~ "Εκκίνηση του συστήματος ήχου PulseAudio με πολιτική δρομολόγησης KDE"
+
+#~ msgid "Failed to open configuration file '%s': %s"
+#~ msgstr "Αποτυχία ανοίγματος αρχείου ρυθμίσεων '%s': %s"
 
 #~ msgid "%s+%s"
 #~ msgstr "%s+%s"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 5a110ca..f425228 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1,17 +1,17 @@
 # Brazilian Portuguese translation of pulseaudio
-# Copyright (C) 2013 freedesktop.org
+# Copyright (C) 2014 freedesktop.org
 # This file is distributed under the same license as the pulseaudio package.
 # Fabian Affolter <fab at fedoraproject.org>, 2008.
 # Igor Pires Soares <igor at projetofedora.org>, 2009, 2012.
-# Rafael Ferreira Fontenelle <rafael.f.f1 at gmail.com>, 2013.
+# Rafael Ferreira Fontenelle <rafael.f.f1 at gmail.com>, 2013, 2014.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: pulseaudio\n"
 "Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?"
 "product=PulseAudio&keywords=I18N+L10N&component=misc\n"
-"POT-Creation-Date: 2013-10-08 14:25+0000\n"
-"PO-Revision-Date: 2013-10-08 15:31-0300\n"
+"POT-Creation-Date: 2014-06-24 22:12+0000\n"
+"PO-Revision-Date: 2014-07-21 09:26-0300\n"
 "Last-Translator: Rafael Ferreira <rafael.f.f1 at gmail.com>\n"
 "Language-Team: Brazilian Portuguese <gnome-pt_br-list at gnome.org>\n"
 "Language: pt_BR\n"
@@ -19,7 +19,7 @@ msgstr ""
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Poedit 1.5.7\n"
+"X-Generator: Poedit 1.6.5\n"
 
 #: ../src/daemon/caps.c:54
 msgid "Cleaning up privileges."
@@ -67,7 +67,7 @@ msgid ""
 "and\n"
 "                                        this time passed\n"
 "      --log-level[=LEVEL]               Increase or set verbosity level\n"
-"  -v                                    Increase the verbosity level\n"
+"  -v  --verbose                         Increase the verbosity level\n"
 "      --log-target={auto,syslog,stderr,file:PATH,newfile:PATH}\n"
 "                                        Specify the log target\n"
 "      --log-meta[=BOOL]                 Include code location in log "
@@ -127,7 +127,7 @@ msgstr ""
 "                                        com RLIMIT_NICE elevado)\n"
 "      --realtime[=BOOL]                 Tenta habilitar o escalonamento em\n"
 "                                        tempo real (disponível apenas como\n"
-"                                        root, quando SUID ou com "
+"                                        root quando SUID ou com "
 "RLIMIT_RTPRIO\n"
 "                                        elevado)\n"
 "      --disallow-module-loading[=BOOL]  Não permite carga/descarga de "
@@ -148,7 +148,7 @@ msgstr ""
 "                                        este tempo foi decorrido\n"
 "      --log-level[=NÍVEL]               Aumenta ou define grau de "
 "detalhamento\n"
-"  -v                                    Aumenta o nível de detalhamento\n"
+"  -v  --verbose                         Aumenta o nível de detalhamento\n"
 "      --log-target={auto,syslog,stderr,file:CAMINHO,newfile:CAMINHO}\n"
 "                                        Especifica o destino do log\n"
 "      --log-meta[=BOOL]                 Inclui a localização do código na\n"
@@ -175,7 +175,7 @@ msgstr ""
 "                                        compartilhada.\n"
 "\n"
 "SCRIPT DE INICIALIZAÇÃO:\n"
-"  -L, --load=\"ARGUMENTOS DO MÓDULO\"   Carrega um plug-in especificado com\n"
+"  -L, --load=\"ARGUMENTOS DO MÓDULO\"     Carrega um plug-in especificado com\n"
 "                                        o argumento especificado\n"
 "  -F, --file=NOME_DO_ARQUIVO            Executa o script especificado\n"
 "  -C                                    Abre uma linha de comando no TTY em\n"
@@ -220,7 +220,15 @@ msgstr "--disallow-exit espera um argumento booleano"
 msgid "--use-pid-file expects boolean argument"
 msgstr "--use-pid-file espera argumento booleano"
 
-#: ../src/daemon/cmdline.c:326
+#: ../src/daemon/cmdline.c:327
+msgid ""
+"Invalid log target: use either 'syslog', 'journal','stderr' or 'auto' or a "
+"valid file name 'file:<path>', 'newfile:<path>'."
+msgstr ""
+"Alvo de log inválido: use \"syslog\", \"journal\", \"stderr\" ou \"auto\" um "
+"nome de arquivo válido \"file:<caminho>\", \"newfile:<caminho>\"."
+
+#: ../src/daemon/cmdline.c:329
 msgid ""
 "Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file "
 "name 'file:<path>', 'newfile:<path>'."
@@ -228,28 +236,28 @@ msgstr ""
 "Alvo de log inválido: use \"syslog\", \"stderr\" ou \"auto\" um nome de "
 "arquivo válido \"file:<caminho>\", \"newfile:<caminho>\"."
 
-#: ../src/daemon/cmdline.c:333
+#: ../src/daemon/cmdline.c:337
 msgid "--log-time expects boolean argument"
 msgstr "--log-time espera um argumento booleano"
 
-#: ../src/daemon/cmdline.c:341
+#: ../src/daemon/cmdline.c:345
 msgid "--log-meta expects boolean argument"
 msgstr "--log-meta espera um argumento booleano"
 
-#: ../src/daemon/cmdline.c:361
+#: ../src/daemon/cmdline.c:365
 #, c-format
 msgid "Invalid resample method '%s'."
 msgstr "Método de reamostragem inválido \"%s\"."
 
-#: ../src/daemon/cmdline.c:368
+#: ../src/daemon/cmdline.c:372
 msgid "--system expects boolean argument"
 msgstr "--system espera argumento booleano"
 
-#: ../src/daemon/cmdline.c:376
+#: ../src/daemon/cmdline.c:380
 msgid "--no-cpu-limit expects boolean argument"
 msgstr "--no-cpu-limit espera argumento booleano"
 
-#: ../src/daemon/cmdline.c:384
+#: ../src/daemon/cmdline.c:388
 msgid "--disable-shm expects boolean argument"
 msgstr "--disable-shm espera argumento booleano"
 
@@ -278,47 +286,47 @@ msgstr "[%s:%u] rlimit inválido \"%s\"."
 msgid "[%s:%u] Invalid sample format '%s'."
 msgstr "[%s:%u] Formato de amostragem inválido \"%s\"."
 
-#: ../src/daemon/daemon-conf.c:350 ../src/daemon/daemon-conf.c:368
+#: ../src/daemon/daemon-conf.c:349 ../src/daemon/daemon-conf.c:366
 #, c-format
 msgid "[%s:%u] Invalid sample rate '%s'."
 msgstr "[%s:%u] Taxa de amostragem inválida \"%s\"."
 
-#: ../src/daemon/daemon-conf.c:391
+#: ../src/daemon/daemon-conf.c:389
 #, c-format
 msgid "[%s:%u] Invalid sample channels '%s'."
 msgstr "[%s:%u] Canais de amostragem inválidos \"%s\"."
 
-#: ../src/daemon/daemon-conf.c:408
+#: ../src/daemon/daemon-conf.c:406
 #, c-format
 msgid "[%s:%u] Invalid channel map '%s'."
 msgstr "[%s:%u] Mapa de canais inválido \"%s\"."
 
-#: ../src/daemon/daemon-conf.c:425
+#: ../src/daemon/daemon-conf.c:423
 #, c-format
 msgid "[%s:%u] Invalid number of fragments '%s'."
 msgstr "[%s:%u] Números de fragmentos inválidos \"%s\"."
 
-#: ../src/daemon/daemon-conf.c:442
+#: ../src/daemon/daemon-conf.c:440
 #, c-format
 msgid "[%s:%u] Invalid fragment size '%s'."
 msgstr "[%s:%u] Tamanho de fragmentos inválido \"%s\"."
 
-#: ../src/daemon/daemon-conf.c:459
+#: ../src/daemon/daemon-conf.c:457
 #, c-format
 msgid "[%s:%u] Invalid nice level '%s'."
 msgstr "[%s:%u] Número de nice inválido \"%s\"."
 
-#: ../src/daemon/daemon-conf.c:502
+#: ../src/daemon/daemon-conf.c:500
 #, c-format
 msgid "[%s:%u] Invalid server type '%s'."
 msgstr "[%s:%u] Tipo de servidor inválido \"%s\"."
 
-#: ../src/daemon/daemon-conf.c:615
+#: ../src/daemon/daemon-conf.c:613
 #, c-format
 msgid "Failed to open configuration file: %s"
 msgstr "Falha em abrir o arquivo de configuração: %s"
 
-#: ../src/daemon/daemon-conf.c:631
+#: ../src/daemon/daemon-conf.c:629
 msgid ""
 "The specified default channel map has a different number of channels than "
 "the specified default number of channels."
@@ -326,7 +334,7 @@ msgstr ""
 "O mapa padrão dos canais especificado tem um número diferente de canais do "
 "que o número de canais padrão especificado."
 
-#: ../src/daemon/daemon-conf.c:718
+#: ../src/daemon/daemon-conf.c:716
 #, c-format
 msgid "### Read from configuration file: %s ###\n"
 msgstr "### Lido do arquivo de configuração: %s ###\n"
@@ -393,78 +401,78 @@ msgstr "Falha ao alocar o novo carregador dl."
 msgid "Failed to add bind-now-loader."
 msgstr "Falha ao adicionar o bind-now-loader."
 
-#: ../src/daemon/main.c:139
+#: ../src/daemon/main.c:115
 #, c-format
 msgid "Got signal %s."
 msgstr "Sinal %s recebido."
 
-#: ../src/daemon/main.c:166
+#: ../src/daemon/main.c:142
 msgid "Exiting."
 msgstr "Saindo."
 
-#: ../src/daemon/main.c:184
+#: ../src/daemon/main.c:160
 #, c-format
 msgid "Failed to find user '%s'."
 msgstr "Falha ao localizar o usuário \"%s\"."
 
-#: ../src/daemon/main.c:189
+#: ../src/daemon/main.c:165
 #, c-format
 msgid "Failed to find group '%s'."
 msgstr "Falha ao localizar o grupo \"%s\"."
 
-#: ../src/daemon/main.c:193
+#: ../src/daemon/main.c:169
 #, c-format
 msgid "Found user '%s' (UID %lu) and group '%s' (GID %lu)."
 msgstr "Usuário \"%s\" (UID %lu) e grupo \"%s\" (GID %lu) localizados."
 
-#: ../src/daemon/main.c:198
+#: ../src/daemon/main.c:174
 #, c-format
 msgid "GID of user '%s' and of group '%s' don't match."
 msgstr "O GID do usuário \"%s\" e do grupo \"%s\" não combinam."
 
-#: ../src/daemon/main.c:203
+#: ../src/daemon/main.c:179
 #, c-format
 msgid "Home directory of user '%s' is not '%s', ignoring."
 msgstr "O diretório pessoal do usuário \"%s\" não é \"%s\", ignorando."
 
-#: ../src/daemon/main.c:206 ../src/daemon/main.c:211
+#: ../src/daemon/main.c:182 ../src/daemon/main.c:187
 #, c-format
 msgid "Failed to create '%s': %s"
 msgstr "Falha ao criar \"%s\": %s"
 
-#: ../src/daemon/main.c:218
+#: ../src/daemon/main.c:194
 #, c-format
 msgid "Failed to change group list: %s"
 msgstr "Falha ao alterar a lista de grupos: %s"
 
-#: ../src/daemon/main.c:234
+#: ../src/daemon/main.c:210
 #, c-format
 msgid "Failed to change GID: %s"
 msgstr "Falha ao alterar o GID: %s"
 
-#: ../src/daemon/main.c:250
+#: ../src/daemon/main.c:226
 #, c-format
 msgid "Failed to change UID: %s"
 msgstr "Falha ao alterar o UID: %s"
 
-#: ../src/daemon/main.c:271
+#: ../src/daemon/main.c:247
 msgid "Successfully changed user to \""
 msgstr "Usuário alterado com sucesso para \""
 
-#: ../src/daemon/main.c:279
+#: ../src/daemon/main.c:255
 msgid "System wide mode unsupported on this platform."
 msgstr "O modo ampliado do sistema não tem suporte nessa plataforma."
 
-#: ../src/daemon/main.c:297
+#: ../src/daemon/main.c:273
 #, c-format
 msgid "setrlimit(%s, (%u, %u)) failed: %s"
 msgstr "setrlimit(%s, (%u, %u)) falhou: %s"
 
-#: ../src/daemon/main.c:498
+#: ../src/daemon/main.c:466
 msgid "Failed to parse command line."
 msgstr "Falha ao analisar a linha de comando."
 
-#: ../src/daemon/main.c:537
+#: ../src/daemon/main.c:505
 msgid ""
 "System mode refused for non-root user. Only starting the D-Bus server lookup "
 "service."
@@ -472,21 +480,21 @@ msgstr ""
 "Modo de sistema recusado para usuário não root. Apenas iniciando o serviço D-"
 "Bus de procura de servidores."
 
-#: ../src/daemon/main.c:619
+#: ../src/daemon/main.c:587
 msgid "Daemon not running"
 msgstr "O daemon não está em execução"
 
-#: ../src/daemon/main.c:621
+#: ../src/daemon/main.c:589
 #, c-format
 msgid "Daemon running as PID %u"
 msgstr "Daemon executando como PID %u"
 
-#: ../src/daemon/main.c:636
+#: ../src/daemon/main.c:604
 #, c-format
 msgid "Failed to kill daemon: %s"
 msgstr "Falha ao encerrar o daemon: %s"
 
-#: ../src/daemon/main.c:665
+#: ../src/daemon/main.c:633
 msgid ""
 "This program is not intended to be run as root (unless --system is "
 "specified)."
@@ -494,20 +502,20 @@ msgstr ""
 "Este programa não é para ser executado como root (a não ser que --system "
 "seja especificado)."
 
-#: ../src/daemon/main.c:668
+#: ../src/daemon/main.c:636
 msgid "Root privileges required."
 msgstr "Privilégios de root requeridos."
 
-#: ../src/daemon/main.c:675
+#: ../src/daemon/main.c:643
 msgid "--start not supported for system instances."
 msgstr "--start não tem suporte para instâncias de sistemas."
 
-#: ../src/daemon/main.c:715
+#: ../src/daemon/main.c:683
 #, c-format
 msgid "User-configured server at %s, refusing to start/autospawn."
 msgstr "Servidor configurado por usuário em %s, recusando início/autogeração."
 
-#: ../src/daemon/main.c:721
+#: ../src/daemon/main.c:689
 #, c-format
 msgid ""
 "User-configured server at %s, which appears to be local. Probing deeper."
@@ -515,162 +523,162 @@ msgstr ""
 "Servidor configurado por usuário em %s, que aparece ser local. Sondando mais "
 "fundo."
 
-#: ../src/daemon/main.c:726
+#: ../src/daemon/main.c:694
 msgid "Running in system mode, but --disallow-exit not set!"
 msgstr "Executando no modo sistema, mas --disallow-exit não foi configurado!"
 
-#: ../src/daemon/main.c:729
+#: ../src/daemon/main.c:697
 msgid "Running in system mode, but --disallow-module-loading not set!"
 msgstr ""
 "Executando no modo sistema, mas --disallow-module-loading não foi "
 "configurado!"
 
-#: ../src/daemon/main.c:732
+#: ../src/daemon/main.c:700
 msgid "Running in system mode, forcibly disabling SHM mode!"
 msgstr "Executando no modo sistema, desabilitando forçadamente o modo SHM!"
 
-#: ../src/daemon/main.c:737
+#: ../src/daemon/main.c:705
 msgid "Running in system mode, forcibly disabling exit idle time!"
 msgstr ""
 "Executando no modo sistema, desabilitando forçadamente o exit idle time!"
 
-#: ../src/daemon/main.c:765
+#: ../src/daemon/main.c:733
 msgid "Failed to acquire stdio."
 msgstr "Falha em adquirir o stdio."
 
-#: ../src/daemon/main.c:771 ../src/daemon/main.c:838
+#: ../src/daemon/main.c:739 ../src/daemon/main.c:810
 #, c-format
 msgid "pipe() failed: %s"
 msgstr "pipe() falhou: %s"
 
-#: ../src/daemon/main.c:776 ../src/daemon/main.c:843
+#: ../src/daemon/main.c:744 ../src/daemon/main.c:815
 #, c-format
 msgid "fork() failed: %s"
 msgstr "O fork() falhou: %s"
 
-#: ../src/daemon/main.c:791 ../src/daemon/main.c:858 ../src/utils/pacat.c:569
+#: ../src/daemon/main.c:759 ../src/daemon/main.c:830 ../src/utils/pacat.c:569
 #, c-format
 msgid "read() failed: %s"
 msgstr "A operação read() falhou: %s"
 
-#: ../src/daemon/main.c:797
+#: ../src/daemon/main.c:765
 msgid "Daemon startup failed."
 msgstr "Falha na partida do daemon."
 
-#: ../src/daemon/main.c:799
+#: ../src/daemon/main.c:767
 msgid "Daemon startup successful."
 msgstr "Os daemons foram iniciados com sucesso."
 
-#: ../src/daemon/main.c:826
+#: ../src/daemon/main.c:798
 #, c-format
 msgid "setsid() failed: %s"
 msgstr "setsid() falhou: %s"
 
-#: ../src/daemon/main.c:911
+#: ../src/daemon/main.c:884
 #, c-format
 msgid "This is PulseAudio %s"
 msgstr "Este é o PulseAudio %s"
 
-#: ../src/daemon/main.c:912
+#: ../src/daemon/main.c:885
 #, c-format
 msgid "Compilation host: %s"
 msgstr "Máquina da compilação: %s"
 
-#: ../src/daemon/main.c:913 ../src/tests/resampler-test.c:418
+#: ../src/daemon/main.c:886 ../src/tests/resampler-test.c:418
 #, c-format
 msgid "Compilation CFLAGS: %s"
 msgstr "CFLAGS da compilação: %s"
 
-#: ../src/daemon/main.c:916
+#: ../src/daemon/main.c:889
 #, c-format
 msgid "Running on host: %s"
 msgstr "Executando no host: %s"
 
-#: ../src/daemon/main.c:919
+#: ../src/daemon/main.c:892
 #, c-format
 msgid "Found %u CPUs."
 msgstr "%u CPUs localizadas."
 
-#: ../src/daemon/main.c:921
+#: ../src/daemon/main.c:894
 #, c-format
 msgid "Page size is %lu bytes"
 msgstr "O tamanho da página é %lu bytes"
 
-#: ../src/daemon/main.c:924
+#: ../src/daemon/main.c:897
 msgid "Compiled with Valgrind support: yes"
 msgstr "Compilado com suporte do Valgrind: sim"
 
-#: ../src/daemon/main.c:926
+#: ../src/daemon/main.c:899
 msgid "Compiled with Valgrind support: no"
 msgstr "Compilado com suporte do Valgrind: não"
 
-#: ../src/daemon/main.c:929
+#: ../src/daemon/main.c:902
 #, c-format
 msgid "Running in valgrind mode: %s"
 msgstr "Executando em modo valgrind: %s"
 
-#: ../src/daemon/main.c:931
+#: ../src/daemon/main.c:904
 #, c-format
 msgid "Running in VM: %s"
 msgstr "Executando na VM: %s"
 
-#: ../src/daemon/main.c:934
+#: ../src/daemon/main.c:907
 msgid "Optimized build: yes"
 msgstr "Build otimizado: sim"
 
-#: ../src/daemon/main.c:936
+#: ../src/daemon/main.c:909
 msgid "Optimized build: no"
 msgstr "Build otimizado: não"
 
-#: ../src/daemon/main.c:940
+#: ../src/daemon/main.c:913
 msgid "NDEBUG defined, all asserts disabled."
 msgstr "NDEBUG definido, todas as declarações desabilitadas."
 
-#: ../src/daemon/main.c:942
+#: ../src/daemon/main.c:915
 msgid "FASTPATH defined, only fast path asserts disabled."
 msgstr ""
 "FASTPATH definido, somente as declarações do \"fast path\" foram "
 "desabilitadas."
 
-#: ../src/daemon/main.c:944
+#: ../src/daemon/main.c:917
 msgid "All asserts enabled."
 msgstr "Todas as declarações habilitadas."
 
-#: ../src/daemon/main.c:948
+#: ../src/daemon/main.c:921
 msgid "Failed to get machine ID"
 msgstr "Falha ao obter o ID da máquina"
 
-#: ../src/daemon/main.c:951
+#: ../src/daemon/main.c:924
 #, c-format
 msgid "Machine ID is %s."
 msgstr "O ID da máquina é %s."
 
-#: ../src/daemon/main.c:955
+#: ../src/daemon/main.c:928
 #, c-format
 msgid "Session ID is %s."
 msgstr "O ID da sessão é %s."
 
-#: ../src/daemon/main.c:961
+#: ../src/daemon/main.c:934
 #, c-format
 msgid "Using runtime directory %s."
 msgstr "Usando o diretório de runtime %s."
 
-#: ../src/daemon/main.c:966
+#: ../src/daemon/main.c:939
 #, c-format
 msgid "Using state directory %s."
 msgstr "Usando o diretório de estado %s."
 
-#: ../src/daemon/main.c:969
+#: ../src/daemon/main.c:942
 #, c-format
 msgid "Using modules directory %s."
 msgstr "Usando o diretório de módulos %s."
 
-#: ../src/daemon/main.c:971
+#: ../src/daemon/main.c:944
 #, c-format
 msgid "Running in system mode: %s"
 msgstr "Executando em modo do sistema: %s"
 
-#: ../src/daemon/main.c:974
+#: ../src/daemon/main.c:947
 msgid ""
 "OK, so you are running PA in system mode. Please note that you most likely "
 "shouldn't be doing that.\n"
@@ -686,15 +694,15 @@ msgstr ""
 "Por favor, leia o http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode para "
 "obter um explicação sobre porque o modo de sistema é uma má ideia."
 
-#: ../src/daemon/main.c:991
+#: ../src/daemon/main.c:964
 msgid "pa_pid_file_create() failed."
 msgstr "pa_pid_file_create() falhou."
 
-#: ../src/daemon/main.c:1001
+#: ../src/daemon/main.c:974
 msgid "Fresh high-resolution timers available! Bon appetit!"
 msgstr "Timers de alta resolução fresquinhos disponíveis! Bon appetit!"
 
-#: ../src/daemon/main.c:1003
+#: ../src/daemon/main.c:976
 msgid ""
 "Dude, your kernel stinks! The chef's recommendation today is Linux with high-"
 "resolution timers enabled!"
@@ -702,28 +710,28 @@ msgstr ""
 "Cara, seu kernel fede! A recomendação do chef hoje é Linux com timers de "
 "alta resolução habilitados!"
 
-#: ../src/daemon/main.c:1021
+#: ../src/daemon/main.c:994
 msgid "pa_core_new() failed."
 msgstr "pa_core_new() falhou."
 
-#: ../src/daemon/main.c:1099
+#: ../src/daemon/main.c:1068
 msgid "Failed to initialize daemon."
 msgstr "Falha em iniciar o daemon."
 
-#: ../src/daemon/main.c:1104
+#: ../src/daemon/main.c:1073
 msgid "Daemon startup without any loaded modules, refusing to work."
 msgstr ""
 "O Daemon iniciou sem qualquer módulo carregado, recusando-se a trabalhar."
 
-#: ../src/daemon/main.c:1142
+#: ../src/daemon/main.c:1111
 msgid "Daemon startup complete."
 msgstr "A inicialização do daemon foi concluída."
 
-#: ../src/daemon/main.c:1148
+#: ../src/daemon/main.c:1117
 msgid "Daemon shutdown initiated."
 msgstr "O encerramento do daemon foi iniciado."
 
-#: ../src/daemon/main.c:1179
+#: ../src/daemon/main.c:1143
 msgid "Daemon terminated."
 msgstr "Daemon terminado."
 
@@ -735,269 +743,261 @@ msgstr "Sistema de som PulseAudio"
 msgid "Start the PulseAudio Sound System"
 msgstr "Iniciar o sistema de som PulseAudio"
 
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:1
-msgid "PulseAudio Sound System KDE Routing Policy"
-msgstr "Política de roteamento do KDE para Sistema de som PulseAudio"
-
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:2
-msgid "Start the PulseAudio Sound System with KDE Routing Policy"
-msgstr "Iniciar o sistema de som PulseAudio com política de roteamento do KDE"
-
-#: ../src/modules/alsa/alsa-mixer.c:2250
+#: ../src/modules/alsa/alsa-mixer.c:2251
 msgid "Input"
 msgstr "Entrada"
 
-#: ../src/modules/alsa/alsa-mixer.c:2251
+#: ../src/modules/alsa/alsa-mixer.c:2252
 msgid "Docking Station Input"
 msgstr "Entrada da base de encaixe"
 
-#: ../src/modules/alsa/alsa-mixer.c:2252
+#: ../src/modules/alsa/alsa-mixer.c:2253
 msgid "Docking Station Microphone"
 msgstr "Microfone de estação de base de encaixe"
 
-#: ../src/modules/alsa/alsa-mixer.c:2253
+#: ../src/modules/alsa/alsa-mixer.c:2254
 msgid "Docking Station Line In"
 msgstr "Entrada de linha de estação de base de encaixe"
 
-#: ../src/modules/alsa/alsa-mixer.c:2254 ../src/modules/alsa/alsa-mixer.c:2339
+#: ../src/modules/alsa/alsa-mixer.c:2255 ../src/modules/alsa/alsa-mixer.c:2340
 msgid "Line In"
 msgstr "Entrada de linha"
 
-#: ../src/modules/alsa/alsa-mixer.c:2255 ../src/modules/alsa/alsa-mixer.c:2333
-#: ../src/modules/bluetooth/module-bluez4-device.c:2097
-#: ../src/modules/bluetooth/module-bluez5-device.c:1447
+#: ../src/modules/alsa/alsa-mixer.c:2256 ../src/modules/alsa/alsa-mixer.c:2334
+#: ../src/modules/bluetooth/module-bluez4-device.c:2101
+#: ../src/modules/bluetooth/module-bluez5-device.c:1446
 msgid "Microphone"
 msgstr "Microfone"
 
-#: ../src/modules/alsa/alsa-mixer.c:2256 ../src/modules/alsa/alsa-mixer.c:2334
+#: ../src/modules/alsa/alsa-mixer.c:2257 ../src/modules/alsa/alsa-mixer.c:2335
 msgid "Front Microphone"
 msgstr "Microfone frontal"
 
-#: ../src/modules/alsa/alsa-mixer.c:2257 ../src/modules/alsa/alsa-mixer.c:2335
+#: ../src/modules/alsa/alsa-mixer.c:2258 ../src/modules/alsa/alsa-mixer.c:2336
 msgid "Rear Microphone"
 msgstr "Microfone posterior"
 
-#: ../src/modules/alsa/alsa-mixer.c:2258
+#: ../src/modules/alsa/alsa-mixer.c:2259
 msgid "External Microphone"
 msgstr "Microfone externo"
 
-#: ../src/modules/alsa/alsa-mixer.c:2259 ../src/modules/alsa/alsa-mixer.c:2337
+#: ../src/modules/alsa/alsa-mixer.c:2260 ../src/modules/alsa/alsa-mixer.c:2338
 msgid "Internal Microphone"
 msgstr "Microfone interno"
 
-#: ../src/modules/alsa/alsa-mixer.c:2260 ../src/modules/alsa/alsa-mixer.c:2340
+#: ../src/modules/alsa/alsa-mixer.c:2261 ../src/modules/alsa/alsa-mixer.c:2341
 msgid "Radio"
 msgstr "Rádio"
 
-#: ../src/modules/alsa/alsa-mixer.c:2261 ../src/modules/alsa/alsa-mixer.c:2341
+#: ../src/modules/alsa/alsa-mixer.c:2262 ../src/modules/alsa/alsa-mixer.c:2342
 msgid "Video"
 msgstr "Vídeo"
 
 # https://pt.wikipedia.org/wiki/Controle_autom%C3%A1tico_de_ganho
-#: ../src/modules/alsa/alsa-mixer.c:2262
+#: ../src/modules/alsa/alsa-mixer.c:2263
 msgid "Automatic Gain Control"
 msgstr "Controle automático de ganho"
 
 # https://pt.wikipedia.org/wiki/Controle_autom%C3%A1tico_de_ganho
-#: ../src/modules/alsa/alsa-mixer.c:2263
+#: ../src/modules/alsa/alsa-mixer.c:2264
 msgid "No Automatic Gain Control"
 msgstr "Sem controle automático de ganho"
 
 # Este contexto de Boost é "reforço" no áudio, e não "impulso".
-#: ../src/modules/alsa/alsa-mixer.c:2264
+#: ../src/modules/alsa/alsa-mixer.c:2265
 msgid "Boost"
 msgstr "Reforço"
 
 # Este contexto de Boost é "reforço" no áudio, e não "impulso".
-#: ../src/modules/alsa/alsa-mixer.c:2265
+#: ../src/modules/alsa/alsa-mixer.c:2266
 msgid "No Boost"
 msgstr "Sem reforço"
 
-#: ../src/modules/alsa/alsa-mixer.c:2266
+#: ../src/modules/alsa/alsa-mixer.c:2267
 msgid "Amplifier"
 msgstr "Amplificador"
 
-#: ../src/modules/alsa/alsa-mixer.c:2267
+#: ../src/modules/alsa/alsa-mixer.c:2268
 msgid "No Amplifier"
 msgstr "Sem amplificador"
 
 # Este contexto de Boost é "reforço" no áudio, e não "impulso".
-#: ../src/modules/alsa/alsa-mixer.c:2268
+#: ../src/modules/alsa/alsa-mixer.c:2269
 msgid "Bass Boost"
 msgstr "Reforço de graves"
 
 # Este contexto de Boost é "reforço" no áudio, e não "impulso".
-#: ../src/modules/alsa/alsa-mixer.c:2269
+#: ../src/modules/alsa/alsa-mixer.c:2270
 msgid "No Bass Boost"
 msgstr "Sem reforço de graves"
 
-#: ../src/modules/alsa/alsa-mixer.c:2270
-#: ../src/modules/bluetooth/module-bluez4-device.c:2102
-#: ../src/modules/bluetooth/module-bluez5-device.c:1454
+#: ../src/modules/alsa/alsa-mixer.c:2271
+#: ../src/modules/bluetooth/module-bluez4-device.c:2106
+#: ../src/modules/bluetooth/module-bluez5-device.c:1453
 msgid "Speaker"
 msgstr "Auto-falante"
 
-#: ../src/modules/alsa/alsa-mixer.c:2271 ../src/modules/alsa/alsa-mixer.c:2343
+#: ../src/modules/alsa/alsa-mixer.c:2272 ../src/modules/alsa/alsa-mixer.c:2344
 msgid "Headphones"
 msgstr "Fones de ouvidos"
 
-#: ../src/modules/alsa/alsa-mixer.c:2332
+#: ../src/modules/alsa/alsa-mixer.c:2333
 msgid "Analog Input"
 msgstr "Entrada analógica"
 
-#: ../src/modules/alsa/alsa-mixer.c:2336
+#: ../src/modules/alsa/alsa-mixer.c:2337
 msgid "Dock Microphone"
 msgstr "Microfone de base de encaixe"
 
-#: ../src/modules/alsa/alsa-mixer.c:2338
+#: ../src/modules/alsa/alsa-mixer.c:2339
 msgid "Headset Microphone"
 msgstr "Microfone de headset"
 
-#: ../src/modules/alsa/alsa-mixer.c:2342
+#: ../src/modules/alsa/alsa-mixer.c:2343
 msgid "Analog Output"
 msgstr "Saída analógica"
 
-#: ../src/modules/alsa/alsa-mixer.c:2344
+#: ../src/modules/alsa/alsa-mixer.c:2345
 msgid "LFE on Separate Mono Output"
 msgstr "Saída monofônica separada em LFE"
 
-#: ../src/modules/alsa/alsa-mixer.c:2345
+#: ../src/modules/alsa/alsa-mixer.c:2346
 msgid "Line Out"
 msgstr "Saída de linha"
 
-#: ../src/modules/alsa/alsa-mixer.c:2346
+#: ../src/modules/alsa/alsa-mixer.c:2347
 msgid "Analog Mono Output"
 msgstr "Saída analógica monofônica"
 
-#: ../src/modules/alsa/alsa-mixer.c:2347
+#: ../src/modules/alsa/alsa-mixer.c:2348
 msgid "Speakers"
 msgstr "Alto-falantes"
 
-#: ../src/modules/alsa/alsa-mixer.c:2348
+#: ../src/modules/alsa/alsa-mixer.c:2349
 msgid "HDMI / DisplayPort"
 msgstr "HDMI / DisplayPort"
 
-#: ../src/modules/alsa/alsa-mixer.c:2349
+#: ../src/modules/alsa/alsa-mixer.c:2350
 msgid "Digital Output (S/PDIF)"
 msgstr "Saída digital (S/PDIF)"
 
-#: ../src/modules/alsa/alsa-mixer.c:2350
+#: ../src/modules/alsa/alsa-mixer.c:2351
 msgid "Digital Input (S/PDIF)"
 msgstr "Entrada digital (S/PDIF)"
 
-#: ../src/modules/alsa/alsa-mixer.c:2351
+#: ../src/modules/alsa/alsa-mixer.c:2352
 msgid "Digital Passthrough (S/PDIF)"
 msgstr "Conversor digital (S/PDIF)"
 
-#: ../src/modules/alsa/alsa-mixer.c:3806
+#: ../src/modules/alsa/alsa-mixer.c:3807
 msgid "Analog Mono"
 msgstr "Monofônico analógico"
 
-#: ../src/modules/alsa/alsa-mixer.c:3807
+#: ../src/modules/alsa/alsa-mixer.c:3808
 msgid "Analog Stereo"
 msgstr "Estéreo analógico"
 
-#: ../src/modules/alsa/alsa-mixer.c:3808
+#: ../src/modules/alsa/alsa-mixer.c:3809
 msgid "Analog Surround 2.1"
 msgstr "Surround analógico 2.1"
 
-#: ../src/modules/alsa/alsa-mixer.c:3809
+#: ../src/modules/alsa/alsa-mixer.c:3810
 msgid "Analog Surround 3.0"
 msgstr "Surround analógico 3.0"
 
-#: ../src/modules/alsa/alsa-mixer.c:3810
+#: ../src/modules/alsa/alsa-mixer.c:3811
 msgid "Analog Surround 3.1"
 msgstr "Surround analógico 3.1"
 
-#: ../src/modules/alsa/alsa-mixer.c:3811
+#: ../src/modules/alsa/alsa-mixer.c:3812
 msgid "Analog Surround 4.0"
 msgstr "Surround analógico 4.0"
 
-#: ../src/modules/alsa/alsa-mixer.c:3812
+#: ../src/modules/alsa/alsa-mixer.c:3813
 msgid "Analog Surround 4.1"
 msgstr "Surround analógico 4.1"
 
-#: ../src/modules/alsa/alsa-mixer.c:3813
+#: ../src/modules/alsa/alsa-mixer.c:3814
 msgid "Analog Surround 5.0"
 msgstr "Surround analógico 5.0"
 
-#: ../src/modules/alsa/alsa-mixer.c:3814
+#: ../src/modules/alsa/alsa-mixer.c:3815
 msgid "Analog Surround 5.1"
 msgstr "Surround analógico 5.1"
 
-#: ../src/modules/alsa/alsa-mixer.c:3815
+#: ../src/modules/alsa/alsa-mixer.c:3816
 msgid "Analog Surround 6.0"
 msgstr "Surround analógico 6.0"
 
-#: ../src/modules/alsa/alsa-mixer.c:3816
+#: ../src/modules/alsa/alsa-mixer.c:3817
 msgid "Analog Surround 6.1"
 msgstr "Surround analógico 6.1"
 
-#: ../src/modules/alsa/alsa-mixer.c:3817
+#: ../src/modules/alsa/alsa-mixer.c:3818
 msgid "Analog Surround 7.0"
 msgstr "Surround analógico 7.0"
 
-#: ../src/modules/alsa/alsa-mixer.c:3818
+#: ../src/modules/alsa/alsa-mixer.c:3819
 msgid "Analog Surround 7.1"
 msgstr "Surround analógico 7.1"
 
-#: ../src/modules/alsa/alsa-mixer.c:3819
+#: ../src/modules/alsa/alsa-mixer.c:3820
 msgid "Analog 4-channel Input"
 msgstr "Entrada analógica de 4 canais"
 
-#: ../src/modules/alsa/alsa-mixer.c:3820
+#: ../src/modules/alsa/alsa-mixer.c:3821
 msgid "Digital Stereo (IEC958)"
 msgstr "Estéreo digital (IEC958)"
 
-#: ../src/modules/alsa/alsa-mixer.c:3821
+#: ../src/modules/alsa/alsa-mixer.c:3822
 msgid "Digital Passthrough  (IEC958)"
 msgstr "Conversor digital (IEC958)"
 
-#: ../src/modules/alsa/alsa-mixer.c:3822
+#: ../src/modules/alsa/alsa-mixer.c:3823
 msgid "Digital Surround 4.0 (IEC958/AC3)"
 msgstr "Surround digital 4.0 (IEC958/AC3)"
 
-#: ../src/modules/alsa/alsa-mixer.c:3823
+#: ../src/modules/alsa/alsa-mixer.c:3824
 msgid "Digital Surround 5.1 (IEC958/AC3)"
 msgstr "Surround digital 5.1 (IEC958/AC3)"
 
-#: ../src/modules/alsa/alsa-mixer.c:3824
+#: ../src/modules/alsa/alsa-mixer.c:3825
 msgid "Digital Surround 5.1 (IEC958/DTS)"
 msgstr "Surround digital 5.1 (IEC958/DTS)"
 
-#: ../src/modules/alsa/alsa-mixer.c:3825
+#: ../src/modules/alsa/alsa-mixer.c:3826
 msgid "Digital Stereo (HDMI)"
 msgstr "Estéreo digital (HDMI)"
 
-#: ../src/modules/alsa/alsa-mixer.c:3826
+#: ../src/modules/alsa/alsa-mixer.c:3827
 msgid "Digital Surround 5.1 (HDMI)"
 msgstr "Surround digital 5.1 (HDMI)"
 
-#: ../src/modules/alsa/alsa-mixer.c:3955
+#: ../src/modules/alsa/alsa-mixer.c:3956
 msgid "Analog Mono Duplex"
 msgstr "Duplex monofônico analógico"
 
-#: ../src/modules/alsa/alsa-mixer.c:3956
+#: ../src/modules/alsa/alsa-mixer.c:3957
 msgid "Analog Stereo Duplex"
 msgstr "Duplex estéreo analógico"
 
-#: ../src/modules/alsa/alsa-mixer.c:3957
+#: ../src/modules/alsa/alsa-mixer.c:3958
 msgid "Digital Stereo Duplex (IEC958)"
 msgstr "Duplex estéreo digital (IEC958)"
 
-#: ../src/modules/alsa/alsa-mixer.c:3958
+#: ../src/modules/alsa/alsa-mixer.c:3959
 #: ../src/modules/alsa/module-alsa-card.c:193
-#: ../src/modules/bluetooth/module-bluez4-device.c:2293
-#: ../src/modules/bluetooth/module-bluez5-device.c:1652
+#: ../src/modules/bluetooth/module-bluez4-device.c:2297
+#: ../src/modules/bluetooth/module-bluez5-device.c:1649
 msgid "Off"
 msgstr "Desligado"
 
-#: ../src/modules/alsa/alsa-mixer.c:4057
+#: ../src/modules/alsa/alsa-mixer.c:4058
 #, c-format
 msgid "%s Output"
 msgstr "Saída de %s"
 
-#: ../src/modules/alsa/alsa-mixer.c:4065
+#: ../src/modules/alsa/alsa-mixer.c:4066
 #, c-format
 msgid "%s Input"
 msgstr "Entrada de %s"
@@ -1036,7 +1036,7 @@ msgstr ""
 "Nós fomos acordados com o conjunto POLLIN -- entretanto, a snd_pcm_avail() "
 "subsequente retornou 0 ou outro valor < min_avail."
 
-#: ../src/modules/alsa/alsa-util.c:1128 ../src/modules/alsa/alsa-util.c:1203
+#: ../src/modules/alsa/alsa-util.c:1135 ../src/modules/alsa/alsa-util.c:1210
 #, c-format
 msgid ""
 "snd_pcm_avail() returned a value that is exceptionally large: %lu bytes (%lu "
@@ -1049,7 +1049,7 @@ msgstr ""
 "É mais provável que isso seja um erro no driver \"%s\" do ALSA. Por favor, "
 "relate esse problema aos desenvolvedores do ALSA."
 
-#: ../src/modules/alsa/alsa-util.c:1178
+#: ../src/modules/alsa/alsa-util.c:1185
 #, c-format
 msgid ""
 "snd_pcm_delay() returned a value that is exceptionally large: %li bytes (%s"
@@ -1062,7 +1062,7 @@ msgstr ""
 "É mais provável que isso seja um erro no driver \"%s\" do ALSA. Por favor, "
 "relate esse problema aos desenvolvedores do ALSA."
 
-#: ../src/modules/alsa/alsa-util.c:1219
+#: ../src/modules/alsa/alsa-util.c:1226
 #, c-format
 msgid ""
 "snd_pcm_avail_delay() returned strange values: delay %lu is less than avail "
@@ -1075,7 +1075,7 @@ msgstr ""
 "É mais provável que isso seja um erro no driver \"%s\" do ALSA. Por favor, "
 "relate esse problema aos desenvolvedores do ALSA."
 
-#: ../src/modules/alsa/alsa-util.c:1262
+#: ../src/modules/alsa/alsa-util.c:1269
 #, c-format
 msgid ""
 "snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes "
@@ -1089,80 +1089,78 @@ msgstr ""
 "relate esse problema aos desenvolvedores do ALSA."
 
 # Fone de ouvido não se encaixa como tradução aqui, pois há ou pode haver microfone junto.
-#: ../src/modules/bluetooth/module-bluez4-device.c:2087
-#: ../src/modules/bluetooth/module-bluez5-device.c:1437
+#: ../src/modules/bluetooth/module-bluez4-device.c:2091
+#: ../src/modules/bluetooth/module-bluez5-device.c:1436
 msgid "Headset"
 msgstr "Headset"
 
 # Desconheço tradução comum para esta palavra.
-#: ../src/modules/bluetooth/module-bluez4-device.c:2092
-#: ../src/modules/bluetooth/module-bluez5-device.c:1442
+#: ../src/modules/bluetooth/module-bluez4-device.c:2096
+#: ../src/modules/bluetooth/module-bluez5-device.c:1441
 msgid "Handsfree"
 msgstr "Handsfree"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2107
-#: ../src/modules/bluetooth/module-bluez5-device.c:1460
+#: ../src/modules/bluetooth/module-bluez4-device.c:2111
+#: ../src/modules/bluetooth/module-bluez5-device.c:1459
 msgid "Headphone"
 msgstr "Fones de ouvido"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2112
-#: ../src/modules/bluetooth/module-bluez5-device.c:1465
+#: ../src/modules/bluetooth/module-bluez4-device.c:2116
+#: ../src/modules/bluetooth/module-bluez5-device.c:1464
 msgid "Portable"
 msgstr "Portátil"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2117
-#: ../src/modules/bluetooth/module-bluez5-device.c:1470
+#: ../src/modules/bluetooth/module-bluez4-device.c:2121
+#: ../src/modules/bluetooth/module-bluez5-device.c:1469
 msgid "Car"
 msgstr "Carro"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2122
-#: ../src/modules/bluetooth/module-bluez5-device.c:1475
+#: ../src/modules/bluetooth/module-bluez4-device.c:2126
+#: ../src/modules/bluetooth/module-bluez5-device.c:1474
 msgid "HiFi"
 msgstr "HiFi"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2127
-#: ../src/modules/bluetooth/module-bluez5-device.c:1480
+#: ../src/modules/bluetooth/module-bluez4-device.c:2131
+#: ../src/modules/bluetooth/module-bluez5-device.c:1479
 msgid "Phone"
 msgstr "Telefone"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2135
-#: ../src/modules/bluetooth/module-bluez5-device.c:1432
-#: ../src/modules/bluetooth/module-bluez5-device.c:1448
-#: ../src/modules/bluetooth/module-bluez5-device.c:1486
+#: ../src/modules/bluetooth/module-bluez4-device.c:2139
+#: ../src/modules/bluetooth/module-bluez5-device.c:1431
+#: ../src/modules/bluetooth/module-bluez5-device.c:1447
+#: ../src/modules/bluetooth/module-bluez5-device.c:1485
 msgid "Bluetooth Output"
 msgstr "Saída Bluetooth"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2138
-#: ../src/modules/bluetooth/module-bluez5-device.c:1431
-#: ../src/modules/bluetooth/module-bluez5-device.c:1453
-#: ../src/modules/bluetooth/module-bluez5-device.c:1459
-#: ../src/modules/bluetooth/module-bluez5-device.c:1485
+#: ../src/modules/bluetooth/module-bluez4-device.c:2142
+#: ../src/modules/bluetooth/module-bluez5-device.c:1430
+#: ../src/modules/bluetooth/module-bluez5-device.c:1452
+#: ../src/modules/bluetooth/module-bluez5-device.c:1458
+#: ../src/modules/bluetooth/module-bluez5-device.c:1484
 msgid "Bluetooth Input"
 msgstr "Entrada Bluetooth"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2174
+#: ../src/modules/bluetooth/module-bluez4-device.c:2178
 msgid "High Fidelity Playback (A2DP)"
 msgstr "Reprodução de alta fidelidade (A2DP)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2185
+#: ../src/modules/bluetooth/module-bluez4-device.c:2189
 msgid "High Fidelity Capture (A2DP)"
 msgstr "Captura de alta fidelidade (A2DP)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2196
+#: ../src/modules/bluetooth/module-bluez4-device.c:2200
 msgid "Telephony Duplex (HSP/HFP)"
 msgstr "Duplex telefônico (HSP/HFP)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2208
+#: ../src/modules/bluetooth/module-bluez4-device.c:2212
 msgid "Handsfree Gateway"
 msgstr "Gateway de handsfree"
 
-#. TODO: Change this profile's name to a2dp_sink, to reflect the remote
-#. * device's role and be consistent with the a2dp source profile
-#: ../src/modules/bluetooth/module-bluez5-device.c:1525
+#: ../src/modules/bluetooth/module-bluez5-device.c:1522
 msgid "High Fidelity Playback (A2DP Sink)"
 msgstr "Reprodução de alta fidelidade (Destino A2DP)"
 
-#: ../src/modules/bluetooth/module-bluez5-device.c:1536
+#: ../src/modules/bluetooth/module-bluez5-device.c:1533
 msgid "High Fidelity Capture (A2DP Source)"
 msgstr "Captura de alta fidelidade (Fonte A2DP)"
 
@@ -1272,14 +1270,14 @@ msgstr "Áudio em @HOSTNAME@"
 
 #. TODO: old tunnel put here the remote sink_name into stream name e.g. 'Null Output for lynxis at lazus'
 #. TODO: old tunnel put here the remote source_name into stream name e.g. 'Null Output for lynxis at lazus'
-#: ../src/modules/module-tunnel-sink-new.c:286
-#: ../src/modules/module-tunnel-source-new.c:287
+#: ../src/modules/module-tunnel-sink-new.c:293
+#: ../src/modules/module-tunnel-source-new.c:294
 #, c-format
 msgid "Tunnel for %s@%s"
 msgstr "Túnel para %s@%s"
 
-#: ../src/modules/module-tunnel-sink-new.c:474
-#: ../src/modules/module-tunnel-source-new.c:477
+#: ../src/modules/module-tunnel-sink-new.c:483
+#: ../src/modules/module-tunnel-source-new.c:485
 #, c-format
 msgid "Tunnel to %s/%s"
 msgstr "Túnel para %s/%s"
@@ -1306,7 +1304,7 @@ msgstr ""
 msgid "PulseAudio Sound Server"
 msgstr "Servidor de som PulseAudio"
 
-#: ../src/pulse/channelmap.c:105 ../src/pulse/channelmap.c:756
+#: ../src/pulse/channelmap.c:105 ../src/pulse/channelmap.c:760
 msgid "Mono"
 msgstr "Mono"
 
@@ -1510,84 +1508,103 @@ msgstr "Posterior superior esquerdo"
 msgid "Top Rear Right"
 msgstr "Posterior superior direito"
 
-#: ../src/pulse/channelmap.c:483 ../src/pulse/format.c:122
-#: ../src/pulse/sample.c:169 ../src/pulse/volume.c:297
-#: ../src/pulse/volume.c:323 ../src/pulse/volume.c:343
-#: ../src/pulse/volume.c:375 ../src/pulse/volume.c:415
-#: ../src/pulse/volume.c:434
+#: ../src/pulse/channelmap.c:481 ../src/pulse/format.c:123
+#: ../src/pulse/sample.c:177 ../src/pulse/volume.c:296
+#: ../src/pulse/volume.c:322 ../src/pulse/volume.c:342
+#: ../src/pulse/volume.c:374 ../src/pulse/volume.c:414
+#: ../src/pulse/volume.c:433
 msgid "(invalid)"
 msgstr "(Inválido)"
 
-#: ../src/pulse/channelmap.c:760
+#: ../src/pulse/channelmap.c:764
 msgid "Stereo"
 msgstr "Estéreo"
 
-#: ../src/pulse/channelmap.c:765
+#: ../src/pulse/channelmap.c:769
 msgid "Surround 4.0"
 msgstr "Surround 4.0"
 
-#: ../src/pulse/channelmap.c:771
+#: ../src/pulse/channelmap.c:775
 msgid "Surround 4.1"
 msgstr "Surround 4.1"
 
-#: ../src/pulse/channelmap.c:777
+#: ../src/pulse/channelmap.c:781
 msgid "Surround 5.0"
 msgstr "Surround 5.0"
 
-#: ../src/pulse/channelmap.c:783
+#: ../src/pulse/channelmap.c:787
 msgid "Surround 5.1"
 msgstr "Surround 5.1"
 
-#: ../src/pulse/channelmap.c:790
+#: ../src/pulse/channelmap.c:794
 msgid "Surround 7.1"
 msgstr "Surround 7.1"
 
-#: ../src/pulse/client-conf.c:119
-#, c-format
-msgid "Failed to open configuration file '%s': %s"
-msgstr "Falha em abrir o arquivo de configuração \"%s\": %s"
-
-#: ../src/pulse/client-conf.c:213 ../src/pulse/client-conf-x11.c:95
-msgid "Failed to parse cookie data"
-msgstr "Falha ao analisar os dados do cookie"
-
-#: ../src/pulse/client-conf-x11.c:54 ../src/utils/pax11publish.c:99
+#: ../src/pulse/client-conf-x11.c:55 ../src/utils/pax11publish.c:99
 msgid "xcb_connect() failed"
 msgstr "xcb_connect() falhou"
 
-#: ../src/pulse/client-conf-x11.c:59 ../src/utils/pax11publish.c:104
+#: ../src/pulse/client-conf-x11.c:60 ../src/utils/pax11publish.c:104
 msgid "xcb_connection_has_error() returned true"
 msgstr "xcb_connection_has_error() retornou verdadeiro"
 
-#: ../src/pulse/context.c:528
+#: ../src/pulse/client-conf-x11.c:96
+msgid "Failed to parse cookie data"
+msgstr "Falha ao analisar os dados do cookie"
+
+#: ../src/pulse/context.c:522
 msgid "No cookie loaded. Attempting to connect without."
 msgstr "Nenhum cookie foi carregado. Tentativa de conexão sem eles."
 
-#: ../src/pulse/context.c:609
+#: ../src/pulse/context.c:603
 #, c-format
 msgid "fork(): %s"
 msgstr "fork(): %s"
 
-#: ../src/pulse/context.c:664
+#: ../src/pulse/context.c:658
 #, c-format
 msgid "waitpid(): %s"
 msgstr "waitpid(): %s"
 
-#: ../src/pulse/context.c:1365
+#: ../src/pulse/context.c:1359
 #, c-format
 msgid "Received message for unknown extension '%s'"
 msgstr "Foi recebida uma mensagem para uma extensão desconhecida \"%s\""
 
-#: ../src/pulsecore/lock-autospawn.c:136 ../src/pulsecore/lock-autospawn.c:222
+#: ../src/pulse/direction.c:39
+msgid "input"
+msgstr "entrada"
+
+#: ../src/pulse/direction.c:41
+msgid "output"
+msgstr "saída"
+
+#: ../src/pulse/direction.c:43
+msgid "bidirectional"
+msgstr "bidirecional"
+
+#: ../src/pulse/direction.c:45
+msgid "invalid"
+msgstr "inválido"
+
+#: ../src/pulsecore/core-util.h:95
+msgid "yes"
+msgstr "sim"
+
+#: ../src/pulsecore/core-util.h:95
+msgid "no"
+msgstr "não"
+
+#: ../src/pulsecore/lock-autospawn.c:143 ../src/pulsecore/lock-autospawn.c:229
 msgid "Cannot access autospawn lock."
 msgstr "Não foi possível acessar a trava de autogeração."
 
-#: ../src/pulsecore/log.c:136
+#: ../src/pulsecore/log.c:155
 #, c-format
 msgid "Failed to open target file '%s'."
 msgstr "Falha ao abrir o arquivo alvo \"%s\"."
 
-#: ../src/pulsecore/log.c:159
+#: ../src/pulsecore/log.c:178
 #, c-format
 msgid ""
 "Tried to open target file '%s', '%s.1', '%s.2' ... '%s.%d', but all failed."
@@ -1595,15 +1612,15 @@ msgstr ""
 "Tentado abrir arquivo alvo \"%s\", \"%s.1\", \"%s.2\" ... \"%s.%d\", mas "
 "tudo falhou."
 
-#: ../src/pulsecore/log.c:580
+#: ../src/pulsecore/log.c:633
 msgid "Invalid log target."
 msgstr "Alvo do log inválido."
 
-#: ../src/pulsecore/sink.c:3475
+#: ../src/pulsecore/sink.c:3424
 msgid "Built-in Audio"
 msgstr "Áudio interno"
 
-#: ../src/pulsecore/sink.c:3480
+#: ../src/pulsecore/sink.c:3429
 msgid "Modem"
 msgstr "Modem"
 
@@ -1715,27 +1732,27 @@ msgstr "Erro de entrada/saída"
 msgid "Device or resource busy"
 msgstr "Dispositivo ou recurso ocupado"
 
-#: ../src/pulse/sample.c:171
+#: ../src/pulse/sample.c:179
 #, c-format
 msgid "%s %uch %uHz"
 msgstr "%s %uch %uHz"
 
-#: ../src/pulse/sample.c:183
+#: ../src/pulse/sample.c:191
 #, c-format
 msgid "%0.1f GiB"
 msgstr "%0.1f GB"
 
-#: ../src/pulse/sample.c:185
+#: ../src/pulse/sample.c:193
 #, c-format
 msgid "%0.1f MiB"
 msgstr "%0.1f MB"
 
-#: ../src/pulse/sample.c:187
+#: ../src/pulse/sample.c:195
 #, c-format
 msgid "%0.1f KiB"
 msgstr "%0.1f KB"
 
-#: ../src/pulse/sample.c:189
+#: ../src/pulse/sample.c:197
 #, c-format
 msgid "%u B"
 msgstr "%u B"
@@ -1867,8 +1884,8 @@ msgstr "Usando especificação de amostragem \"%s\", mapa de canais \"%s\"."
 
 #: ../src/utils/pacat.c:359
 #, c-format
-msgid "Connected to device %s (%u, %ssuspended)."
-msgstr "Conectado ao dispositivo %s (%u, %ssuspended)."
+msgid "Connected to device %s (index: %u, suspended: %s)."
+msgstr "Conectado ao dispositivo %s (índice: %u, suspenso: %s)."
 
 #: ../src/utils/pacat.c:369
 #, c-format
@@ -1955,7 +1972,7 @@ msgstr "Falha ao definir o fluxo de monitoração: %s"
 msgid "pa_stream_connect_record() failed: %s"
 msgstr "pa_stream_connect_record() falhou: %s"
 
-#: ../src/utils/pacat.c:531 ../src/utils/pactl.c:1388
+#: ../src/utils/pacat.c:531 ../src/utils/pactl.c:1455
 #, c-format
 msgid "Connection failure: %s"
 msgstr "Falha na conexão: %s"
@@ -2024,16 +2041,16 @@ msgid ""
 "                                        (defaults to 2)\n"
 "      --channel-map=CHANNELMAP          Channel map to use instead of the "
 "default\n"
-"      --fix-format                      Take the sample format from the sink "
-"the stream is\n"
+"      --fix-format                      Take the sample format from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
-"      --fix-rate                        Take the sampling rate from the sink "
-"the stream is\n"
+"      --fix-rate                        Take the sampling rate from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
 "      --fix-channels                    Take the number of channels and the "
 "channel map\n"
-"                                        from the sink the stream is being "
-"connected to.\n"
+"                                        from the sink/source the stream is "
+"being connected to.\n"
 "      --no-remix                        Don't upmix or downmix channels.\n"
 "      --no-remap                        Map channels by index instead of "
 "name.\n"
@@ -2048,7 +2065,7 @@ msgid ""
 "      --property=PROPERTY=VALUE         Set the specified property to the "
 "specified value.\n"
 "      --raw                             Record/play raw PCM data.\n"
-"      --passthrough                     passthrough data \n"
+"      --passthrough                     Passthrough data.\n"
 "      --file-format[=FFORMAT]           Record/play formatted PCM data.\n"
 "      --list-file-formats               List available file formats.\n"
 "      --monitor-stream=INDEX            Record from the sink input with "
@@ -2085,10 +2102,10 @@ msgstr ""
 "      --channel-map=MAPA_DE_CANAIS      Mapeamento de canais a ser usado no\n"
 "                                        lugar do padrão\n"
 "      --fix-format                      Obtém o formato da amostragem do\n"
-"                                        destino onde o fluxo está sendo\n"
-"                                        conectado.\n"
+"                                        destino/fonte onde o fluxo está\n"
+"                                        sendo conectado.\n"
 "      --fix-rate                        Obtém a taxa de amostragem do "
-"destino\n"
+"destino/fonte\n"
 "                                        onde o fluxo está sendo conectado.\n"
 "      --fix-channels                    Obtém o número de canais e o mapa "
 "de\n"
@@ -2115,7 +2132,7 @@ msgstr ""
 "      --raw                             Grava/reproduz dados PCM não "
 "tratados.\n"
 "      --passthrough                     Dados para conversão.\n"
-"      --file-format[=FORMATO_DO_ARQ.]   Grava/reproduz dados PCM "
+"      --file-format[=FORMATO_ARQUIVO]   Grava/reproduz dados PCM "
 "formatados.\n"
 "      --list-file-formats               Lista formatos de arquivo "
 "disponíveis.\n"
@@ -2133,7 +2150,7 @@ msgstr ""
 "Compilado com libpulse %s\n"
 "Vinculado com libpulse %s\n"
 
-#: ../src/utils/pacat.c:843 ../src/utils/pactl.c:1559
+#: ../src/utils/pacat.c:843 ../src/utils/pactl.c:1651
 #, c-format
 msgid "Invalid client name '%s'"
 msgstr "Nome do cliente \"%s\" inválido"
@@ -2206,7 +2223,7 @@ msgstr ""
 "Aviso: a especificação de amostragem especificada será sobrescrita pela "
 "especificação do arquivo."
 
-#: ../src/utils/pacat.c:1070 ../src/utils/pactl.c:1626
+#: ../src/utils/pacat.c:1070 ../src/utils/pactl.c:1718
 msgid "Failed to determine sample specification from file."
 msgstr "Falha ao determinar a especificação de amostragem a partir do arquivo."
 
@@ -2242,7 +2259,7 @@ msgstr "playback"
 msgid "Failed to set media name."
 msgstr "Falha ao definir o nome da mídia."
 
-#: ../src/utils/pacat.c:1148 ../src/utils/pactl.c:1976
+#: ../src/utils/pacat.c:1148 ../src/utils/pactl.c:2068
 msgid "pa_mainloop_new() failed."
 msgstr "pa_mainloop_new() falhou."
 
@@ -2250,11 +2267,11 @@ msgstr "pa_mainloop_new() falhou."
 msgid "io_new() failed."
 msgstr "io_new() falhou."
 
-#: ../src/utils/pacat.c:1178 ../src/utils/pactl.c:1988
+#: ../src/utils/pacat.c:1178 ../src/utils/pactl.c:2080
 msgid "pa_context_new() failed."
 msgstr "pa_context_new() falhou."
 
-#: ../src/utils/pacat.c:1186 ../src/utils/pactl.c:1994
+#: ../src/utils/pacat.c:1186 ../src/utils/pactl.c:2086
 #, c-format
 msgid "pa_context_connect() failed: %s"
 msgstr "pa_context_new() falhou: %s"
@@ -2263,32 +2280,32 @@ msgstr "pa_context_new() falhou: %s"
 msgid "pa_context_rttime_new() failed."
 msgstr "pa_context_rttime_new() falhou."
 
-#: ../src/utils/pacat.c:1199 ../src/utils/pactl.c:1999
+#: ../src/utils/pacat.c:1199 ../src/utils/pactl.c:2091
 msgid "pa_mainloop_run() failed."
 msgstr "pa_mainloop_run() falhou."
 
-#: ../src/utils/pacmd.c:53 ../src/utils/pactl.c:1481
+#: ../src/utils/pacmd.c:53 ../src/utils/pactl.c:1573
 msgid "NAME [ARGS ...]"
 msgstr "NOME [ARGS ...]"
 
-#: ../src/utils/pacmd.c:54 ../src/utils/pacmd.c:62 ../src/utils/pactl.c:1482
+#: ../src/utils/pacmd.c:54 ../src/utils/pacmd.c:62 ../src/utils/pactl.c:1574
 msgid "NAME|#N"
 msgstr "NOME|#N"
 
-#: ../src/utils/pacmd.c:55 ../src/utils/pacmd.c:65 ../src/utils/pactl.c:1480
-#: ../src/utils/pactl.c:1486
+#: ../src/utils/pacmd.c:55 ../src/utils/pacmd.c:65 ../src/utils/pactl.c:1572
+#: ../src/utils/pactl.c:1578
 msgid "NAME"
 msgstr "NOME"
 
-#: ../src/utils/pacmd.c:56 ../src/utils/pactl.c:1488
+#: ../src/utils/pacmd.c:56
 msgid "NAME|#N VOLUME"
 msgstr "NOME|#N VOLUME"
 
-#: ../src/utils/pacmd.c:57 ../src/utils/pactl.c:1489
+#: ../src/utils/pacmd.c:57
 msgid "#N VOLUME"
 msgstr "#N VOLUME"
 
-#: ../src/utils/pacmd.c:58 ../src/utils/pacmd.c:72 ../src/utils/pactl.c:1484
+#: ../src/utils/pacmd.c:58 ../src/utils/pacmd.c:72 ../src/utils/pactl.c:1576
 msgid "NAME|#N 1|0"
 msgstr "NOME|#N 1|0"
 
@@ -2324,7 +2341,7 @@ msgstr "NOME_DE_CAMINHO"
 msgid "FILENAME SINK|#N"
 msgstr "NOME_DE_ARQUIVO DESTINO|#N"
 
-#: ../src/utils/pacmd.c:71 ../src/utils/pactl.c:1483
+#: ../src/utils/pacmd.c:71 ../src/utils/pactl.c:1575
 msgid "#N SINK|SOURCE"
 msgstr "#N DESTINO|FONTE"
 
@@ -2332,15 +2349,15 @@ msgstr "#N DESTINO|FONTE"
 msgid "1|0"
 msgstr "1|0"
 
-#: ../src/utils/pacmd.c:74 ../src/utils/pactl.c:1485
+#: ../src/utils/pacmd.c:74 ../src/utils/pactl.c:1577
 msgid "CARD PROFILE"
 msgstr "PLACA PERFIL"
 
-#: ../src/utils/pacmd.c:75 ../src/utils/pactl.c:1487
+#: ../src/utils/pacmd.c:75 ../src/utils/pactl.c:1579
 msgid "NAME|#N PORT"
 msgstr "NOME|#N PORTA"
 
-#: ../src/utils/pacmd.c:76 ../src/utils/pactl.c:1493
+#: ../src/utils/pacmd.c:76 ../src/utils/pactl.c:1585
 msgid "CARD-NAME|CARD-#N PORT OFFSET"
 msgstr "NOME-PLACA|PLACA-#N PORTA POSIÇÃO"
 
@@ -2419,32 +2436,32 @@ msgstr "poll(): %s"
 msgid "read(): %s"
 msgstr "read(): %s"
 
-#: ../src/utils/pactl.c:161
+#: ../src/utils/pactl.c:166
 #, c-format
 msgid "Failed to get statistics: %s"
 msgstr "Falha ao obter estatísticas: %s"
 
-#: ../src/utils/pactl.c:167
+#: ../src/utils/pactl.c:172
 #, c-format
 msgid "Currently in use: %u blocks containing %s bytes total.\n"
 msgstr "Em uso no momento: %u blocos contendo %s bytes no total.\n"
 
-#: ../src/utils/pactl.c:170
+#: ../src/utils/pactl.c:175
 #, c-format
 msgid "Allocated during whole lifetime: %u blocks containing %s bytes total.\n"
 msgstr "Alocado por todo o tempo: %u blocos contendo %s bytes no total.\n"
 
-#: ../src/utils/pactl.c:173
+#: ../src/utils/pactl.c:178
 #, c-format
 msgid "Sample cache size: %s\n"
 msgstr "Tamanho do cache para amostragem: %s\n"
 
-#: ../src/utils/pactl.c:182
+#: ../src/utils/pactl.c:187
 #, c-format
 msgid "Failed to get server information: %s"
 msgstr "Falha ao obter informações do servidor: %s"
 
-#: ../src/utils/pactl.c:187
+#: ../src/utils/pactl.c:192
 #, c-format
 msgid ""
 "Server String: %s\n"
@@ -2461,7 +2478,7 @@ msgstr ""
 "Índice do cliente: %u\n"
 "Tamanho de fragmento: %zu\n"
 
-#: ../src/utils/pactl.c:203
+#: ../src/utils/pactl.c:208
 #, c-format
 msgid ""
 "User Name: %s\n"
@@ -2484,12 +2501,12 @@ msgstr ""
 "Fonte padrão: %s\n"
 "Cookie: %04x:%04x\n"
 
-#: ../src/utils/pactl.c:252 ../src/utils/pactl.c:878 ../src/utils/pactl.c:952
+#: ../src/utils/pactl.c:257 ../src/utils/pactl.c:902 ../src/utils/pactl.c:980
 #, c-format
 msgid "Failed to get sink information: %s"
 msgstr "Falha ao obter informações do destino: %s"
 
-#: ../src/utils/pactl.c:278
+#: ../src/utils/pactl.c:283
 #, c-format
 msgid ""
 "Sink #%u\n"
@@ -2528,27 +2545,27 @@ msgstr ""
 "\tPropriedades:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:322 ../src/utils/pactl.c:428 ../src/utils/pactl.c:589
+#: ../src/utils/pactl.c:327 ../src/utils/pactl.c:433 ../src/utils/pactl.c:594
 #, c-format
 msgid "\tPorts:\n"
 msgstr "\tPortas:\n"
 
-#: ../src/utils/pactl.c:329 ../src/utils/pactl.c:435
+#: ../src/utils/pactl.c:334 ../src/utils/pactl.c:440
 #, c-format
 msgid "\tActive Port: %s\n"
 msgstr "\tPorta ativa: %s\n"
 
-#: ../src/utils/pactl.c:335 ../src/utils/pactl.c:441
+#: ../src/utils/pactl.c:340 ../src/utils/pactl.c:446
 #, c-format
 msgid "\tFormats:\n"
 msgstr "\tFormatos:\n"
 
-#: ../src/utils/pactl.c:359 ../src/utils/pactl.c:897 ../src/utils/pactl.c:967
+#: ../src/utils/pactl.c:364 ../src/utils/pactl.c:922 ../src/utils/pactl.c:995
 #, c-format
 msgid "Failed to get source information: %s"
 msgstr "Falha ao obter informações da fonte: %s"
 
-#: ../src/utils/pactl.c:385
+#: ../src/utils/pactl.c:390
 #, c-format
 msgid ""
 "Source #%u\n"
@@ -2587,20 +2604,20 @@ msgstr ""
 "\tPropriedades:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:413 ../src/utils/pactl.c:483 ../src/utils/pactl.c:526
-#: ../src/utils/pactl.c:568 ../src/utils/pactl.c:666 ../src/utils/pactl.c:667
-#: ../src/utils/pactl.c:678 ../src/utils/pactl.c:736 ../src/utils/pactl.c:737
-#: ../src/utils/pactl.c:748 ../src/utils/pactl.c:799 ../src/utils/pactl.c:800
-#: ../src/utils/pactl.c:806
+#: ../src/utils/pactl.c:418 ../src/utils/pactl.c:488 ../src/utils/pactl.c:531
+#: ../src/utils/pactl.c:573 ../src/utils/pactl.c:671 ../src/utils/pactl.c:672
+#: ../src/utils/pactl.c:683 ../src/utils/pactl.c:741 ../src/utils/pactl.c:742
+#: ../src/utils/pactl.c:753 ../src/utils/pactl.c:804 ../src/utils/pactl.c:805
+#: ../src/utils/pactl.c:811
 msgid "n/a"
 msgstr "n/d"
 
-#: ../src/utils/pactl.c:452 ../src/utils/pactl.c:853
+#: ../src/utils/pactl.c:457 ../src/utils/pactl.c:861
 #, c-format
 msgid "Failed to get module information: %s"
 msgstr "Falha ao obter informações do módulo: %s"
 
-#: ../src/utils/pactl.c:475
+#: ../src/utils/pactl.c:480
 #, c-format
 msgid ""
 "Module #%u\n"
@@ -2617,12 +2634,12 @@ msgstr ""
 "\tPropriedades:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:494
+#: ../src/utils/pactl.c:499
 #, c-format
 msgid "Failed to get client information: %s"
 msgstr "Falha ao obter informações do cliente: %s"
 
-#: ../src/utils/pactl.c:520
+#: ../src/utils/pactl.c:525
 #, c-format
 msgid ""
 "Client #%u\n"
@@ -2637,12 +2654,12 @@ msgstr ""
 "\tPropriedades:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:537
+#: ../src/utils/pactl.c:542
 #, c-format
 msgid "Failed to get card information: %s"
 msgstr "Falha ao obter informações da placa: %s"
 
-#: ../src/utils/pactl.c:560
+#: ../src/utils/pactl.c:565
 #, c-format
 msgid ""
 "Card #%u\n"
@@ -2659,17 +2676,17 @@ msgstr ""
 "\tPropriedades:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:576
+#: ../src/utils/pactl.c:581
 #, c-format
 msgid "\tProfiles:\n"
 msgstr "\tPerfis:\n"
 
-#: ../src/utils/pactl.c:583
+#: ../src/utils/pactl.c:588
 #, c-format
 msgid "\tActive Profile: %s\n"
 msgstr "\tPerfil ativo: %s\n"
 
-#: ../src/utils/pactl.c:597
+#: ../src/utils/pactl.c:602
 #, c-format
 msgid ""
 "\t\t\tProperties:\n"
@@ -2678,17 +2695,17 @@ msgstr ""
 "\t\t\tPropriedades:\n"
 "\t\t\t\t%s\n"
 
-#: ../src/utils/pactl.c:602
+#: ../src/utils/pactl.c:607
 #, c-format
 msgid "\t\t\tPart of profile(s): %s"
 msgstr "\t\t\tParte de perfil/perfis: %s"
 
-#: ../src/utils/pactl.c:619 ../src/utils/pactl.c:916 ../src/utils/pactl.c:982
+#: ../src/utils/pactl.c:624 ../src/utils/pactl.c:942 ../src/utils/pactl.c:1010
 #, c-format
 msgid "Failed to get sink input information: %s"
 msgstr "Falha ao obter informações da entrada do destino: %s"
 
-#: ../src/utils/pactl.c:648
+#: ../src/utils/pactl.c:653
 #, c-format
 msgid ""
 "Sink Input #%u\n"
@@ -2727,12 +2744,12 @@ msgstr ""
 "\tPropriedades:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:689 ../src/utils/pactl.c:935 ../src/utils/pactl.c:997
+#: ../src/utils/pactl.c:694 ../src/utils/pactl.c:962 ../src/utils/pactl.c:1025
 #, c-format
 msgid "Failed to get source output information: %s"
 msgstr "Falha ao obter informações da saída da fonte: %s"
 
-#: ../src/utils/pactl.c:718
+#: ../src/utils/pactl.c:723
 #, c-format
 msgid ""
 "Source Output #%u\n"
@@ -2771,12 +2788,12 @@ msgstr ""
 "\tPropriedades:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:759
+#: ../src/utils/pactl.c:764
 #, c-format
 msgid "Failed to get sample information: %s"
 msgstr "Falha ao obter informações sobre a amostragem: %s"
 
-#: ../src/utils/pactl.c:786
+#: ../src/utils/pactl.c:791
 #, c-format
 msgid ""
 "Sample #%u\n"
@@ -2805,134 +2822,163 @@ msgstr ""
 "\tPropriedades:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:814 ../src/utils/pactl.c:824
+#: ../src/utils/pactl.c:819 ../src/utils/pactl.c:829
 #, c-format
 msgid "Failure: %s"
 msgstr "Falha: %s"
 
-#: ../src/utils/pactl.c:860
+#: ../src/utils/pactl.c:868
 #, c-format
 msgid "Failed to unload module: Module %s not loaded"
 msgstr "Falha ao descarregar o módulo: módulo %s não carregado"
 
-#: ../src/utils/pactl.c:1023
+#: ../src/utils/pactl.c:886
+#, c-format
+msgid ""
+"Failed to set volume: You tried to set volumes for %d channels, whereas "
+"channel/s supported = %d\n"
+msgstr ""
+"Falha ao definir volume: Você tentou definir volumes para %d canais, havendo "
+"suporte a %d canais\n"
+
+#: ../src/utils/pactl.c:1052
 #, c-format
 msgid "Failed to set format: invalid format string %s"
 msgstr "Falha ao definir formato: string %s de formato inválida"
 
-#: ../src/utils/pactl.c:1062
+#: ../src/utils/pactl.c:1095
 #, c-format
 msgid "Failed to upload sample: %s"
 msgstr "Falha ao enviar a amostragem: %s"
 
-#: ../src/utils/pactl.c:1079
+#: ../src/utils/pactl.c:1112
 msgid "Premature end of file"
 msgstr "Fim prematuro do arquivo"
 
-#: ../src/utils/pactl.c:1099
+#: ../src/utils/pactl.c:1132
 msgid "new"
 msgstr "novo"
 
-#: ../src/utils/pactl.c:1102
+#: ../src/utils/pactl.c:1135
 msgid "change"
 msgstr "alterar"
 
-#: ../src/utils/pactl.c:1105
+#: ../src/utils/pactl.c:1138
 msgid "remove"
 msgstr "remover"
 
-#: ../src/utils/pactl.c:1108 ../src/utils/pactl.c:1143
+#: ../src/utils/pactl.c:1141 ../src/utils/pactl.c:1176
 msgid "unknown"
 msgstr "desconhecido"
 
-#: ../src/utils/pactl.c:1116
+#: ../src/utils/pactl.c:1149
 msgid "sink"
 msgstr "destino"
 
-#: ../src/utils/pactl.c:1119
+#: ../src/utils/pactl.c:1152
 msgid "source"
 msgstr "fonte"
 
-#: ../src/utils/pactl.c:1122
+#: ../src/utils/pactl.c:1155
 msgid "sink-input"
 msgstr "entrada-destino"
 
-#: ../src/utils/pactl.c:1125
+#: ../src/utils/pactl.c:1158
 msgid "source-output"
 msgstr "saída-fonte"
 
-#: ../src/utils/pactl.c:1128
+#: ../src/utils/pactl.c:1161
 msgid "module"
 msgstr "módulo"
 
-#: ../src/utils/pactl.c:1131
+#: ../src/utils/pactl.c:1164
 msgid "client"
 msgstr "cliente"
 
-#: ../src/utils/pactl.c:1134
+#: ../src/utils/pactl.c:1167
 msgid "sample-cache"
 msgstr "cache-amostragem"
 
-#: ../src/utils/pactl.c:1137 ../src/utils/pactl.c:1140
+#: ../src/utils/pactl.c:1170
 msgid "server"
 msgstr "servidor"
 
-#: ../src/utils/pactl.c:1149
+#: ../src/utils/pactl.c:1173
+msgid "card"
+msgstr "placa"
+
+#: ../src/utils/pactl.c:1182
 #, c-format
 msgid "Event '%s' on %s #%u\n"
 msgstr "Evento \"%s\" em %s #%u\n"
 
-#: ../src/utils/pactl.c:1394
+#: ../src/utils/pactl.c:1461
 msgid "Got SIGINT, exiting."
 msgstr "SIGINT recebido, saindo."
 
-#: ../src/utils/pactl.c:1421
+#: ../src/utils/pactl.c:1488
 msgid "Invalid volume specification"
 msgstr "Especificação de volume inválida"
 
-#: ../src/utils/pactl.c:1444
+#: ../src/utils/pactl.c:1511
 msgid "Volume outside permissible range.\n"
 msgstr "Volume fora da faixa admissível.\n"
 
-#: ../src/utils/pactl.c:1474 ../src/utils/pactl.c:1475
-#: ../src/utils/pactl.c:1476 ../src/utils/pactl.c:1477
-#: ../src/utils/pactl.c:1478 ../src/utils/pactl.c:1479
-#: ../src/utils/pactl.c:1480 ../src/utils/pactl.c:1481
-#: ../src/utils/pactl.c:1482 ../src/utils/pactl.c:1483
-#: ../src/utils/pactl.c:1484 ../src/utils/pactl.c:1485
-#: ../src/utils/pactl.c:1486 ../src/utils/pactl.c:1487
-#: ../src/utils/pactl.c:1488 ../src/utils/pactl.c:1489
-#: ../src/utils/pactl.c:1490 ../src/utils/pactl.c:1491
-#: ../src/utils/pactl.c:1492 ../src/utils/pactl.c:1493
-#: ../src/utils/pactl.c:1494
+#: ../src/utils/pactl.c:1524
+msgid "Invalid number of volume specifications.\n"
+msgstr "Número de especificações de volume inválido.\n"
+
+#: ../src/utils/pactl.c:1536
+msgid "Inconsistent volume specification.\n"
+msgstr "Especificação de volume inconsistente.\n"
+
+#: ../src/utils/pactl.c:1566 ../src/utils/pactl.c:1567
+#: ../src/utils/pactl.c:1568 ../src/utils/pactl.c:1569
+#: ../src/utils/pactl.c:1570 ../src/utils/pactl.c:1571
+#: ../src/utils/pactl.c:1572 ../src/utils/pactl.c:1573
+#: ../src/utils/pactl.c:1574 ../src/utils/pactl.c:1575
+#: ../src/utils/pactl.c:1576 ../src/utils/pactl.c:1577
+#: ../src/utils/pactl.c:1578 ../src/utils/pactl.c:1579
+#: ../src/utils/pactl.c:1580 ../src/utils/pactl.c:1581
+#: ../src/utils/pactl.c:1582 ../src/utils/pactl.c:1583
+#: ../src/utils/pactl.c:1584 ../src/utils/pactl.c:1585
+#: ../src/utils/pactl.c:1586
 msgid "[options]"
 msgstr "[opções]"
 
-#: ../src/utils/pactl.c:1476
+#: ../src/utils/pactl.c:1568
 msgid "[TYPE]"
 msgstr "[TIPO]"
 
-#: ../src/utils/pactl.c:1478
+#: ../src/utils/pactl.c:1570
 msgid "FILENAME [NAME]"
 msgstr "NOME_DE_ARQUIVO [NOME]"
 
-#: ../src/utils/pactl.c:1479
+#: ../src/utils/pactl.c:1571
 msgid "NAME [SINK]"
 msgstr "NOME [DESTINO]"
 
-#: ../src/utils/pactl.c:1490
+#: ../src/utils/pactl.c:1580
+msgid "NAME|#N VOLUME [VOLUME ...]"
+msgstr "NOME|#N VOLUME [VOLUME ...]"
+
+#: ../src/utils/pactl.c:1581
+msgid "#N VOLUME [VOLUME ...]"
+msgstr "#N VOLUME [VOLUME ...]"
+
+#: ../src/utils/pactl.c:1582
 msgid "NAME|#N 1|0|toggle"
 msgstr "NOME|#N 1|0|toggle"
 
-#: ../src/utils/pactl.c:1491
+#: ../src/utils/pactl.c:1583
 msgid "#N 1|0|toggle"
 msgstr "#N 1|0|toggle"
 
-#: ../src/utils/pactl.c:1492
+#: ../src/utils/pactl.c:1584
 msgid "#N FORMATS"
 msgstr "#N FORMATOS"
 
-#: ../src/utils/pactl.c:1495
+#: ../src/utils/pactl.c:1587
 #, c-format
 msgid ""
 "\n"
@@ -2944,7 +2990,7 @@ msgstr ""
 "podem ser usados para especificar o destino, a fonte e a monitoração "
 "padrão.\n"
 
-#: ../src/utils/pactl.c:1498
+#: ../src/utils/pactl.c:1590
 #, c-format
 msgid ""
 "\n"
@@ -2964,7 +3010,7 @@ msgstr ""
 "  -n, --client-name=NOME                Como chamar este cliente no "
 "servidor\n"
 
-#: ../src/utils/pactl.c:1539
+#: ../src/utils/pactl.c:1631
 #, c-format
 msgid ""
 "pactl %s\n"
@@ -2975,60 +3021,60 @@ msgstr ""
 "Compilado com libpulse %s\n"
 "Vinculado com libpulse %s\n"
 
-#: ../src/utils/pactl.c:1598
+#: ../src/utils/pactl.c:1690
 #, c-format
 msgid "Specify nothing, or one of: %s"
 msgstr "Especifique nada ou uma de: %s"
 
-#: ../src/utils/pactl.c:1608
+#: ../src/utils/pactl.c:1700
 msgid "Please specify a sample file to load"
 msgstr "Por favor, especifique um arquivo de amostragem a ser carregado"
 
-#: ../src/utils/pactl.c:1621
+#: ../src/utils/pactl.c:1713
 msgid "Failed to open sound file."
 msgstr "Falha ao abrir o arquivo de som."
 
-#: ../src/utils/pactl.c:1633
+#: ../src/utils/pactl.c:1725
 msgid "Warning: Failed to determine sample specification from file."
 msgstr ""
 "Aviso: Falha ao determinar a especificação da amostragem a partir do arquivo."
 
-#: ../src/utils/pactl.c:1643
+#: ../src/utils/pactl.c:1735
 msgid "You have to specify a sample name to play"
 msgstr "Você deve especificar um nome para amostra a ser reproduzida"
 
-#: ../src/utils/pactl.c:1655
+#: ../src/utils/pactl.c:1747
 msgid "You have to specify a sample name to remove"
 msgstr "Você deve especificar um nome para a amostra a ser removida"
 
-#: ../src/utils/pactl.c:1664
+#: ../src/utils/pactl.c:1756
 msgid "You have to specify a sink input index and a sink"
 msgstr "Você deve especificar a entrada do destino e um destino"
 
-#: ../src/utils/pactl.c:1674
+#: ../src/utils/pactl.c:1766
 msgid "You have to specify a source output index and a source"
 msgstr "Você deve especificar um índice de saída da fonte e uma fonte"
 
-#: ../src/utils/pactl.c:1689
+#: ../src/utils/pactl.c:1781
 msgid "You have to specify a module name and arguments."
 msgstr "Você deve especificar um nome para o módulo e seus argumentos."
 
-#: ../src/utils/pactl.c:1709
+#: ../src/utils/pactl.c:1801
 msgid "You have to specify a module index or name"
 msgstr "Você deve especificar um nome ou índice do módulo"
 
-#: ../src/utils/pactl.c:1722
+#: ../src/utils/pactl.c:1814
 msgid ""
 "You may not specify more than one sink. You have to specify a boolean value."
 msgstr ""
 "Você não pode especificar mais de um destino. Você deve especificar um valor "
 "booleano."
 
-#: ../src/utils/pactl.c:1727 ../src/utils/pactl.c:1747
+#: ../src/utils/pactl.c:1819 ../src/utils/pactl.c:1839
 msgid "Invalid suspend specification."
 msgstr "Especificação de suspensão inválida."
 
-#: ../src/utils/pactl.c:1742
+#: ../src/utils/pactl.c:1834
 msgid ""
 "You may not specify more than one source. You have to specify a boolean "
 "value."
@@ -3036,83 +3082,83 @@ msgstr ""
 "Você não pode especificar mais de uma fonte. Você deve especificar um valor "
 "booleano."
 
-#: ../src/utils/pactl.c:1759
+#: ../src/utils/pactl.c:1851
 msgid "You have to specify a card name/index and a profile name"
 msgstr "Você deve especificar um nome/índice para a placa e um nome de perfil"
 
-#: ../src/utils/pactl.c:1770
+#: ../src/utils/pactl.c:1862
 msgid "You have to specify a sink name/index and a port name"
 msgstr "Você deve especificar um nome/índice do destino e o nome da porta"
 
-#: ../src/utils/pactl.c:1781
+#: ../src/utils/pactl.c:1873
 msgid "You have to specify a sink name"
 msgstr "Você deve especificar um nome de destino"
 
-#: ../src/utils/pactl.c:1791
+#: ../src/utils/pactl.c:1883
 msgid "You have to specify a source name/index and a port name"
 msgstr "Você deve especificar um nome/índice da fonte e o nome da porta"
 
-#: ../src/utils/pactl.c:1802
+#: ../src/utils/pactl.c:1894
 msgid "You have to specify a source name"
 msgstr "Você deve especificar um nome de fonte"
 
-#: ../src/utils/pactl.c:1812
+#: ../src/utils/pactl.c:1904
 msgid "You have to specify a sink name/index and a volume"
 msgstr "Você deve especificar um nome/índice do destino e um volume"
 
-#: ../src/utils/pactl.c:1825
+#: ../src/utils/pactl.c:1917
 msgid "You have to specify a source name/index and a volume"
 msgstr "Você deve especificar um nome/índice da fonte e um volume"
 
-#: ../src/utils/pactl.c:1838
+#: ../src/utils/pactl.c:1930
 msgid "You have to specify a sink input index and a volume"
 msgstr "Você deve especificar um índice de entrada para o destino e um volume"
 
-#: ../src/utils/pactl.c:1843
+#: ../src/utils/pactl.c:1935
 msgid "Invalid sink input index"
 msgstr "Índice de entrada de destino inválido"
 
-#: ../src/utils/pactl.c:1854
+#: ../src/utils/pactl.c:1946
 msgid "You have to specify a source output index and a volume"
 msgstr "Você deve especificar um índice de saída da fonte e um volume"
 
-#: ../src/utils/pactl.c:1859
+#: ../src/utils/pactl.c:1951
 msgid "Invalid source output index"
 msgstr "Índice de saída de fonte inválido"
 
-#: ../src/utils/pactl.c:1870
+#: ../src/utils/pactl.c:1962
 msgid "You have to specify a sink name/index and a mute boolean"
 msgstr "Você deve especificar um nome/índice do destino e um booleano do mudo"
 
-#: ../src/utils/pactl.c:1875 ../src/utils/pactl.c:1890
-#: ../src/utils/pactl.c:1910 ../src/utils/pactl.c:1928
+#: ../src/utils/pactl.c:1967 ../src/utils/pactl.c:1982
+#: ../src/utils/pactl.c:2002 ../src/utils/pactl.c:2020
 msgid "Invalid mute specification"
 msgstr "Especificação de mudo inválida"
 
-#: ../src/utils/pactl.c:1885
+#: ../src/utils/pactl.c:1977
 msgid "You have to specify a source name/index and a mute boolean"
 msgstr "Você deve especificar um nome/índice da fonte e um booleano do mudo"
 
-#: ../src/utils/pactl.c:1900
+#: ../src/utils/pactl.c:1992
 msgid "You have to specify a sink input index and a mute boolean"
 msgstr ""
 "Você deve especificar um índice de entrada para o destino e um booleano do "
 "mudo"
 
-#: ../src/utils/pactl.c:1905
+#: ../src/utils/pactl.c:1997
 msgid "Invalid sink input index specification"
 msgstr "Especificação do índice de entrada de destino inválida"
 
-#: ../src/utils/pactl.c:1918
+#: ../src/utils/pactl.c:2010
 msgid "You have to specify a source output index and a mute boolean"
 msgstr ""
 "Você deve especificar um índice da saída da fonte e um booleano do mudo"
 
-#: ../src/utils/pactl.c:1923
+#: ../src/utils/pactl.c:2015
 msgid "Invalid source output index specification"
 msgstr "Especificação do índice de saída de fonte inválida"
 
-#: ../src/utils/pactl.c:1940
+#: ../src/utils/pactl.c:2032
 msgid ""
 "You have to specify a sink index and a semicolon-separated list of supported "
 "formats"
@@ -3120,17 +3166,17 @@ msgstr ""
 "Você deve especificar um índice do destino e uma lista separada por ponto-e-"
 "vírgulas de formatos aceitos"
 
-#: ../src/utils/pactl.c:1952
+#: ../src/utils/pactl.c:2044
 msgid "You have to specify a card name/index, a port name and a latency offset"
 msgstr ""
 "Você deve especificar nome/índice de uma placa, um nome de porta e uma "
 "mudança de latência"
 
-#: ../src/utils/pactl.c:1959
+#: ../src/utils/pactl.c:2051
 msgid "Could not parse latency offset"
 msgstr "Não foi possível analisar a mudança da latência"
 
-#: ../src/utils/pactl.c:1971
+#: ../src/utils/pactl.c:2063
 msgid "No valid command specified."
 msgstr "Nenhum comando válido especificado."
 
@@ -3275,31 +3321,37 @@ msgstr "Falha ao analisar os dados do cookie\n"
 msgid "Failed to save cookie data\n"
 msgstr "Falha ao salvar os dados do cookie\n"
 
-#: ../src/utils/pax11publish.c:156
-#, c-format
-msgid "Failed to load client configuration file.\n"
-msgstr "Falha ao carregar o arquivo de configuração do cliente.\n"
-
-#: ../src/utils/pax11publish.c:161
-#, c-format
-msgid "Failed to read environment configuration data.\n"
-msgstr "Falha ao ler os dados de configuração do ambiente.\n"
-
-#: ../src/utils/pax11publish.c:178
+#: ../src/utils/pax11publish.c:170
 #, c-format
 msgid "Failed to get FQDN.\n"
 msgstr "Falha ao obter FQDN.\n"
 
-#: ../src/utils/pax11publish.c:198
+#: ../src/utils/pax11publish.c:190
 #, c-format
 msgid "Failed to load cookie data\n"
 msgstr "Falha ao carregar os dados do cookie\n"
 
-#: ../src/utils/pax11publish.c:216
+#: ../src/utils/pax11publish.c:208
 #, c-format
 msgid "Not yet implemented.\n"
 msgstr "Não implementado ainda.\n"
 
+#~ msgid "PulseAudio Sound System KDE Routing Policy"
+#~ msgstr "Política de roteamento do KDE para Sistema de som PulseAudio"
+
+#~ msgid "Start the PulseAudio Sound System with KDE Routing Policy"
+#~ msgstr ""
+#~ "Iniciar o sistema de som PulseAudio com política de roteamento do KDE"
+
+#~ msgid "Failed to open configuration file '%s': %s"
+#~ msgstr "Falha em abrir o arquivo de configuração \"%s\": %s"
+
+#~ msgid "Failed to load client configuration file.\n"
+#~ msgstr "Falha ao carregar o arquivo de configuração do cliente.\n"
+
+#~ msgid "Failed to read environment configuration data.\n"
+#~ msgstr "Falha ao ler os dados de configuração do ambiente.\n"
+
 #~ msgid "Successfully dropped root privileges."
 #~ msgstr "Os privilégios do root foram retirados com sucesso."
 
diff --git a/po/ru.po b/po/ru.po
index 3c44b0c..6ac08f1 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: pulseaudio\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-11 21:08+0400\n"
-"PO-Revision-Date: 2014-01-13 03:33+0200\n"
+"POT-Creation-Date: 2014-05-12 01:28+0400\n"
+"PO-Revision-Date: 2014-05-12 02:33+0400\n"
 "Last-Translator: Alexander Potashev <aspotashev at gmail.com>\n"
 "Language-Team: Russian <kde-russian at lists.kde.ru>\n"
 "Language: ru\n"
@@ -66,7 +66,7 @@ msgid ""
 "and\n"
 "                                        this time passed\n"
 "      --log-level[=LEVEL]               Increase or set verbosity level\n"
-"  -v                                    Increase the verbosity level\n"
+"  -v  --verbose                         Increase the verbosity level\n"
 "      --log-target={auto,syslog,stderr,file:PATH,newfile:PATH}\n"
 "                                        Specify the log target\n"
 "      --log-meta[=BOOL]                 Include code location in log "
@@ -142,7 +142,7 @@ msgstr ""
 "                                        указанного периода времени.\n"
 "      --log-level[=УРОВЕНЬ]             Повысить или установить уровень\n"
 "                                        подробности журналирования.\n"
-"  -v                                    Повысить уровень подробности\n"
+"  -v  --verbose                         Повысить уровень подробности\n"
 "                                        журналирования.\n"
 "      --log-target={auto,syslog,stderr,file:ПУТЬ,newfile:ПУТЬ}\n"
 "                                        Задать журнал\n"
@@ -456,6 +456,7 @@ msgid "Failed to change UID: %s"
 msgstr "Не удалось изменить идентификатор пользователя (UID): %s"
 
 # BUGME: gettext understands only single string constants. --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78564
 #: ../src/daemon/main.c:271
 msgid "Successfully changed user to \""
 msgstr "Успешно произведена смена пользователя на «"
@@ -525,23 +526,27 @@ msgstr ""
 "компьютере. Попытка запуска будет продолжена."
 
 # BUGME: remove exclamation --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78563
 #: ../src/daemon/main.c:726
 msgid "Running in system mode, but --disallow-exit not set!"
 msgstr "Запущен в общесистемном режиме, но «--disallow-exit» не задан."
 
 # BUGME: remove exclamation --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78563
 #: ../src/daemon/main.c:729
 msgid "Running in system mode, but --disallow-module-loading not set!"
 msgstr ""
 "Запущен в общесистемном режиме, но «--disallow-module-loading» не задан."
 
 # BUGME: remove exclamation --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78563
 #: ../src/daemon/main.c:732
 msgid "Running in system mode, forcibly disabling SHM mode!"
 msgstr ""
 "Запущен в общесистемном режиме, поэтому режим SHM принудительно отключён."
 
 # BUGME: remove exclamation --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78563
 #: ../src/daemon/main.c:737
 msgid "Running in system mode, forcibly disabling exit idle time!"
 msgstr ""
@@ -641,6 +646,7 @@ msgid "NDEBUG defined, all asserts disabled."
 msgstr "NDEBUG задан, все проверки отключены."
 
 # BUGME: Should be "FASTPATH defined, only fast path asserts enabled." --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78568
 #: ../src/daemon/main.c:947
 msgid "FASTPATH defined, only fast path asserts disabled."
 msgstr "FASTPATH задан, включены только быстрые проверки «fast path»."
@@ -704,11 +710,13 @@ msgid "pa_pid_file_create() failed."
 msgstr "Произошла ошибка при выполнении pa_pid_file_create()."
 
 # BUGME: remove exclamation --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78563
 #: ../src/daemon/main.c:1006
 msgid "Fresh high-resolution timers available! Bon appetit!"
 msgstr "Доступны таймеры высокого разрешения."
 
 # BUGME: remove exclamation --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78563
 #: ../src/daemon/main.c:1008
 msgid ""
 "Dude, your kernel stinks! The chef's recommendation today is Linux with high-"
@@ -748,14 +756,6 @@ msgstr "Звуковая система PulseAudio"
 msgid "Start the PulseAudio Sound System"
 msgstr "Запуск звуковой системы PulseAudio"
 
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:1
-msgid "PulseAudio Sound System KDE Routing Policy"
-msgstr "Звуковая система PulseAudio с маршрутизацией для KDE"
-
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:2
-msgid "Start the PulseAudio Sound System with KDE Routing Policy"
-msgstr "Запуск звуковой системы PulseAudio с маршрутизацией для KDE"
-
 #: ../src/modules/alsa/alsa-mixer.c:2251
 msgid "Input"
 msgstr "Вход"
@@ -777,8 +777,8 @@ msgid "Line In"
 msgstr "Линейный вход"
 
 #: ../src/modules/alsa/alsa-mixer.c:2256 ../src/modules/alsa/alsa-mixer.c:2334
-#: ../src/modules/bluetooth/module-bluez4-device.c:2097
-#: ../src/modules/bluetooth/module-bluez5-device.c:1447
+#: ../src/modules/bluetooth/module-bluez4-device.c:2101
+#: ../src/modules/bluetooth/module-bluez5-device.c:1451
 msgid "Microphone"
 msgstr "Микрофон"
 
@@ -841,8 +841,8 @@ msgid "No Bass Boost"
 msgstr "Нет усиления басов"
 
 #: ../src/modules/alsa/alsa-mixer.c:2271
-#: ../src/modules/bluetooth/module-bluez4-device.c:2102
-#: ../src/modules/bluetooth/module-bluez5-device.c:1454
+#: ../src/modules/bluetooth/module-bluez4-device.c:2106
+#: ../src/modules/bluetooth/module-bluez5-device.c:1458
 msgid "Speaker"
 msgstr "Динамик"
 
@@ -996,8 +996,8 @@ msgstr "Цифровой стерео дуплекс (IEC958)"
 
 #: ../src/modules/alsa/alsa-mixer.c:3959
 #: ../src/modules/alsa/module-alsa-card.c:193
-#: ../src/modules/bluetooth/module-bluez4-device.c:2293
-#: ../src/modules/bluetooth/module-bluez5-device.c:1652
+#: ../src/modules/bluetooth/module-bluez4-device.c:2297
+#: ../src/modules/bluetooth/module-bluez5-device.c:1656
 msgid "Off"
 msgstr "Выключено"
 
@@ -1012,6 +1012,7 @@ msgid "%s Input"
 msgstr "%s вход"
 
 # BUGME: remove exclamation --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78563
 #: ../src/modules/alsa/alsa-sink.c:570 ../src/modules/alsa/alsa-sink.c:748
 #, c-format
 msgid ""
@@ -1029,6 +1030,7 @@ msgstr ""
 "или другое значение, меньшее чем min_avail."
 
 # BUGME: remove exclamation --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78563
 #: ../src/modules/alsa/alsa-source.c:529 ../src/modules/alsa/alsa-source.c:681
 #, c-format
 msgid ""
@@ -1045,7 +1047,7 @@ msgstr ""
 "с установленным POLLIN, однако последующий вызов snd_pcm_avail() вернул 0\n"
 "или другое значение, меньшее чем min_avail."
 
-#: ../src/modules/alsa/alsa-util.c:1134 ../src/modules/alsa/alsa-util.c:1209
+#: ../src/modules/alsa/alsa-util.c:1135 ../src/modules/alsa/alsa-util.c:1210
 #, c-format
 msgid ""
 "snd_pcm_avail() returned a value that is exceptionally large: %lu bytes (%lu "
@@ -1058,7 +1060,7 @@ msgstr ""
 "Вероятно, это ошибка в драйвере ALSA «%s». Пожалуйста, сообщите об этой "
 "проблеме разработчикам ALSA."
 
-#: ../src/modules/alsa/alsa-util.c:1184
+#: ../src/modules/alsa/alsa-util.c:1185
 #, c-format
 msgid ""
 "snd_pcm_delay() returned a value that is exceptionally large: %li bytes (%s"
@@ -1071,7 +1073,7 @@ msgstr ""
 "Вероятно, это ошибка в драйвере ALSA «%s». Пожалуйста, сообщите об этой "
 "проблеме разработчикам ALSA."
 
-#: ../src/modules/alsa/alsa-util.c:1225
+#: ../src/modules/alsa/alsa-util.c:1226
 #, c-format
 msgid ""
 "snd_pcm_avail_delay() returned strange values: delay %lu is less than avail "
@@ -1084,7 +1086,7 @@ msgstr ""
 "Вероятно, это ошибка в драйвере ALSA «%s». Пожалуйста, сообщите об этой "
 "проблеме разработчикам ALSA."
 
-#: ../src/modules/alsa/alsa-util.c:1268
+#: ../src/modules/alsa/alsa-util.c:1269
 #, c-format
 msgid ""
 "snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes "
@@ -1097,80 +1099,80 @@ msgstr ""
 "Вероятно, это ошибка в драйвере ALSA «%s». Пожалуйста, сообщите об этой "
 "проблеме разработчикам ALSA."
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2087
-#: ../src/modules/bluetooth/module-bluez5-device.c:1437
+#: ../src/modules/bluetooth/module-bluez4-device.c:2091
+#: ../src/modules/bluetooth/module-bluez5-device.c:1441
 msgid "Headset"
 msgstr "Гарнитура"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2092
-#: ../src/modules/bluetooth/module-bluez5-device.c:1442
+#: ../src/modules/bluetooth/module-bluez4-device.c:2096
+#: ../src/modules/bluetooth/module-bluez5-device.c:1446
 msgid "Handsfree"
 msgstr "Хендс-фри"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2107
-#: ../src/modules/bluetooth/module-bluez5-device.c:1460
+#: ../src/modules/bluetooth/module-bluez4-device.c:2111
+#: ../src/modules/bluetooth/module-bluez5-device.c:1464
 msgid "Headphone"
 msgstr "Наушник"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2112
-#: ../src/modules/bluetooth/module-bluez5-device.c:1465
+#: ../src/modules/bluetooth/module-bluez4-device.c:2116
+#: ../src/modules/bluetooth/module-bluez5-device.c:1469
 msgid "Portable"
 msgstr "Портативный динамик"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2117
-#: ../src/modules/bluetooth/module-bluez5-device.c:1470
+#: ../src/modules/bluetooth/module-bluez4-device.c:2121
+#: ../src/modules/bluetooth/module-bluez5-device.c:1474
 msgid "Car"
 msgstr "Автомобильный динамик"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2122
-#: ../src/modules/bluetooth/module-bluez5-device.c:1475
+#: ../src/modules/bluetooth/module-bluez4-device.c:2126
+#: ../src/modules/bluetooth/module-bluez5-device.c:1479
 msgid "HiFi"
 msgstr "Hi-Fi"
 
 # BUGME: please clarify, does this mean a cell phone? --aspotashev
-#: ../src/modules/bluetooth/module-bluez4-device.c:2127
-#: ../src/modules/bluetooth/module-bluez5-device.c:1480
+#: ../src/modules/bluetooth/module-bluez4-device.c:2131
+#: ../src/modules/bluetooth/module-bluez5-device.c:1484
 msgid "Phone"
 msgstr "Телефон"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2135
-#: ../src/modules/bluetooth/module-bluez5-device.c:1432
-#: ../src/modules/bluetooth/module-bluez5-device.c:1448
-#: ../src/modules/bluetooth/module-bluez5-device.c:1486
+#: ../src/modules/bluetooth/module-bluez4-device.c:2139
+#: ../src/modules/bluetooth/module-bluez5-device.c:1436
+#: ../src/modules/bluetooth/module-bluez5-device.c:1452
+#: ../src/modules/bluetooth/module-bluez5-device.c:1490
 msgid "Bluetooth Output"
 msgstr "Выход Bluetooth"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2138
-#: ../src/modules/bluetooth/module-bluez5-device.c:1431
-#: ../src/modules/bluetooth/module-bluez5-device.c:1453
-#: ../src/modules/bluetooth/module-bluez5-device.c:1459
-#: ../src/modules/bluetooth/module-bluez5-device.c:1485
+#: ../src/modules/bluetooth/module-bluez4-device.c:2142
+#: ../src/modules/bluetooth/module-bluez5-device.c:1435
+#: ../src/modules/bluetooth/module-bluez5-device.c:1457
+#: ../src/modules/bluetooth/module-bluez5-device.c:1463
+#: ../src/modules/bluetooth/module-bluez5-device.c:1489
 msgid "Bluetooth Input"
 msgstr "Вход Bluetooth"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2174
+#: ../src/modules/bluetooth/module-bluez4-device.c:2178
 msgid "High Fidelity Playback (A2DP)"
 msgstr "Воспроизведение высокого качества (A2DP)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2185
+#: ../src/modules/bluetooth/module-bluez4-device.c:2189
 msgid "High Fidelity Capture (A2DP)"
 msgstr "Запись высокого качества (A2DP)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2196
+#: ../src/modules/bluetooth/module-bluez4-device.c:2200
 msgid "Telephony Duplex (HSP/HFP)"
 msgstr "Дуплексная телефония (HSP/HFP)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2208
+#: ../src/modules/bluetooth/module-bluez4-device.c:2212
 msgid "Handsfree Gateway"
 msgstr "Шлюз передачи данных для хендс-фри"
 
 #. TODO: Change this profile's name to a2dp_sink, to reflect the remote
 #. * device's role and be consistent with the a2dp source profile
-#: ../src/modules/bluetooth/module-bluez5-device.c:1525
+#: ../src/modules/bluetooth/module-bluez5-device.c:1529
 msgid "High Fidelity Playback (A2DP Sink)"
 msgstr "Воспроизведение высокого качества (приёмник A2DP)"
 
-#: ../src/modules/bluetooth/module-bluez5-device.c:1536
+#: ../src/modules/bluetooth/module-bluez5-device.c:1540
 msgid "High Fidelity Capture (A2DP Source)"
 msgstr "Запись высокого качества (передатчик A2DP)"
 
@@ -1553,38 +1555,33 @@ msgstr "Объёмный 5.1"
 msgid "Surround 7.1"
 msgstr "Объёмный 7.1"
 
-#: ../src/pulse/client-conf.c:119
-#, c-format
-msgid "Failed to open configuration file '%s': %s"
-msgstr "Не удалось открыть файл конфигурации «%s»: %s"
-
-#: ../src/pulse/client-conf.c:213 ../src/pulse/client-conf-x11.c:95
-msgid "Failed to parse cookie data"
-msgstr "Не удалось разобрать данные cookie"
-
-#: ../src/pulse/client-conf-x11.c:54 ../src/utils/pax11publish.c:99
+#: ../src/pulse/client-conf-x11.c:55 ../src/utils/pax11publish.c:99
 msgid "xcb_connect() failed"
 msgstr "Произошла ошибка при выполнении pa_context_connect()."
 
-#: ../src/pulse/client-conf-x11.c:59 ../src/utils/pax11publish.c:104
+#: ../src/pulse/client-conf-x11.c:60 ../src/utils/pax11publish.c:104
 msgid "xcb_connection_has_error() returned true"
 msgstr "Вызов xcb_connection_has_error() вернул «true»."
 
-#: ../src/pulse/context.c:528
+#: ../src/pulse/client-conf-x11.c:96
+msgid "Failed to parse cookie data"
+msgstr "Не удалось разобрать данные cookie"
+
+#: ../src/pulse/context.c:529
 msgid "No cookie loaded. Attempting to connect without."
 msgstr "Cookie не загружены. Попытка подключения без них."
 
-#: ../src/pulse/context.c:609
+#: ../src/pulse/context.c:610
 #, c-format
 msgid "fork(): %s"
 msgstr "fork(): %s"
 
-#: ../src/pulse/context.c:664
+#: ../src/pulse/context.c:665
 #, c-format
 msgid "waitpid(): %s"
 msgstr "waitpid(): %s"
 
-#: ../src/pulse/context.c:1365
+#: ../src/pulse/context.c:1366
 #, c-format
 msgid "Received message for unknown extension '%s'"
 msgstr "Получено сообщение для неизвестного расширения «%s»."
@@ -1612,11 +1609,11 @@ msgstr ""
 msgid "Invalid log target."
 msgstr "Недопустимый журнал."
 
-#: ../src/pulsecore/sink.c:3483
+#: ../src/pulsecore/sink.c:3428
 msgid "Built-in Audio"
 msgstr "Встроенное аудио"
 
-#: ../src/pulsecore/sink.c:3488
+#: ../src/pulsecore/sink.c:3433
 msgid "Modem"
 msgstr "Модем"
 
@@ -1657,6 +1654,7 @@ msgid "Timeout"
 msgstr "Время ожидания истекло"
 
 # BUGME: authorization -> authentication? --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78566
 #: ../src/pulse/error.c:49
 msgid "No authorization key"
 msgstr "Нет ключа аутентификации"
@@ -1883,11 +1881,12 @@ msgstr "Показатели буфера: maxlength=%u, fragsize=%u"
 msgid "Using sample spec '%s', channel map '%s'."
 msgstr "Использование отсчётов «%s», схемы каналов «%s»."
 
-# BUGME: word puzzle, "not" is not translatable. --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=76529
 #: ../src/utils/pacat.c:359
 #, c-format
-msgid "Connected to device %s (%u, %ssuspended)."
-msgstr "Установлено соединение с устройством %s (%u, %sприостановлено)."
+msgid "Connected to device %s (index: %u, suspended: %s)."
+msgstr ""
+"Установлено соединение с устройством %s (номер: %u, приостановлено: %s)."
 
 #: ../src/utils/pacat.c:369
 #, c-format
@@ -1920,6 +1919,7 @@ msgid "Stream started.%s"
 msgstr "Поток запущен.%s"
 
 # BUGME: word puzzle with "not". --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=76529
 #: ../src/utils/pacat.c:410
 #, c-format
 msgid "Stream moved to device %s (%u, %ssuspended).%s"
@@ -1945,6 +1945,7 @@ msgstr ""
 "возобновление потока."
 
 # BUGME: remove exclamation --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78563
 #: ../src/utils/pacat.c:442
 msgid "Warning: Received more uncork requests than cork requests!"
 msgstr ""
@@ -1976,7 +1977,7 @@ msgstr "Не удалось установить мониторный поток
 msgid "pa_stream_connect_record() failed: %s"
 msgstr "Произошла ошибка при выполнении pa_stream_connect_record(): %s"
 
-#: ../src/utils/pacat.c:531 ../src/utils/pactl.c:1388
+#: ../src/utils/pacat.c:531 ../src/utils/pactl.c:1455
 #, c-format
 msgid "Connection failure: %s"
 msgstr "Ошибка подключения: %s"
@@ -2045,16 +2046,16 @@ msgid ""
 "                                        (defaults to 2)\n"
 "      --channel-map=CHANNELMAP          Channel map to use instead of the "
 "default\n"
-"      --fix-format                      Take the sample format from the sink "
-"the stream is\n"
+"      --fix-format                      Take the sample format from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
-"      --fix-rate                        Take the sampling rate from the sink "
-"the stream is\n"
+"      --fix-rate                        Take the sampling rate from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
 "      --fix-channels                    Take the number of channels and the "
 "channel map\n"
-"                                        from the sink the stream is being "
-"connected to.\n"
+"                                        from the sink/source the stream is "
+"being connected to.\n"
 "      --no-remix                        Don't upmix or downmix channels.\n"
 "      --no-remap                        Map channels by index instead of "
 "name.\n"
@@ -2069,7 +2070,7 @@ msgid ""
 "      --property=PROPERTY=VALUE         Set the specified property to the "
 "specified value.\n"
 "      --raw                             Record/play raw PCM data.\n"
-"      --passthrough                     passthrough data \n"
+"      --passthrough                     Passthrough data.\n"
 "      --file-format[=FFORMAT]           Record/play formatted PCM data.\n"
 "      --list-file-formats               List available file formats.\n"
 "      --monitor-stream=INDEX            Record from the sink input with "
@@ -2114,14 +2115,16 @@ msgstr ""
 "вместо\n"
 "                                        стандартной.\n"
 "      --fix-format                      Использовать формат отсчётов как у\n"
-"                                        аудиоприёмника, к которому "
+"                                        аудиоприёмника/источника, к которому "
 "подключён\n"
 "                                        поток.\n"
 "      --fix-rate                        Использовать частоту дискретизации\n"
-"                                        как у аудиоприёмника, к которому\n"
+"                                        как у аудиоприёмника/источника, к "
+"которому\n"
 "                                        подключён поток.\n"
 "      --fix-channels                    Использовать число каналов и схему\n"
-"                                        каналов как у аудиоприёмника,\n"
+"                                        каналов как у "
+"аудиоприёмника/источника,\n"
 "                                        к которому подключён поток.\n"
 "      --no-remix                        Не менять число каналов.\n"
 "      --no-remap                        Сопоставлять каналы по их номерам,\n"
@@ -2162,7 +2165,7 @@ msgstr ""
 "Скомпилировано с libpulse %s\n"
 "Скомпоновано с libpulse %s\n"
 
-#: ../src/utils/pacat.c:843 ../src/utils/pactl.c:1559
+#: ../src/utils/pacat.c:843 ../src/utils/pactl.c:1651
 #, c-format
 msgid "Invalid client name '%s'"
 msgstr "Недопустимое имя клиента «%s»."
@@ -2235,7 +2238,7 @@ msgstr ""
 "Предупреждение: указанная спецификация отсчётов будет заменена спецификацией "
 "из файла."
 
-#: ../src/utils/pacat.c:1070 ../src/utils/pactl.c:1626
+#: ../src/utils/pacat.c:1070 ../src/utils/pactl.c:1718
 msgid "Failed to determine sample specification from file."
 msgstr "Не удалось определить спецификацию отсчётов из файла."
 
@@ -2271,7 +2274,7 @@ msgstr "воспроизведения"
 msgid "Failed to set media name."
 msgstr "Не удалось установить имя потока."
 
-#: ../src/utils/pacat.c:1148 ../src/utils/pactl.c:1976
+#: ../src/utils/pacat.c:1148 ../src/utils/pactl.c:2068
 msgid "pa_mainloop_new() failed."
 msgstr "Произошла ошибка при выполнении pa_mainloop_new()."
 
@@ -2279,11 +2282,11 @@ msgstr "Произошла ошибка при выполнении pa_mainloop_
 msgid "io_new() failed."
 msgstr "Произошла ошибка при выполнении io_new()."
 
-#: ../src/utils/pacat.c:1178 ../src/utils/pactl.c:1988
+#: ../src/utils/pacat.c:1178 ../src/utils/pactl.c:2080
 msgid "pa_context_new() failed."
 msgstr "Произошла ошибка при выполнении pa_context_new()."
 
-#: ../src/utils/pacat.c:1186 ../src/utils/pactl.c:1994
+#: ../src/utils/pacat.c:1186 ../src/utils/pactl.c:2086
 #, c-format
 msgid "pa_context_connect() failed: %s"
 msgstr "Произошла ошибка при выполнении pa_context_connect(): %s"
@@ -2292,32 +2295,32 @@ msgstr "Произошла ошибка при выполнении pa_context_c
 msgid "pa_context_rttime_new() failed."
 msgstr "Произошла ошибка при выполнении pa_context_rttime_new()."
 
-#: ../src/utils/pacat.c:1199 ../src/utils/pactl.c:1999
+#: ../src/utils/pacat.c:1199 ../src/utils/pactl.c:2091
 msgid "pa_mainloop_run() failed."
 msgstr "Произошла ошибка при выполнении pa_mainloop_run()."
 
-#: ../src/utils/pacmd.c:53 ../src/utils/pactl.c:1481
+#: ../src/utils/pacmd.c:53 ../src/utils/pactl.c:1573
 msgid "NAME [ARGS ...]"
 msgstr "ИМЯ [АРГУМЕНТЫ ...]"
 
-#: ../src/utils/pacmd.c:54 ../src/utils/pacmd.c:62 ../src/utils/pactl.c:1482
+#: ../src/utils/pacmd.c:54 ../src/utils/pacmd.c:62 ../src/utils/pactl.c:1574
 msgid "NAME|#N"
 msgstr "ИМЯ|№"
 
-#: ../src/utils/pacmd.c:55 ../src/utils/pacmd.c:65 ../src/utils/pactl.c:1480
-#: ../src/utils/pactl.c:1486
+#: ../src/utils/pacmd.c:55 ../src/utils/pacmd.c:65 ../src/utils/pactl.c:1572
+#: ../src/utils/pactl.c:1578
 msgid "NAME"
 msgstr "ИМЯ"
 
-#: ../src/utils/pacmd.c:56 ../src/utils/pactl.c:1488
+#: ../src/utils/pacmd.c:56
 msgid "NAME|#N VOLUME"
 msgstr "ИМЯ|№ ГРОМКОСТЬ"
 
-#: ../src/utils/pacmd.c:57 ../src/utils/pactl.c:1489
+#: ../src/utils/pacmd.c:57
 msgid "#N VOLUME"
 msgstr "№ ГРОМКОСТЬ"
 
-#: ../src/utils/pacmd.c:58 ../src/utils/pacmd.c:72 ../src/utils/pactl.c:1484
+#: ../src/utils/pacmd.c:58 ../src/utils/pacmd.c:72 ../src/utils/pactl.c:1576
 msgid "NAME|#N 1|0"
 msgstr "ИМЯ|№ 1|0"
 
@@ -2353,7 +2356,7 @@ msgstr "ПУТЬ"
 msgid "FILENAME SINK|#N"
 msgstr "ИМЯ_ФАЙЛА АУДИОПРИЁМНИК|№"
 
-#: ../src/utils/pacmd.c:71 ../src/utils/pactl.c:1483
+#: ../src/utils/pacmd.c:71 ../src/utils/pactl.c:1575
 msgid "#N SINK|SOURCE"
 msgstr "№ АУДИОПРИЁМНИК|ИСТОЧНИК"
 
@@ -2361,15 +2364,15 @@ msgstr "№ АУДИОПРИЁМНИК|ИСТОЧНИК"
 msgid "1|0"
 msgstr "1|0"
 
-#: ../src/utils/pacmd.c:74 ../src/utils/pactl.c:1485
+#: ../src/utils/pacmd.c:74 ../src/utils/pactl.c:1577
 msgid "CARD PROFILE"
 msgstr "ПЛАТА ПРОФИЛЬ"
 
-#: ../src/utils/pacmd.c:75 ../src/utils/pactl.c:1487
+#: ../src/utils/pacmd.c:75 ../src/utils/pactl.c:1579
 msgid "NAME|#N PORT"
 msgstr "ИМЯ|№ ПОРТ"
 
-#: ../src/utils/pacmd.c:76 ../src/utils/pactl.c:1493
+#: ../src/utils/pacmd.c:76 ../src/utils/pactl.c:1585
 msgid "CARD-NAME|CARD-#N PORT OFFSET"
 msgstr "ИМЯ_ПЛАТЫ|№_ПЛАТЫ ПОРТ ЗАДЕРЖКА"
 
@@ -2378,6 +2381,7 @@ msgid "TARGET"
 msgstr "КУДА"
 
 # BUGME: change "NUMERIC LEVEL" to "NUMERIC-LEVEL", because it's a single argument. --aspotashev
+# https://bugs.freedesktop.org/show_bug.cgi?id=78565
 #: ../src/utils/pacmd.c:78
 msgid "NUMERIC LEVEL"
 msgstr "ЧИСЛОВОЙ-УРОВЕНЬ"
@@ -2450,33 +2454,33 @@ msgstr "poll(): %s"
 msgid "read(): %s"
 msgstr "read(): %s"
 
-#: ../src/utils/pactl.c:161
+#: ../src/utils/pactl.c:166
 #, c-format
 msgid "Failed to get statistics: %s"
 msgstr "Не удалось получить статистику: %s"
 
-#: ../src/utils/pactl.c:167
+#: ../src/utils/pactl.c:172
 #, c-format
 msgid "Currently in use: %u blocks containing %s bytes total.\n"
 msgstr "Сейчас используется: %u блоков, содержащих в совокупности %s байт.\n"
 
-#: ../src/utils/pactl.c:170
+#: ../src/utils/pactl.c:175
 #, c-format
 msgid "Allocated during whole lifetime: %u blocks containing %s bytes total.\n"
 msgstr "Выделено за всё время: %u блоков, содержащих в совокупности %s байт.\n"
 
-#: ../src/utils/pactl.c:173
+#: ../src/utils/pactl.c:178
 #, c-format
 msgid "Sample cache size: %s\n"
 msgstr "Размер кэша сэмплов: %s\n"
 
-#: ../src/utils/pactl.c:182
+#: ../src/utils/pactl.c:187
 #, c-format
 msgid "Failed to get server information: %s"
 msgstr "Не удалось получить информацию о сервере: %s"
 
 # Tile Size = PA_MEMPOOL_SLOT_SIZE in src/pulsecore/memblock.c. --aspotashev
-#: ../src/utils/pactl.c:187
+#: ../src/utils/pactl.c:192
 #, c-format
 msgid ""
 "Server String: %s\n"
@@ -2493,7 +2497,7 @@ msgstr ""
 "Номер клиента: %u\n"
 "Размер блока памяти: %zu\n"
 
-#: ../src/utils/pactl.c:203
+#: ../src/utils/pactl.c:208
 #, c-format
 msgid ""
 "User Name: %s\n"
@@ -2516,12 +2520,12 @@ msgstr ""
 "Источник по умолчанию: %s\n"
 "Cookie: %04x:%04x\n"
 
-#: ../src/utils/pactl.c:252 ../src/utils/pactl.c:878 ../src/utils/pactl.c:952
+#: ../src/utils/pactl.c:257 ../src/utils/pactl.c:902 ../src/utils/pactl.c:980
 #, c-format
 msgid "Failed to get sink information: %s"
 msgstr "Не удалось получить информацию об аудиоприёмнике: %s"
 
-#: ../src/utils/pactl.c:278
+#: ../src/utils/pactl.c:283
 #, c-format
 msgid ""
 "Sink #%u\n"
@@ -2560,27 +2564,27 @@ msgstr ""
 "\tСвойства:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:322 ../src/utils/pactl.c:428 ../src/utils/pactl.c:589
+#: ../src/utils/pactl.c:327 ../src/utils/pactl.c:433 ../src/utils/pactl.c:594
 #, c-format
 msgid "\tPorts:\n"
 msgstr "\tПорты:\n"
 
-#: ../src/utils/pactl.c:329 ../src/utils/pactl.c:435
+#: ../src/utils/pactl.c:334 ../src/utils/pactl.c:440
 #, c-format
 msgid "\tActive Port: %s\n"
 msgstr "\tАктивный порт: %s\n"
 
-#: ../src/utils/pactl.c:335 ../src/utils/pactl.c:441
+#: ../src/utils/pactl.c:340 ../src/utils/pactl.c:446
 #, c-format
 msgid "\tFormats:\n"
 msgstr "\tФорматы:\n"
 
-#: ../src/utils/pactl.c:359 ../src/utils/pactl.c:897 ../src/utils/pactl.c:967
+#: ../src/utils/pactl.c:364 ../src/utils/pactl.c:922 ../src/utils/pactl.c:995
 #, c-format
 msgid "Failed to get source information: %s"
 msgstr "Не удалось получить информацию об источнике: %s"
 
-#: ../src/utils/pactl.c:385
+#: ../src/utils/pactl.c:390
 #, c-format
 msgid ""
 "Source #%u\n"
@@ -2619,20 +2623,20 @@ msgstr ""
 "\tСвойства:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:413 ../src/utils/pactl.c:483 ../src/utils/pactl.c:526
-#: ../src/utils/pactl.c:568 ../src/utils/pactl.c:666 ../src/utils/pactl.c:667
-#: ../src/utils/pactl.c:678 ../src/utils/pactl.c:736 ../src/utils/pactl.c:737
-#: ../src/utils/pactl.c:748 ../src/utils/pactl.c:799 ../src/utils/pactl.c:800
-#: ../src/utils/pactl.c:806
+#: ../src/utils/pactl.c:418 ../src/utils/pactl.c:488 ../src/utils/pactl.c:531
+#: ../src/utils/pactl.c:573 ../src/utils/pactl.c:671 ../src/utils/pactl.c:672
+#: ../src/utils/pactl.c:683 ../src/utils/pactl.c:741 ../src/utils/pactl.c:742
+#: ../src/utils/pactl.c:753 ../src/utils/pactl.c:804 ../src/utils/pactl.c:805
+#: ../src/utils/pactl.c:811
 msgid "n/a"
 msgstr "н/д"
 
-#: ../src/utils/pactl.c:452 ../src/utils/pactl.c:853
+#: ../src/utils/pactl.c:457 ../src/utils/pactl.c:861
 #, c-format
 msgid "Failed to get module information: %s"
 msgstr "Не удалось получить информацию о модуле: %s"
 
-#: ../src/utils/pactl.c:475
+#: ../src/utils/pactl.c:480
 #, c-format
 msgid ""
 "Module #%u\n"
@@ -2649,12 +2653,12 @@ msgstr ""
 "\tСвойства:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:494
+#: ../src/utils/pactl.c:499
 #, c-format
 msgid "Failed to get client information: %s"
 msgstr "Не удалось получить информацию о клиенте: %s"
 
-#: ../src/utils/pactl.c:520
+#: ../src/utils/pactl.c:525
 #, c-format
 msgid ""
 "Client #%u\n"
@@ -2669,12 +2673,12 @@ msgstr ""
 "\tСвойства:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:537
+#: ../src/utils/pactl.c:542
 #, c-format
 msgid "Failed to get card information: %s"
 msgstr "Не удалось получить информацию о звуковой плате: %s"
 
-#: ../src/utils/pactl.c:560
+#: ../src/utils/pactl.c:565
 #, c-format
 msgid ""
 "Card #%u\n"
@@ -2691,17 +2695,17 @@ msgstr ""
 "\tСвойства:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:576
+#: ../src/utils/pactl.c:581
 #, c-format
 msgid "\tProfiles:\n"
 msgstr "\tПрофили:\n"
 
-#: ../src/utils/pactl.c:583
+#: ../src/utils/pactl.c:588
 #, c-format
 msgid "\tActive Profile: %s\n"
 msgstr "\tАктивный профиль: %s\n"
 
-#: ../src/utils/pactl.c:597
+#: ../src/utils/pactl.c:602
 #, c-format
 msgid ""
 "\t\t\tProperties:\n"
@@ -2710,17 +2714,17 @@ msgstr ""
 "\t\t\tСвойства:\n"
 "\t\t\t\t%s\n"
 
-#: ../src/utils/pactl.c:602
+#: ../src/utils/pactl.c:607
 #, c-format
 msgid "\t\t\tPart of profile(s): %s"
 msgstr "\t\t\tВходит в профиль(и): %s"
 
-#: ../src/utils/pactl.c:619 ../src/utils/pactl.c:916 ../src/utils/pactl.c:982
+#: ../src/utils/pactl.c:624 ../src/utils/pactl.c:942 ../src/utils/pactl.c:1010
 #, c-format
 msgid "Failed to get sink input information: %s"
 msgstr "Не удалось получить информацию о входе аудиоприёмника: %s"
 
-#: ../src/utils/pactl.c:648
+#: ../src/utils/pactl.c:653
 #, c-format
 msgid ""
 "Sink Input #%u\n"
@@ -2759,12 +2763,12 @@ msgstr ""
 "\tСвойства:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:689 ../src/utils/pactl.c:935 ../src/utils/pactl.c:997
+#: ../src/utils/pactl.c:694 ../src/utils/pactl.c:962 ../src/utils/pactl.c:1025
 #, c-format
 msgid "Failed to get source output information: %s"
 msgstr "Не удалось получить информацию о выходе источника: %s"
 
-#: ../src/utils/pactl.c:718
+#: ../src/utils/pactl.c:723
 #, c-format
 msgid ""
 "Source Output #%u\n"
@@ -2803,12 +2807,12 @@ msgstr ""
 "\tСвойства:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:759
+#: ../src/utils/pactl.c:764
 #, c-format
 msgid "Failed to get sample information: %s"
 msgstr "Не удалось получить информацию о сэмплах: %s"
 
-#: ../src/utils/pactl.c:786
+#: ../src/utils/pactl.c:791
 #, c-format
 msgid ""
 "Sample #%u\n"
@@ -2837,143 +2841,173 @@ msgstr ""
 "\tСвойства:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:814 ../src/utils/pactl.c:824
+#: ../src/utils/pactl.c:819 ../src/utils/pactl.c:829
 #, c-format
 msgid "Failure: %s"
 msgstr "Произошла ошибка: %s"
 
-#: ../src/utils/pactl.c:860
+#: ../src/utils/pactl.c:868
 #, c-format
 msgid "Failed to unload module: Module %s not loaded"
 msgstr "Не удалось выгрузить модуль: модуль «%s» не загружен."
 
-#: ../src/utils/pactl.c:1023
+#: ../src/utils/pactl.c:886
+#, c-format
+msgid ""
+"Failed to set volume: You tried to set volumes for %d channels, whereas "
+"channel/s supported = %d\n"
+msgstr ""
+"Не удалось задать громкость: вы установить задать громкость для %d каналов, "
+"но число поддерживаемых каналов не совпадает и равно %d\n"
+
+#: ../src/utils/pactl.c:1052
 #, c-format
 msgid "Failed to set format: invalid format string %s"
 msgstr "Не удалось задать формат: недопустимый формат «%s»."
 
-#: ../src/utils/pactl.c:1062
+#: ../src/utils/pactl.c:1095
 #, c-format
 msgid "Failed to upload sample: %s"
 msgstr "Не удалось загрузить сэмпл в кэш: %s"
 
-#: ../src/utils/pactl.c:1079
+#: ../src/utils/pactl.c:1112
 msgid "Premature end of file"
 msgstr "Неожиданный конец файла."
 
-#: ../src/utils/pactl.c:1099
+#: ../src/utils/pactl.c:1132
 msgid "new"
 msgstr "появление"
 
-#: ../src/utils/pactl.c:1102
+#: ../src/utils/pactl.c:1135
 msgid "change"
 msgstr "изменение"
 
-#: ../src/utils/pactl.c:1105
+#: ../src/utils/pactl.c:1138
 msgid "remove"
 msgstr "удаление"
 
-#: ../src/utils/pactl.c:1108 ../src/utils/pactl.c:1143
+#: ../src/utils/pactl.c:1141 ../src/utils/pactl.c:1176
 msgid "unknown"
 msgstr "(неизвестно)"
 
 # [event-facility] --aspotashev
-#: ../src/utils/pactl.c:1116
+#: ../src/utils/pactl.c:1149
 msgid "sink"
 msgstr "аудиоприёмника"
 
 # [event-facility] --aspotashev
-#: ../src/utils/pactl.c:1119
+#: ../src/utils/pactl.c:1152
 msgid "source"
 msgstr "источника"
 
 # [event-facility] --aspotashev
-#: ../src/utils/pactl.c:1122
+#: ../src/utils/pactl.c:1155
 msgid "sink-input"
 msgstr "входа аудиоприёмника"
 
 # [event-facility] --aspotashev
-#: ../src/utils/pactl.c:1125
+#: ../src/utils/pactl.c:1158
 msgid "source-output"
 msgstr "выхода источника"
 
 # [event-facility] --aspotashev
-#: ../src/utils/pactl.c:1128
+#: ../src/utils/pactl.c:1161
 msgid "module"
 msgstr "модуля"
 
 # [event-facility] --aspotashev
-#: ../src/utils/pactl.c:1131
+#: ../src/utils/pactl.c:1164
 msgid "client"
 msgstr "клиента"
 
 # [event-facility] --aspotashev
-#: ../src/utils/pactl.c:1134
+#: ../src/utils/pactl.c:1167
 msgid "sample-cache"
 msgstr "кэшированного сэмпла"
 
 # [event-facility] --aspotashev
-#: ../src/utils/pactl.c:1137 ../src/utils/pactl.c:1140
+#: ../src/utils/pactl.c:1170
 msgid "server"
 msgstr "сервера"
 
+# [event-facility] --aspotashev
+#: ../src/utils/pactl.c:1173
+msgid "card"
+msgstr "платы"
+
 # "Событие [event-type] в отношении [event-facility] #N", поэтому все строки [event-facility] выше пишем в родительном падеже. --aspotashev
-#: ../src/utils/pactl.c:1149
+#: ../src/utils/pactl.c:1182
 #, c-format
 msgid "Event '%s' on %s #%u\n"
 msgstr "Событие «%s» в отношении %s №%u\n"
 
-#: ../src/utils/pactl.c:1394
+#: ../src/utils/pactl.c:1461
 msgid "Got SIGINT, exiting."
 msgstr "Получен сигнал для остановки (SIGINT), выход."
 
-#: ../src/utils/pactl.c:1421
+#: ../src/utils/pactl.c:1488
 msgid "Invalid volume specification"
 msgstr "Недопустимое значение громкости."
 
-#: ../src/utils/pactl.c:1444
+#: ../src/utils/pactl.c:1511
 msgid "Volume outside permissible range.\n"
 msgstr "Указанная громкость выходит за границы разрешённого диапазона.\n"
 
-#: ../src/utils/pactl.c:1474 ../src/utils/pactl.c:1475
-#: ../src/utils/pactl.c:1476 ../src/utils/pactl.c:1477
-#: ../src/utils/pactl.c:1478 ../src/utils/pactl.c:1479
-#: ../src/utils/pactl.c:1480 ../src/utils/pactl.c:1481
-#: ../src/utils/pactl.c:1482 ../src/utils/pactl.c:1483
-#: ../src/utils/pactl.c:1484 ../src/utils/pactl.c:1485
-#: ../src/utils/pactl.c:1486 ../src/utils/pactl.c:1487
-#: ../src/utils/pactl.c:1488 ../src/utils/pactl.c:1489
-#: ../src/utils/pactl.c:1490 ../src/utils/pactl.c:1491
-#: ../src/utils/pactl.c:1492 ../src/utils/pactl.c:1493
-#: ../src/utils/pactl.c:1494
+#: ../src/utils/pactl.c:1524
+msgid "Invalid number of volume specifications.\n"
+msgstr "Недопустимое количество значений громкости.\n"
+
+#: ../src/utils/pactl.c:1536
+msgid "Inconsistent volume specification.\n"
+msgstr "Несогласованные способы указания значений громкости.\n"
+
+#: ../src/utils/pactl.c:1566 ../src/utils/pactl.c:1567
+#: ../src/utils/pactl.c:1568 ../src/utils/pactl.c:1569
+#: ../src/utils/pactl.c:1570 ../src/utils/pactl.c:1571
+#: ../src/utils/pactl.c:1572 ../src/utils/pactl.c:1573
+#: ../src/utils/pactl.c:1574 ../src/utils/pactl.c:1575
+#: ../src/utils/pactl.c:1576 ../src/utils/pactl.c:1577
+#: ../src/utils/pactl.c:1578 ../src/utils/pactl.c:1579
+#: ../src/utils/pactl.c:1580 ../src/utils/pactl.c:1581
+#: ../src/utils/pactl.c:1582 ../src/utils/pactl.c:1583
+#: ../src/utils/pactl.c:1584 ../src/utils/pactl.c:1585
+#: ../src/utils/pactl.c:1586
 msgid "[options]"
 msgstr "[параметры]"
 
-#: ../src/utils/pactl.c:1476
+#: ../src/utils/pactl.c:1568
 msgid "[TYPE]"
 msgstr "[ТИП]"
 
-#: ../src/utils/pactl.c:1478
+#: ../src/utils/pactl.c:1570
 msgid "FILENAME [NAME]"
 msgstr "ИМЯ_ФАЙЛА [ИМЯ]"
 
-#: ../src/utils/pactl.c:1479
+#: ../src/utils/pactl.c:1571
 msgid "NAME [SINK]"
 msgstr "ИМЯ [АУДИОПРИЁМНИК]"
 
-#: ../src/utils/pactl.c:1490
+#: ../src/utils/pactl.c:1580
+msgid "NAME|#N VOLUME [VOLUME ...]"
+msgstr "ИМЯ|№ ГРОМКОСТЬ [ГРОМКОСТЬ ...]"
+
+#: ../src/utils/pactl.c:1581
+msgid "#N VOLUME [VOLUME ...]"
+msgstr "№ ГРОМКОСТЬ [ГРОМКОСТЬ ...]"
+
+#: ../src/utils/pactl.c:1582
 msgid "NAME|#N 1|0|toggle"
 msgstr "ИМЯ|№ 1|0|toggle"
 
-#: ../src/utils/pactl.c:1491
+#: ../src/utils/pactl.c:1583
 msgid "#N 1|0|toggle"
 msgstr "№ 1|0|toggle"
 
-#: ../src/utils/pactl.c:1492
+#: ../src/utils/pactl.c:1584
 msgid "#N FORMATS"
 msgstr "№ ФОРМАТЫ"
 
-#: ../src/utils/pactl.c:1495
+#: ../src/utils/pactl.c:1587
 #, c-format
 msgid ""
 "\n"
@@ -2985,7 +3019,7 @@ msgstr ""
 "можно использовать для указания аудиоприёмника, источника и монитора,\n"
 "используемых по умолчанию.\n"
 
-#: ../src/utils/pactl.c:1498
+#: ../src/utils/pactl.c:1590
 #, c-format
 msgid ""
 "\n"
@@ -3006,7 +3040,7 @@ msgstr ""
 "  -n, --client-name=ИМЯ                 Имя этого клиента, которое будет\n"
 "                                        представлено серверу.\n"
 
-#: ../src/utils/pactl.c:1539
+#: ../src/utils/pactl.c:1631
 #, c-format
 msgid ""
 "pactl %s\n"
@@ -3017,60 +3051,60 @@ msgstr ""
 "Скомпилировано с libpulse %s\n"
 "Скомпоновано с libpulse %s\n"
 
-#: ../src/utils/pactl.c:1598
+#: ../src/utils/pactl.c:1690
 #, c-format
 msgid "Specify nothing, or one of: %s"
 msgstr "Не указывайте ничего либо укажите одно из: %s"
 
-#: ../src/utils/pactl.c:1608
+#: ../src/utils/pactl.c:1700
 msgid "Please specify a sample file to load"
 msgstr "Необходимо указать файл, из которого будет загружен сэмпл."
 
-#: ../src/utils/pactl.c:1621
+#: ../src/utils/pactl.c:1713
 msgid "Failed to open sound file."
 msgstr "Не удалось открыть аудиофайл."
 
-#: ../src/utils/pactl.c:1633
+#: ../src/utils/pactl.c:1725
 msgid "Warning: Failed to determine sample specification from file."
 msgstr "Предупреждение: не удалось определить спецификацию отсчётов из файла."
 
-#: ../src/utils/pactl.c:1643
+#: ../src/utils/pactl.c:1735
 msgid "You have to specify a sample name to play"
 msgstr "Необходимо указать имя сэмпла для воспроизведения."
 
-#: ../src/utils/pactl.c:1655
+#: ../src/utils/pactl.c:1747
 msgid "You have to specify a sample name to remove"
 msgstr "Необходимо указать имя сэмпла для удаления."
 
-#: ../src/utils/pactl.c:1664
+#: ../src/utils/pactl.c:1756
 msgid "You have to specify a sink input index and a sink"
 msgstr "Необходимо указать номер входа аудиоприёмника и аудиоприёмник."
 
-#: ../src/utils/pactl.c:1674
+#: ../src/utils/pactl.c:1766
 msgid "You have to specify a source output index and a source"
 msgstr "Необходимо указать номер выхода источника и источник."
 
-#: ../src/utils/pactl.c:1689
+#: ../src/utils/pactl.c:1781
 msgid "You have to specify a module name and arguments."
 msgstr "Необходимо указать имя модуля и аргументы."
 
-#: ../src/utils/pactl.c:1709
+#: ../src/utils/pactl.c:1801
 msgid "You have to specify a module index or name"
 msgstr "Необходимо указать номер или имя модуля."
 
-#: ../src/utils/pactl.c:1722
+#: ../src/utils/pactl.c:1814
 msgid ""
 "You may not specify more than one sink. You have to specify a boolean value."
 msgstr ""
 "Нельзя указывать больше одного аудиоприёмника. Необходимо указать логическое "
 "значение."
 
-#: ../src/utils/pactl.c:1727 ../src/utils/pactl.c:1747
+#: ../src/utils/pactl.c:1819 ../src/utils/pactl.c:1839
 msgid "Invalid suspend specification."
 msgstr ""
 "Недопустимое значение операции приостановки, ожидалось логическое значение."
 
-#: ../src/utils/pactl.c:1742
+#: ../src/utils/pactl.c:1834
 msgid ""
 "You may not specify more than one source. You have to specify a boolean "
 "value."
@@ -3078,88 +3112,88 @@ msgstr ""
 "Нельзя указывать больше одного источника. Необходимо указать логическое "
 "значение."
 
-#: ../src/utils/pactl.c:1759
+#: ../src/utils/pactl.c:1851
 msgid "You have to specify a card name/index and a profile name"
 msgstr "Необходимо указать имя или номер звуковой платы и имя профиля."
 
-#: ../src/utils/pactl.c:1770
+#: ../src/utils/pactl.c:1862
 msgid "You have to specify a sink name/index and a port name"
 msgstr "Необходимо указать имя или номер аудиоприёмника и имя порта."
 
-#: ../src/utils/pactl.c:1781
+#: ../src/utils/pactl.c:1873
 msgid "You have to specify a sink name"
 msgstr "Необходимо указать имя аудиоприёмника."
 
-#: ../src/utils/pactl.c:1791
+#: ../src/utils/pactl.c:1883
 msgid "You have to specify a source name/index and a port name"
 msgstr "Необходимо указать имя или номер источника и имя порта."
 
-#: ../src/utils/pactl.c:1802
+#: ../src/utils/pactl.c:1894
 msgid "You have to specify a source name"
 msgstr "Необходимо указать имя источника."
 
-#: ../src/utils/pactl.c:1812
+#: ../src/utils/pactl.c:1904
 msgid "You have to specify a sink name/index and a volume"
 msgstr "Необходимо указать имя или номер аудиоприёмника и громкость."
 
-#: ../src/utils/pactl.c:1825
+#: ../src/utils/pactl.c:1917
 msgid "You have to specify a source name/index and a volume"
 msgstr "Необходимо указать имя или номер источника и громкость."
 
-#: ../src/utils/pactl.c:1838
+#: ../src/utils/pactl.c:1930
 msgid "You have to specify a sink input index and a volume"
 msgstr "Необходимо указать номер входа аудиоприёмника и громкость."
 
-#: ../src/utils/pactl.c:1843
+#: ../src/utils/pactl.c:1935
 msgid "Invalid sink input index"
 msgstr "Недопустимый номер входа аудиоприёмника."
 
-#: ../src/utils/pactl.c:1854
+#: ../src/utils/pactl.c:1946
 msgid "You have to specify a source output index and a volume"
 msgstr "Необходимо указать номер выхода источника и громкость."
 
-#: ../src/utils/pactl.c:1859
+#: ../src/utils/pactl.c:1951
 msgid "Invalid source output index"
 msgstr "Недопустимый номер выхода источника."
 
-#: ../src/utils/pactl.c:1870
+#: ../src/utils/pactl.c:1962
 msgid "You have to specify a sink name/index and a mute boolean"
 msgstr ""
 "Необходимо указать имя или номер аудиоприёмника и логическое значение "
 "выключения звука."
 
-#: ../src/utils/pactl.c:1875 ../src/utils/pactl.c:1890
-#: ../src/utils/pactl.c:1910 ../src/utils/pactl.c:1928
+#: ../src/utils/pactl.c:1967 ../src/utils/pactl.c:1982
+#: ../src/utils/pactl.c:2002 ../src/utils/pactl.c:2020
 msgid "Invalid mute specification"
 msgstr "Недопустимое логическое значение выключения звука."
 
-#: ../src/utils/pactl.c:1885
+#: ../src/utils/pactl.c:1977
 msgid "You have to specify a source name/index and a mute boolean"
 msgstr ""
 "Необходимо указать имя или номер источника и логическое значение выключения "
 "звука."
 
-#: ../src/utils/pactl.c:1900
+#: ../src/utils/pactl.c:1992
 msgid "You have to specify a sink input index and a mute boolean"
 msgstr ""
 "Необходимо указать номер входа аудиоприёмника и логическое значение "
 "выключения звука."
 
-#: ../src/utils/pactl.c:1905
+#: ../src/utils/pactl.c:1997
 msgid "Invalid sink input index specification"
 msgstr "Недопустимый номер входа аудиоприёмника."
 
-#: ../src/utils/pactl.c:1918
+#: ../src/utils/pactl.c:2010
 msgid "You have to specify a source output index and a mute boolean"
 msgstr ""
 "Необходимо указать номер выхода источника и логическое значение выключения "
 "звука."
 
-#: ../src/utils/pactl.c:1923
+#: ../src/utils/pactl.c:2015
 msgid "Invalid source output index specification"
 msgstr "Недопустимый номер выхода источника."
 
-#: ../src/utils/pactl.c:1940
+#: ../src/utils/pactl.c:2032
 msgid ""
 "You have to specify a sink index and a semicolon-separated list of supported "
 "formats"
@@ -3167,15 +3201,15 @@ msgstr ""
 "Необходимо указать номер аудиоприёмника и разделённый запятыми список "
 "поддерживаемых форматов."
 
-#: ../src/utils/pactl.c:1952
+#: ../src/utils/pactl.c:2044
 msgid "You have to specify a card name/index, a port name and a latency offset"
 msgstr "Необходимо указать имя или номер звуковой платы, имя порта и задержку."
 
-#: ../src/utils/pactl.c:1959
+#: ../src/utils/pactl.c:2051
 msgid "Could not parse latency offset"
 msgstr "Недопустимое значение задержки."
 
-#: ../src/utils/pactl.c:1971
+#: ../src/utils/pactl.c:2063
 msgid "No valid command specified."
 msgstr "Имя команды не указано или не распознано."
 
@@ -3346,6 +3380,15 @@ msgstr "Не удалось загрузить данные cookie.\n"
 msgid "Not yet implemented.\n"
 msgstr "Не реализовано.\n"
 
+#~ msgid "PulseAudio Sound System KDE Routing Policy"
+#~ msgstr "Звуковая система PulseAudio с маршрутизацией для KDE"
+
+#~ msgid "Start the PulseAudio Sound System with KDE Routing Policy"
+#~ msgstr "Запуск звуковой системы PulseAudio с маршрутизацией для KDE"
+
+#~ msgid "Failed to open configuration file '%s': %s"
+#~ msgstr "Не удалось открыть файл конфигурации «%s»: %s"
+
 #, fuzzy
 #~ msgid "Successfully dropped root privileges."
 #~ msgstr "Успешное удаление привилегий администратора."
diff --git a/po/el.po b/po/sk.po
similarity index 57%
copy from po/el.po
copy to po/sk.po
index dedd12e..6300aed 100644
--- a/po/el.po
+++ b/po/sk.po
@@ -1,736 +1,1009 @@
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-#
-# Dimitris Glezos <dimitris at glezos.com>, 2008.
-# Thalia Papoutsaki <saliyath at gmail.com>, 2009, 2012.
+# Slovak translation for PulseAudio.
+# Copyright (C) 2014 PulseAudio's COPYRIGHT HOLDER
+# This file is distributed under the same license as the PulseAudio package.
+# Dušan Kazik <prescott66 at gmail.com>, 2014.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: el\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-01-30 10:10+0000\n"
-"PO-Revision-Date: 2012-01-30 09:53+0000\n"
-"Last-Translator: Thalia Papoutsaki <saliyath at gmail.com>\n"
-"Language-Team: Greek <fedora-trans-el at redhat.com>\n"
-"Language: el\n"
+"Project-Id-Version: PulseAudio master\n"
+"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?"
+"product=PulseAudio&keywords=I18N+L10N&component=misc\n"
+"POT-Creation-Date: 2014-09-16 22:25+0000\n"
+"PO-Revision-Date: 2014-10-02 13:41+0100\n"
+"Last-Translator: Dušan Kazik <prescott66 at gmail.com>\n"
+"Language-Team: Slovak <gnome-sk-list at gnome.org>\n"
+"Language: sk\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: KAider 0.1\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n"
+"X-Generator: Poedit 1.5.4\n"
 
-#: ../src/modules/alsa/alsa-util.c:1136 ../src/modules/alsa/alsa-util.c:1204
+#: ../src/daemon/cmdline.c:113
 #, c-format
 msgid ""
-"snd_pcm_avail() returned a value that is exceptionally large: %lu bytes (%lu "
-"ms).\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers."
+"%s [options]\n"
+"\n"
+"COMMANDS:\n"
+"  -h, --help                            Show this help\n"
+"      --version                         Show version\n"
+"      --dump-conf                       Dump default configuration\n"
+"      --dump-modules                    Dump list of available modules\n"
+"      --dump-resample-methods           Dump available resample methods\n"
+"      --cleanup-shm                     Cleanup stale shared memory "
+"segments\n"
+"      --start                           Start the daemon if it is not "
+"running\n"
+"  -k  --kill                            Kill a running daemon\n"
+"      --check                           Check for a running daemon (only "
+"returns exit code)\n"
+"\n"
+"OPTIONS:\n"
+"      --system[=BOOL]                   Run as system-wide instance\n"
+"  -D, --daemonize[=BOOL]                Daemonize after startup\n"
+"      --fail[=BOOL]                     Quit when startup fails\n"
+"      --high-priority[=BOOL]            Try to set high nice level\n"
+"                                        (only available as root, when SUID "
+"or\n"
+"                                        with elevated RLIMIT_NICE)\n"
+"      --realtime[=BOOL]                 Try to enable realtime scheduling\n"
+"                                        (only available as root, when SUID "
+"or\n"
+"                                        with elevated RLIMIT_RTPRIO)\n"
+"      --disallow-module-loading[=BOOL]  Disallow module user requested "
+"module\n"
+"                                        loading/unloading after startup\n"
+"      --disallow-exit[=BOOL]            Disallow user requested exit\n"
+"      --exit-idle-time=SECS             Terminate the daemon when idle and "
+"this\n"
+"                                        time passed\n"
+"      --scache-idle-time=SECS           Unload autoloaded samples when idle "
+"and\n"
+"                                        this time passed\n"
+"      --log-level[=LEVEL]               Increase or set verbosity level\n"
+"  -v  --verbose                         Increase the verbosity level\n"
+"      --log-target={auto,syslog,stderr,file:PATH,newfile:PATH}\n"
+"                                        Specify the log target\n"
+"      --log-meta[=BOOL]                 Include code location in log "
+"messages\n"
+"      --log-time[=BOOL]                 Include timestamps in log messages\n"
+"      --log-backtrace=FRAMES            Include a backtrace in log messages\n"
+"  -p, --dl-search-path=PATH             Set the search path for dynamic "
+"shared\n"
+"                                        objects (plugins)\n"
+"      --resample-method=METHOD          Use the specified resampling method\n"
+"                                        (See --dump-resample-methods for\n"
+"                                        possible values)\n"
+"      --use-pid-file[=BOOL]             Create a PID file\n"
+"      --no-cpu-limit[=BOOL]             Do not install CPU load limiter on\n"
+"                                        platforms that support it.\n"
+"      --disable-shm[=BOOL]              Disable shared memory support.\n"
+"\n"
+"STARTUP SCRIPT:\n"
+"  -L, --load=\"MODULE ARGUMENTS\"         Load the specified plugin module "
+"with\n"
+"                                        the specified argument\n"
+"  -F, --file=FILENAME                   Run the specified script\n"
+"  -C                                    Open a command line on the running "
+"TTY\n"
+"                                        after startup\n"
+"\n"
+"  -n                                    Don't load default script file\n"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-util.c:1179
-#, c-format
-msgid ""
-"snd_pcm_delay() returned a value that is exceptionally large: %li bytes (%s"
-"%lu ms).\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers."
+#: ../src/daemon/cmdline.c:245
+msgid "--daemonize expects boolean argument"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-util.c:1220
-#, c-format
-msgid ""
-"snd_pcm_avail_delay() returned strange values: delay %lu is less than avail "
-"%lu.\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers."
+#: ../src/daemon/cmdline.c:253
+msgid "--fail expects boolean argument"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-util.c:1263
-#, c-format
+#: ../src/daemon/cmdline.c:264
 msgid ""
-"snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes "
-"(%lu ms).\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers."
+"--log-level expects log level argument (either numeric in range 0..4 or one "
+"of debug, info, notice, warn, error)."
 msgstr ""
 
-#: ../src/modules/module-always-sink.c:38
-msgid "Always keeps at least one sink loaded even if it's a null one"
+#: ../src/daemon/cmdline.c:276
+msgid "--high-priority expects boolean argument"
 msgstr ""
 
-#: ../src/modules/module-always-sink.c:82
-msgid "Dummy Output"
+#: ../src/daemon/cmdline.c:284
+msgid "--realtime expects boolean argument"
 msgstr ""
 
-#: ../src/modules/module-ladspa-sink.c:48
-msgid "Virtual LADSPA sink"
+#: ../src/daemon/cmdline.c:292
+msgid "--disallow-module-loading expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:300
+msgid "--disallow-exit expects boolean argument"
+msgstr ""
+
+#: ../src/daemon/cmdline.c:308
+msgid "--use-pid-file expects boolean argument"
 msgstr ""
 
-#: ../src/modules/module-ladspa-sink.c:52
+#: ../src/daemon/cmdline.c:327
 msgid ""
-"sink_name=<name for the sink> sink_properties=<properties for the sink> "
-"master=<name of sink to filter> format=<sample format> rate=<sample rate> "
-"channels=<number of channels> channel_map=<input channel map> plugin=<ladspa "
-"plugin name> label=<ladspa plugin label> control=<comma separated list of "
-"input control values> input_ladspaport_map=<comma separated list of input "
-"LADSPA port names> output_ladspaport_map=<comma separated list of output "
-"LADSPA port names> "
+"Invalid log target: use either 'syslog', 'journal','stderr' or 'auto' or a "
+"valid file name 'file:<path>', 'newfile:<path>'."
 msgstr ""
 
-#: ../src/modules/module-null-sink.c:49
-msgid "Clocked NULL sink"
+#: ../src/daemon/cmdline.c:329
+msgid ""
+"Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file "
+"name 'file:<path>', 'newfile:<path>'."
 msgstr ""
 
-#: ../src/modules/module-null-sink.c:284
-msgid "Null Output"
+#: ../src/daemon/cmdline.c:337
+msgid "--log-time expects boolean argument"
 msgstr ""
 
-#: ../src/pulsecore/sink.c:3349
-msgid "Built-in Audio"
-msgstr "Εσωτερικός ήχος"
+#: ../src/daemon/cmdline.c:345
+msgid "--log-meta expects boolean argument"
+msgstr ""
 
-#: ../src/pulsecore/sink.c:3354
-msgid "Modem"
-msgstr "Modem"
+#: ../src/daemon/cmdline.c:365
+#, c-format
+msgid "Invalid resample method '%s'."
+msgstr "Neplatná metóda prevzorkovania „%s“."
 
-#: ../src/daemon/ltdl-bind-now.c:127
-msgid "Failed to find original lt_dlopen loader."
+#: ../src/daemon/cmdline.c:372
+msgid "--system expects boolean argument"
+msgstr "Voľba --system očakáva booleovský parameter"
+
+#: ../src/daemon/cmdline.c:380
+msgid "--no-cpu-limit expects boolean argument"
 msgstr ""
 
-#: ../src/daemon/ltdl-bind-now.c:132
-msgid "Failed to allocate new dl loader."
+#: ../src/daemon/cmdline.c:388
+msgid "--disable-shm expects boolean argument"
 msgstr ""
 
-#: ../src/daemon/ltdl-bind-now.c:145
-msgid "Failed to add bind-now-loader."
+#: ../src/daemon/daemon-conf.c:260
+#, c-format
+msgid "[%s:%u] Invalid log target '%s'."
 msgstr ""
 
-#: ../src/daemon/main.c:139
+#: ../src/daemon/daemon-conf.c:275
 #, c-format
-msgid "Got signal %s."
-msgstr "Έγινε λήψη σήματος %s."
+msgid "[%s:%u] Invalid log level '%s'."
+msgstr ""
 
-#: ../src/daemon/main.c:166
-msgid "Exiting."
-msgstr "Έξοδος."
+#: ../src/daemon/daemon-conf.c:290
+#, c-format
+msgid "[%s:%u] Invalid resample method '%s'."
+msgstr ""
 
-#: ../src/daemon/main.c:184
+#: ../src/daemon/daemon-conf.c:312
 #, c-format
-msgid "Failed to find user '%s'."
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgid "[%s:%u] Invalid rlimit '%s'."
+msgstr ""
 
-#: ../src/daemon/main.c:189
+#: ../src/daemon/daemon-conf.c:332
 #, c-format
-msgid "Failed to find group '%s'."
-msgstr "Αποτυχία εύρεσης ομάδας χρηστών '%s'."
+msgid "[%s:%u] Invalid sample format '%s'."
+msgstr ""
 
-#: ../src/daemon/main.c:193
+#: ../src/daemon/daemon-conf.c:349 ../src/daemon/daemon-conf.c:366
 #, c-format
-msgid "Found user '%s' (UID %lu) and group '%s' (GID %lu)."
+msgid "[%s:%u] Invalid sample rate '%s'."
 msgstr ""
 
-#: ../src/daemon/main.c:198
+#: ../src/daemon/daemon-conf.c:389
 #, c-format
-msgid "GID of user '%s' and of group '%s' don't match."
+msgid "[%s:%u] Invalid sample channels '%s'."
 msgstr ""
 
-#: ../src/daemon/main.c:203
+#: ../src/daemon/daemon-conf.c:406
 #, c-format
-msgid "Home directory of user '%s' is not '%s', ignoring."
+msgid "[%s:%u] Invalid channel map '%s'."
 msgstr ""
 
-#: ../src/daemon/main.c:206 ../src/daemon/main.c:211
+#: ../src/daemon/daemon-conf.c:423
 #, c-format
-msgid "Failed to create '%s': %s"
+msgid "[%s:%u] Invalid number of fragments '%s'."
 msgstr ""
 
-#: ../src/daemon/main.c:218
+#: ../src/daemon/daemon-conf.c:440
 #, c-format
-msgid "Failed to change group list: %s"
+msgid "[%s:%u] Invalid fragment size '%s'."
 msgstr ""
 
-#: ../src/daemon/main.c:234
+#: ../src/daemon/daemon-conf.c:457
 #, c-format
-msgid "Failed to change GID: %s"
+msgid "[%s:%u] Invalid nice level '%s'."
 msgstr ""
 
-#: ../src/daemon/main.c:250
+#: ../src/daemon/daemon-conf.c:500
 #, c-format
-msgid "Failed to change UID: %s"
+msgid "[%s:%u] Invalid server type '%s'."
 msgstr ""
 
-#: ../src/daemon/main.c:269
-msgid "Successfully dropped root privileges."
+#: ../src/daemon/daemon-conf.c:613
+#, c-format
+msgid "Failed to open configuration file: %s"
+msgstr "Zlyhalo otvorenie konfiguračného súboru: %s"
+
+#: ../src/daemon/daemon-conf.c:629
+msgid ""
+"The specified default channel map has a different number of channels than "
+"the specified default number of channels."
 msgstr ""
+"Určená predvolená mapa kanálov obsahuje odlišný počet kanálov ako je určený "
+"predvolený počet kanálov."
 
-#: ../src/daemon/main.c:277
-msgid "System wide mode unsupported on this platform."
+#: ../src/daemon/daemon-conf.c:716
+#, c-format
+msgid "### Read from configuration file: %s ###\n"
+msgstr "### Čítať z konfiguračného súboru: %s ###\n"
+
+#: ../src/daemon/dumpmodules.c:59
+#, c-format
+msgid "Name: %s\n"
+msgstr "Názov: %s\n"
+
+#: ../src/daemon/dumpmodules.c:62
+#, c-format
+msgid "No module information available\n"
+msgstr "Nie sú dostupné žiadne informácie o module\n"
+
+#: ../src/daemon/dumpmodules.c:65
+#, c-format
+msgid "Version: %s\n"
+msgstr "Verzia: %s\n"
+
+#: ../src/daemon/dumpmodules.c:67
+#, c-format
+msgid "Description: %s\n"
+msgstr "Popis: %s\n"
+
+#: ../src/daemon/dumpmodules.c:69
+#, c-format
+msgid "Author: %s\n"
+msgstr "Autor: %s\n"
+
+#: ../src/daemon/dumpmodules.c:71
+#, c-format
+msgid "Usage: %s\n"
+msgstr "Využitie: %s\n"
+
+#: ../src/daemon/dumpmodules.c:72
+#, c-format
+msgid "Load Once: %s\n"
+msgstr "Načítané raz: %s\n"
+
+#: ../src/daemon/dumpmodules.c:74
+#, c-format
+msgid "DEPRECATION WARNING: %s\n"
 msgstr ""
 
-#: ../src/daemon/main.c:295
+#: ../src/daemon/dumpmodules.c:78
+#, c-format
+msgid "Path: %s\n"
+msgstr "Cesta: %s\n"
+
+#: ../src/daemon/ltdl-bind-now.c:77
 #, c-format
-msgid "setrlimit(%s, (%u, %u)) failed: %s"
+msgid "Failed to open module %s: %s"
+msgstr "Zlyhalo otvorenie modulu %s: %s"
+
+#: ../src/daemon/ltdl-bind-now.c:128
+msgid "Failed to find original lt_dlopen loader."
 msgstr ""
 
-#: ../src/daemon/main.c:496
-msgid "Failed to parse command line."
+#: ../src/daemon/ltdl-bind-now.c:133
+msgid "Failed to allocate new dl loader."
 msgstr ""
 
-#: ../src/daemon/main.c:529
-msgid ""
-"System mode refused for non-root user. Only starting the D-Bus server lookup "
-"service."
+#: ../src/daemon/ltdl-bind-now.c:146
+msgid "Failed to add bind-now-loader."
+msgstr ""
+
+#: ../src/daemon/main.c:158
+#, c-format
+msgid "Failed to find user '%s'."
+msgstr "Zlyhalo nájdenie používateľa „%s“."
+
+#: ../src/daemon/main.c:163
+#, c-format
+msgid "Failed to find group '%s'."
+msgstr "Zlyhalo nájdenie skupiny „%s“."
+
+#: ../src/daemon/main.c:172
+#, c-format
+msgid "GID of user '%s' and of group '%s' don't match."
 msgstr ""
 
-#: ../src/daemon/main.c:611
-msgid "Daemon not running"
+#: ../src/daemon/main.c:177
+#, c-format
+msgid "Home directory of user '%s' is not '%s', ignoring."
 msgstr ""
 
-#: ../src/daemon/main.c:613
+#: ../src/daemon/main.c:180 ../src/daemon/main.c:185
+#, c-format
+msgid "Failed to create '%s': %s"
+msgstr "Zlyhalo vytvorenie „%s“: %s"
+
+#: ../src/daemon/main.c:192
+#, c-format
+msgid "Failed to change group list: %s"
+msgstr "Zlyhala zmena zoznamu skupín: %s"
+
+#: ../src/daemon/main.c:208
 #, c-format
-msgid "Daemon running as PID %u"
+msgid "Failed to change GID: %s"
 msgstr ""
 
-#: ../src/daemon/main.c:628
+#: ../src/daemon/main.c:224
 #, c-format
-msgid "Failed to kill daemon: %s"
+msgid "Failed to change UID: %s"
+msgstr ""
+
+#: ../src/daemon/main.c:253
+msgid "System wide mode unsupported on this platform."
+msgstr ""
+
+#: ../src/daemon/main.c:464
+msgid "Failed to parse command line."
+msgstr "Zlyhalo analyzovanie príkazového riadku."
+
+#: ../src/daemon/main.c:503
+msgid ""
+"System mode refused for non-root user. Only starting the D-Bus server lookup "
+"service."
 msgstr ""
 
-#: ../src/daemon/main.c:657
+#: ../src/daemon/main.c:602
+#, c-format
+msgid "Failed to kill daemon: %s"
+msgstr "Zlyhalo zabitie služby: %s"
+
+#: ../src/daemon/main.c:631
 msgid ""
 "This program is not intended to be run as root (unless --system is "
 "specified)."
 msgstr ""
 
-#: ../src/daemon/main.c:660
+#: ../src/daemon/main.c:634
 msgid "Root privileges required."
-msgstr ""
+msgstr "Vyžadujú sa privilégiá správcu"
 
-#: ../src/daemon/main.c:667
+#: ../src/daemon/main.c:641
 msgid "--start not supported for system instances."
-msgstr ""
+msgstr "Voľba --start nie je podporovaná pre systémové inštancie."
 
-#: ../src/daemon/main.c:707
+#: ../src/daemon/main.c:681
 #, c-format
 msgid "User-configured server at %s, refusing to start/autospawn."
 msgstr ""
 
-#: ../src/daemon/main.c:713
+#: ../src/daemon/main.c:687
 #, c-format
 msgid ""
 "User-configured server at %s, which appears to be local. Probing deeper."
 msgstr ""
 
-#: ../src/daemon/main.c:718
+#: ../src/daemon/main.c:692
 msgid "Running in system mode, but --disallow-exit not set!"
 msgstr ""
 
-#: ../src/daemon/main.c:721
+#: ../src/daemon/main.c:695
 msgid "Running in system mode, but --disallow-module-loading not set!"
 msgstr ""
 
-#: ../src/daemon/main.c:724
+#: ../src/daemon/main.c:698
 msgid "Running in system mode, forcibly disabling SHM mode!"
 msgstr ""
 
-#: ../src/daemon/main.c:729
+#: ../src/daemon/main.c:703
 msgid "Running in system mode, forcibly disabling exit idle time!"
 msgstr ""
 
-#: ../src/daemon/main.c:757
+#: ../src/daemon/main.c:736
 msgid "Failed to acquire stdio."
 msgstr ""
 
-#: ../src/daemon/main.c:763 ../src/daemon/main.c:828
+#: ../src/daemon/main.c:742 ../src/daemon/main.c:813
 #, c-format
 msgid "pipe() failed: %s"
 msgstr ""
 
-#: ../src/daemon/main.c:768 ../src/daemon/main.c:833
+#: ../src/daemon/main.c:747 ../src/daemon/main.c:818
 #, c-format
 msgid "fork() failed: %s"
 msgstr ""
 
-#: ../src/daemon/main.c:783 ../src/daemon/main.c:848 ../src/utils/pacat.c:550
+#: ../src/daemon/main.c:762 ../src/daemon/main.c:833 ../src/utils/pacat.c:569
 #, c-format
 msgid "read() failed: %s"
 msgstr ""
 
-#: ../src/daemon/main.c:789
+#: ../src/daemon/main.c:768
 msgid "Daemon startup failed."
-msgstr ""
+msgstr "Zlyhalo spustenie služby."
 
-#: ../src/daemon/main.c:791
-msgid "Daemon startup successful."
-msgstr ""
-
-#: ../src/daemon/main.c:816
-#, fuzzy, c-format
+#: ../src/daemon/main.c:801
+#, c-format
 msgid "setsid() failed: %s"
-msgstr "Αποτυχία σύνδεσης: %s"
+msgstr ""
 
-#: ../src/daemon/main.c:901
-#, c-format
-msgid "This is PulseAudio %s"
-msgstr "Αυτό είναι το PulseAudio %s"
+#: ../src/daemon/main.c:924
+msgid "Failed to get machine ID"
+msgstr "Zlyhalo získanie identifikátora stroja"
 
-#: ../src/daemon/main.c:902
-#, c-format
-msgid "Compilation host: %s"
+#: ../src/daemon/main.c:950
+msgid ""
+"OK, so you are running PA in system mode. Please note that you most likely "
+"shouldn't be doing that.\n"
+"If you do it nonetheless then it's your own fault if things don't work as "
+"expected.\n"
+"Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an "
+"explanation why system mode is usually a bad idea."
 msgstr ""
 
-#: ../src/daemon/main.c:903 ../src/tests/resampler-test.c:418
-#, c-format
-msgid "Compilation CFLAGS: %s"
+#: ../src/daemon/main.c:967
+msgid "pa_pid_file_create() failed."
 msgstr ""
 
-#: ../src/daemon/main.c:906
-#, c-format
-msgid "Running on host: %s"
+#: ../src/daemon/main.c:997
+msgid "pa_core_new() failed."
 msgstr ""
 
-#: ../src/daemon/main.c:909
-#, c-format
-msgid "Found %u CPUs."
-msgstr ""
+#: ../src/daemon/main.c:1064
+msgid "Failed to initialize daemon."
+msgstr "Zlyhala inicializácia služby."
 
-#: ../src/daemon/main.c:911
-#, c-format
-msgid "Page size is %lu bytes"
+#: ../src/daemon/main.c:1069
+msgid "Daemon startup without any loaded modules, refusing to work."
 msgstr ""
 
-#: ../src/daemon/main.c:914
-msgid "Compiled with Valgrind support: yes"
-msgstr ""
+#: ../src/daemon/pulseaudio.desktop.in.h:1
+msgid "PulseAudio Sound System"
+msgstr "Zvukový systém PulseAudio"
 
-#: ../src/daemon/main.c:916
-msgid "Compiled with Valgrind support: no"
-msgstr ""
+#: ../src/daemon/pulseaudio.desktop.in.h:2
+msgid "Start the PulseAudio Sound System"
+msgstr "Spustenie zvukového systému PulseAudio"
 
-#: ../src/daemon/main.c:919
-#, c-format
-msgid "Running in valgrind mode: %s"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2293
+msgid "Input"
+msgstr "Vstup"
 
-#: ../src/daemon/main.c:921
-#, c-format
-msgid "Running in VM: %s"
+#: ../src/modules/alsa/alsa-mixer.c:2294
+msgid "Docking Station Input"
 msgstr ""
 
-#: ../src/daemon/main.c:924
-msgid "Optimized build: yes"
+#: ../src/modules/alsa/alsa-mixer.c:2295
+msgid "Docking Station Microphone"
 msgstr ""
 
-#: ../src/daemon/main.c:926
-msgid "Optimized build: no"
+#: ../src/modules/alsa/alsa-mixer.c:2296
+msgid "Docking Station Line In"
 msgstr ""
 
-#: ../src/daemon/main.c:930
-msgid "NDEBUG defined, all asserts disabled."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2297 ../src/modules/alsa/alsa-mixer.c:2382
+msgid "Line In"
+msgstr "Vstupná linka"
 
-#: ../src/daemon/main.c:932
-msgid "FASTPATH defined, only fast path asserts disabled."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2298 ../src/modules/alsa/alsa-mixer.c:2376
+#: ../src/modules/bluetooth/module-bluez4-device.c:2101
+#: ../src/modules/bluetooth/module-bluez5-device.c:1635
+msgid "Microphone"
+msgstr "Mikrofón"
 
-#: ../src/daemon/main.c:934
-msgid "All asserts enabled."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2299 ../src/modules/alsa/alsa-mixer.c:2377
+msgid "Front Microphone"
+msgstr "Predný mikrofón"
 
-#: ../src/daemon/main.c:938
-msgid "Failed to get machine ID"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2300 ../src/modules/alsa/alsa-mixer.c:2378
+msgid "Rear Microphone"
+msgstr "Zadný mikrofón"
 
-#: ../src/daemon/main.c:941
-#, c-format
-msgid "Machine ID is %s."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2301
+msgid "External Microphone"
+msgstr "Externý mikrofón"
 
-#: ../src/daemon/main.c:945
-#, c-format
-msgid "Session ID is %s."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2302 ../src/modules/alsa/alsa-mixer.c:2380
+msgid "Internal Microphone"
+msgstr "Vstavaný mikrofón"
 
-#: ../src/daemon/main.c:951
-#, c-format
-msgid "Using runtime directory %s."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2303 ../src/modules/alsa/alsa-mixer.c:2383
+msgid "Radio"
+msgstr "Rádio"
 
-#: ../src/daemon/main.c:956
-#, c-format
-msgid "Using state directory %s."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2304 ../src/modules/alsa/alsa-mixer.c:2384
+msgid "Video"
+msgstr "Video"
 
-#: ../src/daemon/main.c:959
-#, c-format
-msgid "Using modules directory %s."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2305
+msgid "Automatic Gain Control"
+msgstr "Automatické ovládanie zosilnenia"
 
-#: ../src/daemon/main.c:961
-#, c-format
-msgid "Running in system mode: %s"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2306
+msgid "No Automatic Gain Control"
+msgstr "Bez automatického ovládania zosilnenia"
 
-#: ../src/daemon/main.c:964
-msgid ""
-"OK, so you are running PA in system mode. Please note that you most likely "
-"shouldn't be doing that.\n"
-"If you do it nonetheless then it's your own fault if things don't work as "
-"expected.\n"
-"Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an "
-"explanation why system mode is usually a bad idea."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2307
+msgid "Boost"
+msgstr "Zosilnenie"
 
-#: ../src/daemon/main.c:981
-msgid "pa_pid_file_create() failed."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2308
+msgid "No Boost"
+msgstr "Bez zosilnenia"
 
-#: ../src/daemon/main.c:991
-msgid "Fresh high-resolution timers available! Bon appetit!"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2309
+msgid "Amplifier"
+msgstr "Zosilňovač"
 
-#: ../src/daemon/main.c:993
-msgid ""
-"Dude, your kernel stinks! The chef's recommendation today is Linux with high-"
-"resolution timers enabled!"
-msgstr ""
-"Δικέ μου, ο πυρήνας σου είναι για τα μπάζα! Η πρόταση του σεφ σήμερα είναι "
-"Linux με ενεργοποιημένα τα high-resolution timers!"
+#: ../src/modules/alsa/alsa-mixer.c:2310
+msgid "No Amplifier"
+msgstr "Bez zosilňovača"
 
-#: ../src/daemon/main.c:1011
-msgid "pa_core_new() failed."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2311
+msgid "Bass Boost"
+msgstr "Zosilnenie basov"
 
-#: ../src/daemon/main.c:1087
-msgid "Failed to initialize daemon."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2312
+msgid "No Bass Boost"
+msgstr "Bez zosilnenia basov"
 
-#: ../src/daemon/main.c:1092
-msgid "Daemon startup without any loaded modules, refusing to work."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2313
+#: ../src/modules/bluetooth/module-bluez4-device.c:2106
+#: ../src/modules/bluetooth/module-bluez5-device.c:1642
+msgid "Speaker"
+msgstr "Reproduktor"
 
-#: ../src/daemon/main.c:1130
-msgid "Daemon startup complete."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2314 ../src/modules/alsa/alsa-mixer.c:2386
+msgid "Headphones"
+msgstr "Slúchadlá"
 
-#: ../src/daemon/main.c:1136
-msgid "Daemon shutdown initiated."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2375
+msgid "Analog Input"
+msgstr "Analógový vstup"
 
-#: ../src/daemon/main.c:1167
-msgid "Daemon terminated."
+#: ../src/modules/alsa/alsa-mixer.c:2379
+msgid "Dock Microphone"
 msgstr ""
 
-#: ../src/daemon/cmdline.c:113
-#, c-format
-msgid ""
-"%s [options]\n"
-"\n"
-"COMMANDS:\n"
-"  -h, --help                            Show this help\n"
-"      --version                         Show version\n"
-"      --dump-conf                       Dump default configuration\n"
-"      --dump-modules                    Dump list of available modules\n"
-"      --dump-resample-methods           Dump available resample methods\n"
-"      --cleanup-shm                     Cleanup stale shared memory "
-"segments\n"
-"      --start                           Start the daemon if it is not "
-"running\n"
-"  -k  --kill                            Kill a running daemon\n"
-"      --check                           Check for a running daemon (only "
-"returns exit code)\n"
-"\n"
-"OPTIONS:\n"
-"      --system[=BOOL]                   Run as system-wide instance\n"
-"  -D, --daemonize[=BOOL]                Daemonize after startup\n"
-"      --fail[=BOOL]                     Quit when startup fails\n"
-"      --high-priority[=BOOL]            Try to set high nice level\n"
-"                                        (only available as root, when SUID "
-"or\n"
-"                                        with elevated RLIMIT_NICE)\n"
-"      --realtime[=BOOL]                 Try to enable realtime scheduling\n"
-"                                        (only available as root, when SUID "
-"or\n"
-"                                        with elevated RLIMIT_RTPRIO)\n"
-"      --disallow-module-loading[=BOOL]  Disallow module user requested "
-"module\n"
-"                                        loading/unloading after startup\n"
-"      --disallow-exit[=BOOL]            Disallow user requested exit\n"
-"      --exit-idle-time=SECS             Terminate the daemon when idle and "
-"this\n"
-"                                        time passed\n"
-"      --scache-idle-time=SECS           Unload autoloaded samples when idle "
-"and\n"
-"                                        this time passed\n"
-"      --log-level[=LEVEL]               Increase or set verbosity level\n"
-"  -v                                    Increase the verbosity level\n"
-"      --log-target={auto,syslog,stderr,file:PATH}\n"
-"                                        Specify the log target\n"
-"      --log-meta[=BOOL]                 Include code location in log "
-"messages\n"
-"      --log-time[=BOOL]                 Include timestamps in log messages\n"
-"      --log-backtrace=FRAMES            Include a backtrace in log messages\n"
-"  -p, --dl-search-path=PATH             Set the search path for dynamic "
-"shared\n"
-"                                        objects (plugins)\n"
-"      --resample-method=METHOD          Use the specified resampling method\n"
-"                                        (See --dump-resample-methods for\n"
-"                                        possible values)\n"
-"      --use-pid-file[=BOOL]             Create a PID file\n"
-"      --no-cpu-limit[=BOOL]             Do not install CPU load limiter on\n"
-"                                        platforms that support it.\n"
-"      --disable-shm[=BOOL]              Disable shared memory support.\n"
-"\n"
-"STARTUP SCRIPT:\n"
-"  -L, --load=\"MODULE ARGUMENTS\"         Load the specified plugin module "
-"with\n"
-"                                        the specified argument\n"
-"  -F, --file=FILENAME                   Run the specified script\n"
-"  -C                                    Open a command line on the running "
-"TTY\n"
-"                                        after startup\n"
-"\n"
-"  -n                                    Don't load default script file\n"
+#: ../src/modules/alsa/alsa-mixer.c:2381
+msgid "Headset Microphone"
 msgstr ""
 
-#: ../src/daemon/cmdline.c:244
-msgid "--daemonize expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2385
+msgid "Analog Output"
+msgstr "Analógový výstup"
 
-#: ../src/daemon/cmdline.c:251
-msgid "--fail expects boolean argument"
+#: ../src/modules/alsa/alsa-mixer.c:2387
+msgid "LFE on Separate Mono Output"
 msgstr ""
 
-#: ../src/daemon/cmdline.c:261
-msgid ""
-"--log-level expects log level argument (either numeric in range 0..4 or one "
-"of debug, info, notice, warn, error)."
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2388
+msgid "Line Out"
+msgstr "Výstupná linka"
 
-#: ../src/daemon/cmdline.c:273
-msgid "--high-priority expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2389
+msgid "Analog Mono Output"
+msgstr "Analógový mono výstup"
 
-#: ../src/daemon/cmdline.c:280
-msgid "--realtime expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2390
+msgid "Speakers"
+msgstr "Reproduktory"
 
-#: ../src/daemon/cmdline.c:287
-msgid "--disallow-module-loading expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2391
+msgid "HDMI / DisplayPort"
+msgstr "HDMI / DisplayPort"
 
-#: ../src/daemon/cmdline.c:294
-msgid "--disallow-exit expects boolean argument"
-msgstr ""
+#: ../src/modules/alsa/alsa-mixer.c:2392
+msgid "Digital Output (S/PDIF)"
+msgstr "Digitálny výstup (S/PDIF)"
 
-#: ../src/daemon/cmdline.c:301
-msgid "--use-pid-file expects boolean argument"
+#: ../src/modules/alsa/alsa-mixer.c:2393
+msgid "Digital Input (S/PDIF)"
+msgstr "Digitálny vstup (S/PDIF)"
+
+#: ../src/modules/alsa/alsa-mixer.c:2394
+msgid "Digital Passthrough (S/PDIF)"
+msgstr "Digitálny prechod (S/PDIF)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3901
+msgid "Analog Mono"
+msgstr "Analógový mono"
+
+#: ../src/modules/alsa/alsa-mixer.c:3902
+msgid "Analog Stereo"
+msgstr "Analógový stereo"
+
+#: ../src/modules/alsa/alsa-mixer.c:3903
+msgid "Multichannel"
+msgstr "Viackanálový"
+
+#: ../src/modules/alsa/alsa-mixer.c:3904
+msgid "Analog Surround 2.1"
+msgstr "Analógový priestorový 2.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3905
+msgid "Analog Surround 3.0"
+msgstr "Analógový priestorový 3.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3906
+msgid "Analog Surround 3.1"
+msgstr "Analógový priestorový 3.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3907
+msgid "Analog Surround 4.0"
+msgstr "Analógový priestorový 4.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3908
+msgid "Analog Surround 4.1"
+msgstr "Analógový priestorový 4.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3909
+msgid "Analog Surround 5.0"
+msgstr "Analógový priestorový 5.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3910
+msgid "Analog Surround 5.1"
+msgstr "Analógový priestorový 5.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3911
+msgid "Analog Surround 6.0"
+msgstr "Analógový priestorový 6.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3912
+msgid "Analog Surround 6.1"
+msgstr "Analógový priestorový 6.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3913
+msgid "Analog Surround 7.0"
+msgstr "Analógový priestorový 7.0"
+
+#: ../src/modules/alsa/alsa-mixer.c:3914
+msgid "Analog Surround 7.1"
+msgstr "Analógový priestorový 7.1"
+
+#: ../src/modules/alsa/alsa-mixer.c:3915
+msgid "Digital Stereo (IEC958)"
+msgstr "Digitálne stereo (IEC958)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3916
+msgid "Digital Passthrough  (IEC958)"
+msgstr "Digitálny prechod  (IEC958)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3917
+msgid "Digital Surround 4.0 (IEC958/AC3)"
+msgstr "Digitálny priestorový 4.0 (IEC958/AC3)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3918
+msgid "Digital Surround 5.1 (IEC958/AC3)"
+msgstr "Digitálny priestorový 5.1 (IEC958/AC3)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3919
+msgid "Digital Surround 5.1 (IEC958/DTS)"
+msgstr "Digitálny priestorový 5.1 (IEC958/DTS)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3920
+msgid "Digital Stereo (HDMI)"
+msgstr "Digitálny stereo (HDMI)"
+
+#: ../src/modules/alsa/alsa-mixer.c:3921
+msgid "Digital Surround 5.1 (HDMI)"
+msgstr "Digitálny priestorový 5.1 (HDMI)"
+
+#: ../src/modules/alsa/alsa-mixer.c:4052
+msgid "Analog Mono Duplex"
+msgstr "Obojsmerný analógový mono"
+
+#: ../src/modules/alsa/alsa-mixer.c:4053
+msgid "Analog Stereo Duplex"
+msgstr "Obojsmerný analógový stereo"
+
+#: ../src/modules/alsa/alsa-mixer.c:4054
+msgid "Digital Stereo Duplex (IEC958)"
+msgstr "Obojsmerný digitálny stereo (IEC958)"
+
+#: ../src/modules/alsa/alsa-mixer.c:4055
+#: ../src/modules/alsa/module-alsa-card.c:192
+#: ../src/modules/bluetooth/module-bluez4-device.c:2297
+#: ../src/modules/bluetooth/module-bluez5-device.c:1866
+msgid "Off"
+msgstr "Vypnuté"
+
+#: ../src/modules/alsa/alsa-mixer.c:4154
+#, c-format
+msgid "%s Output"
+msgstr "%s výstup"
+
+#: ../src/modules/alsa/alsa-mixer.c:4162
+#, c-format
+msgid "%s Input"
+msgstr "%s vstup"
+
+#: ../src/modules/alsa/alsa-sink.c:570 ../src/modules/alsa/alsa-sink.c:748
+#, c-format
+msgid ""
+"ALSA woke us up to write new data to the device, but there was actually "
+"nothing to write!\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers.\n"
+"We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() "
+"returned 0 or another value < min_avail."
 msgstr ""
 
-#: ../src/daemon/cmdline.c:318
+#: ../src/modules/alsa/alsa-source.c:529 ../src/modules/alsa/alsa-source.c:681
+#, c-format
 msgid ""
-"Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file "
-"name 'file:<path>'."
+"ALSA woke us up to read new data from the device, but there was actually "
+"nothing to read!\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers.\n"
+"We were woken up with POLLIN set -- however a subsequent snd_pcm_avail() "
+"returned 0 or another value < min_avail."
 msgstr ""
 
-#: ../src/daemon/cmdline.c:325
-msgid "--log-time expects boolean argument"
+#: ../src/modules/alsa/alsa-util.c:1135 ../src/modules/alsa/alsa-util.c:1210
+#, c-format
+msgid ""
+"snd_pcm_avail() returned a value that is exceptionally large: %lu bytes (%lu "
+"ms).\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers."
 msgstr ""
 
-#: ../src/daemon/cmdline.c:332
-msgid "--log-meta expects boolean argument"
+#: ../src/modules/alsa/alsa-util.c:1185
+#, c-format
+msgid ""
+"snd_pcm_delay() returned a value that is exceptionally large: %li bytes (%s"
+"%lu ms).\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers."
 msgstr ""
 
-#: ../src/daemon/cmdline.c:351
+#: ../src/modules/alsa/alsa-util.c:1226
 #, c-format
-msgid "Invalid resample method '%s'."
+msgid ""
+"snd_pcm_avail_delay() returned strange values: delay %lu is less than avail "
+"%lu.\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers."
 msgstr ""
 
-#: ../src/daemon/cmdline.c:358
-msgid "--system expects boolean argument"
+#: ../src/modules/alsa/alsa-util.c:1269
+#, c-format
+msgid ""
+"snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes "
+"(%lu ms).\n"
+"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
+"to the ALSA developers."
 msgstr ""
 
-#: ../src/daemon/cmdline.c:365
-msgid "--no-cpu-limit expects boolean argument"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2091
+#: ../src/modules/bluetooth/module-bluez5-device.c:1625
+msgid "Headset"
 msgstr ""
 
-#: ../src/daemon/cmdline.c:372
-msgid "--disable-shm expects boolean argument"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2096
+#: ../src/modules/bluetooth/module-bluez5-device.c:1630
+msgid "Handsfree"
 msgstr ""
 
-#: ../src/daemon/dumpmodules.c:59
-#, c-format
-msgid "Name: %s\n"
-msgstr "Όνομα: %s\n"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2111
+#: ../src/modules/bluetooth/module-bluez5-device.c:1648
+msgid "Headphone"
+msgstr "Slúchadlo"
 
-#: ../src/daemon/dumpmodules.c:62
-#, c-format
-msgid "No module information available\n"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2116
+#: ../src/modules/bluetooth/module-bluez5-device.c:1653
+msgid "Portable"
 msgstr ""
 
-#: ../src/daemon/dumpmodules.c:65
-#, c-format
-msgid "Version: %s\n"
-msgstr "Έκδοση: %s\n"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2121
+#: ../src/modules/bluetooth/module-bluez5-device.c:1658
+msgid "Car"
+msgstr "Automobil"
 
-#: ../src/daemon/dumpmodules.c:67
-#, c-format
-msgid "Description: %s\n"
-msgstr "Περιγραφή: %s\n"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2126
+#: ../src/modules/bluetooth/module-bluez5-device.c:1663
+msgid "HiFi"
+msgstr "HiFi"
 
-#: ../src/daemon/dumpmodules.c:69
-#, c-format
-msgid "Author: %s\n"
-msgstr "Συγγραφέας: %s\n"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2131
+#: ../src/modules/bluetooth/module-bluez5-device.c:1668
+msgid "Phone"
+msgstr "Telefón"
 
-#: ../src/daemon/dumpmodules.c:71
-#, c-format
-msgid "Usage: %s\n"
-msgstr "Χρήση: %s\n"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2139
+#: ../src/modules/bluetooth/module-bluez5-device.c:1620
+#: ../src/modules/bluetooth/module-bluez5-device.c:1636
+#: ../src/modules/bluetooth/module-bluez5-device.c:1674
+msgid "Bluetooth Output"
+msgstr "Výstup cez Bluetooth"
 
-#: ../src/daemon/dumpmodules.c:72
-#, c-format
-msgid "Load Once: %s\n"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2142
+#: ../src/modules/bluetooth/module-bluez5-device.c:1619
+#: ../src/modules/bluetooth/module-bluez5-device.c:1641
+#: ../src/modules/bluetooth/module-bluez5-device.c:1647
+#: ../src/modules/bluetooth/module-bluez5-device.c:1673
+msgid "Bluetooth Input"
+msgstr "Vstup cez Bluetooth"
+
+#: ../src/modules/bluetooth/module-bluez4-device.c:2178
+msgid "High Fidelity Playback (A2DP)"
 msgstr ""
 
-#: ../src/daemon/dumpmodules.c:74
-#, c-format
-msgid "DEPRECATION WARNING: %s\n"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2189
+msgid "High Fidelity Capture (A2DP)"
 msgstr ""
 
-#: ../src/daemon/dumpmodules.c:78
-#, c-format
-msgid "Path: %s\n"
+#: ../src/modules/bluetooth/module-bluez4-device.c:2200
+msgid "Telephony Duplex (HSP/HFP)"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:275
-#, c-format
-msgid "[%s:%u] Invalid log target '%s'."
+#: ../src/modules/bluetooth/module-bluez4-device.c:2212
+msgid "Handsfree Gateway"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:291
-#, c-format
-msgid "[%s:%u] Invalid log level '%s'."
+#: ../src/modules/bluetooth/module-bluez5-device.c:1711
+msgid "High Fidelity Playback (A2DP Sink)"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:307
-#, c-format
-msgid "[%s:%u] Invalid resample method '%s'."
+#: ../src/modules/bluetooth/module-bluez5-device.c:1722
+msgid "High Fidelity Capture (A2DP Source)"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:330
-#, c-format
-msgid "[%s:%u] Invalid rlimit '%s'."
+#: ../src/modules/bluetooth/module-bluez5-device.c:1733
+msgid "Headset Head Unit (HSP/HFP)"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:351
-#, c-format
-msgid "[%s:%u] Invalid sample format '%s'."
+#: ../src/modules/bluetooth/module-bluez5-device.c:1745
+msgid "Headset Audio Gateway (HSP/HFP)"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:370 ../src/daemon/daemon-conf.c:389
-#, c-format
-msgid "[%s:%u] Invalid sample rate '%s'."
+#: ../src/modules/echo-cancel/module-echo-cancel.c:63
+msgid ""
+"source_name=<name for the source> source_properties=<properties for the "
+"source> source_master=<name of source to filter> sink_name=<name for the "
+"sink> sink_properties=<properties for the sink> sink_master=<name of sink to "
+"filter> adjust_time=<how often to readjust rates in s> adjust_threshold=<how "
+"much drift to readjust after in ms> format=<sample format> rate=<sample "
+"rate> channels=<number of channels> channel_map=<channel map> "
+"aec_method=<implementation to use> aec_args=<parameters for the AEC engine> "
+"save_aec=<save AEC data in /tmp> autoloaded=<set if this module is being "
+"loaded automatically> use_volume_sharing=<yes or no> "
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:413
-#, c-format
-msgid "[%s:%u] Invalid sample channels '%s'."
+#. add on profile
+#: ../src/modules/macosx/module-coreaudio-device.c:756
+msgid "On"
+msgstr "Zapnutý"
+
+#: ../src/modules/module-always-sink.c:38
+msgid "Always keeps at least one sink loaded even if it's a null one"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:431
-#, c-format
-msgid "[%s:%u] Invalid channel map '%s'."
+#: ../src/modules/module-always-sink.c:82
+msgid "Dummy Output"
+msgstr "Fiktívny výstup"
+
+#: ../src/modules/module-equalizer-sink.c:72
+msgid "General Purpose Equalizer"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:449
-#, c-format
-msgid "[%s:%u] Invalid number of fragments '%s'."
+#: ../src/modules/module-equalizer-sink.c:76
+msgid ""
+"sink_name=<name of the sink> sink_properties=<properties for the sink> "
+"sink_master=<sink to connect to> format=<sample format> rate=<sample rate> "
+"channels=<number of channels> channel_map=<channel map> autoloaded=<set if "
+"this module is being loaded automatically> use_volume_sharing=<yes or no> "
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:467
-#, c-format
-msgid "[%s:%u] Invalid fragment size '%s'."
+#: ../src/modules/module-filter-apply.c:48
+msgid "autoclean=<automatically unload unused filters?>"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:485
-#, c-format
-msgid "[%s:%u] Invalid nice level '%s'."
+#: ../src/modules/module-ladspa-sink.c:53
+msgid "Virtual LADSPA sink"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:528
-#, c-format
-msgid "[%s:%u] Invalid server type '%s'."
+#: ../src/modules/module-ladspa-sink.c:57
+msgid ""
+"sink_name=<name for the sink> sink_properties=<properties for the sink> "
+"master=<name of sink to filter> format=<sample format> rate=<sample rate> "
+"channels=<number of channels> channel_map=<input channel map> plugin=<ladspa "
+"plugin name> label=<ladspa plugin label> control=<comma separated list of "
+"input control values> input_ladspaport_map=<comma separated list of input "
+"LADSPA port names> output_ladspaport_map=<comma separated list of output "
+"LADSPA port names> "
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:641
-#, c-format
-msgid "Failed to open configuration file: %s"
+#: ../src/modules/module-null-sink.c:49
+msgid "Clocked NULL sink"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:657
-msgid ""
-"The specified default channel map has a different number of channels than "
-"the specified default number of channels."
+#: ../src/modules/module-null-sink.c:280
+msgid "Null Output"
 msgstr ""
 
-#: ../src/daemon/daemon-conf.c:743
-#, c-format
-msgid "### Read from configuration file: %s ###\n"
+#: ../src/modules/module-rygel-media-server.c:510
+#: ../src/modules/module-rygel-media-server.c:548
+#: ../src/modules/module-rygel-media-server.c:907
+msgid "Output Devices"
+msgstr "Výstupné zariadenia"
+
+#: ../src/modules/module-rygel-media-server.c:511
+#: ../src/modules/module-rygel-media-server.c:549
+#: ../src/modules/module-rygel-media-server.c:908
+msgid "Input Devices"
+msgstr "Vstupné zariadenia"
+
+#: ../src/modules/module-rygel-media-server.c:1065
+msgid "Audio on @HOSTNAME@"
 msgstr ""
 
-#: ../src/daemon/caps.c:58
-msgid "Cleaning up privileges."
+#. TODO: old tunnel put here the remote sink_name into stream name e.g. 'Null Output for lynxis at lazus'
+#. TODO: old tunnel put here the remote source_name into stream name e.g. 'Null Output for lynxis at lazus'
+#: ../src/modules/module-tunnel-sink-new.c:299
+#: ../src/modules/module-tunnel-source-new.c:307
+#, c-format
+msgid "Tunnel for %s@%s"
 msgstr ""
 
-#: ../src/daemon/pulseaudio.desktop.in.h:1
-msgid "PulseAudio Sound System"
+#: ../src/modules/module-tunnel-sink-new.c:509
+#: ../src/modules/module-tunnel-source-new.c:518
+#, c-format
+msgid "Tunnel to %s/%s"
 msgstr ""
 
-#: ../src/daemon/pulseaudio.desktop.in.h:2
-msgid "Start the PulseAudio Sound System"
+#: ../src/modules/module-virtual-surround-sink.c:49
+msgid "Virtual surround sink"
 msgstr ""
 
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:1
-msgid "PulseAudio Sound System KDE Routing Policy"
+#: ../src/modules/module-virtual-surround-sink.c:53
+msgid ""
+"sink_name=<name for the sink> sink_properties=<properties for the sink> "
+"master=<name of sink to filter> format=<sample format> rate=<sample rate> "
+"channels=<number of channels> channel_map=<channel map> "
+"use_volume_sharing=<yes or no> force_flat_volume=<yes or no> hrir=/path/to/"
+"left_hrir.wav "
 msgstr ""
 
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:2
-msgid "Start the PulseAudio Sound System with KDE Routing Policy"
-msgstr ""
+#: ../src/modules/reserve-wrap.c:151
+msgid "PulseAudio Sound Server"
+msgstr "Zvukový server PulseAudio"
 
-#: ../src/pulse/channelmap.c:105 ../src/pulse/channelmap.c:757
+#: ../src/pulse/channelmap.c:105 ../src/pulse/channelmap.c:760
 msgid "Mono"
 msgstr "Mono"
 
 #: ../src/pulse/channelmap.c:107
 msgid "Front Center"
-msgstr ""
+msgstr "Predný stredový"
 
 #: ../src/pulse/channelmap.c:108
 msgid "Front Left"
-msgstr ""
+msgstr "Predný ľavý"
 
 #: ../src/pulse/channelmap.c:109
 msgid "Front Right"
-msgstr ""
+msgstr "Predný pravý"
 
 #: ../src/pulse/channelmap.c:111
 msgid "Rear Center"
-msgstr ""
+msgstr "Zadný stredový"
 
 #: ../src/pulse/channelmap.c:112
 msgid "Rear Left"
-msgstr ""
+msgstr "Zadný ľavý"
 
 #: ../src/pulse/channelmap.c:113
 msgid "Rear Right"
-msgstr ""
+msgstr "Zadný pravý"
 
 #: ../src/pulse/channelmap.c:115
 msgid "Subwoofer"
-msgstr ""
+msgstr "Basový reproduktor"
 
 #: ../src/pulse/channelmap.c:117
 msgid "Front Left-of-center"
@@ -742,214 +1015,301 @@ msgstr ""
 
 #: ../src/pulse/channelmap.c:120
 msgid "Side Left"
-msgstr ""
+msgstr "Ľavá strana"
 
 #: ../src/pulse/channelmap.c:121
 msgid "Side Right"
-msgstr ""
+msgstr "Pravá strana"
 
 #: ../src/pulse/channelmap.c:123
 msgid "Auxiliary 0"
-msgstr "Auxiliary 0"
+msgstr "Aux 0"
 
 #: ../src/pulse/channelmap.c:124
 msgid "Auxiliary 1"
-msgstr "Auxiliary 1"
+msgstr "Aux 1"
 
 #: ../src/pulse/channelmap.c:125
 msgid "Auxiliary 2"
-msgstr "Auxiliary 2"
+msgstr "Aux 2"
 
 #: ../src/pulse/channelmap.c:126
 msgid "Auxiliary 3"
-msgstr "Auxiliary 3"
+msgstr "Aux 3"
 
 #: ../src/pulse/channelmap.c:127
 msgid "Auxiliary 4"
-msgstr "Auxiliary 4"
+msgstr "Aux 4"
 
 #: ../src/pulse/channelmap.c:128
 msgid "Auxiliary 5"
-msgstr "Auxiliary 5"
+msgstr "Aux 5"
 
 #: ../src/pulse/channelmap.c:129
 msgid "Auxiliary 6"
-msgstr "Auxiliary 6"
+msgstr "Aux 6"
 
 #: ../src/pulse/channelmap.c:130
 msgid "Auxiliary 7"
-msgstr "Auxiliary 7"
+msgstr "Aux 7"
 
 #: ../src/pulse/channelmap.c:131
 msgid "Auxiliary 8"
-msgstr "Auxiliary 8"
+msgstr "Aux 8"
 
 #: ../src/pulse/channelmap.c:132
 msgid "Auxiliary 9"
-msgstr "Auxiliary 9"
+msgstr "Aux 9"
 
 #: ../src/pulse/channelmap.c:133
 msgid "Auxiliary 10"
-msgstr "Auxiliary 10"
+msgstr "Aux 10"
 
 #: ../src/pulse/channelmap.c:134
 msgid "Auxiliary 11"
-msgstr "Auxiliary 11"
+msgstr "Aux 11"
 
 #: ../src/pulse/channelmap.c:135
 msgid "Auxiliary 12"
-msgstr "Auxiliary 12"
+msgstr "Aux 12"
 
 #: ../src/pulse/channelmap.c:136
 msgid "Auxiliary 13"
-msgstr "Auxiliary 13"
+msgstr "Aux 13"
 
 #: ../src/pulse/channelmap.c:137
 msgid "Auxiliary 14"
-msgstr "Auxiliary 14"
+msgstr "Aux 14"
 
 #: ../src/pulse/channelmap.c:138
 msgid "Auxiliary 15"
-msgstr "Auxiliary 15"
+msgstr "Aux 15"
 
 #: ../src/pulse/channelmap.c:139
 msgid "Auxiliary 16"
-msgstr "Auxiliary 16"
+msgstr "Aux 16"
 
 #: ../src/pulse/channelmap.c:140
 msgid "Auxiliary 17"
-msgstr "Auxiliary 17"
+msgstr "Aux 17"
 
 #: ../src/pulse/channelmap.c:141
 msgid "Auxiliary 18"
-msgstr "Auxiliary 18"
+msgstr "Aux 18"
 
 #: ../src/pulse/channelmap.c:142
 msgid "Auxiliary 19"
-msgstr "Auxiliary 19"
+msgstr "Aux 19"
 
 #: ../src/pulse/channelmap.c:143
 msgid "Auxiliary 20"
-msgstr "Auxiliary 20"
+msgstr "Aux 20"
 
 #: ../src/pulse/channelmap.c:144
 msgid "Auxiliary 21"
-msgstr "Auxiliary 21"
+msgstr "Aux 21"
 
 #: ../src/pulse/channelmap.c:145
 msgid "Auxiliary 22"
-msgstr "Auxiliary 22"
+msgstr "Aux 22"
 
 #: ../src/pulse/channelmap.c:146
 msgid "Auxiliary 23"
-msgstr "Auxiliary 23"
+msgstr "Aux 23"
 
 #: ../src/pulse/channelmap.c:147
 msgid "Auxiliary 24"
-msgstr "Auxiliary 24"
+msgstr "Aux 24"
 
 #: ../src/pulse/channelmap.c:148
 msgid "Auxiliary 25"
-msgstr "Auxiliary 25"
+msgstr "Aux 25"
 
 #: ../src/pulse/channelmap.c:149
 msgid "Auxiliary 26"
-msgstr "Auxiliary 26"
+msgstr "Aux 26"
 
 #: ../src/pulse/channelmap.c:150
 msgid "Auxiliary 27"
-msgstr "Auxiliary 27"
+msgstr "Aux 27"
 
 #: ../src/pulse/channelmap.c:151
 msgid "Auxiliary 28"
-msgstr "Auxiliary 28"
+msgstr "Aux 28"
 
 #: ../src/pulse/channelmap.c:152
 msgid "Auxiliary 29"
-msgstr "Auxiliary 29"
+msgstr "Aux 29"
 
 #: ../src/pulse/channelmap.c:153
 msgid "Auxiliary 30"
-msgstr "Auxiliary 30"
+msgstr "Aux 30"
 
 #: ../src/pulse/channelmap.c:154
 msgid "Auxiliary 31"
-msgstr "Auxiliary 31"
+msgstr "Aux 31"
 
 #: ../src/pulse/channelmap.c:156
 msgid "Top Center"
-msgstr ""
+msgstr "Horný stredový"
 
 #: ../src/pulse/channelmap.c:158
 msgid "Top Front Center"
-msgstr ""
+msgstr "Horný predný stredový"
 
 #: ../src/pulse/channelmap.c:159
 msgid "Top Front Left"
-msgstr ""
+msgstr "Horný predný ľavý"
 
 #: ../src/pulse/channelmap.c:160
 msgid "Top Front Right"
-msgstr ""
+msgstr "Horný predný pravý"
 
 #: ../src/pulse/channelmap.c:162
 msgid "Top Rear Center"
-msgstr ""
+msgstr "Horný zadný stredový"
 
 #: ../src/pulse/channelmap.c:163
 msgid "Top Rear Left"
-msgstr ""
+msgstr "Horný zadný ľavý"
 
 #: ../src/pulse/channelmap.c:164
 msgid "Top Rear Right"
-msgstr ""
+msgstr "Horný zadný pravý"
 
-#: ../src/pulse/channelmap.c:484 ../src/pulse/sample.c:169
-#: ../src/pulse/volume.c:297 ../src/pulse/volume.c:323
-#: ../src/pulse/volume.c:343 ../src/pulse/volume.c:373
-#: ../src/pulse/format.c:125
+#: ../src/pulse/channelmap.c:481 ../src/pulse/format.c:123
+#: ../src/pulse/sample.c:177 ../src/pulse/volume.c:296
+#: ../src/pulse/volume.c:322 ../src/pulse/volume.c:342
+#: ../src/pulse/volume.c:374 ../src/pulse/volume.c:414
+#: ../src/pulse/volume.c:433
 msgid "(invalid)"
-msgstr "(μη έγκυρο)"
+msgstr "(neplatné)"
 
-#: ../src/pulse/channelmap.c:761
+#: ../src/pulse/channelmap.c:764
 msgid "Stereo"
 msgstr "Stereo"
 
-#: ../src/pulse/channelmap.c:766
+#: ../src/pulse/channelmap.c:769
 msgid "Surround 4.0"
-msgstr "Surround 4.0"
+msgstr "Priestorový 4.0"
 
-#: ../src/pulse/channelmap.c:772
+#: ../src/pulse/channelmap.c:775
 msgid "Surround 4.1"
-msgstr "Surround 4.1"
+msgstr "Priestorový 4.1"
 
-#: ../src/pulse/channelmap.c:778
+#: ../src/pulse/channelmap.c:781
 msgid "Surround 5.0"
-msgstr "Surround 5.0"
+msgstr "Priestorový 5.0"
 
-#: ../src/pulse/channelmap.c:784
+#: ../src/pulse/channelmap.c:787
 msgid "Surround 5.1"
-msgstr "Surround 5.1"
+msgstr "Priestorový 5.1"
 
-#: ../src/pulse/channelmap.c:791
+#: ../src/pulse/channelmap.c:794
 msgid "Surround 7.1"
-msgstr "Surround 7.1"
+msgstr "Priestorový 7.1"
+
+#: ../src/pulse/client-conf-x11.c:55 ../src/utils/pax11publish.c:99
+msgid "xcb_connect() failed"
+msgstr ""
+
+#: ../src/pulse/client-conf-x11.c:60 ../src/utils/pax11publish.c:104
+msgid "xcb_connection_has_error() returned true"
+msgstr ""
+
+#: ../src/pulse/client-conf-x11.c:96
+msgid "Failed to parse cookie data"
+msgstr ""
+
+#: ../src/pulse/context.c:658
+#, c-format
+msgid "fork(): %s"
+msgstr ""
+
+#: ../src/pulse/context.c:713
+#, c-format
+msgid "waitpid(): %s"
+msgstr ""
+
+#: ../src/pulse/context.c:1414
+#, c-format
+msgid "Received message for unknown extension '%s'"
+msgstr ""
+
+#: ../src/pulse/direction.c:39
+msgid "input"
+msgstr ""
+
+#: ../src/pulse/direction.c:41
+msgid "output"
+msgstr ""
+
+#: ../src/pulse/direction.c:43
+msgid "bidirectional"
+msgstr ""
+
+#: ../src/pulse/direction.c:45
+msgid "invalid"
+msgstr ""
+
+#: ../src/pulsecore/core-util.c:1821
+#, c-format
+msgid ""
+"XDG_RUNTIME_DIR (%s) is not owned by us (uid %d), but by uid %d! (This could "
+"e g happen if you try to connect to a non-root PulseAudio as a root user, "
+"over the native protocol. Don't do that.)"
+msgstr ""
+
+#: ../src/pulsecore/core-util.h:95
+msgid "yes"
+msgstr "áno"
+
+#: ../src/pulsecore/core-util.h:95
+msgid "no"
+msgstr "nie"
+
+#: ../src/pulsecore/lock-autospawn.c:143 ../src/pulsecore/lock-autospawn.c:229
+msgid "Cannot access autospawn lock."
+msgstr ""
+
+#: ../src/pulsecore/log.c:155
+#, c-format
+msgid "Failed to open target file '%s'."
+msgstr ""
+
+#: ../src/pulsecore/log.c:178
+#, c-format
+msgid ""
+"Tried to open target file '%s', '%s.1', '%s.2' ... '%s.%d', but all failed."
+msgstr ""
+
+#: ../src/pulsecore/log.c:633
+msgid "Invalid log target."
+msgstr ""
+
+#: ../src/pulsecore/sink.c:3429
+msgid "Built-in Audio"
+msgstr "Vstavané audio"
+
+#: ../src/pulsecore/sink.c:3434
+msgid "Modem"
+msgstr "Modem"
 
 #: ../src/pulse/error.c:40
 msgid "OK"
-msgstr "Εντάξει"
+msgstr "OK"
 
 #: ../src/pulse/error.c:41
 msgid "Access denied"
-msgstr ""
+msgstr "Prístup zamietnutý"
 
 #: ../src/pulse/error.c:42
 msgid "Unknown command"
-msgstr ""
+msgstr "Neznámy príkaz"
 
 #: ../src/pulse/error.c:43
 msgid "Invalid argument"
-msgstr ""
+msgstr "Neplatný parameter"
 
 #: ../src/pulse/error.c:44
 msgid "Entity exists"
@@ -969,15 +1329,15 @@ msgstr ""
 
 #: ../src/pulse/error.c:48
 msgid "Timeout"
-msgstr ""
+msgstr "Vypršanie času"
 
 #: ../src/pulse/error.c:49
-msgid "No authorization key"
+msgid "No authentication key"
 msgstr ""
 
 #: ../src/pulse/error.c:50
 msgid "Internal error"
-msgstr ""
+msgstr "Interná chyba"
 
 #: ../src/pulse/error.c:51
 msgid "Connection terminated"
@@ -989,7 +1349,7 @@ msgstr ""
 
 #: ../src/pulse/error.c:53
 msgid "Invalid server"
-msgstr ""
+msgstr "Neplatný server"
 
 #: ../src/pulse/error.c:54
 msgid "Module initialization failed"
@@ -997,11 +1357,11 @@ msgstr ""
 
 #: ../src/pulse/error.c:55
 msgid "Bad state"
-msgstr ""
+msgstr "Zlý stav"
 
 #: ../src/pulse/error.c:56
 msgid "No data"
-msgstr ""
+msgstr "Žiadne údaje"
 
 #: ../src/pulse/error.c:57
 msgid "Incompatible protocol version"
@@ -1037,246 +1397,249 @@ msgstr ""
 
 #: ../src/pulse/error.c:65
 msgid "Input/Output error"
-msgstr ""
+msgstr "Vstupno/výstupná chyba"
 
 #: ../src/pulse/error.c:66
 msgid "Device or resource busy"
-msgstr ""
+msgstr "Zariadenie alebo prostriedok je zaneprázdnený"
 
-#: ../src/pulse/sample.c:171
+#: ../src/pulse/sample.c:179
 #, c-format
 msgid "%s %uch %uHz"
-msgstr "%s %uch %uHz"
+msgstr ""
 
-#: ../src/pulse/sample.c:183
+#: ../src/pulse/sample.c:191
 #, c-format
 msgid "%0.1f GiB"
-msgstr "%0.1f GiB"
+msgstr ""
 
-#: ../src/pulse/sample.c:185
+#: ../src/pulse/sample.c:193
 #, c-format
 msgid "%0.1f MiB"
-msgstr "%0.1f MiB"
+msgstr ""
 
-#: ../src/pulse/sample.c:187
+#: ../src/pulse/sample.c:195
 #, c-format
 msgid "%0.1f KiB"
-msgstr "%0.1f KiB"
+msgstr ""
 
-#: ../src/pulse/sample.c:189
+#: ../src/pulse/sample.c:197
 #, c-format
 msgid "%u B"
-msgstr "%u B"
-
-#: ../src/pulse/client-conf-x11.c:54 ../src/utils/pax11publish.c:100
-#, fuzzy
-msgid "xcb_connect() failed"
-msgstr "σύνδεση(): %s"
-
-#: ../src/pulse/client-conf-x11.c:59 ../src/utils/pax11publish.c:105
-msgid "xcb_connection_has_error() returned true"
-msgstr ""
-
-#: ../src/pulse/client-conf-x11.c:97
-msgid "Failed to parse cookie data"
 msgstr ""
 
-#: ../src/pulse/client-conf.c:117
+#: ../src/tests/resampler-test.c:257
 #, c-format
-msgid "Failed to open configuration file '%s': %s"
-msgstr ""
-
-#: ../src/pulse/context.c:528
-msgid "No cookie loaded. Attempting to connect without."
+msgid ""
+"%s [options]\n"
+"\n"
+"-h, --help                            Show this help\n"
+"-v, --verbose                         Print debug messages\n"
+"      --from-rate=SAMPLERATE          From sample rate in Hz (defaults to "
+"44100)\n"
+"      --from-format=SAMPLEFORMAT      From sample type (defaults to s16le)\n"
+"      --from-channels=CHANNELS        From number of channels (defaults to "
+"1)\n"
+"      --to-rate=SAMPLERATE            To sample rate in Hz (defaults to "
+"44100)\n"
+"      --to-format=SAMPLEFORMAT        To sample type (defaults to s16le)\n"
+"      --to-channels=CHANNELS          To number of channels (defaults to 1)\n"
+"      --resample-method=METHOD        Resample method (defaults to auto)\n"
+"      --seconds=SECONDS               From stream duration (defaults to 60)\n"
+"\n"
+"If the formats are not specified, the test performs all formats "
+"combinations,\n"
+"back and forth.\n"
+"\n"
+"Sample type must be one of s16le, s16be, u8, float32le, float32be, ulaw, "
+"alaw,\n"
+"s24le, s24be, s24-32le, s24-32be, s32le, s32be (defaults to s16ne)\n"
+"\n"
+"See --dump-resample-methods for possible values of resample methods.\n"
 msgstr ""
 
-#: ../src/pulse/context.c:675
-#, fuzzy, c-format
-msgid "fork(): %s"
-msgstr "fork(): %s"
-
-#: ../src/pulse/context.c:730
-#, fuzzy, c-format
-msgid "waitpid(): %s"
-msgstr "waitpid(): %s"
-
-#: ../src/pulse/context.c:1431
+#: ../src/tests/resampler-test.c:356
 #, c-format
-msgid "Received message for unknown extension '%s'"
+msgid "%s %s\n"
 msgstr ""
 
-#: ../src/utils/pacat.c:112
-#, fuzzy, c-format
+#: ../src/utils/pacat.c:118
+#, c-format
 msgid "Failed to drain stream: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pacat.c:117
+#: ../src/utils/pacat.c:123
 msgid "Playback stream drained."
 msgstr ""
 
-#: ../src/utils/pacat.c:128
+#: ../src/utils/pacat.c:134
 msgid "Draining connection to server."
 msgstr ""
 
-#: ../src/utils/pacat.c:141
+#: ../src/utils/pacat.c:147
 #, c-format
 msgid "pa_stream_drain(): %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:164
+#: ../src/utils/pacat.c:170
 #, c-format
 msgid "pa_stream_write() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:205
+#: ../src/utils/pacat.c:211
 #, c-format
 msgid "pa_stream_begin_write() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:255 ../src/utils/pacat.c:285
+#: ../src/utils/pacat.c:261 ../src/utils/pacat.c:291
 #, c-format
 msgid "pa_stream_peek() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:325
+#: ../src/utils/pacat.c:341
 msgid "Stream successfully created."
 msgstr ""
 
-#: ../src/utils/pacat.c:328
+#: ../src/utils/pacat.c:344
 #, c-format
 msgid "pa_stream_get_buffer_attr() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:332
+#: ../src/utils/pacat.c:348
 #, c-format
 msgid "Buffer metrics: maxlength=%u, tlength=%u, prebuf=%u, minreq=%u"
 msgstr ""
 
-#: ../src/utils/pacat.c:335
+#: ../src/utils/pacat.c:351
 #, c-format
 msgid "Buffer metrics: maxlength=%u, fragsize=%u"
 msgstr ""
 
-#: ../src/utils/pacat.c:339
+#: ../src/utils/pacat.c:355
 #, c-format
 msgid "Using sample spec '%s', channel map '%s'."
 msgstr ""
 
-#: ../src/utils/pacat.c:343
+#: ../src/utils/pacat.c:359
 #, c-format
-msgid "Connected to device %s (%u, %ssuspended)."
+msgid "Connected to device %s (index: %u, suspended: %s)."
 msgstr ""
 
-#: ../src/utils/pacat.c:353
+#: ../src/utils/pacat.c:369
 #, c-format
 msgid "Stream error: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:363
+#: ../src/utils/pacat.c:379
 #, c-format
 msgid "Stream device suspended.%s"
 msgstr ""
 
-#: ../src/utils/pacat.c:365
+#: ../src/utils/pacat.c:381
 #, c-format
 msgid "Stream device resumed.%s"
 msgstr ""
 
-#: ../src/utils/pacat.c:373
+#: ../src/utils/pacat.c:389
 #, c-format
 msgid "Stream underrun.%s"
 msgstr ""
 
-#: ../src/utils/pacat.c:380
+#: ../src/utils/pacat.c:396
 #, c-format
 msgid "Stream overrun.%s"
 msgstr ""
 
-#: ../src/utils/pacat.c:387
+#: ../src/utils/pacat.c:403
 #, c-format
 msgid "Stream started.%s"
 msgstr ""
 
-#: ../src/utils/pacat.c:394
+#: ../src/utils/pacat.c:410
 #, c-format
 msgid "Stream moved to device %s (%u, %ssuspended).%s"
 msgstr ""
 
-#: ../src/utils/pacat.c:394
+#: ../src/utils/pacat.c:410
 msgid "not "
 msgstr ""
 
-#: ../src/utils/pacat.c:401
+#: ../src/utils/pacat.c:417
 #, c-format
 msgid "Stream buffer attributes changed.%s"
 msgstr ""
 
-#: ../src/utils/pacat.c:416
+#: ../src/utils/pacat.c:432
 msgid "Cork request stack is empty: corking stream"
 msgstr ""
 
-#: ../src/utils/pacat.c:422
+#: ../src/utils/pacat.c:438
 msgid "Cork request stack is empty: uncorking stream"
 msgstr ""
 
-#: ../src/utils/pacat.c:426
+#: ../src/utils/pacat.c:442
 msgid "Warning: Received more uncork requests than cork requests!"
 msgstr ""
 
-#: ../src/utils/pacat.c:451
+#: ../src/utils/pacat.c:467
 #, c-format
 msgid "Connection established.%s"
 msgstr ""
 
-#: ../src/utils/pacat.c:454
+#: ../src/utils/pacat.c:470
 #, c-format
 msgid "pa_stream_new() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:492
+#: ../src/utils/pacat.c:508
 #, c-format
 msgid "pa_stream_connect_playback() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:498
+#: ../src/utils/pacat.c:514
+#, c-format
+msgid "Failed to set monitor stream: %s"
+msgstr ""
+
+#: ../src/utils/pacat.c:518
 #, c-format
 msgid "pa_stream_connect_record() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:512 ../src/utils/pactl.c:1252
+#: ../src/utils/pacat.c:531 ../src/utils/pactl.c:1455
 #, c-format
 msgid "Connection failure: %s"
-msgstr "Αποτυχία σύνδεσης: %s"
+msgstr ""
 
-#: ../src/utils/pacat.c:545
+#: ../src/utils/pacat.c:564
 msgid "Got EOF."
 msgstr ""
 
-#: ../src/utils/pacat.c:582
+#: ../src/utils/pacat.c:601
 #, c-format
 msgid "write() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:603
+#: ../src/utils/pacat.c:622
 msgid "Got signal, exiting."
 msgstr ""
 
-#: ../src/utils/pacat.c:617
-#, fuzzy, c-format
+#: ../src/utils/pacat.c:636
+#, c-format
 msgid "Failed to get latency: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pacat.c:622
+#: ../src/utils/pacat.c:641
 #, c-format
 msgid "Time: %0.3f sec; Latency: %0.0f usec."
 msgstr ""
 
-#: ../src/utils/pacat.c:643
+#: ../src/utils/pacat.c:662
 #, c-format
 msgid "pa_stream_update_timing_info() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:653
+#: ../src/utils/pacat.c:672
 #, c-format
 msgid ""
 "%s [options]\n"
@@ -1312,16 +1675,16 @@ msgid ""
 "                                        (defaults to 2)\n"
 "      --channel-map=CHANNELMAP          Channel map to use instead of the "
 "default\n"
-"      --fix-format                      Take the sample format from the sink "
-"the stream is\n"
+"      --fix-format                      Take the sample format from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
-"      --fix-rate                        Take the sampling rate from the sink "
-"the stream is\n"
+"      --fix-rate                        Take the sampling rate from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
 "      --fix-channels                    Take the number of channels and the "
 "channel map\n"
-"                                        from the sink the stream is being "
-"connected to.\n"
+"                                        from the sink/source the stream is "
+"being connected to.\n"
 "      --no-remix                        Don't upmix or downmix channels.\n"
 "      --no-remap                        Map channels by index instead of "
 "name.\n"
@@ -1336,12 +1699,14 @@ msgid ""
 "      --property=PROPERTY=VALUE         Set the specified property to the "
 "specified value.\n"
 "      --raw                             Record/play raw PCM data.\n"
-"      --passthrough                     passthrough data \n"
+"      --passthrough                     Passthrough data.\n"
 "      --file-format[=FFORMAT]           Record/play formatted PCM data.\n"
 "      --list-file-formats               List available file formats.\n"
+"      --monitor-stream=INDEX            Record from the sink input with "
+"index INDEX.\n"
 msgstr ""
 
-#: ../src/utils/pacat.c:786
+#: ../src/utils/pacat.c:810
 #, c-format
 msgid ""
 "pacat %s\n"
@@ -1349,234 +1714,305 @@ msgid ""
 "Linked with libpulse %s\n"
 msgstr ""
 
-#: ../src/utils/pacat.c:819 ../src/utils/pactl.c:1400
+#: ../src/utils/pacat.c:843 ../src/utils/pactl.c:1651
 #, c-format
 msgid "Invalid client name '%s'"
 msgstr ""
 
-#: ../src/utils/pacat.c:834
+#: ../src/utils/pacat.c:858
 #, c-format
 msgid "Invalid stream name '%s'"
 msgstr ""
 
-#: ../src/utils/pacat.c:871
+#: ../src/utils/pacat.c:895
 #, c-format
 msgid "Invalid channel map '%s'"
 msgstr ""
 
-#: ../src/utils/pacat.c:900 ../src/utils/pacat.c:914
+#: ../src/utils/pacat.c:924 ../src/utils/pacat.c:938
 #, c-format
 msgid "Invalid latency specification '%s'"
 msgstr ""
 
-#: ../src/utils/pacat.c:907 ../src/utils/pacat.c:921
+#: ../src/utils/pacat.c:931 ../src/utils/pacat.c:945
 #, c-format
 msgid "Invalid process time specification '%s'"
 msgstr ""
 
-#: ../src/utils/pacat.c:933
+#: ../src/utils/pacat.c:957
 #, c-format
 msgid "Invalid property '%s'"
 msgstr ""
 
-#: ../src/utils/pacat.c:952
+#: ../src/utils/pacat.c:976
 #, c-format
 msgid "Unknown file format %s."
 msgstr ""
 
-#: ../src/utils/pacat.c:971
+#: ../src/utils/pacat.c:991
+msgid "Failed to parse the argument for --monitor-stream"
+msgstr ""
+
+#: ../src/utils/pacat.c:1002
 msgid "Invalid sample specification"
 msgstr ""
 
-#: ../src/utils/pacat.c:981
+#: ../src/utils/pacat.c:1012
 #, c-format
 msgid "open(): %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:986
+#: ../src/utils/pacat.c:1017
 #, c-format
 msgid "dup2(): %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:993
+#: ../src/utils/pacat.c:1024
 msgid "Too many arguments."
 msgstr ""
 
-#: ../src/utils/pacat.c:1004
+#: ../src/utils/pacat.c:1035
 msgid "Failed to generate sample specification for file."
 msgstr ""
 
-#: ../src/utils/pacat.c:1030
+#: ../src/utils/pacat.c:1061
 msgid "Failed to open audio file."
 msgstr ""
 
-#: ../src/utils/pacat.c:1036
+#: ../src/utils/pacat.c:1067
 msgid ""
 "Warning: specified sample specification will be overwritten with "
 "specification from file."
 msgstr ""
 
-#: ../src/utils/pacat.c:1039 ../src/utils/pactl.c:1467
+#: ../src/utils/pacat.c:1070 ../src/utils/pactl.c:1718
 msgid "Failed to determine sample specification from file."
 msgstr ""
 
-#: ../src/utils/pacat.c:1048
+#: ../src/utils/pacat.c:1079
 msgid "Warning: Failed to determine channel map from file."
 msgstr ""
 
-#: ../src/utils/pacat.c:1059
+#: ../src/utils/pacat.c:1090
 msgid "Channel map doesn't match sample specification"
 msgstr ""
 
-#: ../src/utils/pacat.c:1070
+#: ../src/utils/pacat.c:1101
 msgid "Warning: failed to write channel map to file."
 msgstr ""
 
-#: ../src/utils/pacat.c:1085
+#: ../src/utils/pacat.c:1116
 #, c-format
 msgid ""
 "Opening a %s stream with sample specification '%s' and channel map '%s'."
 msgstr ""
 
-#: ../src/utils/pacat.c:1086
+#: ../src/utils/pacat.c:1117
 msgid "recording"
 msgstr ""
 
-#: ../src/utils/pacat.c:1086
+#: ../src/utils/pacat.c:1117
 msgid "playback"
 msgstr ""
 
-#: ../src/utils/pacat.c:1110
-#, fuzzy
+#: ../src/utils/pacat.c:1141
 msgid "Failed to set media name."
-msgstr "Αποτυχία ανοίγματος αρχείου ήχου."
+msgstr ""
 
-#: ../src/utils/pacat.c:1117 ../src/utils/pactl.c:1777
+#: ../src/utils/pacat.c:1148 ../src/utils/pactl.c:2068
 msgid "pa_mainloop_new() failed."
 msgstr ""
 
-#: ../src/utils/pacat.c:1136
+#: ../src/utils/pacat.c:1171
 msgid "io_new() failed."
 msgstr ""
 
-#: ../src/utils/pacat.c:1143 ../src/utils/pactl.c:1789
+#: ../src/utils/pacat.c:1178 ../src/utils/pactl.c:2080
 msgid "pa_context_new() failed."
 msgstr ""
 
-#: ../src/utils/pacat.c:1151 ../src/utils/pactl.c:1795
+#: ../src/utils/pacat.c:1186 ../src/utils/pactl.c:2086
 #, c-format
 msgid "pa_context_connect() failed: %s"
 msgstr ""
 
-#: ../src/utils/pacat.c:1157
+#: ../src/utils/pacat.c:1192
 msgid "pa_context_rttime_new() failed."
 msgstr ""
 
-#: ../src/utils/pacat.c:1164 ../src/utils/pactl.c:1800
+#: ../src/utils/pacat.c:1199 ../src/utils/pactl.c:2091
 msgid "pa_mainloop_run() failed."
 msgstr ""
 
-#: ../src/utils/pasuspender.c:79
-#, fuzzy, c-format
-msgid "fork(): %s\n"
-msgstr "fork(): %s\n"
+#: ../src/utils/pacmd.c:53 ../src/utils/pactl.c:1573
+msgid "NAME [ARGS ...]"
+msgstr ""
 
-#: ../src/utils/pasuspender.c:90
-#, fuzzy, c-format
-msgid "execvp(): %s\n"
-msgstr "execvp(): %s\n"
+#: ../src/utils/pacmd.c:54 ../src/utils/pacmd.c:62 ../src/utils/pactl.c:1574
+msgid "NAME|#N"
+msgstr ""
 
-#: ../src/utils/pasuspender.c:107
-#, c-format
-msgid "Failure to suspend: %s\n"
+#: ../src/utils/pacmd.c:55 ../src/utils/pacmd.c:65 ../src/utils/pactl.c:1572
+#: ../src/utils/pactl.c:1578
+msgid "NAME"
 msgstr ""
 
-#: ../src/utils/pasuspender.c:122
-#, c-format
-msgid "Failure to resume: %s\n"
+#: ../src/utils/pacmd.c:56
+msgid "NAME|#N VOLUME"
 msgstr ""
 
-#: ../src/utils/pasuspender.c:145
-#, c-format
-msgid "WARNING: Sound server is not local, not suspending.\n"
+#: ../src/utils/pacmd.c:57
+msgid "#N VOLUME"
 msgstr ""
 
-#: ../src/utils/pasuspender.c:157
-#, c-format
-msgid "Connection failure: %s\n"
+#: ../src/utils/pacmd.c:58 ../src/utils/pacmd.c:72 ../src/utils/pactl.c:1576
+msgid "NAME|#N 1|0"
 msgstr ""
 
-#: ../src/utils/pasuspender.c:174
-#, c-format
-msgid "Got SIGINT, exiting.\n"
+#: ../src/utils/pacmd.c:59
+msgid "#N 1|0"
 msgstr ""
 
-#: ../src/utils/pasuspender.c:192
-#, c-format
-msgid "WARNING: Child process terminated by signal %u\n"
+#: ../src/utils/pacmd.c:60
+msgid "NAME|#N KEY=VALUE"
+msgstr ""
+
+#: ../src/utils/pacmd.c:61
+msgid "#N KEY=VALUE"
+msgstr ""
+
+#: ../src/utils/pacmd.c:63
+msgid "#N"
+msgstr ""
+
+#: ../src/utils/pacmd.c:64
+msgid "NAME SINK|#N"
+msgstr ""
+
+#: ../src/utils/pacmd.c:66 ../src/utils/pacmd.c:67
+msgid "NAME FILENAME"
+msgstr ""
+
+#: ../src/utils/pacmd.c:68
+msgid "PATHNAME"
+msgstr ""
+
+#: ../src/utils/pacmd.c:69
+msgid "FILENAME SINK|#N"
+msgstr ""
+
+#: ../src/utils/pacmd.c:71 ../src/utils/pactl.c:1575
+msgid "#N SINK|SOURCE"
+msgstr ""
+
+#: ../src/utils/pacmd.c:73 ../src/utils/pacmd.c:79 ../src/utils/pacmd.c:80
+msgid "1|0"
+msgstr ""
+
+#: ../src/utils/pacmd.c:74 ../src/utils/pactl.c:1577
+msgid "CARD PROFILE"
+msgstr ""
+
+#: ../src/utils/pacmd.c:75 ../src/utils/pactl.c:1579
+msgid "NAME|#N PORT"
+msgstr ""
+
+#: ../src/utils/pacmd.c:76 ../src/utils/pactl.c:1585
+msgid "CARD-NAME|CARD-#N PORT OFFSET"
+msgstr ""
+
+#: ../src/utils/pacmd.c:77
+msgid "TARGET"
+msgstr ""
+
+#: ../src/utils/pacmd.c:78
+msgid "NUMERIC LEVEL"
+msgstr ""
+
+#: ../src/utils/pacmd.c:81
+msgid "FRAMES"
 msgstr ""
 
-#: ../src/utils/pasuspender.c:210
+#: ../src/utils/pacmd.c:83
 #, c-format
 msgid ""
-"%s [options] ... \n"
 "\n"
 "  -h, --help                            Show this help\n"
 "      --version                         Show version\n"
-"  -s, --server=SERVER                   The name of the server to connect "
-"to\n"
-"\n"
+"When no command is given pacmd starts in the interactive mode.\n"
 msgstr ""
 
-#: ../src/utils/pasuspender.c:248
+#: ../src/utils/pacmd.c:130
 #, c-format
 msgid ""
-"pasuspender %s\n"
+"pacmd %s\n"
 "Compiled with libpulse %s\n"
 "Linked with libpulse %s\n"
 msgstr ""
 
-#: ../src/utils/pasuspender.c:277
+#: ../src/utils/pacmd.c:144
+msgid "No PulseAudio daemon running, or not running as session daemon."
+msgstr ""
+
+#: ../src/utils/pacmd.c:149
 #, c-format
-msgid "pa_mainloop_new() failed.\n"
+msgid "socket(PF_UNIX, SOCK_STREAM, 0): %s"
 msgstr ""
 
-#: ../src/utils/pasuspender.c:290
+#: ../src/utils/pacmd.c:166
 #, c-format
-msgid "pa_context_new() failed.\n"
+msgid "connect(): %s"
+msgstr ""
+
+#: ../src/utils/pacmd.c:174
+msgid "Failed to kill PulseAudio daemon."
+msgstr ""
+
+#: ../src/utils/pacmd.c:182
+msgid "Daemon not responding."
 msgstr ""
 
-#: ../src/utils/pasuspender.c:298
+#: ../src/utils/pacmd.c:214 ../src/utils/pacmd.c:323 ../src/utils/pacmd.c:341
 #, c-format
-msgid "pa_mainloop_run() failed.\n"
+msgid "write(): %s"
+msgstr ""
+
+#: ../src/utils/pacmd.c:270
+#, c-format
+msgid "poll(): %s"
+msgstr ""
+
+#: ../src/utils/pacmd.c:281 ../src/utils/pacmd.c:301
+#, c-format
+msgid "read(): %s"
 msgstr ""
 
-#: ../src/utils/pactl.c:150
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:166
+#, c-format
 msgid "Failed to get statistics: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:156
+#: ../src/utils/pactl.c:172
 #, c-format
 msgid "Currently in use: %u blocks containing %s bytes total.\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:159
+#: ../src/utils/pactl.c:175
 #, c-format
 msgid "Allocated during whole lifetime: %u blocks containing %s bytes total.\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:162
+#: ../src/utils/pactl.c:178
 #, c-format
 msgid "Sample cache size: %s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:171
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:187
+#, c-format
 msgid "Failed to get server information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:176
+#: ../src/utils/pactl.c:192
 #, c-format
 msgid ""
 "Server String: %s\n"
@@ -1587,7 +2023,7 @@ msgid ""
 "Tile Size: %zu\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:192
+#: ../src/utils/pactl.c:208
 #, c-format
 msgid ""
 "User Name: %s\n"
@@ -1601,12 +2037,12 @@ msgid ""
 "Cookie: %04x:%04x\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:244 ../src/utils/pactl.c:830
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:257 ../src/utils/pactl.c:902 ../src/utils/pactl.c:980
+#, c-format
 msgid "Failed to get sink information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:270
+#: ../src/utils/pactl.c:283
 #, c-format
 msgid ""
 "Sink #%u\n"
@@ -1618,9 +2054,9 @@ msgid ""
 "\tChannel Map: %s\n"
 "\tOwner Module: %u\n"
 "\tMute: %s\n"
-"\tVolume: %s%s%s\n"
+"\tVolume: %s\n"
 "\t        balance %0.2f\n"
-"\tBase Volume: %s%s%s\n"
+"\tBase Volume: %s\n"
 "\tMonitor Source: %s\n"
 "\tLatency: %0.0f usec, configured %0.0f usec\n"
 "\tFlags: %s%s%s%s%s%s%s\n"
@@ -1628,27 +2064,27 @@ msgid ""
 "\t\t%s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:318 ../src/utils/pactl.c:430
+#: ../src/utils/pactl.c:327 ../src/utils/pactl.c:433 ../src/utils/pactl.c:594
 #, c-format
 msgid "\tPorts:\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:325 ../src/utils/pactl.c:437
+#: ../src/utils/pactl.c:334 ../src/utils/pactl.c:440
 #, c-format
 msgid "\tActive Port: %s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:331 ../src/utils/pactl.c:443
+#: ../src/utils/pactl.c:340 ../src/utils/pactl.c:446
 #, c-format
 msgid "\tFormats:\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:357 ../src/utils/pactl.c:849
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:364 ../src/utils/pactl.c:922 ../src/utils/pactl.c:995
+#, c-format
 msgid "Failed to get source information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:383
+#: ../src/utils/pactl.c:390
 #, c-format
 msgid ""
 "Source #%u\n"
@@ -1660,9 +2096,9 @@ msgid ""
 "\tChannel Map: %s\n"
 "\tOwner Module: %u\n"
 "\tMute: %s\n"
-"\tVolume: %s%s%s\n"
+"\tVolume: %s\n"
 "\t        balance %0.2f\n"
-"\tBase Volume: %s%s%s\n"
+"\tBase Volume: %s\n"
 "\tMonitor of Sink: %s\n"
 "\tLatency: %0.0f usec, configured %0.0f usec\n"
 "\tFlags: %s%s%s%s%s%s\n"
@@ -1670,20 +2106,20 @@ msgid ""
 "\t\t%s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:415 ../src/utils/pactl.c:485 ../src/utils/pactl.c:528
-#: ../src/utils/pactl.c:570 ../src/utils/pactl.c:640 ../src/utils/pactl.c:641
-#: ../src/utils/pactl.c:652 ../src/utils/pactl.c:711 ../src/utils/pactl.c:712
-#: ../src/utils/pactl.c:723 ../src/utils/pactl.c:775 ../src/utils/pactl.c:776
-#: ../src/utils/pactl.c:783
+#: ../src/utils/pactl.c:418 ../src/utils/pactl.c:488 ../src/utils/pactl.c:531
+#: ../src/utils/pactl.c:573 ../src/utils/pactl.c:671 ../src/utils/pactl.c:672
+#: ../src/utils/pactl.c:683 ../src/utils/pactl.c:741 ../src/utils/pactl.c:742
+#: ../src/utils/pactl.c:753 ../src/utils/pactl.c:804 ../src/utils/pactl.c:805
+#: ../src/utils/pactl.c:811
 msgid "n/a"
 msgstr ""
 
-#: ../src/utils/pactl.c:454
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:457 ../src/utils/pactl.c:861
+#, c-format
 msgid "Failed to get module information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:477
+#: ../src/utils/pactl.c:480
 #, c-format
 msgid ""
 "Module #%u\n"
@@ -1694,12 +2130,12 @@ msgid ""
 "\t\t%s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:496
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:499
+#, c-format
 msgid "Failed to get client information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:522
+#: ../src/utils/pactl.c:525
 #, c-format
 msgid ""
 "Client #%u\n"
@@ -1709,12 +2145,12 @@ msgid ""
 "\t\t%s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:539
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:542
+#, c-format
 msgid "Failed to get card information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:562
+#: ../src/utils/pactl.c:565
 #, c-format
 msgid ""
 "Card #%u\n"
@@ -1725,22 +2161,34 @@ msgid ""
 "\t\t%s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:576
+#: ../src/utils/pactl.c:581
 #, c-format
 msgid "\tProfiles:\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:582
+#: ../src/utils/pactl.c:588
 #, c-format
 msgid "\tActive Profile: %s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:593 ../src/utils/pactl.c:868
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:602
+#, c-format
+msgid ""
+"\t\t\tProperties:\n"
+"\t\t\t\t%s\n"
+msgstr ""
+
+#: ../src/utils/pactl.c:607
+#, c-format
+msgid "\t\t\tPart of profile(s): %s"
+msgstr ""
+
+#: ../src/utils/pactl.c:624 ../src/utils/pactl.c:942 ../src/utils/pactl.c:1010
+#, c-format
 msgid "Failed to get sink input information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:622
+#: ../src/utils/pactl.c:653
 #, c-format
 msgid ""
 "Sink Input #%u\n"
@@ -1751,9 +2199,9 @@ msgid ""
 "\tSample Specification: %s\n"
 "\tChannel Map: %s\n"
 "\tFormat: %s\n"
+"\tCorked: %s\n"
 "\tMute: %s\n"
 "\tVolume: %s\n"
-"\t        %s\n"
 "\t        balance %0.2f\n"
 "\tBuffer Latency: %0.0f usec\n"
 "\tSink Latency: %0.0f usec\n"
@@ -1762,12 +2210,12 @@ msgid ""
 "\t\t%s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:663 ../src/utils/pactl.c:887
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:694 ../src/utils/pactl.c:962 ../src/utils/pactl.c:1025
+#, c-format
 msgid "Failed to get source output information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:693
+#: ../src/utils/pactl.c:723
 #, c-format
 msgid ""
 "Source Output #%u\n"
@@ -1778,9 +2226,9 @@ msgid ""
 "\tSample Specification: %s\n"
 "\tChannel Map: %s\n"
 "\tFormat: %s\n"
+"\tCorked: %s\n"
 "\tMute: %s\n"
 "\tVolume: %s\n"
-"\t        %s\n"
 "\t        balance %0.2f\n"
 "\tBuffer Latency: %0.0f usec\n"
 "\tSource Latency: %0.0f usec\n"
@@ -1789,12 +2237,12 @@ msgid ""
 "\t\t%s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:734
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:764
+#, c-format
 msgid "Failed to get sample information: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:761
+#: ../src/utils/pactl.c:791
 #, c-format
 msgid ""
 "Sample #%u\n"
@@ -1802,7 +2250,6 @@ msgid ""
 "\tSample Specification: %s\n"
 "\tChannel Map: %s\n"
 "\tVolume: %s\n"
-"\t        %s\n"
 "\t        balance %0.2f\n"
 "\tDuration: %0.1fs\n"
 "\tSize: %s\n"
@@ -1812,160 +2259,169 @@ msgid ""
 "\t\t%s\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:791 ../src/utils/pactl.c:801
+#: ../src/utils/pactl.c:819 ../src/utils/pactl.c:829
 #, c-format
 msgid "Failure: %s"
-msgstr "Αποτυχία: %s"
+msgstr ""
+
+#: ../src/utils/pactl.c:868
+#, c-format
+msgid "Failed to unload module: Module %s not loaded"
+msgstr ""
+
+#: ../src/utils/pactl.c:886
+#, c-format
+msgid ""
+"Failed to set volume: You tried to set volumes for %d channels, whereas "
+"channel/s supported = %d\n"
+msgstr ""
 
-#: ../src/utils/pactl.c:915
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:1052
+#, c-format
 msgid "Failed to set format: invalid format string %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:954
-#, fuzzy, c-format
+#: ../src/utils/pactl.c:1095
+#, c-format
 msgid "Failed to upload sample: %s"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
+msgstr ""
 
-#: ../src/utils/pactl.c:971
+#: ../src/utils/pactl.c:1112
 msgid "Premature end of file"
 msgstr ""
 
-#: ../src/utils/pactl.c:991
+#: ../src/utils/pactl.c:1132
 msgid "new"
 msgstr ""
 
-#: ../src/utils/pactl.c:994
+#: ../src/utils/pactl.c:1135
 msgid "change"
 msgstr ""
 
-#: ../src/utils/pactl.c:997
+#: ../src/utils/pactl.c:1138
 msgid "remove"
 msgstr ""
 
-#: ../src/utils/pactl.c:1000 ../src/utils/pactl.c:1035
+#: ../src/utils/pactl.c:1141 ../src/utils/pactl.c:1176
 msgid "unknown"
 msgstr ""
 
-#: ../src/utils/pactl.c:1008
+#: ../src/utils/pactl.c:1149
 msgid "sink"
 msgstr ""
 
-#: ../src/utils/pactl.c:1011
+#: ../src/utils/pactl.c:1152
 msgid "source"
 msgstr ""
 
-#: ../src/utils/pactl.c:1014
+#: ../src/utils/pactl.c:1155
 msgid "sink-input"
 msgstr ""
 
-#: ../src/utils/pactl.c:1017
+#: ../src/utils/pactl.c:1158
 msgid "source-output"
 msgstr ""
 
-#: ../src/utils/pactl.c:1020
+#: ../src/utils/pactl.c:1161
 msgid "module"
 msgstr ""
 
-#: ../src/utils/pactl.c:1023
+#: ../src/utils/pactl.c:1164
 msgid "client"
 msgstr ""
 
-#: ../src/utils/pactl.c:1026
+#: ../src/utils/pactl.c:1167
 msgid "sample-cache"
 msgstr ""
 
-#: ../src/utils/pactl.c:1029 ../src/utils/pactl.c:1032
+#: ../src/utils/pactl.c:1170
 msgid "server"
 msgstr ""
 
-#: ../src/utils/pactl.c:1041
+#: ../src/utils/pactl.c:1173
+msgid "card"
+msgstr ""
+
+#: ../src/utils/pactl.c:1182
 #, c-format
 msgid "Event '%s' on %s #%u\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:1258
+#: ../src/utils/pactl.c:1461
 msgid "Got SIGINT, exiting."
 msgstr ""
 
-#: ../src/utils/pactl.c:1285
+#: ../src/utils/pactl.c:1488
 msgid "Invalid volume specification"
 msgstr ""
 
-#: ../src/utils/pactl.c:1308
+#: ../src/utils/pactl.c:1511
 msgid "Volume outside permissible range.\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:1319 ../src/utils/pactl.c:1320
-#: ../src/utils/pactl.c:1321 ../src/utils/pactl.c:1322
-#: ../src/utils/pactl.c:1323 ../src/utils/pactl.c:1324
-#: ../src/utils/pactl.c:1325 ../src/utils/pactl.c:1326
-#: ../src/utils/pactl.c:1327 ../src/utils/pactl.c:1328
-#: ../src/utils/pactl.c:1329 ../src/utils/pactl.c:1330
-#: ../src/utils/pactl.c:1331 ../src/utils/pactl.c:1332
-#: ../src/utils/pactl.c:1333 ../src/utils/pactl.c:1334
-#: ../src/utils/pactl.c:1335 ../src/utils/pactl.c:1336
-#: ../src/utils/pactl.c:1337
-msgid "[options]"
-msgstr ""
-
-#: ../src/utils/pactl.c:1321
-msgid "[TYPE]"
-msgstr ""
-
-#: ../src/utils/pactl.c:1323
-msgid "FILENAME [NAME]"
-msgstr ""
-
-#: ../src/utils/pactl.c:1324
-msgid "NAME [SINK]"
+#: ../src/utils/pactl.c:1524
+msgid "Invalid number of volume specifications.\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:1325
-msgid "NAME"
+#: ../src/utils/pactl.c:1536
+msgid "Inconsistent volume specification.\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:1326
-msgid "NAME [ARGS ...]"
-msgstr ""
+#: ../src/utils/pactl.c:1566 ../src/utils/pactl.c:1567
+#: ../src/utils/pactl.c:1568 ../src/utils/pactl.c:1569
+#: ../src/utils/pactl.c:1570 ../src/utils/pactl.c:1571
+#: ../src/utils/pactl.c:1572 ../src/utils/pactl.c:1573
+#: ../src/utils/pactl.c:1574 ../src/utils/pactl.c:1575
+#: ../src/utils/pactl.c:1576 ../src/utils/pactl.c:1577
+#: ../src/utils/pactl.c:1578 ../src/utils/pactl.c:1579
+#: ../src/utils/pactl.c:1580 ../src/utils/pactl.c:1581
+#: ../src/utils/pactl.c:1582 ../src/utils/pactl.c:1583
+#: ../src/utils/pactl.c:1584 ../src/utils/pactl.c:1585
+#: ../src/utils/pactl.c:1586
+msgid "[options]"
+msgstr "[voľby]"
 
-#: ../src/utils/pactl.c:1327
-msgid "#N"
-msgstr ""
+#: ../src/utils/pactl.c:1568
+msgid "[TYPE]"
+msgstr "[TYP]"
 
-#: ../src/utils/pactl.c:1328
-msgid "#N SINK|SOURCE"
+#: ../src/utils/pactl.c:1570
+msgid "FILENAME [NAME]"
 msgstr ""
 
-#: ../src/utils/pactl.c:1329 ../src/utils/pactl.c:1334
-msgid "NAME|#N 1|0"
+#: ../src/utils/pactl.c:1571
+msgid "NAME [SINK]"
 msgstr ""
 
-#: ../src/utils/pactl.c:1330
-msgid "CARD PROFILE"
+#: ../src/utils/pactl.c:1580
+msgid "NAME|#N VOLUME [VOLUME ...]"
 msgstr ""
 
-#: ../src/utils/pactl.c:1331
-msgid "NAME|#N PORT"
+#: ../src/utils/pactl.c:1581
+msgid "#N VOLUME [VOLUME ...]"
 msgstr ""
 
-#: ../src/utils/pactl.c:1332
-msgid "NAME|#N VOLUME"
+#: ../src/utils/pactl.c:1582
+msgid "NAME|#N 1|0|toggle"
 msgstr ""
 
-#: ../src/utils/pactl.c:1333
-msgid "#N VOLUME"
+#: ../src/utils/pactl.c:1583
+msgid "#N 1|0|toggle"
 msgstr ""
 
-#: ../src/utils/pactl.c:1335
-msgid "#N 1|0"
+#: ../src/utils/pactl.c:1584
+msgid "#N FORMATS"
 msgstr ""
 
-#: ../src/utils/pactl.c:1336
-msgid "#N FORMATS"
+#: ../src/utils/pactl.c:1587
+#, c-format
+msgid ""
+"\n"
+"The special names @DEFAULT_SINK@, @DEFAULT_SOURCE@ and @DEFAULT_MONITOR@\n"
+"can be used to specify the default sink, source and monitor.\n"
 msgstr ""
 
-#: ../src/utils/pactl.c:1339
+#: ../src/utils/pactl.c:1590
 #, c-format
 msgid ""
 "\n"
@@ -1977,625 +2433,308 @@ msgid ""
 "  -n, --client-name=NAME                How to call this client on the "
 "server\n"
 msgstr ""
-
-#: ../src/utils/pactl.c:1380
-#, c-format
-msgid ""
-"pactl %s\n"
-"Compiled with libpulse %s\n"
-"Linked with libpulse %s\n"
-msgstr ""
-
-#: ../src/utils/pactl.c:1439
-#, c-format
-msgid "Specify nothing, or one of: %s"
-msgstr ""
-
-#: ../src/utils/pactl.c:1449
-msgid "Please specify a sample file to load"
-msgstr ""
-
-#: ../src/utils/pactl.c:1462
-msgid "Failed to open sound file."
-msgstr "Αποτυχία ανοίγματος αρχείου ήχου."
-
-#: ../src/utils/pactl.c:1474
-msgid "Warning: Failed to determine sample specification from file."
-msgstr ""
-
-#: ../src/utils/pactl.c:1484
-msgid "You have to specify a sample name to play"
-msgstr ""
-
-#: ../src/utils/pactl.c:1496
-msgid "You have to specify a sample name to remove"
-msgstr ""
-
-#: ../src/utils/pactl.c:1505
-msgid "You have to specify a sink input index and a sink"
-msgstr ""
-
-#: ../src/utils/pactl.c:1515
-msgid "You have to specify a source output index and a source"
-msgstr ""
-
-#: ../src/utils/pactl.c:1530
-msgid "You have to specify a module name and arguments."
-msgstr ""
-
-#: ../src/utils/pactl.c:1550
-msgid "You have to specify a module index"
-msgstr ""
-
-#: ../src/utils/pactl.c:1560
-msgid ""
-"You may not specify more than one sink. You have to specify a boolean value."
-msgstr ""
-
-#: ../src/utils/pactl.c:1573
-msgid ""
-"You may not specify more than one source. You have to specify a boolean "
-"value."
-msgstr ""
-
-#: ../src/utils/pactl.c:1585
-msgid "You have to specify a card name/index and a profile name"
-msgstr ""
-
-#: ../src/utils/pactl.c:1596
-msgid "You have to specify a sink name/index and a port name"
-msgstr ""
-
-#: ../src/utils/pactl.c:1607
-msgid "You have to specify a source name/index and a port name"
-msgstr ""
-
-#: ../src/utils/pactl.c:1618
-msgid "You have to specify a sink name/index and a volume"
-msgstr ""
-
-#: ../src/utils/pactl.c:1631
-msgid "You have to specify a source name/index and a volume"
-msgstr ""
-
-#: ../src/utils/pactl.c:1644
-msgid "You have to specify a sink input index and a volume"
-msgstr ""
-
-#: ../src/utils/pactl.c:1649
-msgid "Invalid sink input index"
-msgstr ""
-
-#: ../src/utils/pactl.c:1660
-msgid "You have to specify a source output index and a volume"
-msgstr ""
-
-#: ../src/utils/pactl.c:1665
-msgid "Invalid source output index"
-msgstr ""
-
-#: ../src/utils/pactl.c:1677
-msgid "You have to specify a sink name/index and a mute boolean"
-msgstr ""
-
-#: ../src/utils/pactl.c:1682 ../src/utils/pactl.c:1699
-#: ../src/utils/pactl.c:1721 ../src/utils/pactl.c:1742
-msgid "Invalid mute specification"
-msgstr ""
-
-#: ../src/utils/pactl.c:1694
-msgid "You have to specify a source name/index and a mute boolean"
-msgstr ""
-
-#: ../src/utils/pactl.c:1711
-msgid "You have to specify a sink input index and a mute boolean"
-msgstr ""
-
-#: ../src/utils/pactl.c:1716
-msgid "Invalid sink input index specification"
-msgstr ""
-
-#: ../src/utils/pactl.c:1732
-msgid "You have to specify a source output index and a mute boolean"
-msgstr ""
-
-#: ../src/utils/pactl.c:1737
-#, fuzzy
-msgid "Invalid source output index specification"
-msgstr "Αποτυχία εύρεσης χρήστη '%s'."
-
-#: ../src/utils/pactl.c:1756
-msgid ""
-"You have to specify a sink index and a semicolon-separated list of supported "
-"formats"
-msgstr ""
-
-#: ../src/utils/pactl.c:1772
-msgid "No valid command specified."
-msgstr ""
-
-#: ../src/utils/pax11publish.c:61
-#, c-format
-msgid ""
-"%s [-D display] [-S server] [-O sink] [-I source] [-c file]  [-d|-e|-i|-r]\n"
 "\n"
-" -d    Show current PulseAudio data attached to X11 display (default)\n"
-" -e    Export local PulseAudio data to X11 display\n"
-" -i    Import PulseAudio data from X11 display to local environment "
-"variables and cookie file.\n"
-" -r    Remove PulseAudio data from X11 display\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:94
-#, c-format
-msgid "Failed to parse command line.\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:113
-#, c-format
-msgid "Server: %s\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:115
-#, c-format
-msgid "Source: %s\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:117
-#, c-format
-msgid "Sink: %s\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:119
-#, c-format
-msgid "Cookie: %s\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:137
-#, c-format
-msgid "Failed to parse cookie data\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:142
-#, c-format
-msgid "Failed to save cookie data\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:157
-#, c-format
-msgid "Failed to load client configuration file.\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:162
-#, c-format
-msgid "Failed to read environment configuration data.\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:179
-#, c-format
-msgid "Failed to get FQDN.\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:199
-#, c-format
-msgid "Failed to load cookie data\n"
-msgstr ""
-
-#: ../src/utils/pax11publish.c:217
-#, c-format
-msgid "Not yet implemented.\n"
-msgstr ""
-
-#: ../src/utils/pacmd.c:66
-msgid "No PulseAudio daemon running, or not running as session daemon."
-msgstr ""
-
-#: ../src/utils/pacmd.c:71
-#, c-format
-msgid "socket(PF_UNIX, SOCK_STREAM, 0): %s"
-msgstr ""
-
-#: ../src/utils/pacmd.c:88
-#, c-format
-msgid "connect(): %s"
-msgstr "σύνδεση(): %s"
-
-#: ../src/utils/pacmd.c:96
-msgid "Failed to kill PulseAudio daemon."
-msgstr ""
-
-#: ../src/utils/pacmd.c:104
-msgid "Daemon not responding."
-msgstr ""
-
-#: ../src/utils/pacmd.c:184
-#, c-format
-msgid "poll(): %s"
-msgstr ""
-
-#: ../src/utils/pacmd.c:195 ../src/utils/pacmd.c:215
-#, c-format
-msgid "read(): %s"
-msgstr ""
-
-#: ../src/utils/pacmd.c:237 ../src/utils/pacmd.c:255
-#, c-format
-msgid "write(): %s"
-msgstr ""
-
-#: ../src/pulsecore/lock-autospawn.c:136 ../src/pulsecore/lock-autospawn.c:222
-msgid "Cannot access autospawn lock."
-msgstr ""
-
-#: ../src/modules/alsa/alsa-sink.c:560 ../src/modules/alsa/alsa-sink.c:726
-#, c-format
-msgid ""
-"ALSA woke us up to write new data to the device, but there was actually "
-"nothing to write!\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers.\n"
-"We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() "
-"returned 0 or another value < min_avail."
-msgstr ""
+"  -h, --help                            Zobrazí tohoto pomocníka\n"
+"      --version                         Zobrazí verziu\n"
+"\n"
+"  -s, --server=SERVER                   Názov servera, na ktorý sa pripojiť\n"
+"  -n, --client-name=NÁZOV                Ako nazvať tohoto klienta na "
+"serveri\n"
 
-#: ../src/modules/alsa/alsa-source.c:519 ../src/modules/alsa/alsa-source.c:672
-#, c-format
-msgid ""
-"ALSA woke us up to read new data from the device, but there was actually "
-"nothing to read!\n"
-"Most likely this is a bug in the ALSA driver '%s'. Please report this issue "
-"to the ALSA developers.\n"
-"We were woken up with POLLIN set -- however a subsequent snd_pcm_avail() "
-"returned 0 or another value < min_avail."
+#: ../src/utils/pactl.c:1631
+#, c-format
+msgid ""
+"pactl %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
 msgstr ""
 
-#: ../src/modules/alsa/module-alsa-card.c:167
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2796
-#: ../src/modules/alsa/alsa-mixer.c:3898
-msgid "Off"
+#: ../src/utils/pactl.c:1690
+#, c-format
+msgid "Specify nothing, or one of: %s"
 msgstr ""
 
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2738
-msgid "High Fidelity Playback (A2DP)"
+#: ../src/utils/pactl.c:1700
+msgid "Please specify a sample file to load"
 msgstr ""
 
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2752
-msgid "High Fidelity Capture (A2DP)"
+#: ../src/utils/pactl.c:1713
+msgid "Failed to open sound file."
 msgstr ""
 
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2767
-msgid "Telephony Duplex (HSP/HFP)"
+#: ../src/utils/pactl.c:1725
+msgid "Warning: Failed to determine sample specification from file."
 msgstr ""
 
-#: ../src/modules/bluetooth/module-bluetooth-device.c:2781
-msgid "Handsfree Gateway"
+#: ../src/utils/pactl.c:1735
+msgid "You have to specify a sample name to play"
 msgstr ""
 
-#: ../src/modules/reserve-wrap.c:151
-msgid "PulseAudio Sound Server"
+#: ../src/utils/pactl.c:1747
+msgid "You have to specify a sample name to remove"
 msgstr ""
 
-#: ../src/modules/module-rygel-media-server.c:510
-#: ../src/modules/module-rygel-media-server.c:548
-#: ../src/modules/module-rygel-media-server.c:903
-msgid "Output Devices"
+#: ../src/utils/pactl.c:1756
+msgid "You have to specify a sink input index and a sink"
 msgstr ""
 
-#: ../src/modules/module-rygel-media-server.c:511
-#: ../src/modules/module-rygel-media-server.c:549
-#: ../src/modules/module-rygel-media-server.c:904
-msgid "Input Devices"
+#: ../src/utils/pactl.c:1766
+msgid "You have to specify a source output index and a source"
 msgstr ""
 
-#: ../src/modules/module-rygel-media-server.c:1056
-msgid "Audio on @HOSTNAME@"
+#: ../src/utils/pactl.c:1781
+msgid "You have to specify a module name and arguments."
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2219
-msgid "Input"
+#: ../src/utils/pactl.c:1801
+msgid "You have to specify a module index or name"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2220
-msgid "Docking Station Input"
+#: ../src/utils/pactl.c:1814
+msgid ""
+"You may not specify more than one sink. You have to specify a boolean value."
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2221
-msgid "Docking Station Microphone"
+#: ../src/utils/pactl.c:1819 ../src/utils/pactl.c:1839
+msgid "Invalid suspend specification."
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2222
-msgid "Docking Station Line In"
+#: ../src/utils/pactl.c:1834
+msgid ""
+"You may not specify more than one source. You have to specify a boolean "
+"value."
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2223 ../src/modules/alsa/alsa-mixer.c:2307
-msgid "Line In"
+#: ../src/utils/pactl.c:1851
+msgid "You have to specify a card name/index and a profile name"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2224 ../src/modules/alsa/alsa-mixer.c:2302
-msgid "Microphone"
+#: ../src/utils/pactl.c:1862
+msgid "You have to specify a sink name/index and a port name"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2225 ../src/modules/alsa/alsa-mixer.c:2303
-msgid "Front Microphone"
+#: ../src/utils/pactl.c:1873
+msgid "You have to specify a sink name"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2226 ../src/modules/alsa/alsa-mixer.c:2304
-msgid "Rear Microphone"
+#: ../src/utils/pactl.c:1883
+msgid "You have to specify a source name/index and a port name"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2227
-msgid "External Microphone"
+#: ../src/utils/pactl.c:1894
+msgid "You have to specify a source name"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2228 ../src/modules/alsa/alsa-mixer.c:2306
-msgid "Internal Microphone"
+#: ../src/utils/pactl.c:1904
+msgid "You have to specify a sink name/index and a volume"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2229 ../src/modules/alsa/alsa-mixer.c:2308
-msgid "Radio"
-msgstr "Radio"
-
-#: ../src/modules/alsa/alsa-mixer.c:2230 ../src/modules/alsa/alsa-mixer.c:2309
-msgid "Video"
-msgstr "Video"
-
-#: ../src/modules/alsa/alsa-mixer.c:2231
-msgid "Automatic Gain Control"
+#: ../src/utils/pactl.c:1917
+msgid "You have to specify a source name/index and a volume"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2232
-msgid "No Automatic Gain Control"
+#: ../src/utils/pactl.c:1930
+msgid "You have to specify a sink input index and a volume"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2233
-msgid "Boost"
+#: ../src/utils/pactl.c:1935
+msgid "Invalid sink input index"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2234
-msgid "No Boost"
+#: ../src/utils/pactl.c:1946
+msgid "You have to specify a source output index and a volume"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2235
-msgid "Amplifier"
+#: ../src/utils/pactl.c:1951
+msgid "Invalid source output index"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2236
-msgid "No Amplifier"
+#: ../src/utils/pactl.c:1962
+msgid "You have to specify a sink name/index and a mute boolean"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2237
-msgid "Bass Boost"
+#: ../src/utils/pactl.c:1967 ../src/utils/pactl.c:1982
+#: ../src/utils/pactl.c:2002 ../src/utils/pactl.c:2020
+msgid "Invalid mute specification"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2238
-msgid "No Bass Boost"
+#: ../src/utils/pactl.c:1977
+msgid "You have to specify a source name/index and a mute boolean"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2239
-msgid "Speaker"
+#: ../src/utils/pactl.c:1992
+msgid "You have to specify a sink input index and a mute boolean"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2240 ../src/modules/alsa/alsa-mixer.c:2311
-msgid "Headphones"
+#: ../src/utils/pactl.c:1997
+msgid "Invalid sink input index specification"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2301
-msgid "Analog Input"
+#: ../src/utils/pactl.c:2010
+msgid "You have to specify a source output index and a mute boolean"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2305
-msgid "Dock Microphone"
+#: ../src/utils/pactl.c:2015
+msgid "Invalid source output index specification"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2310
-msgid "Analog Output"
+#: ../src/utils/pactl.c:2032
+msgid ""
+"You have to specify a sink index and a semicolon-separated list of supported "
+"formats"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2312
-msgid "LFE on Separate Mono Output"
-msgstr "Analog Output (LFE)"
-
-#: ../src/modules/alsa/alsa-mixer.c:2313
-msgid "Line Out"
+#: ../src/utils/pactl.c:2044
+msgid "You have to specify a card name/index, a port name and a latency offset"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2314
-msgid "Analog Mono Output"
-msgstr "Analog Mono Output"
-
-#: ../src/modules/alsa/alsa-mixer.c:2315
-#, fuzzy
-msgid "Speakers"
-msgstr "Analog Stereo"
-
-#: ../src/modules/alsa/alsa-mixer.c:2316
-msgid "HDMI / DisplayPort"
+#: ../src/utils/pactl.c:2051
+msgid "Could not parse latency offset"
 msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:2317
-#, fuzzy
-msgid "Digital Output (S/PDIF)"
-msgstr "Digital Stereo (HDMI)"
-
-#: ../src/modules/alsa/alsa-mixer.c:2318
-#, fuzzy
-msgid "Digital Passthrough (S/PDIF)"
-msgstr "Digital Stereo (HDMI)"
-
-#: ../src/modules/alsa/alsa-mixer.c:3756
-msgid "Analog Mono"
-msgstr "Analog Mono"
-
-#: ../src/modules/alsa/alsa-mixer.c:3757
-msgid "Analog Stereo"
-msgstr "Analog Stereo"
-
-#: ../src/modules/alsa/alsa-mixer.c:3758
-msgid "Analog Surround 2.1"
-msgstr "Analog Surround 2.1"
-
-#: ../src/modules/alsa/alsa-mixer.c:3759
-msgid "Analog Surround 3.0"
-msgstr "Analog Surround 3.0"
-
-#: ../src/modules/alsa/alsa-mixer.c:3760
-msgid "Analog Surround 3.1"
-msgstr "Analog Surround 3.1"
-
-#: ../src/modules/alsa/alsa-mixer.c:3761
-msgid "Analog Surround 4.0"
-msgstr "Analog Surround 4.0"
+#: ../src/utils/pactl.c:2063
+msgid "No valid command specified."
+msgstr "Nebol učený žiadny platný príkaz."
 
-#: ../src/modules/alsa/alsa-mixer.c:3762
-msgid "Analog Surround 4.1"
-msgstr "Analog Surround 4.1"
+#: ../src/utils/pasuspender.c:81
+#, c-format
+msgid "fork(): %s\n"
+msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:3763
-msgid "Analog Surround 5.0"
-msgstr "Analog Surround 5.0"
+#: ../src/utils/pasuspender.c:94
+#, c-format
+msgid "execvp(): %s\n"
+msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:3764
-msgid "Analog Surround 5.1"
-msgstr "Analog Surround 5.1"
+#: ../src/utils/pasuspender.c:113
+#, c-format
+msgid "Failure to resume: %s\n"
+msgstr "Zlyhanie pri pokračovaní: %s\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:3765
-msgid "Analog Surround 6.0"
-msgstr "Analog Surround 6.0"
+#: ../src/utils/pasuspender.c:147
+#, c-format
+msgid "Failure to suspend: %s\n"
+msgstr "Zlyhanie pri uspávaní: %s\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:3766
-msgid "Analog Surround 6.1"
-msgstr "Analog Surround 6.1"
+#: ../src/utils/pasuspender.c:172
+#, c-format
+msgid "WARNING: Sound server is not local, not suspending.\n"
+msgstr "UPOZORNENIE: Zvukový server nie je miestny. Neuspáva sa.\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:3767
-msgid "Analog Surround 7.0"
-msgstr "Analog Surround 7.0"
+#: ../src/utils/pasuspender.c:185
+#, c-format
+msgid "Connection failure: %s\n"
+msgstr "Zlyhanie pripojenia: %s\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:3768
-msgid "Analog Surround 7.1"
-msgstr "Analog Surround 7.1"
+#: ../src/utils/pasuspender.c:203
+#, c-format
+msgid "Got SIGINT, exiting.\n"
+msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:3769
-msgid "Digital Stereo (IEC958)"
-msgstr "Digital Stereo (IEC958)"
+#: ../src/utils/pasuspender.c:221
+#, c-format
+msgid "WARNING: Child process terminated by signal %u\n"
+msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:3770
-#, fuzzy
-msgid "Digital Passthrough  (IEC958)"
-msgstr "Digital Stereo (IEC958)"
+#: ../src/utils/pasuspender.c:230
+#, c-format
+msgid ""
+"%s [options] ... \n"
+"\n"
+"  -h, --help                            Show this help\n"
+"      --version                         Show version\n"
+"  -s, --server=SERVER                   The name of the server to connect "
+"to\n"
+"\n"
+msgstr ""
+"%s [voľby] ... \n"
+"\n"
+"  -h, --help                            Zobrazí tohto pomocníka\n"
+"      --version                         Zobrazí verziu\n"
+"  -s, --server=SERVER                   Názov servera, na ktorý sa pripojiť\n"
+"\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:3771
-msgid "Digital Surround 4.0 (IEC958/AC3)"
-msgstr "Digital Surround 4.0 (IEC958/AC3)"
+#: ../src/utils/pasuspender.c:268
+#, c-format
+msgid ""
+"pasuspender %s\n"
+"Compiled with libpulse %s\n"
+"Linked with libpulse %s\n"
+msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:3772
-msgid "Digital Surround 5.1 (IEC958/AC3)"
-msgstr "Digital Surround 5.1 (IEC958/AC3)"
+#: ../src/utils/pasuspender.c:297
+#, c-format
+msgid "pa_mainloop_new() failed.\n"
+msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:3773
-msgid "Digital Stereo (HDMI)"
-msgstr "Digital Stereo (HDMI)"
+#: ../src/utils/pasuspender.c:310
+#, c-format
+msgid "pa_context_new() failed.\n"
+msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:3774
-#, fuzzy
-msgid "Digital Surround 5.1 (HDMI)"
-msgstr "Digital Surround 5.1 (IEC958/AC3)"
+#: ../src/utils/pasuspender.c:322
+#, c-format
+msgid "pa_mainloop_run() failed.\n"
+msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:3895
-msgid "Analog Mono Duplex"
-msgstr "Analog Mono Duplex"
+#: ../src/utils/pax11publish.c:60
+#, c-format
+msgid ""
+"%s [-D display] [-S server] [-O sink] [-I source] [-c file]  [-d|-e|-i|-r]\n"
+"\n"
+" -d    Show current PulseAudio data attached to X11 display (default)\n"
+" -e    Export local PulseAudio data to X11 display\n"
+" -i    Import PulseAudio data from X11 display to local environment "
+"variables and cookie file.\n"
+" -r    Remove PulseAudio data from X11 display\n"
+msgstr ""
 
-#: ../src/modules/alsa/alsa-mixer.c:3896
-msgid "Analog Stereo Duplex"
-msgstr "Analog Stereo Duplex"
+#: ../src/utils/pax11publish.c:93
+#, c-format
+msgid "Failed to parse command line.\n"
+msgstr "Zlyhalo analyzovanie príkazového riadku.\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:3897
-msgid "Digital Stereo Duplex (IEC958)"
-msgstr "Digital Stereo Duplex (IEC958)"
+#: ../src/utils/pax11publish.c:112
+#, c-format
+msgid "Server: %s\n"
+msgstr "Server: %s\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:3997
+#: ../src/utils/pax11publish.c:114
 #, c-format
-msgid "%s Output"
-msgstr ""
+msgid "Source: %s\n"
+msgstr "Zdroj: %s\n"
 
-#: ../src/modules/alsa/alsa-mixer.c:4005
+#: ../src/utils/pax11publish.c:116
 #, c-format
-msgid "%s Input"
+msgid "Sink: %s\n"
 msgstr ""
 
-#: ../src/modules/echo-cancel/module-echo-cancel.c:63
-msgid ""
-"source_name=<name for the source> source_properties=<properties for the "
-"source> source_master=<name of source to filter> sink_name=<name for the "
-"sink> sink_properties=<properties for the sink> sink_master=<name of sink to "
-"filter> adjust_time=<how often to readjust rates in s> adjust_threshold=<how "
-"much drift to readjust after in ms> format=<sample format> rate=<sample "
-"rate> channels=<number of channels> channel_map=<channel map> "
-"aec_method=<implementation to use> aec_args=<parameters for the AEC engine> "
-"save_aec=<save AEC data in /tmp> autoloaded=<set if this module is being "
-"loaded automatically> use_volume_sharing=<yes or no> "
+#: ../src/utils/pax11publish.c:118
+#, c-format
+msgid "Cookie: %s\n"
 msgstr ""
 
-#: ../src/modules/module-equalizer-sink.c:72
-msgid "General Purpose Equalizer"
+#: ../src/utils/pax11publish.c:136
+#, c-format
+msgid "Failed to parse cookie data\n"
 msgstr ""
 
-#: ../src/modules/module-equalizer-sink.c:76
-msgid ""
-"sink_name=<name of the sink> sink_properties=<properties for the sink> "
-"sink_master=<sink to connect to> format=<sample format> rate=<sample rate> "
-"channels=<number of channels> channel_map=<channel map> autoloaded=<set if "
-"this module is being loaded automatically> use_volume_sharing=<yes or no> "
+#: ../src/utils/pax11publish.c:141
+#, c-format
+msgid "Failed to save cookie data\n"
 msgstr ""
 
-#: ../src/modules/module-filter-apply.c:48
-msgid "autoclean=<automatically unload unused filters?>"
+#: ../src/utils/pax11publish.c:170
+#, c-format
+msgid "Failed to get FQDN.\n"
 msgstr ""
 
-#: ../src/tests/resampler-test.c:257
+#: ../src/utils/pax11publish.c:190
 #, c-format
-msgid ""
-"%s [options]\n"
-"\n"
-"-h, --help                            Show this help\n"
-"-v, --verbose                         Print debug messages\n"
-"      --from-rate=SAMPLERATE          From sample rate in Hz (defaults to "
-"44100)\n"
-"      --from-format=SAMPLEFORMAT      From sample type (defaults to s16le)\n"
-"      --from-channels=CHANNELS        From number of channels (defaults to "
-"1)\n"
-"      --to-rate=SAMPLERATE            To sample rate in Hz (defaults to "
-"44100)\n"
-"      --to-format=SAMPLEFORMAT        To sample type (defaults to s16le)\n"
-"      --to-channels=CHANNELS          To number of channels (defaults to 1)\n"
-"      --resample-method=METHOD        Resample method (defaults to auto)\n"
-"      --seconds=SECONDS               From stream duration (defaults to 60)\n"
-"\n"
-"If the formats are not specified, the test performs all formats "
-"combinations,\n"
-"back and forth.\n"
-"\n"
-"Sample type must be one of s16le, s16be, u8, float32le, float32be, ulaw, "
-"alaw,\n"
-"32le, s32be (defaults to s16ne)\n"
-"\n"
-"See --dump-resample-methods for possible values of resample methods.\n"
+msgid "Failed to load cookie data\n"
 msgstr ""
 
-#: ../src/tests/resampler-test.c:356
-#, fuzzy, c-format
-msgid "%s %s\n"
-msgstr "%s %s"
-
-#: ../src/tests/resampler-test.c:419
+#: ../src/utils/pax11publish.c:208
 #, c-format
-msgid "=== %d seconds: %d Hz %d ch (%s) -> %d Hz %d ch (%s)"
+msgid "Not yet implemented.\n"
 msgstr ""
-
-#~ msgid "%s+%s"
-#~ msgstr "%s+%s"
-
-#~ msgid "%s / %s"
-#~ msgstr "%s / %s"
-
-#~ msgid "Digital Surround 4.0 (IEC958)"
-#~ msgstr "Digital Surround 4.0 (IEC958)"
diff --git a/po/uk.po b/po/uk.po
index 1f94a98..f31bde2 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -5,9 +5,10 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: pulseaudio.master-tx\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-11 19:46+0200\n"
-"PO-Revision-Date: 2014-01-13 18:53+0200\n"
+"Report-Msgid-Bugs-To: https://bugs.freedesktop.org/enter_bug.cgi?"
+"product=PulseAudio&keywords=I18N+L10N&component=misc\n"
+"POT-Creation-Date: 2014-05-30 15:56+0000\n"
+"PO-Revision-Date: 2014-06-23 21:20+0300\n"
 "Last-Translator: Yuri Chornoivan <yurchor at ukr.net>\n"
 "Language-Team: Ukrainian <translation at linux.org.ua>\n"
 "Language: uk\n"
@@ -64,7 +65,7 @@ msgid ""
 "and\n"
 "                                        this time passed\n"
 "      --log-level[=LEVEL]               Increase or set verbosity level\n"
-"  -v                                    Increase the verbosity level\n"
+"  -v  --verbose                         Increase the verbosity level\n"
 "      --log-target={auto,syslog,stderr,file:PATH,newfile:PATH}\n"
 "                                        Specify the log target\n"
 "      --log-meta[=BOOL]                 Include code location in log "
@@ -140,7 +141,7 @@ msgstr ""
 "                                        активності протягом вказаного часу\n"
 "      --log-level[=РІВЕНЬ]              Підвищити або встановити рівень "
 "докладності виводу\n"
-"  -v                                    Підвищити рівень докладності виводу\n"
+"  -v  --verbose                         Підвищити рівень докладності виводу\n"
 "      --log-target={auto,syslog,stderr,file:ШЛЯХ,newfile:ШЛЯХ}\n"
 "                                        Вказати журнал\n"
 "      --log-meta[=BOOL]                 Додати повідомлення про місце у коді "
@@ -220,8 +221,7 @@ msgid ""
 "valid file name 'file:<path>', 'newfile:<path>'."
 msgstr ""
 "Журнал вказано неправильно: можливі варіанти «syslog», «journal», «stderr», "
-"«auto» і "
-"чинна назва файла «file:<шлях>» або «newfile:<шлях>»."
+"«auto» і чинна назва файла «file:<шлях>» або «newfile:<шлях>»."
 
 #: ../src/daemon/cmdline.c:329
 msgid ""
@@ -709,8 +709,8 @@ msgid ""
 "Dude, your kernel stinks! The chef's recommendation today is Linux with high-"
 "resolution timers enabled!"
 msgstr ""
-"Хлопче, від твого ядра вже тхне! Варто нарешті встановити Linux з увімкненими "
-"високоточними таймерами!"
+"Хлопче, від твого ядра вже тхне! Варто нарешті встановити Linux з "
+"увімкненими високоточними таймерами!"
 
 #: ../src/daemon/main.c:1026
 msgid "pa_core_new() failed."
@@ -746,14 +746,6 @@ msgstr "Звукова система PulseAudio"
 msgid "Start the PulseAudio Sound System"
 msgstr "Запустити звукову систему PulseAudio"
 
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:1
-msgid "PulseAudio Sound System KDE Routing Policy"
-msgstr "Правила маршрутизації звукової системи PulseAudio у KDE"
-
-#: ../src/daemon/pulseaudio-kde.desktop.in.h:2
-msgid "Start the PulseAudio Sound System with KDE Routing Policy"
-msgstr "Запустити звукову систему PulseAudio з правилами маршрутизації KDE"
-
 #: ../src/modules/alsa/alsa-mixer.c:2251
 msgid "Input"
 msgstr "Вхід"
@@ -775,8 +767,8 @@ msgid "Line In"
 msgstr "Лінійний вхід"
 
 #: ../src/modules/alsa/alsa-mixer.c:2256 ../src/modules/alsa/alsa-mixer.c:2334
-#: ../src/modules/bluetooth/module-bluez4-device.c:2097
-#: ../src/modules/bluetooth/module-bluez5-device.c:1447
+#: ../src/modules/bluetooth/module-bluez4-device.c:2101
+#: ../src/modules/bluetooth/module-bluez5-device.c:1451
 msgid "Microphone"
 msgstr "Мікрофон"
 
@@ -837,8 +829,8 @@ msgid "No Bass Boost"
 msgstr "Без підсилення"
 
 #: ../src/modules/alsa/alsa-mixer.c:2271
-#: ../src/modules/bluetooth/module-bluez4-device.c:2102
-#: ../src/modules/bluetooth/module-bluez5-device.c:1454
+#: ../src/modules/bluetooth/module-bluez4-device.c:2106
+#: ../src/modules/bluetooth/module-bluez5-device.c:1458
 msgid "Speaker"
 msgstr "Гучномовець"
 
@@ -992,8 +984,8 @@ msgstr "Цифрове двобічне стерео (IEC958)"
 
 #: ../src/modules/alsa/alsa-mixer.c:3959
 #: ../src/modules/alsa/module-alsa-card.c:193
-#: ../src/modules/bluetooth/module-bluez4-device.c:2293
-#: ../src/modules/bluetooth/module-bluez5-device.c:1652
+#: ../src/modules/bluetooth/module-bluez4-device.c:2297
+#: ../src/modules/bluetooth/module-bluez5-device.c:1654
 msgid "Off"
 msgstr "Вимкнено"
 
@@ -1041,7 +1033,7 @@ msgstr ""
 "Службу було викликано зі встановленим POLLIN, але наступний виклик "
 "snd_pcm_avail() повернув 0 або інше значення < min_avail."
 
-#: ../src/modules/alsa/alsa-util.c:1134 ../src/modules/alsa/alsa-util.c:1209
+#: ../src/modules/alsa/alsa-util.c:1135 ../src/modules/alsa/alsa-util.c:1210
 #, c-format
 msgid ""
 "snd_pcm_avail() returned a value that is exceptionally large: %lu bytes (%lu "
@@ -1054,7 +1046,7 @@ msgstr ""
 "Ймовірно, ви натрапили на ваду у драйвері ALSA «%s». Будь ласка, повідомте "
 "про цю ваду розробникам ALSA."
 
-#: ../src/modules/alsa/alsa-util.c:1184
+#: ../src/modules/alsa/alsa-util.c:1185
 #, c-format
 msgid ""
 "snd_pcm_delay() returned a value that is exceptionally large: %li bytes (%s"
@@ -1067,7 +1059,7 @@ msgstr ""
 "Ймовірно, ви натрапили на ваду у драйвері ALSA «%s». Будь ласка, повідомте "
 "про цю ваду розробникам ALSA."
 
-#: ../src/modules/alsa/alsa-util.c:1225
+#: ../src/modules/alsa/alsa-util.c:1226
 #, c-format
 msgid ""
 "snd_pcm_avail_delay() returned strange values: delay %lu is less than avail "
@@ -1080,7 +1072,7 @@ msgstr ""
 "Ймовірно, це пов’язано з вадою у драйвері ALSA «%s». Будь ласка, повідомте "
 "про цю ваду розробникам ALSA."
 
-#: ../src/modules/alsa/alsa-util.c:1268
+#: ../src/modules/alsa/alsa-util.c:1269
 #, c-format
 msgid ""
 "snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes "
@@ -1093,79 +1085,77 @@ msgstr ""
 "Ймовірно, ви натрапили на ваду у драйвері ALSA «%s». Будь ласка, повідомте "
 "про цю ваду розробникам ALSA."
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2087
-#: ../src/modules/bluetooth/module-bluez5-device.c:1437
+#: ../src/modules/bluetooth/module-bluez4-device.c:2091
+#: ../src/modules/bluetooth/module-bluez5-device.c:1441
 msgid "Headset"
 msgstr "Гарнітура"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2092
-#: ../src/modules/bluetooth/module-bluez5-device.c:1442
+#: ../src/modules/bluetooth/module-bluez4-device.c:2096
+#: ../src/modules/bluetooth/module-bluez5-device.c:1446
 msgid "Handsfree"
 msgstr "Пристрій гучного зв’язку"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2107
-#: ../src/modules/bluetooth/module-bluez5-device.c:1460
+#: ../src/modules/bluetooth/module-bluez4-device.c:2111
+#: ../src/modules/bluetooth/module-bluez5-device.c:1464
 msgid "Headphone"
 msgstr "Навушники"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2112
-#: ../src/modules/bluetooth/module-bluez5-device.c:1465
+#: ../src/modules/bluetooth/module-bluez4-device.c:2116
+#: ../src/modules/bluetooth/module-bluez5-device.c:1469
 msgid "Portable"
 msgstr "Портативна система"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2117
-#: ../src/modules/bluetooth/module-bluez5-device.c:1470
+#: ../src/modules/bluetooth/module-bluez4-device.c:2121
+#: ../src/modules/bluetooth/module-bluez5-device.c:1474
 msgid "Car"
 msgstr "Автомобільна система"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2122
-#: ../src/modules/bluetooth/module-bluez5-device.c:1475
+#: ../src/modules/bluetooth/module-bluez4-device.c:2126
+#: ../src/modules/bluetooth/module-bluez5-device.c:1479
 msgid "HiFi"
 msgstr "HiFi"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2127
-#: ../src/modules/bluetooth/module-bluez5-device.c:1480
+#: ../src/modules/bluetooth/module-bluez4-device.c:2131
+#: ../src/modules/bluetooth/module-bluez5-device.c:1484
 msgid "Phone"
 msgstr "Телефон"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2135
-#: ../src/modules/bluetooth/module-bluez5-device.c:1432
-#: ../src/modules/bluetooth/module-bluez5-device.c:1448
-#: ../src/modules/bluetooth/module-bluez5-device.c:1486
+#: ../src/modules/bluetooth/module-bluez4-device.c:2139
+#: ../src/modules/bluetooth/module-bluez5-device.c:1436
+#: ../src/modules/bluetooth/module-bluez5-device.c:1452
+#: ../src/modules/bluetooth/module-bluez5-device.c:1490
 msgid "Bluetooth Output"
 msgstr "Bluetooth (відтворення)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2138
-#: ../src/modules/bluetooth/module-bluez5-device.c:1431
-#: ../src/modules/bluetooth/module-bluez5-device.c:1453
-#: ../src/modules/bluetooth/module-bluez5-device.c:1459
-#: ../src/modules/bluetooth/module-bluez5-device.c:1485
+#: ../src/modules/bluetooth/module-bluez4-device.c:2142
+#: ../src/modules/bluetooth/module-bluez5-device.c:1435
+#: ../src/modules/bluetooth/module-bluez5-device.c:1457
+#: ../src/modules/bluetooth/module-bluez5-device.c:1463
+#: ../src/modules/bluetooth/module-bluez5-device.c:1489
 msgid "Bluetooth Input"
 msgstr "Bluetooth (вхід)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2174
+#: ../src/modules/bluetooth/module-bluez4-device.c:2178
 msgid "High Fidelity Playback (A2DP)"
 msgstr "Високоточне відтворення (A2DP)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2185
+#: ../src/modules/bluetooth/module-bluez4-device.c:2189
 msgid "High Fidelity Capture (A2DP)"
 msgstr "Високоточне захоплення (A2DP)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2196
+#: ../src/modules/bluetooth/module-bluez4-device.c:2200
 msgid "Telephony Duplex (HSP/HFP)"
 msgstr "Телефонний дуплекс (HSP/HFP)"
 
-#: ../src/modules/bluetooth/module-bluez4-device.c:2208
+#: ../src/modules/bluetooth/module-bluez4-device.c:2212
 msgid "Handsfree Gateway"
 msgstr "Пристрій гучного зв’язку"
 
-#. TODO: Change this profile's name to a2dp_sink, to reflect the remote
-#. * device's role and be consistent with the a2dp source profile
-#: ../src/modules/bluetooth/module-bluez5-device.c:1525
+#: ../src/modules/bluetooth/module-bluez5-device.c:1527
 msgid "High Fidelity Playback (A2DP Sink)"
 msgstr "Високоточне відтворення (приймач A2DP)"
 
-#: ../src/modules/bluetooth/module-bluez5-device.c:1536
+#: ../src/modules/bluetooth/module-bluez5-device.c:1538
 msgid "High Fidelity Capture (A2DP Source)"
 msgstr "Високоточне захоплення (джерело A2DP)"
 
@@ -1186,12 +1176,11 @@ msgstr ""
 "sink_properties=<властивості приймача> sink_master=<назва приймача для "
 "фільтрування> adjust_time=<частота коригування швидкостей у секундах> "
 "adjust_threshold=<тривалість зсуву у мс, яку слід узгодити> format=<формат "
-"даних> rate=<частота дискретизації> channels=<кількість каналів> "
+"фрагмента> rate=<частота дискретизації> channels=<кількість каналів> "
 "channel_map=<карта каналів> aec_method=<реалізація обробки> "
 "aec_args=<параметри рушія придушення луни> save_aec=<чи слід зберігати дані "
-"придушення луни до /tmp> "
-"autoloaded=<визначити, чи слід завантажувати модуль у автоматичному режимі> "
-"use_volume_sharing=<yes або no> "
+"придушення луни до /tmp> autoloaded=<визначити, чи слід завантажувати модуль "
+"у автоматичному режимі> use_volume_sharing=<yes або no> "
 
 #. add on profile
 #: ../src/modules/macosx/module-coreaudio-device.c:756
@@ -1221,7 +1210,7 @@ msgid ""
 msgstr ""
 "sink_name=<назва приймача> sink_properties=<властивості приймача> "
 "sink_master=<назва приймача, з яким слід встановти з’єднання> format=<формат "
-"семплу> rate=<частота вибірки> channels=<кількість каналів> "
+"фрагмента> rate=<частота вибірки> channels=<кількість каналів> "
 "channel_map=<карта каналів> autoloaded=<визначити, чи слід завантажувати цей "
 "модуль у автоматичному режимі> use_volume_sharing=<yes або no> "
 
@@ -1244,7 +1233,7 @@ msgid ""
 "LADSPA port names> "
 msgstr ""
 "sink_name=<назва приймача> sink_properties=<властивості приймача> "
-"master=<назва приймача для фільтрування> format=<формат семплу> "
+"master=<назва приймача для фільтрування> format=<формат фрагмента> "
 "rate=<частота вибірки> channels=<кількість каналів> channel_map=<карта "
 "каналів вхідних даних> plugin=<назва додатка ladspa> label=<мітка додатка "
 "ladspa> control=<розділений комами список значень вхідних параметрів> "
@@ -1303,7 +1292,7 @@ msgid ""
 "left_hrir.wav "
 msgstr ""
 "sink_name=<назва приймача> sink_properties=<властивості приймача> "
-"master=<назва приймача для фільтрування> format=<формат семплу> "
+"master=<назва приймача для фільтрування> format=<формат фрагмента> "
 "rate=<частота вибірки> channels=<кількість каналів> channel_map=<карта "
 "каналів> use_volume_sharing=<yes або no> force_flat_volume=<yes або no> "
 "hrir=/шлях/до/лівого_hrir.wav "
@@ -1312,7 +1301,7 @@ msgstr ""
 msgid "PulseAudio Sound Server"
 msgstr "Звуковий сервер PulseAudio"
 
-#: ../src/pulse/channelmap.c:105 ../src/pulse/channelmap.c:754
+#: ../src/pulse/channelmap.c:105 ../src/pulse/channelmap.c:760
 msgid "Mono"
 msgstr "Моно"
 
@@ -1524,67 +1513,90 @@ msgstr "Верхній задній правий"
 msgid "(invalid)"
 msgstr "(некоректний)"
 
-#: ../src/pulse/channelmap.c:758
+#: ../src/pulse/channelmap.c:764
 msgid "Stereo"
 msgstr "Стерео"
 
-#: ../src/pulse/channelmap.c:763
+#: ../src/pulse/channelmap.c:769
 msgid "Surround 4.0"
 msgstr "Об'ємний 4.0"
 
-#: ../src/pulse/channelmap.c:769
+#: ../src/pulse/channelmap.c:775
 msgid "Surround 4.1"
 msgstr "Об'ємний 4.1"
 
-#: ../src/pulse/channelmap.c:775
+#: ../src/pulse/channelmap.c:781
 msgid "Surround 5.0"
 msgstr "Об'ємний 5.0"
 
-#: ../src/pulse/channelmap.c:781
+#: ../src/pulse/channelmap.c:787
 msgid "Surround 5.1"
 msgstr "Об'ємний 5.1"
 
-#: ../src/pulse/channelmap.c:788
+#: ../src/pulse/channelmap.c:794
 msgid "Surround 7.1"
 msgstr "Об'ємний 7.1"
 
-#: ../src/pulse/client-conf.c:119
-#, c-format
-msgid "Failed to open configuration file '%s': %s"
-msgstr "Не вдалося відкрити файл налаштування «%s»: %s"
-
-#: ../src/pulse/client-conf.c:213 ../src/pulse/client-conf-x11.c:95
-msgid "Failed to parse cookie data"
-msgstr "Не вдалося обробити дані куки"
-
-#: ../src/pulse/client-conf-x11.c:54 ../src/utils/pax11publish.c:99
+#: ../src/pulse/client-conf-x11.c:55 ../src/utils/pax11publish.c:99
 msgid "xcb_connect() failed"
 msgstr "помилка xcb_connect()"
 
-#: ../src/pulse/client-conf-x11.c:59 ../src/utils/pax11publish.c:104
+#: ../src/pulse/client-conf-x11.c:60 ../src/utils/pax11publish.c:104
 msgid "xcb_connection_has_error() returned true"
 msgstr "xcb_connection_has_error() повернуто true"
 
-#: ../src/pulse/context.c:528
+#: ../src/pulse/client-conf-x11.c:96
+msgid "Failed to parse cookie data"
+msgstr "Не вдалося обробити дані куки"
+
+#: ../src/pulse/context.c:529
 msgid "No cookie loaded. Attempting to connect without."
 msgstr ""
 "Куків не завантажено. Буде виконано спробу з’єднання за їх відсутності."
 
-#: ../src/pulse/context.c:609
+#: ../src/pulse/context.c:610
 #, c-format
 msgid "fork(): %s"
 msgstr "fork(): %s"
 
-#: ../src/pulse/context.c:664
+#: ../src/pulse/context.c:665
 #, c-format
 msgid "waitpid(): %s"
 msgstr "waitpid(): %s"
 
-#: ../src/pulse/context.c:1365
+#: ../src/pulse/context.c:1366
 #, c-format
 msgid "Received message for unknown extension '%s'"
 msgstr "Отримано повідомлення про невідомий додаток «%s»"
 
+#: ../src/pulse/direction.c:39
+#| msgid "Input"
+msgid "input"
+msgstr "вхід"
+
+#: ../src/pulse/direction.c:41
+#| msgid "%s Output"
+msgid "output"
+msgstr "вихід"
+
+#: ../src/pulse/direction.c:43
+msgid "bidirectional"
+msgstr "двобічний"
+
+#: ../src/pulse/direction.c:45
+#| msgid "(invalid)"
+msgid "invalid"
+msgstr "некоректний"
+
+#: ../src/pulsecore/core-util.h:95
+msgid "yes"
+msgstr "так"
+
+#: ../src/pulsecore/core-util.h:95
+#| msgid "Mono"
+msgid "no"
+msgstr "ні"
+
 #: ../src/pulsecore/lock-autospawn.c:143 ../src/pulsecore/lock-autospawn.c:229
 msgid "Cannot access autospawn lock."
 msgstr "Не вдалося зняти блокування автоматичного розгалуження."
@@ -1599,18 +1611,18 @@ msgstr "Не вдалося відкрити файл призначення, «
 msgid ""
 "Tried to open target file '%s', '%s.1', '%s.2' ... '%s.%d', but all failed."
 msgstr ""
-"Було виконано спроби відкрити файли призначення «%s», «%s.1», «%s.2» ... «%s.%"
-"d», але усі вони завершилися невдачею."
+"Було виконано спроби відкрити файли призначення «%s», «%s.1», «%s.2» ... «%s."
+"%d», але усі вони завершилися невдачею."
 
 #: ../src/pulsecore/log.c:633
 msgid "Invalid log target."
 msgstr "Некоректна адреса файла журналу."
 
-#: ../src/pulsecore/sink.c:3483
+#: ../src/pulsecore/sink.c:3428
 msgid "Built-in Audio"
 msgstr "Вбудоване аудіо"
 
-#: ../src/pulsecore/sink.c:3488
+#: ../src/pulsecore/sink.c:3433
 msgid "Modem"
 msgstr "Модем"
 
@@ -1875,8 +1887,9 @@ msgstr "Використання частотної специфікації «%
 
 #: ../src/utils/pacat.c:359
 #, c-format
-msgid "Connected to device %s (%u, %ssuspended)."
-msgstr "З’єднано з пристроєм %s (%u, %s призупинено)."
+#| msgid "Connected to device %s (%u, %ssuspended)."
+msgid "Connected to device %s (index: %u, suspended: %s)."
+msgstr "З’єднано з пристроєм %s (індекс: %u, призупинено: %s)."
 
 #: ../src/utils/pacat.c:369
 #, c-format
@@ -1961,7 +1974,7 @@ msgstr "Не вдалося встановити потік спостереже
 msgid "pa_stream_connect_record() failed: %s"
 msgstr "Спроба виконання pa_stream_connect_record() зазнала невдачі: %s"
 
-#: ../src/utils/pacat.c:531 ../src/utils/pactl.c:1388
+#: ../src/utils/pacat.c:531 ../src/utils/pactl.c:1455
 #, c-format
 msgid "Connection failure: %s"
 msgstr "Спроба встановлення з’єднання зазнала невдачі: %s"
@@ -1996,6 +2009,70 @@ msgstr "Помилка pa_stream_update_timing_info(): %s"
 
 #: ../src/utils/pacat.c:672
 #, c-format
+#| msgid ""
+#| "%s [options]\n"
+#| "\n"
+#| "  -h, --help                            Show this help\n"
+#| "      --version                         Show version\n"
+#| "\n"
+#| "  -r, --record                          Create a connection for "
+#| "recording\n"
+#| "  -p, --playback                        Create a connection for playback\n"
+#| "\n"
+#| "  -v, --verbose                         Enable verbose operations\n"
+#| "\n"
+#| "  -s, --server=SERVER                   The name of the server to connect "
+#| "to\n"
+#| "  -d, --device=DEVICE                   The name of the sink/source to "
+#| "connect to\n"
+#| "  -n, --client-name=NAME                How to call this client on the "
+#| "server\n"
+#| "      --stream-name=NAME                How to call this stream on the "
+#| "server\n"
+#| "      --volume=VOLUME                   Specify the initial (linear) "
+#| "volume in range 0...65536\n"
+#| "      --rate=SAMPLERATE                 The sample rate in Hz (defaults "
+#| "to 44100)\n"
+#| "      --format=SAMPLEFORMAT             The sample type, one of s16le, "
+#| "s16be, u8, float32le,\n"
+#| "                                        float32be, ulaw, alaw, s32le, "
+#| "s32be, s24le, s24be,\n"
+#| "                                        s24-32le, s24-32be (defaults to "
+#| "s16ne)\n"
+#| "      --channels=CHANNELS               The number of channels, 1 for "
+#| "mono, 2 for stereo\n"
+#| "                                        (defaults to 2)\n"
+#| "      --channel-map=CHANNELMAP          Channel map to use instead of the "
+#| "default\n"
+#| "      --fix-format                      Take the sample format from the "
+#| "sink the stream is\n"
+#| "                                        being connected to.\n"
+#| "      --fix-rate                        Take the sampling rate from the "
+#| "sink the stream is\n"
+#| "                                        being connected to.\n"
+#| "      --fix-channels                    Take the number of channels and "
+#| "the channel map\n"
+#| "                                        from the sink the stream is being "
+#| "connected to.\n"
+#| "      --no-remix                        Don't upmix or downmix channels.\n"
+#| "      --no-remap                        Map channels by index instead of "
+#| "name.\n"
+#| "      --latency=BYTES                   Request the specified latency in "
+#| "bytes.\n"
+#| "      --process-time=BYTES              Request the specified process "
+#| "time per request in bytes.\n"
+#| "      --latency-msec=MSEC               Request the specified latency in "
+#| "msec.\n"
+#| "      --process-time-msec=MSEC          Request the specified process "
+#| "time per request in msec.\n"
+#| "      --property=PROPERTY=VALUE         Set the specified property to the "
+#| "specified value.\n"
+#| "      --raw                             Record/play raw PCM data.\n"
+#| "      --passthrough                     passthrough data \n"
+#| "      --file-format[=FFORMAT]           Record/play formatted PCM data.\n"
+#| "      --list-file-formats               List available file formats.\n"
+#| "      --monitor-stream=INDEX            Record from the sink input with "
+#| "index INDEX.\n"
 msgid ""
 "%s [options]\n"
 "\n"
@@ -2030,16 +2107,16 @@ msgid ""
 "                                        (defaults to 2)\n"
 "      --channel-map=CHANNELMAP          Channel map to use instead of the "
 "default\n"
-"      --fix-format                      Take the sample format from the sink "
-"the stream is\n"
+"      --fix-format                      Take the sample format from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
-"      --fix-rate                        Take the sampling rate from the sink "
-"the stream is\n"
+"      --fix-rate                        Take the sampling rate from the sink/"
+"source the stream is\n"
 "                                        being connected to.\n"
 "      --fix-channels                    Take the number of channels and the "
 "channel map\n"
-"                                        from the sink the stream is being "
-"connected to.\n"
+"                                        from the sink/source the stream is "
+"being connected to.\n"
 "      --no-remix                        Don't upmix or downmix channels.\n"
 "      --no-remap                        Map channels by index instead of "
 "name.\n"
@@ -2054,7 +2131,7 @@ msgid ""
 "      --property=PROPERTY=VALUE         Set the specified property to the "
 "specified value.\n"
 "      --raw                             Record/play raw PCM data.\n"
-"      --passthrough                     passthrough data \n"
+"      --passthrough                     Passthrough data.\n"
 "      --file-format[=FFORMAT]           Record/play formatted PCM data.\n"
 "      --list-file-formats               List available file formats.\n"
 "      --monitor-stream=INDEX            Record from the sink input with "
@@ -2092,7 +2169,8 @@ msgstr ""
 "                                        (типове значення — 2)\n"
 "      --channel-map=КАРТА КАНАЛІВ       Карта каналів, яку слід "
 "використовувати замість типової\n"
-"      --fix-format                      Запозичити формат даних з приймача, "
+"      --fix-format                      Запозичити формат фрагмента з "
+"приймача, "
 "з яким з’єднано\n"
 "                                        потік.\n"
 "      --fix-rate                        Запозичити дані щодо частоти "
@@ -2136,7 +2214,7 @@ msgstr ""
 "Зібрано з libpulse %s\n"
 "З’єднано з libpulse %s\n"
 
-#: ../src/utils/pacat.c:843 ../src/utils/pactl.c:1559
+#: ../src/utils/pacat.c:843 ../src/utils/pactl.c:1651
 #, c-format
 msgid "Invalid client name '%s'"
 msgstr "Некоректна назва клієнта «%s»"
@@ -2209,7 +2287,7 @@ msgstr ""
 "Попередження: вказану частотну специфікацію буде перезаписано специфікацією "
 "з файла."
 
-#: ../src/utils/pacat.c:1070 ../src/utils/pactl.c:1626
+#: ../src/utils/pacat.c:1070 ../src/utils/pactl.c:1718
 msgid "Failed to determine sample specification from file."
 msgstr "Не вдалося отримати дані щодо частотної специфікації з файла."
 
@@ -2244,7 +2322,7 @@ msgstr "відтворення"
 msgid "Failed to set media name."
 msgstr "Не вдалося встановити назву носія даних."
 
-#: ../src/utils/pacat.c:1148 ../src/utils/pactl.c:1976
+#: ../src/utils/pacat.c:1148 ../src/utils/pactl.c:2068
 msgid "pa_mainloop_new() failed."
 msgstr "Спроба виконання pa_mainloop_new() завершилася невдало."
 
@@ -2252,11 +2330,11 @@ msgstr "Спроба виконання pa_mainloop_new() завершилася
 msgid "io_new() failed."
 msgstr "Спроба виконання io_new() завершилася невдало."
 
-#: ../src/utils/pacat.c:1178 ../src/utils/pactl.c:1988
+#: ../src/utils/pacat.c:1178 ../src/utils/pactl.c:2080
 msgid "pa_context_new() failed."
 msgstr "Спроба виконання pa_context_new() завершилася невдало."
 
-#: ../src/utils/pacat.c:1186 ../src/utils/pactl.c:1994
+#: ../src/utils/pacat.c:1186 ../src/utils/pactl.c:2086
 #, c-format
 msgid "pa_context_connect() failed: %s"
 msgstr "Спроба виконання pa_context_connect() завершилася невдало: %s"
@@ -2265,32 +2343,32 @@ msgstr "Спроба виконання pa_context_connect() завершила
 msgid "pa_context_rttime_new() failed."
 msgstr "Спроба виконання pa_context_new() завершилася невдало."
 
-#: ../src/utils/pacat.c:1199 ../src/utils/pactl.c:1999
+#: ../src/utils/pacat.c:1199 ../src/utils/pactl.c:2091
 msgid "pa_mainloop_run() failed."
 msgstr "Спроба виконання pa_mainloop_run() завершилася невдало."
 
-#: ../src/utils/pacmd.c:53 ../src/utils/pactl.c:1481
+#: ../src/utils/pacmd.c:53 ../src/utils/pactl.c:1573
 msgid "NAME [ARGS ...]"
 msgstr "НАЗВА [АРГУМЕНТИ...]"
 
-#: ../src/utils/pacmd.c:54 ../src/utils/pacmd.c:62 ../src/utils/pactl.c:1482
+#: ../src/utils/pacmd.c:54 ../src/utils/pacmd.c:62 ../src/utils/pactl.c:1574
 msgid "NAME|#N"
 msgstr "НАЗВА|НОМЕР"
 
-#: ../src/utils/pacmd.c:55 ../src/utils/pacmd.c:65 ../src/utils/pactl.c:1480
-#: ../src/utils/pactl.c:1486
+#: ../src/utils/pacmd.c:55 ../src/utils/pacmd.c:65 ../src/utils/pactl.c:1572
+#: ../src/utils/pactl.c:1578
 msgid "NAME"
 msgstr "НАЗВА"
 
-#: ../src/utils/pacmd.c:56 ../src/utils/pactl.c:1488
+#: ../src/utils/pacmd.c:56
 msgid "NAME|#N VOLUME"
 msgstr "НАЗВА|НОМЕР ГУЧНІСТЬ"
 
-#: ../src/utils/pacmd.c:57 ../src/utils/pactl.c:1489
+#: ../src/utils/pacmd.c:57
 msgid "#N VOLUME"
 msgstr "НОМЕР ГУЧНІСТЬ"
 
-#: ../src/utils/pacmd.c:58 ../src/utils/pacmd.c:72 ../src/utils/pactl.c:1484
+#: ../src/utils/pacmd.c:58 ../src/utils/pacmd.c:72 ../src/utils/pactl.c:1576
 msgid "NAME|#N 1|0"
 msgstr "НАЗВА|НОМЕР 1|0"
 
@@ -2326,7 +2404,7 @@ msgstr "ШЛЯХ"
 msgid "FILENAME SINK|#N"
 msgstr "НАЗВА_ФАЙЛА ПРИЙМАЧ|#N"
 
-#: ../src/utils/pacmd.c:71 ../src/utils/pactl.c:1483
+#: ../src/utils/pacmd.c:71 ../src/utils/pactl.c:1575
 msgid "#N SINK|SOURCE"
 msgstr "НОМЕР ПРИЙМАЧ|ДЖЕРЕЛО"
 
@@ -2334,15 +2412,15 @@ msgstr "НОМЕР ПРИЙМАЧ|ДЖЕРЕЛО"
 msgid "1|0"
 msgstr "1|0"
 
-#: ../src/utils/pacmd.c:74 ../src/utils/pactl.c:1485
+#: ../src/utils/pacmd.c:74 ../src/utils/pactl.c:1577
 msgid "CARD PROFILE"
 msgstr "ПРОФІЛЬ КАРТКИ"
 
-#: ../src/utils/pacmd.c:75 ../src/utils/pactl.c:1487
+#: ../src/utils/pacmd.c:75 ../src/utils/pactl.c:1579
 msgid "NAME|#N PORT"
 msgstr "НАЗВА|НОМЕР ПОРТУ"
 
-#: ../src/utils/pacmd.c:76 ../src/utils/pactl.c:1493
+#: ../src/utils/pacmd.c:76 ../src/utils/pactl.c:1585
 msgid "CARD-NAME|CARD-#N PORT OFFSET"
 msgstr "НАЗВА-КАРТКИ|№КАРТКИ ПОРТ ЗСУВ"
 
@@ -2422,33 +2500,33 @@ msgstr "poll(): %s"
 msgid "read(): %s"
 msgstr "read(): %s"
 
-#: ../src/utils/pactl.c:161
+#: ../src/utils/pactl.c:166
 #, c-format
 msgid "Failed to get statistics: %s"
 msgstr "Не вдалося отримати статистичні дані: %s"
 
-#: ../src/utils/pactl.c:167
+#: ../src/utils/pactl.c:172
 #, c-format
 msgid "Currently in use: %u blocks containing %s bytes total.\n"
 msgstr "Зараз використано: %u блоків, що містять загалом %s байтів.\n"
 
-#: ../src/utils/pactl.c:170
+#: ../src/utils/pactl.c:175
 #, c-format
 msgid "Allocated during whole lifetime: %u blocks containing %s bytes total.\n"
 msgstr ""
 "Виділено протягом виконання загалом: %u блоків, що містять %s байтів.\n"
 
-#: ../src/utils/pactl.c:173
+#: ../src/utils/pactl.c:178
 #, c-format
 msgid "Sample cache size: %s\n"
 msgstr "Розмір кешу фрагментів: %s\n"
 
-#: ../src/utils/pactl.c:182
+#: ../src/utils/pactl.c:187
 #, c-format
 msgid "Failed to get server information: %s"
 msgstr "Не вдалося отримати дані щодо сервера: %s"
 
-#: ../src/utils/pactl.c:187
+#: ../src/utils/pactl.c:192
 #, c-format
 msgid ""
 "Server String: %s\n"
@@ -2465,7 +2543,7 @@ msgstr ""
 "Номер клієнта: %u\n"
 "Розмір фрагмента: %zu\n"
 
-#: ../src/utils/pactl.c:203
+#: ../src/utils/pactl.c:208
 #, c-format
 msgid ""
 "User Name: %s\n"
@@ -2488,12 +2566,12 @@ msgstr ""
 "Типове джерело: %s\n"
 "Кука: %04x:%04x\n"
 
-#: ../src/utils/pactl.c:252 ../src/utils/pactl.c:878 ../src/utils/pactl.c:952
+#: ../src/utils/pactl.c:257 ../src/utils/pactl.c:902 ../src/utils/pactl.c:980
 #, c-format
 msgid "Failed to get sink information: %s"
 msgstr "Не вдалося отримати дані щодо приймача: %s"
 
-#: ../src/utils/pactl.c:278
+#: ../src/utils/pactl.c:283
 #, c-format
 msgid ""
 "Sink #%u\n"
@@ -2532,27 +2610,27 @@ msgstr ""
 "\tВластивості:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:322 ../src/utils/pactl.c:428 ../src/utils/pactl.c:589
+#: ../src/utils/pactl.c:327 ../src/utils/pactl.c:433 ../src/utils/pactl.c:594
 #, c-format
 msgid "\tPorts:\n"
 msgstr "\tПорти:\n"
 
-#: ../src/utils/pactl.c:329 ../src/utils/pactl.c:435
+#: ../src/utils/pactl.c:334 ../src/utils/pactl.c:440
 #, c-format
 msgid "\tActive Port: %s\n"
 msgstr "\tАктивний порт: %s\n"
 
-#: ../src/utils/pactl.c:335 ../src/utils/pactl.c:441
+#: ../src/utils/pactl.c:340 ../src/utils/pactl.c:446
 #, c-format
 msgid "\tFormats:\n"
 msgstr "\tФормати:\n"
 
-#: ../src/utils/pactl.c:359 ../src/utils/pactl.c:897 ../src/utils/pactl.c:967
+#: ../src/utils/pactl.c:364 ../src/utils/pactl.c:922 ../src/utils/pactl.c:995
 #, c-format
 msgid "Failed to get source information: %s"
 msgstr "Не вдалося отримати дані щодо джерела: %s"
 
-#: ../src/utils/pactl.c:385
+#: ../src/utils/pactl.c:390
 #, c-format
 msgid ""
 "Source #%u\n"
@@ -2591,20 +2669,20 @@ msgstr ""
 "\tВластивості:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:413 ../src/utils/pactl.c:483 ../src/utils/pactl.c:526
-#: ../src/utils/pactl.c:568 ../src/utils/pactl.c:666 ../src/utils/pactl.c:667
-#: ../src/utils/pactl.c:678 ../src/utils/pactl.c:736 ../src/utils/pactl.c:737
-#: ../src/utils/pactl.c:748 ../src/utils/pactl.c:799 ../src/utils/pactl.c:800
-#: ../src/utils/pactl.c:806
+#: ../src/utils/pactl.c:418 ../src/utils/pactl.c:488 ../src/utils/pactl.c:531
+#: ../src/utils/pactl.c:573 ../src/utils/pactl.c:671 ../src/utils/pactl.c:672
+#: ../src/utils/pactl.c:683 ../src/utils/pactl.c:741 ../src/utils/pactl.c:742
+#: ../src/utils/pactl.c:753 ../src/utils/pactl.c:804 ../src/utils/pactl.c:805
+#: ../src/utils/pactl.c:811
 msgid "n/a"
 msgstr "н/д"
 
-#: ../src/utils/pactl.c:452 ../src/utils/pactl.c:853
+#: ../src/utils/pactl.c:457 ../src/utils/pactl.c:861
 #, c-format
 msgid "Failed to get module information: %s"
 msgstr "Не вдалося отримати дані щодо модуля: %s"
 
-#: ../src/utils/pactl.c:475
+#: ../src/utils/pactl.c:480
 #, c-format
 msgid ""
 "Module #%u\n"
@@ -2621,12 +2699,12 @@ msgstr ""
 "\tВластивості:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:494
+#: ../src/utils/pactl.c:499
 #, c-format
 msgid "Failed to get client information: %s"
 msgstr "Не вдалося отримати дані щодо клієнта: %s"
 
-#: ../src/utils/pactl.c:520
+#: ../src/utils/pactl.c:525
 #, c-format
 msgid ""
 "Client #%u\n"
@@ -2641,12 +2719,12 @@ msgstr ""
 "\tВластивості:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:537
+#: ../src/utils/pactl.c:542
 #, c-format
 msgid "Failed to get card information: %s"
 msgstr "Не вдалося отримати дані щодо карти: %s"
 
-#: ../src/utils/pactl.c:560
+#: ../src/utils/pactl.c:565
 #, c-format
 msgid ""
 "Card #%u\n"
@@ -2663,17 +2741,17 @@ msgstr ""
 "\tВластивості:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:576
+#: ../src/utils/pactl.c:581
 #, c-format
 msgid "\tProfiles:\n"
 msgstr "\tПрофілі:\n"
 
-#: ../src/utils/pactl.c:583
+#: ../src/utils/pactl.c:588
 #, c-format
 msgid "\tActive Profile: %s\n"
 msgstr "\tАктивний профіль: %s\n"
 
-#: ../src/utils/pactl.c:597
+#: ../src/utils/pactl.c:602
 #, c-format
 msgid ""
 "\t\t\tProperties:\n"
@@ -2682,17 +2760,17 @@ msgstr ""
 "\t\t\tВластивості:\n"
 "\t\t\t\t%s\n"
 
-#: ../src/utils/pactl.c:602
+#: ../src/utils/pactl.c:607
 #, c-format
 msgid "\t\t\tPart of profile(s): %s"
 msgstr "\t\t\tЧастина профілів: %s"
 
-#: ../src/utils/pactl.c:619 ../src/utils/pactl.c:916 ../src/utils/pactl.c:982
+#: ../src/utils/pactl.c:624 ../src/utils/pactl.c:942 ../src/utils/pactl.c:1010
 #, c-format
 msgid "Failed to get sink input information: %s"
 msgstr "Не вдалося отримати відомостей щодо вхідного каналу приймача: %s"
 
-#: ../src/utils/pactl.c:648
+#: ../src/utils/pactl.c:653
 #, c-format
 msgid ""
 "Sink Input #%u\n"
@@ -2731,12 +2809,12 @@ msgstr ""
 "\tВластивості:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:689 ../src/utils/pactl.c:935 ../src/utils/pactl.c:997
+#: ../src/utils/pactl.c:694 ../src/utils/pactl.c:962 ../src/utils/pactl.c:1025
 #, c-format
 msgid "Failed to get source output information: %s"
 msgstr "Не вдалося отримати дані щодо відтворення джерела: %s"
 
-#: ../src/utils/pactl.c:718
+#: ../src/utils/pactl.c:723
 #, c-format
 msgid ""
 "Source Output #%u\n"
@@ -2775,12 +2853,12 @@ msgstr ""
 "\tВластивості:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:759
+#: ../src/utils/pactl.c:764
 #, c-format
 msgid "Failed to get sample information: %s"
 msgstr "Не вдалося отримати дані щодо фрагмента: %s"
 
-#: ../src/utils/pactl.c:786
+#: ../src/utils/pactl.c:791
 #, c-format
 msgid ""
 "Sample #%u\n"
@@ -2809,134 +2887,166 @@ msgstr ""
 "\tВластивості:\n"
 "\t\t%s\n"
 
-#: ../src/utils/pactl.c:814 ../src/utils/pactl.c:824
+#: ../src/utils/pactl.c:819 ../src/utils/pactl.c:829
 #, c-format
 msgid "Failure: %s"
 msgstr "Помилка: %s"
 
-#: ../src/utils/pactl.c:860
+#: ../src/utils/pactl.c:868
 #, c-format
 msgid "Failed to unload module: Module %s not loaded"
 msgstr "Не вдалося вивантажити модуль: модуль %s не завантажено"
 
-#: ../src/utils/pactl.c:1023
+#: ../src/utils/pactl.c:886
+#, c-format
+msgid ""
+"Failed to set volume: You tried to set volumes for %d channels, whereas "
+"channel/s supported = %d\n"
+msgstr ""
+"Не вдалося встановити гучність: ви намагалися встановити гучність для %d "
+"каналів, хоча передбачено підтримку %d каналів\n"
+
+#: ../src/utils/pactl.c:1052
 #, c-format
 msgid "Failed to set format: invalid format string %s"
 msgstr "Не вдалося встановити формат: некоректний рядок формату %s"
 
-#: ../src/utils/pactl.c:1062
+#: ../src/utils/pactl.c:1095
 #, c-format
 msgid "Failed to upload sample: %s"
 msgstr "Не вдалося вивантажити зразок: %s"
 
-#: ../src/utils/pactl.c:1079
+#: ../src/utils/pactl.c:1112
 msgid "Premature end of file"
 msgstr "Передчасне завершення файла"
 
-#: ../src/utils/pactl.c:1099
+#: ../src/utils/pactl.c:1132
 msgid "new"
 msgstr "створити"
 
-#: ../src/utils/pactl.c:1102
+#: ../src/utils/pactl.c:1135
 msgid "change"
 msgstr "змінити"
 
-#: ../src/utils/pactl.c:1105
+#: ../src/utils/pactl.c:1138
 msgid "remove"
 msgstr "вилучити"
 
-#: ../src/utils/pactl.c:1108 ../src/utils/pactl.c:1143
+#: ../src/utils/pactl.c:1141 ../src/utils/pactl.c:1176
 msgid "unknown"
 msgstr "невідомий"
 
-#: ../src/utils/pactl.c:1116
+#: ../src/utils/pactl.c:1149
 msgid "sink"
 msgstr "приймач"
 
-#: ../src/utils/pactl.c:1119
+#: ../src/utils/pactl.c:1152
 msgid "source"
 msgstr "джерело"
 
-#: ../src/utils/pactl.c:1122
+#: ../src/utils/pactl.c:1155
 msgid "sink-input"
 msgstr "вхід приймача"
 
-#: ../src/utils/pactl.c:1125
+#: ../src/utils/pactl.c:1158
 msgid "source-output"
 msgstr "відтворення джерела"
 
-#: ../src/utils/pactl.c:1128
+#: ../src/utils/pactl.c:1161
 msgid "module"
 msgstr "модуль"
 
-#: ../src/utils/pactl.c:1131
+#: ../src/utils/pactl.c:1164
 msgid "client"
 msgstr "клієнт"
 
-#: ../src/utils/pactl.c:1134
+#: ../src/utils/pactl.c:1167
 msgid "sample-cache"
 msgstr "кеш семплів"
 
-#: ../src/utils/pactl.c:1137 ../src/utils/pactl.c:1140
+#: ../src/utils/pactl.c:1170
 msgid "server"
 msgstr "сервер"
 
-#: ../src/utils/pactl.c:1149
+#: ../src/utils/pactl.c:1173
+msgid "card"
+msgstr "картка"
+
+#: ../src/utils/pactl.c:1182
 #, c-format
 msgid "Event '%s' on %s #%u\n"
 msgstr "Подія «%s» на %s №%u\n"
 
-#: ../src/utils/pactl.c:1394
+#: ../src/utils/pactl.c:1461
 msgid "Got SIGINT, exiting."
 msgstr "Отримано сигнал SIGINT, завершення роботи."
 
-#: ../src/utils/pactl.c:1421
+#: ../src/utils/pactl.c:1488
 msgid "Invalid volume specification"
 msgstr "Некоректна специфікація гучності"
 
-#: ../src/utils/pactl.c:1444
+#: ../src/utils/pactl.c:1511
 msgid "Volume outside permissible range.\n"
 msgstr "Гучність поза межами дозволеного діапазону.\n"
 
-#: ../src/utils/pactl.c:1474 ../src/utils/pactl.c:1475
-#: ../src/utils/pactl.c:1476 ../src/utils/pactl.c:1477
-#: ../src/utils/pactl.c:1478 ../src/utils/pactl.c:1479
-#: ../src/utils/pactl.c:1480 ../src/utils/pactl.c:1481
-#: ../src/utils/pactl.c:1482 ../src/utils/pactl.c:1483
-#: ../src/utils/pactl.c:1484 ../src/utils/pactl.c:1485
-#: ../src/utils/pactl.c:1486 ../src/utils/pactl.c:1487
-#: ../src/utils/pactl.c:1488 ../src/utils/pactl.c:1489
-#: ../src/utils/pactl.c:1490 ../src/utils/pactl.c:1491
-#: ../src/utils/pactl.c:1492 ../src/utils/pactl.c:1493
-#: ../src/utils/pactl.c:1494
+#: ../src/utils/pactl.c:1524
+#| msgid "Invalid volume specification"
+msgid "Invalid number of volume specifications.\n"
+msgstr "Некоректна кількість специфікацій гучності.\n"
+
+#: ../src/utils/pactl.c:1536
+#| msgid "Invalid volume specification"
+msgid "Inconsistent volume specification.\n"
+msgstr "Несумісна специфікація гучності.\n"
+
+#: ../src/utils/pactl.c:1566 ../src/utils/pactl.c:1567
+#: ../src/utils/pactl.c:1568 ../src/utils/pactl.c:1569
+#: ../src/utils/pactl.c:1570 ../src/utils/pactl.c:1571
+#: ../src/utils/pactl.c:1572 ../src/utils/pactl.c:1573
+#: ../src/utils/pactl.c:1574 ../src/utils/pactl.c:1575
+#: ../src/utils/pactl.c:1576 ../src/utils/pactl.c:1577
+#: ../src/utils/pactl.c:1578 ../src/utils/pactl.c:1579
+#: ../src/utils/pactl.c:1580 ../src/utils/pactl.c:1581
+#: ../src/utils/pactl.c:1582 ../src/utils/pactl.c:1583
+#: ../src/utils/pactl.c:1584 ../src/utils/pactl.c:1585
+#: ../src/utils/pactl.c:1586
 msgid "[options]"
 msgstr "[параметри]"
 
-#: ../src/utils/pactl.c:1476
+#: ../src/utils/pactl.c:1568
 msgid "[TYPE]"
 msgstr "[ТИП]"
 
-#: ../src/utils/pactl.c:1478
+#: ../src/utils/pactl.c:1570
 msgid "FILENAME [NAME]"
 msgstr "НАЗВА_ФАЙЛА [НАЗВА]"
 
-#: ../src/utils/pactl.c:1479
+#: ../src/utils/pactl.c:1571
 msgid "NAME [SINK]"
 msgstr "НАЗВА [ПРИЙМАЧ]"
 
-#: ../src/utils/pactl.c:1490
+#: ../src/utils/pactl.c:1580
+#| msgid "NAME|#N VOLUME"
+msgid "NAME|#N VOLUME [VOLUME ...]"
+msgstr "НАЗВА|НОМЕР ГУЧНІСТЬ [ГУЧНІСТЬ ...]"
+
+#: ../src/utils/pactl.c:1581
+msgid "#N VOLUME [VOLUME ...]"
+msgstr "НОМЕР ГУЧНІСТЬ [ГУЧНІСТЬ ...]"
+
+#: ../src/utils/pactl.c:1582
 msgid "NAME|#N 1|0|toggle"
 msgstr "НАЗВА|НОМЕР 1|0|toggle"
 
-#: ../src/utils/pactl.c:1491
+#: ../src/utils/pactl.c:1583
 msgid "#N 1|0|toggle"
 msgstr "НОМЕР 1|0|toggle"
 
-#: ../src/utils/pactl.c:1492
+#: ../src/utils/pactl.c:1584
 msgid "#N FORMATS"
 msgstr "НОМЕР ФОРМАТИ"
 
-#: ../src/utils/pactl.c:1495
+#: ../src/utils/pactl.c:1587
 #, c-format
 msgid ""
 "\n"
@@ -2948,7 +3058,7 @@ msgstr ""
 "@DEFAULT_MONITOR@,\n"
 "можна скористатися для визначення типового приймача, джерела та монітора.\n"
 
-#: ../src/utils/pactl.c:1498
+#: ../src/utils/pactl.c:1590
 #, c-format
 msgid ""
 "\n"
@@ -2967,7 +3077,7 @@ msgstr ""
 "з’єднатися\n"
 "  -n, --client-name=НАЗВА               Назва цього клієнта на сервері\n"
 
-#: ../src/utils/pactl.c:1539
+#: ../src/utils/pactl.c:1631
 #, c-format
 msgid ""
 "pactl %s\n"
@@ -2978,60 +3088,60 @@ msgstr ""
 "Зібрано з libpulse %s\n"
 "З’єднано з libpulse %s\n"
 
-#: ../src/utils/pactl.c:1598
+#: ../src/utils/pactl.c:1690
 #, c-format
 msgid "Specify nothing, or one of: %s"
 msgstr "Нічого не вказуйте або вкажіть один з варіантів: %s"
 
-#: ../src/utils/pactl.c:1608
+#: ../src/utils/pactl.c:1700
 msgid "Please specify a sample file to load"
 msgstr "Будь ласка, вкажіть файл фрагмента для завантаження"
 
-#: ../src/utils/pactl.c:1621
+#: ../src/utils/pactl.c:1713
 msgid "Failed to open sound file."
 msgstr "Не вдалося відкрити звуковий файл."
 
-#: ../src/utils/pactl.c:1633
+#: ../src/utils/pactl.c:1725
 msgid "Warning: Failed to determine sample specification from file."
 msgstr ""
 "Попередження: не вдалося отримати дані щодо частотної специфікації з файла."
 
-#: ../src/utils/pactl.c:1643
+#: ../src/utils/pactl.c:1735
 msgid "You have to specify a sample name to play"
 msgstr "Вам слід вказати назву зразкового файла, який слід відтворити"
 
-#: ../src/utils/pactl.c:1655
+#: ../src/utils/pactl.c:1747
 msgid "You have to specify a sample name to remove"
 msgstr "Вам слід вказати назву зразкового файла, який слід вилучити"
 
-#: ../src/utils/pactl.c:1664
+#: ../src/utils/pactl.c:1756
 msgid "You have to specify a sink input index and a sink"
 msgstr "Вам слід вказати номер вхідного каналу приймача даних і приймач"
 
-#: ../src/utils/pactl.c:1674
+#: ../src/utils/pactl.c:1766
 msgid "You have to specify a source output index and a source"
 msgstr "Вам слід вказати номер джерела відтворення і джерело"
 
-#: ../src/utils/pactl.c:1689
+#: ../src/utils/pactl.c:1781
 msgid "You have to specify a module name and arguments."
 msgstr "Вам слід вказати назву модуля і аргументи."
 
-#: ../src/utils/pactl.c:1709
+#: ../src/utils/pactl.c:1801
 msgid "You have to specify a module index or name"
 msgstr "Вам слід вказати номер або назву модуля"
 
-#: ../src/utils/pactl.c:1722
+#: ../src/utils/pactl.c:1814
 msgid ""
 "You may not specify more than one sink. You have to specify a boolean value."
 msgstr ""
 "Не можна вказувати більше одного приймача. Вам слід вказати булівське "
 "значення."
 
-#: ../src/utils/pactl.c:1727 ../src/utils/pactl.c:1747
+#: ../src/utils/pactl.c:1819 ../src/utils/pactl.c:1839
 msgid "Invalid suspend specification."
 msgstr "Некоректна специфікація призупинення."
 
-#: ../src/utils/pactl.c:1742
+#: ../src/utils/pactl.c:1834
 msgid ""
 "You may not specify more than one source. You have to specify a boolean "
 "value."
@@ -3039,84 +3149,84 @@ msgstr ""
 "Не можна вказувати більше одного джерела. Вам слід вказати булівське "
 "значення."
 
-#: ../src/utils/pactl.c:1759
+#: ../src/utils/pactl.c:1851
 msgid "You have to specify a card name/index and a profile name"
 msgstr "Вам слід вказати назву/номер карти і назву профілю"
 
-#: ../src/utils/pactl.c:1770
+#: ../src/utils/pactl.c:1862
 msgid "You have to specify a sink name/index and a port name"
 msgstr "Вам слід вказати назву/номер приймача і назву порту"
 
-#: ../src/utils/pactl.c:1781
+#: ../src/utils/pactl.c:1873
 msgid "You have to specify a sink name"
 msgstr "Вам слід вказати назву приймача"
 
-#: ../src/utils/pactl.c:1791
+#: ../src/utils/pactl.c:1883
 msgid "You have to specify a source name/index and a port name"
 msgstr "Вам слід вказати назву/номер джерела і назву порту"
 
-#: ../src/utils/pactl.c:1802
+#: ../src/utils/pactl.c:1894
 msgid "You have to specify a source name"
 msgstr "Вам слід вказати назву джерела"
 
-#: ../src/utils/pactl.c:1812
+#: ../src/utils/pactl.c:1904
 msgid "You have to specify a sink name/index and a volume"
 msgstr "Вам слід вказати назву/номер приймача і гучність"
 
-#: ../src/utils/pactl.c:1825
+#: ../src/utils/pactl.c:1917
 msgid "You have to specify a source name/index and a volume"
 msgstr "Вам слід вказати назву/номер джерела і гучність"
 
-#: ../src/utils/pactl.c:1838
+#: ../src/utils/pactl.c:1930
 msgid "You have to specify a sink input index and a volume"
 msgstr "Вам слід вказати номер вхідного каналу приймача даних і гучність"
 
-#: ../src/utils/pactl.c:1843
+#: ../src/utils/pactl.c:1935
 msgid "Invalid sink input index"
 msgstr "Некоректний номер вхідного каналу приймача даних"
 
-#: ../src/utils/pactl.c:1854
+#: ../src/utils/pactl.c:1946
 msgid "You have to specify a source output index and a volume"
 msgstr "Вам слід вказати номер каналу відтворення і гучність"
 
-#: ../src/utils/pactl.c:1859
+#: ../src/utils/pactl.c:1951
 msgid "Invalid source output index"
 msgstr "Некоректний номер джерела відтворення"
 
-#: ../src/utils/pactl.c:1870
+#: ../src/utils/pactl.c:1962
 msgid "You have to specify a sink name/index and a mute boolean"
 msgstr ""
 "Вам слід вказати назву/номер приймача і булеве значення вимикання звуку"
 
-#: ../src/utils/pactl.c:1875 ../src/utils/pactl.c:1890
-#: ../src/utils/pactl.c:1910 ../src/utils/pactl.c:1928
+#: ../src/utils/pactl.c:1967 ../src/utils/pactl.c:1982
+#: ../src/utils/pactl.c:2002 ../src/utils/pactl.c:2020
 msgid "Invalid mute specification"
 msgstr "Некоректна специфікація вимикання звуку"
 
-#: ../src/utils/pactl.c:1885
+#: ../src/utils/pactl.c:1977
 msgid "You have to specify a source name/index and a mute boolean"
 msgstr "Вам слід вказати назву/номер джерела і булеве значення вимикання звуку"
 
-#: ../src/utils/pactl.c:1900
+#: ../src/utils/pactl.c:1992
 msgid "You have to specify a sink input index and a mute boolean"
 msgstr ""
 "Вам слід вказати номер вхідного каналу приймача даних і булеве значення "
 "вимикання звуку"
 
-#: ../src/utils/pactl.c:1905
+#: ../src/utils/pactl.c:1997
 msgid "Invalid sink input index specification"
 msgstr "Некоректна специфікація номера вхідного каналу приймача даних"
 
-#: ../src/utils/pactl.c:1918
+#: ../src/utils/pactl.c:2010
 msgid "You have to specify a source output index and a mute boolean"
 msgstr ""
 "Вам слід вказати номер джерела відтворення і булеве значення вимикання звуку"
 
-#: ../src/utils/pactl.c:1923
+#: ../src/utils/pactl.c:2015
 msgid "Invalid source output index specification"
 msgstr "Некоректна специфікація номера джерела відтворення"
 
-#: ../src/utils/pactl.c:1940
+#: ../src/utils/pactl.c:2032
 msgid ""
 "You have to specify a sink index and a semicolon-separated list of supported "
 "formats"
@@ -3124,15 +3234,15 @@ msgstr ""
 "Вам слід вказати номер приймача та список підтримуваних каналів, "
 "відокремлених комами"
 
-#: ../src/utils/pactl.c:1952
+#: ../src/utils/pactl.c:2044
 msgid "You have to specify a card name/index, a port name and a latency offset"
 msgstr "Вам слід вказати назву/номер карти, назву порту і зсув латентності"
 
-#: ../src/utils/pactl.c:1959
+#: ../src/utils/pactl.c:2051
 msgid "Could not parse latency offset"
 msgstr "Не вдалося обробити дані щодо зсуву латентності"
 
-#: ../src/utils/pactl.c:1971
+#: ../src/utils/pactl.c:2063
 msgid "No valid command specified."
 msgstr "Не вказано коректної команди."
 
@@ -3304,6 +3414,15 @@ msgstr "Не вдалося завантажити дані куки\n"
 msgid "Not yet implemented.\n"
 msgstr "Ще не реалізовано.\n"
 
+#~ msgid "PulseAudio Sound System KDE Routing Policy"
+#~ msgstr "Правила маршрутизації звукової системи PulseAudio у KDE"
+
+#~ msgid "Start the PulseAudio Sound System with KDE Routing Policy"
+#~ msgstr "Запустити звукову систему PulseAudio з правилами маршрутизації KDE"
+
+#~ msgid "Failed to open configuration file '%s': %s"
+#~ msgstr "Не вдалося відкрити файл налаштування «%s»: %s"
+
 #~ msgid "Successfully dropped root privileges."
 #~ msgstr "Програма успішно позбулася прав доступу користувача root."
 
diff --git a/pulseaudio.supp b/pulseaudio.supp
new file mode 100644
index 0000000..83f9ad1
--- /dev/null
+++ b/pulseaudio.supp
@@ -0,0 +1,50 @@
+# This file contains error suppression rules for Valgrind. These rules suppress
+# errors in alsa-lib that are caused by Valgrind not handling the
+# SNDRV_CTL_IOCTL_TLV_READ ioctl. More information about the Valgrind bug:
+# http://thread.gmane.org/gmane.comp.debugging.valgrind/11888
+#
+# To use this file, pass the command line option --suppressions=<filename> to
+# Valgrind.
+#
+# If you find new false positives, and want to add new suppressions, the
+# --gen-suppression=all option can be very useful. It prints automatically
+# generated suppression rules that can be copy-pasted here.
+
+{
+        alsa-lib/snd_tlv_get_dB_range
+        Memcheck:Cond
+        fun:snd_tlv_get_dB_range
+}
+
+{
+        alsa-lib/snd_tlv_convert_to_dB
+        Memcheck:Cond
+        fun:snd_tlv_convert_to_dB
+}
+
+{
+        alsa-lib/snd_tlv_convert_from_dB
+        Memcheck:Cond
+        fun:snd_tlv_convert_from_dB
+}
+
+{
+        alsa-lib/set_volume_ops
+        Memcheck:Cond
+        fun:set_volume_ops
+}
+
+{
+        alsa-lib/snd_ctl_hw_elem_write
+        Memcheck:Param
+        ioctl(generic)
+        fun:ioctl
+        fun:snd_ctl_hw_elem_write
+}
+
+{
+        alsa-lib/selem_read
+        Memcheck:Cond
+        fun:bcmp
+        fun:selem_read
+}
diff --git a/shell-completion/pulseaudio-bash-completion.sh b/shell-completion/bash/pulseaudio
similarity index 99%
rename from shell-completion/pulseaudio-bash-completion.sh
rename to shell-completion/bash/pulseaudio
index 43f4a2c..4d7e0b8 100644
--- a/shell-completion/pulseaudio-bash-completion.sh
+++ b/shell-completion/bash/pulseaudio
@@ -179,8 +179,6 @@ _pactl() {
     case $prev in
         list) COMPREPLY=($(compgen -W '${list_types[*]}' -- "$cur")) ;;
 
-        stat) COMPREPLY=($(compgen -W 'short' -- "$cur")) ;;
-
         upload-sample) _filedir ;;
 
         play-sample) ;; # TODO
@@ -492,7 +490,7 @@ _pacat () {
             ;;
     esac
 }
-complete -F _pacat pacat paplay parecord
+complete -F _pacat pacat paplay parec parecord
 
 _pulseaudio()
 {
diff --git a/shell-completion/pulseaudio-zsh-completion.zsh b/shell-completion/zsh/_pulseaudio
similarity index 60%
rename from shell-completion/pulseaudio-zsh-completion.zsh
rename to shell-completion/zsh/_pulseaudio
index abc443a..c7d68f5 100644
--- a/shell-completion/pulseaudio-zsh-completion.zsh
+++ b/shell-completion/zsh/_pulseaudio
@@ -1,13 +1,26 @@
-#compdef pulseaudio pactl pacmd pacat paplay parecord padsp pasuspender
+#compdef pulseaudio pactl pacmd pacat paplay parec parecord padsp pasuspender
+
+_set_remote() {
+    for (( i = 0; i < ${#words[@]}; i++ )) do
+        if [[ ${words[$i]} == -s || ${words[$i]} == --server ]]; then
+            remote="-s ${words[$i+1]}"
+            break;
+        elif [[ ${words[$i]} == --server=* ]]; then
+            remote=${words[$i]}
+        fi
+    done
+}
 
 _devices() {
     local -a _device_list
-    local cmd _device _device_description _remote_cmd
+    local cmd _device _device_description
 
     if [[ $service == pactl  || $service == pacmd ]]; then
         case $words[$((CURRENT - 1))] in
             set-sink-input-*) cmd=('sink-inputs');;
             set-sink-*) cmd=('sinks');;
+            set-default-sink) cmd=('sinks');;
+            set-default-source) cmd=('sources');;
             set-source-output-*) cmd=('source-outputs');;
             set-source-*) cmd=('sources');;
             suspend-sink) cmd=('sinks');;
@@ -23,14 +36,14 @@ _devices() {
             move-source-output) cmd=('sources');;
         esac
 
-    elif [[ $service == (pacat|paplay|parecord) ]]; then
+    elif [[ $service == (pacat|paplay|parec|parecord) ]]; then
         case $words[$((CURRENT))] in
             --device=*)
                 if [[ $words == *(--playback|-p)[[:space:]]* ||
                     $service == paplay ]]; then
                     cmd=('sinks')
                 elif [[ $words == *(--record|-r)[[:space:]]* ||
-                    $service == parecord ]]; then
+                    $service == (parec|parecord) ]]; then
                     cmd=('sources')
                 else
                     cmd=('sinks' 'sources')
@@ -45,7 +58,7 @@ _devices() {
                     $service == paplay ]]; then
                     cmd=('sinks')
                 elif [[ $words == *(--record|-r)[[:space:]]* ||
-                    $service == parecord ]]; then
+                    $service == (parec|parecord) ]]; then
                     cmd=('sources')
                 else
                     cmd=('sinks' 'sources')
@@ -55,15 +68,8 @@ _devices() {
 
     fi
 
-    for (( i = 0; i < ${#words[@]}; i++ )) do
-        if [[ ${words[$i]} == -s ]]; then
-            _remote_cmd="-s ${words[$i+1]}"
-            break;
-        fi
-    done
-
     for target in $cmd; do
-        for device_info in ${(ps:\n\n:)"$(_call_program device_tag "pactl $_remote_cmd list $target 2> /dev/null")"}; do
+        for device_info in ${(ps:\n\n:)"$(_call_program device_tag "pactl $remote list $target 2> /dev/null")"}; do
             for line in ${(f)device_info}; do
                 if [[ $target == (sink-inputs|source-outputs) ]]; then
                     if [[ $line == (Sink*Input|Source*Output)* ]]; then
@@ -98,18 +104,11 @@ _devices() {
 
 _profiles() {
     local -a _profile_list
-    local _current_card _raw_profiles _profile_name _profile_description _remote_cmd
+    local _current_card _raw_profiles _profile_name _profile_description
 
     _current_card=$words[$((CURRENT - 1))]
 
-    for (( i = 0; i < ${#words[@]}; i++ )) do
-        if [[ ${words[$i]} == -s ]]; then
-            _remote_cmd="-s ${words[$i+1]}"
-            break;
-        fi
-    done
-
-    for card in ${(ps:\n\n:)"$(_call_program profiles_tag "pactl $_remote_cmd list cards 2> /dev/null")"}; do
+    for card in ${(ps:\n\n:)"$(_call_program profiles_tag "pactl $remote list cards 2> /dev/null")"}; do
         if [[ $card == *$_current_card* ]]; then
             _raw_profiles=${card##*Profiles:}
             _raw_profiles=${_raw_profiles%%Active Profile:*}
@@ -130,7 +129,7 @@ _profiles() {
 
 _ports() {
     local -a _port_list
-    local _raw_ports _port_name _port_description _current_device _remote_cmd
+    local _raw_ports _port_name _port_description _current_device
 
     case $words[$((CURRENT - 2))] in
         set-sink-port) cmd="sinks";;
@@ -140,14 +139,7 @@ _ports() {
 
     _current_device=$words[$((CURRENT - 1))]
 
-    for (( i = 0; i < ${#words[@]}; i++ )) do
-        if [[ ${words[$i]} == -s ]]; then
-            _remote_cmd="-s ${words[$i+1]}"
-            break;
-        fi
-    done
-
-    for device in ${(ps:\n\n:)"$(_call_program port_tag "pactl $_remote_cmd list $cmd 2> /dev/null")"}; do
+    for device in ${(ps:\n\n:)"$(_call_program port_tag "pactl $remote list $cmd 2> /dev/null")"}; do
         if [[ $device == *Ports:* && $device == *$_current_device* ]]; then
             _raw_ports=${device##*Ports:}
             _raw_ports=${_raw_ports%%Active Port:*}
@@ -168,16 +160,9 @@ _ports() {
 
 _cards(){
     local -a _card_list
-    local _card _cad_name _remote_cmd
+    local _card _cad_name
 
-    for (( i = 0; i < ${#words[@]}; i++ )) do
-        if [[ ${words[$i]} == -s ]]; then
-            _remote_cmd="-s ${words[$i+1]}"
-            break;
-        fi
-    done
-
-    for card_info in ${(ps:\n\n:)"$(_call_program card_tag "pactl $_remote_cmd list cards 2> /dev/null")"}; do
+    for card_info in ${(ps:\n\n:)"$(_call_program card_tag "pactl $remote list cards 2> /dev/null")"}; do
         for line in ${(f)card_info}; do
             if [[ $line == *Name:* ]]; then
                 _card=${line#*: }
@@ -201,16 +186,9 @@ _all_modules(){
 }
 
 _loaded_modules(){
-    local -a _loaded_modules_list _remote_cmd
+    local -a _loaded_modules_list
 
-    for (( i = 0; i < ${#words[@]}; i++ )) do
-        if [[ ${words[$i]} == -s ]]; then
-            _remote_cmd="-s ${words[$i+1]}"
-            break;
-        fi
-    done
-
-    for module in ${(f)"$(_call_program modules_tag "pactl $_remote_cmd list modules short 2> /dev/null")"}; do
+    for module in ${(f)"$(_call_program modules_tag "pactl $remote list modules short 2> /dev/null")"}; do
         _loaded_modules_list+=(${${(ps:\t:)module}[1]}:${${(ps:\t:)module}[2]})
     done
     _describe 'module list' _loaded_modules_list
@@ -226,16 +204,9 @@ _resample_methods() {
 
 _clients() {
     local -a _client_list
-    local _client _client_description _remote_cmd
-
-    for (( i = 0; i < ${#words[@]}; i++ )) do
-        if [[ ${words[$i]} == -s ]]; then
-            _remote_cmd="-s ${words[$i+1]}"
-            break;
-        fi
-    done
+    local _client _client_description
 
-    for client_info in ${(ps:\n\n:)"$(_call_program clients_tag "pactl $_remote_cmd list clients 2> /dev/null")"}; do
+    for client_info in ${(ps:\n\n:)"$(_call_program clients_tag "pactl $remote list clients 2> /dev/null")"}; do
         for line in ${(f)client_info}; do
             if [[ $line == Client[[:space:]]#* ]]; then
                 _client=${line#*\#}
@@ -257,7 +228,11 @@ _pacat_file_formats() {
 }
 
 _pactl_completion() {
+    _set_remote
+
     _pactl_command(){
+        local -a _pactl_commands
+
         _pactl_commands=(
             'help: show help and exit'
             'stat: dump statistics about the PulseAudio daemon'
@@ -273,9 +248,9 @@ _pactl_completion() {
             'move-source-output: move a recording stream to a source'
             'suspend-sink: suspend or resume a sink'
             'suspend-source: suspend or resume a source'
-            'set-card-profile: set a card profile:cards:_cards'
-            'set-sink-default: set the default sink'
-            'set-source-default: set the default source'
+            'set-card-profile: set a card profile'
+            'set-default-sink: set the default sink'
+            'set-default-source: set the default source'
             'set-sink-port: set the sink port of a sink'
             'set-source-port: set the source port of a source'
             'set-port-latency-offset: set a latency offset on a port'
@@ -290,55 +265,243 @@ _pactl_completion() {
             'set-sink-formats: set supported formats of a sink'
             'subscribe: subscribe to events'
         )
+
         _describe 'pactl commands' _pactl_commands
     }
 
-    _pactl_list_commands=(
-        'modules: list loaded modules'
-        'sinks: list available sinks'
-        'sources: list available sources'
-        'sink-inputs: list connected sink inputs'
-        'source-outputs: list connected source outputs'
-        'clients: list connected clients'
-        'samples: list samples'
-        'cards: list available cards'
-    )
+    _pactl_command_parameter() {
+        local _command
+
+        _list_parameter() {
+            local -a _objects;
+
+            _objects=(
+                'modules: list loaded modules'
+                'sinks: list available sinks'
+                'sources: list available sources'
+                'sink-inputs: list connected sink inputs'
+                'source-outputs: list connected source outputs'
+                'clients: list connected clients'
+                'samples: list samples'
+                'cards: list available cards'
+            )
+
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "list".
+                # "pactl list cards short" and "pactl list short cards" are
+                # treated as equivalent by pactl, but here we only support the
+                # first form, so "short" isn't a valid completion.
+                _describe 'objects' _objects
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after "list". As
+                # explained in the previous comment, we only support the
+                # "pactl list cards short" form, so "short" is the only valid
+                # completion here.
+                compadd short
+            fi
+        }
+
+        _play_sample_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "play-sample".
+                # TODO: Implement sample name completion.
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after "play-sample".
+                # TODO: Implement sink name completion.
+            fi
+        }
+
+        _load_module_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "load-module".
+                _all_modules
+            else
+                # We're completing the second or later parameter after
+                # "load-module", i.e. the module arguments.
+                # TODO: Implement module argument completion.
+            fi
+        }
+
+        _move_sink_input_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "move-sink-input".
+                # Even though the function name is "_devices", it actually
+                # completes the sink input index. _devices is magical like
+                # that.
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after
+                # "move-sink-input".
+                _devices
+            fi
+        }
+
+        _move_source_output_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after
+                # "move-source-output". Even though the function name is
+                # "_devices", it actually completes the source output index.
+                # _devices is magical like that.
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after
+                # "move-source-output".
+                _devices
+            fi
+        }
+
+        _suspend_sink_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "suspend-sink".
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after "suspend-sink".
+                compadd true false
+            fi
+        }
+
+        _suspend_source_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "suspend-source".
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after "suspend-source".
+                compadd true false
+            fi
+        }
+
+        _set_card_profile_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after
+                # "set-card-profile".
+                _cards
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after
+                # "set-card-profile".
+                _profiles
+            fi
+        }
+
+        _set_sink_port_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "set-sink-port".
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after "set-sink-port".
+                _ports
+            fi
+        }
+
+        _set_source_port_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "set-source-port".
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after
+                # "set-source-port".
+                _ports
+            fi
+        }
+
+        _set_sink_mute_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "set-sink-mute".
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after "set-sink-mute".
+                compadd true false toggle
+            fi
+        }
+
+        _set_source_mute_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after "set-source-mute".
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after
+                # "set-source-mute".
+                compadd true false toggle
+            fi
+        }
+
+        _set_sink_input_mute_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after
+                # "set-sink-input-mute". Even though the function name is
+                # "_devices", it actually completes the sink input index.
+                # _devices is magical like that.
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after
+                # "set-sink-input-mute".
+                compadd true false toggle
+            fi
+        }
+
+        _set_source_output_mute_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after
+                # "set-source-output-mute". Even though the function name is
+                # "_devices", it actually completes the source output index.
+                # _devices is magical like that.
+                _devices
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after
+                # "set-source-output-mute".
+                compadd true false toggle
+            fi
+        }
+
+        _set_port_latency_offset_parameter() {
+            if ((CURRENT == 2)); then
+                # We're completing the first parameter after
+                # "set-port-latency-offset".
+                _cards
+            elif ((CURRENT == 3)); then
+                # We're completing the second parameter after
+                # "set-port-latency-offset".
+                _ports
+            fi
+        }
+
+        _command=$words[1]
+
+        case $_command in
+            list)                                  _list_parameter;;
+            upload-sample)                         if ((CURRENT == 2)); then _files; fi;;
+            play-sample)                           _play_sample_parameter;;
+            remove-sample)                         ;; # TODO: Implement sample name completion.
+            load-module)                           _load_module_parameter;;
+            unload-module)                         if ((CURRENT == 2)); then _loaded_modules; fi;;
+            move-sink-input)                       _move_sink_input_parameter;;
+            move-source-output)                    _move_source_output_parameter;;
+            suspend-sink)                          _suspend_sink_parameter;;
+            suspend-source)                        _suspend_source_parameter;;
+            set-card-profile)                      _set_card_profile_parameter;;
+            set-default-sink)                      if ((CURRENT == 2)); then _devices; fi;;
+            set-default-source)                    if ((CURRENT == 2)); then _devices; fi;;
+            set-sink-port)                         _set_sink_port_parameter;;
+            set-source-port)                       _set_source_port_parameter;;
+            set-sink-volume)                       if ((CURRENT == 2)); then _devices; fi;;
+            set-source-volume)                     if ((CURRENT == 2)); then _devices; fi;;
+            set-sink-input-volume)                 if ((CURRENT == 2)); then _devices; fi;;
+            set-source-output-volume)              if ((CURRENT == 2)); then _devices; fi;;
+            set-sink-mute)                         _set_sink_mute_parameter;;
+            set-source-mute)                       _set_source_mute_parameter;;
+            set-sink-input-mute)                   _set_sink_input_mute_parameter;;
+            set-source-output-mute)                _set_source_output_mute_parameter;;
+            set-sink-formats)                      if ((CURRENT == 2)); then _devices; fi;;
+            set-port-latency-offset)               _set_port_latency_offset_parameter;;
+        esac
+    }
 
-    _arguments -C \
-        - '(help)' \
-            {-h,--help}'[display this help and exit]' \
+    _arguments -C -S -A '-*' \
+        {-h,--help}'[display help and exit]' \
         '--version[show version and exit]' \
-        - '(server)' \
-            {-s,--server}'[name of server to connect to]:host:_hosts' \
-        - '(name)' \
-            {-n,--client-name}'[client name to use]:name' \
-        '::pactl commands:_pactl_command' \
-
-    case $words[$((CURRENT - 1))] in
-        list) _describe 'pactl list commands' _pactl_list_commands;;
-        stat) compadd short;;
-        set-card-profile) _cards;;
-        set-sink-*) _devices;;
-        set-source-*) _devices;;
-        upload-sample) _files;;
-        load-module) _all_modules;;
-        unload-module) _loaded_modules;;
-        suspend-*) _devices;;
-        move-*) _devices;;
-        set-port-latency-offset) _cards;;
-    esac
-
-    case $words[$((CURRENT - 2))] in
-        set-card-profile) _profiles;;
-        set-(sink|source)-port) _ports;;
-        set-port-latency-offset) _ports;;
-        set-*-mute) compadd true false toggle;;
-        suspend-*) compadd true false;;
-        list) compadd short;;
-        move-*) _devices;;
-        '-s' | '-n') _pactl_command;;
-        --server | --client-*) _pactl_command;;
-    esac
+        {-s,--server=}'[name of server to connect to]:host:_hosts' \
+        {-n,--client-name=}'[client name to use]:name' \
+        '::pactl command:_pactl_command' \
+        '*::pactl command parameter:_pactl_command_parameter'
 }
 
 _pacmd_completion() {
@@ -403,9 +566,8 @@ _pacmd_completion() {
         _describe 'pacmd commands' _pacmd_commands
     }
 
-    _arguments -C \
-        - '(help)' \
-            {-h,--help}'[display this help and exit]' \
+    _arguments -C -S -A "-*" \
+        {-h,--help}'[display help and exit]' \
         '--version[show version and exit]' \
         '::pacmd commands:_pacmd_command' \
 
@@ -438,15 +600,15 @@ _pacmd_completion() {
 }
 
 _pasuspender_completion() {
-    _arguments -C \
-        {-h,--help}'[display this help and exit]' \
+    _arguments -S -A "-*" -C \
+        {-h,--help}'[display help and exit]' \
         '--version[show version and exit]' \
-        {-s,--server}'[name of server to connect to]:host:_hosts' \
+        {-s,--server=}'[name of server to connect to]:host:_hosts' \
 }
 
 _padsp_completion() {
-    _arguments -C \
-        '-h[display this help and exit]' \
+    _arguments -C -S -A "-*" \
+        '-h[display help and exit]' \
         '-s[name of server to connect to]:host:_hosts' \
         '-n[client name to use]:name:' \
         '-m[stream name to use]:name:' \
@@ -459,10 +621,12 @@ _padsp_completion() {
 
 # TODO channel map completion
 _pacat_completion() {
+    _set_remote
+
     _pacat_sample_formats=('s16le' 's16be' 'u8' 'float32le' 'float32be'
         'ulaw' 'alaw' 's32le' 's32be' 's24le' 's24-32le' 's24-32be')
 
-    _arguments -C \
+    _arguments -C -S -A "-*" \
         {-h,--help}'[display this help and exit]' \
         '--version[show version and exit]' \
         {-r,--record}'[create a connection for recording]' \
@@ -535,12 +699,22 @@ _pulseaudio_completion() {
 _pulseaudio() {
     local state line curcontext="$curcontext"
 
+    # Some commands, like pactl and pacat, have an option for specifying the
+    # server address, like "--server=somehost". If that option is set, then the
+    # helper commands that are run as part of the autocompletion need to use
+    # that same option. The option is saved in this variable in _set_remote(),
+    # which is called in the beginning of _pactl_completion() and others. The
+    # autocompletion commands can then find the option in that variable if the
+    # option is set.
+    local remote
+
     case $service in
         pulseaudio) _pulseaudio_completion;;
         pactl) _pactl_completion;;
         pacmd) _pacmd_completion;;
         pacat) _pacat_completion;;
         paplay)_pacat_completion;;
+        parec) _pacat_completion;;
         parecord)_pacat_completion;;
         padsp) _padsp_completion;;
         pasuspender) _pasuspender_completion;;
diff --git a/src/.gitignore b/src/.gitignore
index 80f6f2c..11689a5 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -3,6 +3,8 @@ TAGS
 *.o
 *.la
 *.gcno
+*.trs
+*.log
 .deps
 .libs
 /Makefile
@@ -21,8 +23,8 @@ paplay
 pasuspender
 pax11publish
 pulseaudio
+pulseaudio.service
 start-pulseaudio-x11
-start-pulseaudio-kde
 *-symdef.h
 *-orc-gen.[ch]
 # tests
@@ -35,7 +37,10 @@ close-test
 connect-stress
 cpulimit-test
 cpulimit-test2
-cpu-test
+cpu-sconv-test
+cpu-remap-test
+cpu-mix-test
+cpu-volume-test
 extended-test
 flist-test
 format-test
@@ -51,7 +56,6 @@ mainloop-test-glib
 mcalign-test
 memblockq-test
 memblock-test
-mix-special-test
 mix-test
 once-test
 pacat-simple
@@ -65,6 +69,7 @@ rtstutter
 sig2str-test
 sigbus-test
 smoother-test
+srbchannel-test
 stripnul
 strlist-test
 sync-playback
diff --git a/src/Makefile.am b/src/Makefile.am
index 857fda3..4e60a98 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -46,11 +46,11 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/src/modules \
 	-I$(top_builddir)/src/modules \
 	-DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
-	-DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
-AM_CFLAGS = \
-	$(PTHREAD_CFLAGS) \
+	-DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" \
 	-DPA_SRCDIR=\"$(abs_srcdir)\" \
 	-DPA_BUILDDIR=\"$(abs_builddir)\"
+AM_CFLAGS = \
+	$(PTHREAD_CFLAGS)
 AM_CXXFLAGS = $(AM_CFLAGS)
 SERVER_CFLAGS = -D__INCLUDED_FROM_PULSE_AUDIO
 
@@ -95,12 +95,12 @@ EXTRA_DIST = \
 		depmod.py \
 		daemon/esdcompat.in \
 		daemon/start-pulseaudio-x11.in \
-		daemon/start-pulseaudio-kde.in \
+		daemon/systemd/user/pulseaudio.service.in \
+		daemon/systemd/user/pulseaudio.socket \
 		utils/padsp.in \
 		utils/qpaeq \
 		modules/module-defs.h.m4 \
 		daemon/pulseaudio.desktop.in \
-		daemon/pulseaudio-kde.desktop.in \
 		map-file \
 		daemon/pulseaudio-system.conf \
 		modules/echo-cancel/adrian-license.txt
@@ -118,8 +118,7 @@ endif
 
 if HAVE_X11
 xdgautostart_in_files = \
-		daemon/pulseaudio.desktop.in \
-		daemon/pulseaudio-kde.desktop.in
+		daemon/pulseaudio.desktop.in
 xdgautostart_DATA = $(xdgautostart_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 endif
@@ -172,6 +171,11 @@ else
 pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
 endif
 
+if HAVE_SYSTEMD_DAEMON
+pulseaudio_CFLAGS += $(SYSTEMD_FLAGS) $(SYSTEMDDAEMON_FLAGS)
+pulseaudio_LDFLAGS += $(SYSTEMD_LIBS) $(SYSTEMDDAEMON_LIBS)
+endif
+
 ###################################
 #       Utility programs          #
 ###################################
@@ -192,7 +196,7 @@ endif
 
 if HAVE_X11
 bin_PROGRAMS += pax11publish
-bin_SCRIPTS += start-pulseaudio-x11 start-pulseaudio-kde
+bin_SCRIPTS += start-pulseaudio-x11
 endif
 
 pacat_SOURCES = utils/pacat.c
@@ -220,6 +224,14 @@ pax11publish_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
 pax11publish_LDADD = $(AM_LDADD) libpulse.la libpulsecommon- at PA_MAJORMINOR@.la $(X11_LIBS)
 pax11publish_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
 
+if HAVE_SYSTEMD_DAEMON
+
+systemduserunit_DATA = \
+    pulseaudio.service \
+    daemon/systemd/user/pulseaudio.socket
+
+endif
+
 ###################################
 #         Test programs           #
 ###################################
@@ -247,10 +259,12 @@ TESTS_default = \
 		volume-test \
 		mix-test \
 		proplist-test \
-		cpu-test \
+		cpu-mix-test \
+		cpu-remap-test \
+		cpu-sconv-test \
+		cpu-volume-test \
 		lock-autospawn-test \
-		mult-s16-test \
-		mix-special-test
+		mult-s16-test
 
 TESTS_norun = \
 		ipacl-test \
@@ -274,6 +288,7 @@ TESTS_daemon = \
 
 if !OS_IS_WIN32
 TESTS_default += \
+		srbchannel-test \
 		sigbus-test \
 		usergroup-test
 endif
@@ -352,6 +367,11 @@ format_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
 format_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
 format_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
 
+srbchannel_test_SOURCES = tests/srbchannel-test.c
+srbchannel_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+srbchannel_test_LDADD = $(AM_LDADD) libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+srbchannel_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+
 get_binary_name_test_SOURCES = tests/get-binary-name-test.c
 get_binary_name_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
 get_binary_name_test_LDADD = $(AM_LDADD) libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
@@ -507,21 +527,31 @@ proplist_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la li
 proplist_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
 proplist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
 
-cpu_test_SOURCES = tests/cpu-test.c tests/runtime-test-util.h
-cpu_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
-cpu_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
-cpu_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+cpu_mix_test_SOURCES = tests/cpu-mix-test.c tests/runtime-test-util.h
+cpu_mix_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+cpu_mix_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+cpu_mix_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+
+cpu_remap_test_SOURCES = tests/cpu-remap-test.c tests/runtime-test-util.h
+cpu_remap_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+cpu_remap_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+cpu_remap_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+
+cpu_sconv_test_SOURCES = tests/cpu-sconv-test.c tests/runtime-test-util.h
+cpu_sconv_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+cpu_sconv_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+cpu_sconv_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+
+cpu_volume_test_SOURCES = tests/cpu-volume-test.c tests/runtime-test-util.h
+cpu_volume_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+cpu_volume_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+cpu_volume_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
 
 mult_s16_test_SOURCES = tests/mult-s16-test.c tests/runtime-test-util.h
 mult_s16_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
 mult_s16_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
 mult_s16_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
 
-mix_special_test_SOURCES = tests/mix-special-test.c tests/runtime-test-util.h
-mix_special_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
-mix_special_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
-mix_special_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
-
 rtstutter_SOURCES = tests/rtstutter.c
 rtstutter_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
 rtstutter_CFLAGS = $(AM_CFLAGS)
@@ -621,6 +651,7 @@ libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES = \
 		pulsecore/creds.h \
 		pulsecore/dynarray.c pulsecore/dynarray.h \
 		pulsecore/endianmacros.h \
+		pulsecore/fdsem.c pulsecore/fdsem.h \
 		pulsecore/flist.c pulsecore/flist.h \
 		pulsecore/g711.c pulsecore/g711.h \
 		pulsecore/hashmap.c pulsecore/hashmap.h \
@@ -654,6 +685,7 @@ libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES = \
 		pulsecore/queue.c pulsecore/queue.h \
 		pulsecore/random.c pulsecore/random.h \
 		pulsecore/refcnt.h \
+		pulsecore/srbchannel.c pulsecore/srbchannel.h \
 		pulsecore/sample-util.c pulsecore/sample-util.h \
 		pulsecore/shm.c pulsecore/shm.h \
 		pulsecore/bitset.c pulsecore/bitset.h \
@@ -689,9 +721,13 @@ libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS += $(X11_CFLAGS)
 libpulsecommon_ at PA_MAJORMINOR@_la_LDFLAGS += $(X11_LIBS)
 endif
 
+if HAVE_SYSTEMD_DAEMON
+libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS += $(SYSTEMD_FLAGS) $(SYSTEMDDAEMON_FLAGS)
+libpulsecommon_ at PA_MAJORMINOR@_la_LDFLAGS += $(SYSTEMD_LIBS) $(SYSTEMDDAEMON_LIBS)
+endif
 if HAVE_SYSTEMD_JOURNAL
-libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS += $(JOURNAL_FLAGS)
-libpulsecommon_ at PA_MAJORMINOR@_la_LDFLAGS += $(JOURNAL_LIBS)
+libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS += $(SYSTEMD_FLAGS) $(SYSTEMDJOURNAL_FLAGS)
+libpulsecommon_ at PA_MAJORMINOR@_la_LDFLAGS += $(SYSTEMD_LIBS) $(SYSTEMDJOURNAL_LIBS)
 endif
 
 # proplist-util.h uses these header files, but not the library itself!
@@ -749,6 +785,7 @@ pulseinclude_HEADERS = \
 		pulse/channelmap.h \
 		pulse/context.h \
 		pulse/def.h \
+		pulse/direction.h \
 		pulse/error.h \
 		pulse/ext-device-manager.h \
 		pulse/ext-device-restore.h \
@@ -794,6 +831,7 @@ libpulse_la_SOURCES = \
 		pulse/channelmap.c pulse/channelmap.h \
 		pulse/context.c pulse/context.h \
 		pulse/def.h \
+		pulse/direction.c pulse/direction.h \
 		pulse/error.c pulse/error.h \
 		pulse/ext-device-manager.c pulse/ext-device-manager.h \
 		pulse/ext-device-restore.c pulse/ext-device-restore.h \
@@ -881,7 +919,6 @@ libpulsecore_ at PA_MAJORMINOR@_la_SOURCES = \
 		pulsecore/core-scache.c pulsecore/core-scache.h \
 		pulsecore/core-subscribe.c pulsecore/core-subscribe.h \
 		pulsecore/core.c pulsecore/core.h \
-		pulsecore/fdsem.c pulsecore/fdsem.h \
 		pulsecore/hook-list.c pulsecore/hook-list.h \
 		pulsecore/ltdl-helper.c pulsecore/ltdl-helper.h \
 		pulsecore/modargs.c pulsecore/modargs.h \
@@ -895,10 +932,12 @@ libpulsecore_ at PA_MAJORMINOR@_la_SOURCES = \
 		pulsecore/remap.c pulsecore/remap.h \
 		pulsecore/remap_mmx.c pulsecore/remap_sse.c \
 		pulsecore/resampler.c pulsecore/resampler.h \
+		pulsecore/resampler/ffmpeg.c pulsecore/resampler/peaks.c \
+		pulsecore/resampler/trivial.c \
 		pulsecore/rtpoll.c pulsecore/rtpoll.h \
 		pulsecore/stream-util.c pulsecore/stream-util.h \
 		pulsecore/mix.c pulsecore/mix.h \
-		pulsecore/cpu.h \
+		pulsecore/cpu.c pulsecore/cpu.h \
 		pulsecore/cpu-arm.c pulsecore/cpu-arm.h \
 		pulsecore/cpu-x86.c pulsecore/cpu-x86.h \
 		pulsecore/cpu-orc.c pulsecore/cpu-orc.h \
@@ -919,17 +958,19 @@ libpulsecore_ at PA_MAJORMINOR@_la_SOURCES = \
 		pulsecore/thread-mq.c pulsecore/thread-mq.h \
 		pulsecore/database.h
 
-libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSPEEX_CFLAGS) $(LIBSNDFILE_CFLAGS) $(WINSOCK_CFLAGS)
+libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(LIBSNDFILE_CFLAGS) $(WINSOCK_CFLAGS)
 libpulsecore_ at PA_MAJORMINOR@_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
-libpulsecore_ at PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSPEEX_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV) libpulsecommon- at PA_MAJORMINOR@.la libpulse.la libpulsecore-foreign.la
+libpulsecore_ at PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV) libpulsecommon- at PA_MAJORMINOR@.la libpulse.la libpulsecore-foreign.la
 
 if HAVE_NEON
-noinst_LTLIBRARIES += libpulsecore_sconv_neon.la libpulsecore_mix_neon.la
+noinst_LTLIBRARIES += libpulsecore_sconv_neon.la libpulsecore_mix_neon.la libpulsecore_remap_neon.la
 libpulsecore_sconv_neon_la_SOURCES = pulsecore/sconv_neon.c
 libpulsecore_sconv_neon_la_CFLAGS = $(AM_CFLAGS) $(NEON_CFLAGS)
 libpulsecore_mix_neon_la_SOURCES = pulsecore/mix_neon.c
 libpulsecore_mix_neon_la_CFLAGS = $(AM_CFLAGS) $(NEON_CFLAGS)
-libpulsecore_ at PA_MAJORMINOR@_la_LIBADD += libpulsecore_sconv_neon.la libpulsecore_mix_neon.la
+libpulsecore_remap_neon_la_SOURCES = pulsecore/remap_neon.c
+libpulsecore_remap_neon_la_CFLAGS = $(AM_CFLAGS) $(NEON_CFLAGS)
+libpulsecore_ at PA_MAJORMINOR@_la_LIBADD += libpulsecore_sconv_neon.la libpulsecore_mix_neon.la libpulsecore_remap_neon.la
 endif
 
 ORC_SOURCE += pulsecore/svolume
@@ -970,6 +1011,18 @@ if HAVE_SIMPLEDB
 libpulsecore_ at PA_MAJORMINOR@_la_SOURCES += pulsecore/database-simple.c
 endif
 
+if HAVE_SPEEX
+libpulsecore_ at PA_MAJORMINOR@_la_SOURCES += pulsecore/resampler/speex.c
+libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS += $(LIBSPEEX_CFLAGS)
+libpulsecore_ at PA_MAJORMINOR@_la_LIBADD += $(LIBSPEEX_LIBS)
+endif
+
+if HAVE_LIBSAMPLERATE
+libpulsecore_ at PA_MAJORMINOR@_la_SOURCES += pulsecore/resampler/libsamplerate.c
+libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS += $(LIBSAMPLERATE_CFLAGS)
+libpulsecore_ at PA_MAJORMINOR@_la_LIBADD += $(LIBSAMPLERATE_LIBS)
+endif
+
 # We split the foreign code off to not be annoyed by warnings we don't care about
 noinst_LTLIBRARIES += libpulsecore-foreign.la
 
@@ -1197,7 +1250,6 @@ modlibexec_LTLIBRARIES += \
 
 dist_alsaprofilesets_DATA = \
 		modules/alsa/mixer/profile-sets/default.conf \
-		modules/alsa/mixer/profile-sets/extra-hdmi.conf \
 		modules/alsa/mixer/profile-sets/force-speaker.conf \
 		modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf \
 		modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf \
@@ -1237,7 +1289,6 @@ dist_alsapaths_DATA = \
 		modules/alsa/mixer/paths/analog-output-speaker.conf \
 		modules/alsa/mixer/paths/analog-output-speaker-always.conf \
 		modules/alsa/mixer/paths/analog-output.conf.common \
-		modules/alsa/mixer/paths/analog-output-desktop-speaker.conf \
 		modules/alsa/mixer/paths/analog-output-headphones.conf \
 		modules/alsa/mixer/paths/analog-output-headphones-2.conf \
 		modules/alsa/mixer/paths/analog-output-lineout.conf \
@@ -1246,7 +1297,11 @@ dist_alsapaths_DATA = \
 		modules/alsa/mixer/paths/hdmi-output-0.conf \
 		modules/alsa/mixer/paths/hdmi-output-1.conf \
 		modules/alsa/mixer/paths/hdmi-output-2.conf \
-		modules/alsa/mixer/paths/hdmi-output-3.conf
+		modules/alsa/mixer/paths/hdmi-output-3.conf \
+		modules/alsa/mixer/paths/hdmi-output-4.conf \
+		modules/alsa/mixer/paths/hdmi-output-5.conf \
+		modules/alsa/mixer/paths/hdmi-output-6.conf \
+		modules/alsa/mixer/paths/hdmi-output-7.conf
 
 endif
 
@@ -1317,7 +1372,7 @@ modlibexec_LTLIBRARIES += \
 		module-udev-detect.la
 endif
 
-if HAVE_SYSTEMD
+if HAVE_SYSTEMD_LOGIN
 modlibexec_LTLIBRARIES += \
 		module-systemd-login.la
 endif
@@ -1348,6 +1403,9 @@ modlibexec_LTLIBRARIES += \
 		module-bluez5-device.la
 endif
 
+# RAOP depends on RTP, and we don't support RTP on Windows, see comment at
+# librtp.la above.
+if !OS_IS_WIN32
 if HAVE_OPENSSL
 modlibexec_LTLIBRARIES += \
 		libraop.la \
@@ -1357,6 +1415,7 @@ modlibexec_LTLIBRARIES += \
 		module-raop-discover.la
 endif
 endif
+endif
 
 if HAVE_DBUS
 if HAVE_FFTW
@@ -2021,8 +2080,8 @@ module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
 
 module_systemd_login_la_SOURCES = modules/module-systemd-login.c
 module_systemd_login_la_LDFLAGS = $(MODULE_LDFLAGS)
-module_systemd_login_la_LIBADD = $(MODULE_LIBADD) $(SYSTEMD_LIBS)
-module_systemd_login_la_CFLAGS = $(AM_CFLAGS) $(SYSTEMD_CFLAGS)
+module_systemd_login_la_LIBADD = $(MODULE_LIBADD) $(SYSTEMD_LIBS) $(SYSTEMDLOGIN_LIBS)
+module_systemd_login_la_CFLAGS = $(AM_CFLAGS) $(SYSTEMD_CFLAGS) $(SYSTEMDLOGIN_CFLAGS)
 
 # GConf support
 module_gconf_la_SOURCES = modules/gconf/module-gconf.c
@@ -2071,6 +2130,15 @@ libbluez5_util_la_SOURCES = \
 		modules/bluetooth/bluez5-util.c \
 		modules/bluetooth/bluez5-util.h \
 		modules/bluetooth/a2dp-codecs.h
+if HAVE_BLUEZ_5_OFONO_HEADSET
+libbluez5_util_la_SOURCES += \
+		modules/bluetooth/backend-ofono.c
+endif
+if HAVE_BLUEZ_5_NATIVE_HEADSET
+libbluez5_util_la_SOURCES += \
+		modules/bluetooth/backend-native.c
+endif
+
 libbluez5_util_la_LDFLAGS = -avoid-version
 libbluez5_util_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS)
 libbluez5_util_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
@@ -2106,8 +2174,8 @@ module_rygel_media_server_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
 #        Some minor stuff         #
 ###################################
 
-CLEANFILES += daemon/pulseaudio.desktop daemon/pulseaudio-kde.desktop
-DISTCLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11 start-pulseaudio-kde
+CLEANFILES += daemon/pulseaudio.desktop
+DISTCLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11 pulseaudio.service
 
 if OS_IS_WIN32
 SYMLINK_PROGRAM=cd $(DESTDIR)$(bindir) && cp
diff --git a/src/Makefile.in b/src/Makefile.in
index 146f296..82cd592 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -136,11 +136,11 @@ host_triplet = @host@
 DIST_COMMON = $(top_srcdir)/orc.mak $(srcdir)/Makefile.in \
 	$(srcdir)/Makefile.am $(top_srcdir)/src/daemon/esdcompat.in \
 	$(top_srcdir)/src/daemon/start-pulseaudio-x11.in \
-	$(top_srcdir)/src/daemon/start-pulseaudio-kde.in \
 	$(top_srcdir)/src/pulse/client.conf.in \
 	$(top_srcdir)/src/daemon/daemon.conf.in \
 	$(top_srcdir)/src/daemon/default.pa.in \
 	$(top_srcdir)/src/daemon/system.pa.in \
+	$(top_srcdir)/src/daemon/systemd/user/pulseaudio.service.in \
 	$(top_srcdir)/build-aux/depcomp \
 	$(am__dist_alsapaths_DATA_DIST) \
 	$(am__dist_alsaprofilesets_DATA_DIST) \
@@ -154,31 +154,34 @@ bin_PROGRAMS = pulseaudio$(EXEEXT) pacat$(EXEEXT) pactl$(EXEEXT) \
 @HAVE_DBUS_TRUE at am__append_8 = $(DBUS_CFLAGS)
 @HAVE_DBUS_TRUE at am__append_9 = daemon/server-lookup.c daemon/server-lookup.h
 @HAVE_DBUS_TRUE at am__append_10 = $(DBUS_LIBS)
- at OS_IS_WIN32_FALSE@am__append_11 = pasuspender
- at HAVE_AF_UNIX_TRUE@am__append_12 = pacmd
- at HAVE_X11_TRUE@am__append_13 = pax11publish
- at HAVE_X11_TRUE@am__append_14 = start-pulseaudio-x11 start-pulseaudio-kde
- at OS_IS_WIN32_FALSE@am__append_15 = \
+ at HAVE_SYSTEMD_DAEMON_TRUE@am__append_11 = $(SYSTEMD_FLAGS) $(SYSTEMDDAEMON_FLAGS)
+ at HAVE_SYSTEMD_DAEMON_TRUE@am__append_12 = $(SYSTEMD_LIBS) $(SYSTEMDDAEMON_LIBS)
+ at OS_IS_WIN32_FALSE@am__append_13 = pasuspender
+ at HAVE_AF_UNIX_TRUE@am__append_14 = pacmd
+ at HAVE_X11_TRUE@am__append_15 = pax11publish
+ at HAVE_X11_TRUE@am__append_16 = start-pulseaudio-x11
+ at OS_IS_WIN32_FALSE@am__append_17 = \
+ at OS_IS_WIN32_FALSE@		srbchannel-test \
 @OS_IS_WIN32_FALSE@		sigbus-test \
 @OS_IS_WIN32_FALSE@		usergroup-test
 
- at OS_IS_DARWIN_FALSE@am__append_16 = \
+ at OS_IS_DARWIN_FALSE@am__append_18 = \
 @OS_IS_DARWIN_FALSE@		once-test
 
- at HAVE_SIGXCPU_TRUE@am__append_17 = \
+ at HAVE_SIGXCPU_TRUE@am__append_19 = \
 @HAVE_SIGXCPU_TRUE@		cpulimit-test \
 @HAVE_SIGXCPU_TRUE@		cpulimit-test2
 
- at HAVE_GLIB20_TRUE@am__append_18 = \
+ at HAVE_GLIB20_TRUE@am__append_20 = \
 @HAVE_GLIB20_TRUE@		mainloop-test-glib
 
- at HAVE_GTK30_TRUE@am__append_19 = \
+ at HAVE_GTK30_TRUE@am__append_21 = \
 @HAVE_GTK30_TRUE@		gtk-test
 
- at HAVE_ALSA_TRUE@am__append_20 = \
+ at HAVE_ALSA_TRUE@am__append_22 = \
 @HAVE_ALSA_TRUE@		alsa-time-test
 
- at HAVE_ALSA_TRUE@am__append_21 = \
+ at HAVE_ALSA_TRUE@am__append_23 = \
 @HAVE_ALSA_TRUE@		alsa-mixer-path-test
 
 @HAVE_TESTS_TRUE at TESTS = $(am__EXEEXT_8)
@@ -189,250 +192,267 @@ bin_PROGRAMS = pulseaudio$(EXEEXT) pacat$(EXEEXT) pactl$(EXEEXT) \
 @BUILD_TESTS_DEFAULT_FALSE@@HAVE_TESTS_TRUE at check_PROGRAMS =  \
 @BUILD_TESTS_DEFAULT_FALSE@@HAVE_TESTS_TRUE@	$(am__EXEEXT_8) \
 @BUILD_TESTS_DEFAULT_FALSE@@HAVE_TESTS_TRUE@	$(am__EXEEXT_12)
- at OS_IS_WIN32_TRUE@am__append_22 = pulsecore/poll-win32.c pulsecore/poll.h
- at OS_IS_WIN32_FALSE@am__append_23 = pulsecore/poll-posix.c pulsecore/poll.h
- at HAVE_X11_TRUE@am__append_24 = \
+ at OS_IS_WIN32_TRUE@am__append_24 = pulsecore/poll-win32.c pulsecore/poll.h
+ at OS_IS_WIN32_FALSE@am__append_25 = pulsecore/poll-posix.c pulsecore/poll.h
+ at HAVE_X11_TRUE@am__append_26 = \
 @HAVE_X11_TRUE@		pulse/client-conf-x11.c pulse/client-conf-x11.h \
 @HAVE_X11_TRUE@		pulsecore/x11prop.c pulsecore/x11prop.h
 
- at HAVE_X11_TRUE@am__append_25 = $(X11_CFLAGS)
- at HAVE_X11_TRUE@am__append_26 = $(X11_LIBS)
- at HAVE_SYSTEMD_JOURNAL_TRUE@am__append_27 = $(JOURNAL_FLAGS)
- at HAVE_SYSTEMD_JOURNAL_TRUE@am__append_28 = $(JOURNAL_LIBS)
- at OS_IS_WIN32_TRUE@am__append_29 = \
+ at HAVE_X11_TRUE@am__append_27 = $(X11_CFLAGS)
+ at HAVE_X11_TRUE@am__append_28 = $(X11_LIBS)
+ at HAVE_SYSTEMD_DAEMON_TRUE@am__append_29 = $(SYSTEMD_FLAGS) $(SYSTEMDDAEMON_FLAGS)
+ at HAVE_SYSTEMD_DAEMON_TRUE@am__append_30 = $(SYSTEMD_LIBS) $(SYSTEMDDAEMON_LIBS)
+ at HAVE_SYSTEMD_JOURNAL_TRUE@am__append_31 = $(SYSTEMD_FLAGS) $(SYSTEMDJOURNAL_FLAGS)
+ at HAVE_SYSTEMD_JOURNAL_TRUE@am__append_32 = $(SYSTEMD_LIBS) $(SYSTEMDJOURNAL_LIBS)
+ at OS_IS_WIN32_TRUE@am__append_33 = \
 @OS_IS_WIN32_TRUE@		pulsecore/mutex-win32.c pulsecore/mutex.h \
 @OS_IS_WIN32_TRUE@		pulsecore/thread-win32.c pulsecore/thread.h \
 @OS_IS_WIN32_TRUE@		pulsecore/semaphore-win32.c pulsecore/semaphore.h
 
- at OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE at am__append_30 = \
+ at OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE at am__append_34 = \
 @OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE@		pulsecore/mutex-posix.c pulsecore/mutex.h \
 @OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE@		pulsecore/thread-posix.c pulsecore/thread.h \
 @OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE@		pulsecore/semaphore-osx.c pulsecore/semaphore.h
 
- at OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE at am__append_31 = "-I/Developer/Headers/FlatCarbon/"
+ at OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE at am__append_35 = "-I/Developer/Headers/FlatCarbon/"
 #libpulsecommon_ at PA_MAJORMINOR@_la_LDFLAGS += "-framework CoreServices"
- at OS_IS_DARWIN_FALSE@@OS_IS_WIN32_FALSE at am__append_32 = \
+ at OS_IS_DARWIN_FALSE@@OS_IS_WIN32_FALSE at am__append_36 = \
 @OS_IS_DARWIN_FALSE@@OS_IS_WIN32_FALSE@		pulsecore/mutex-posix.c pulsecore/mutex.h \
 @OS_IS_DARWIN_FALSE@@OS_IS_WIN32_FALSE@		pulsecore/thread-posix.c pulsecore/thread.h \
 @OS_IS_DARWIN_FALSE@@OS_IS_WIN32_FALSE@		pulsecore/semaphore-posix.c pulsecore/semaphore.h
 
- at HAVE_LIBASYNCNS_TRUE@am__append_33 = $(LIBASYNCNS_CFLAGS)
- at HAVE_LIBASYNCNS_TRUE@am__append_34 = $(LIBASYNCNS_LIBS)
- at OS_IS_WIN32_TRUE@am__append_35 = pulsecore/dllmain.c
- at HAVE_DBUS_TRUE@am__append_36 = \
+ at HAVE_LIBASYNCNS_TRUE@am__append_37 = $(LIBASYNCNS_CFLAGS)
+ at HAVE_LIBASYNCNS_TRUE@am__append_38 = $(LIBASYNCNS_LIBS)
+ at OS_IS_WIN32_TRUE@am__append_39 = pulsecore/dllmain.c
+ at HAVE_DBUS_TRUE@am__append_40 = \
 @HAVE_DBUS_TRUE@		pulsecore/dbus-util.c pulsecore/dbus-util.h \
 @HAVE_DBUS_TRUE@		pulsecore/rtkit.c pulsecore/rtkit.h
 
- at HAVE_DBUS_TRUE@am__append_37 = $(DBUS_CFLAGS)
- at HAVE_DBUS_TRUE@am__append_38 = $(DBUS_LIBS)
- at HAVE_GLIB20_TRUE@am__append_39 = \
+ at HAVE_DBUS_TRUE@am__append_41 = $(DBUS_CFLAGS)
+ at HAVE_DBUS_TRUE@am__append_42 = $(DBUS_LIBS)
+ at HAVE_GLIB20_TRUE@am__append_43 = \
 @HAVE_GLIB20_TRUE@		pulse/glib-mainloop.h
 
- at HAVE_GLIB20_TRUE@am__append_40 = \
+ at HAVE_GLIB20_TRUE@am__append_44 = \
 @HAVE_GLIB20_TRUE@		libpulse-mainloop-glib.la
 
- at HAVE_DBUS_TRUE@am__append_41 = $(DBUS_CFLAGS)
- at HAVE_DBUS_TRUE@am__append_42 = $(DBUS_LIBS)
- at HAVE_OSS_WRAPPER_TRUE@am__append_43 = padsp
- at HAVE_OSS_WRAPPER_TRUE@am__append_44 = padsp
- at HAVE_NEON_TRUE@am__append_45 = libpulsecore_sconv_neon.la libpulsecore_mix_neon.la
- at HAVE_NEON_TRUE@am__append_46 = libpulsecore_sconv_neon.la libpulsecore_mix_neon.la
- at HAVE_ORC_TRUE@am__append_47 = pulsecore/svolume_orc.c
- at HAVE_ORC_TRUE@am__append_48 = $(ORC_CFLAGS)
- at HAVE_ORC_TRUE@am__append_49 = $(ORC_LIBS)
- at HAVE_X11_TRUE@am__append_50 = pulsecore/x11wrap.c pulsecore/x11wrap.h
- at HAVE_X11_TRUE@am__append_51 = $(X11_CFLAGS)
- at HAVE_X11_TRUE@am__append_52 = $(X11_LIBS)
- at HAVE_DBUS_TRUE@am__append_53 = \
+ at HAVE_DBUS_TRUE@am__append_45 = $(DBUS_CFLAGS)
+ at HAVE_DBUS_TRUE@am__append_46 = $(DBUS_LIBS)
+ at HAVE_OSS_WRAPPER_TRUE@am__append_47 = padsp
+ at HAVE_OSS_WRAPPER_TRUE@am__append_48 = padsp
+ at HAVE_NEON_TRUE@am__append_49 = libpulsecore_sconv_neon.la libpulsecore_mix_neon.la libpulsecore_remap_neon.la
+ at HAVE_NEON_TRUE@am__append_50 = libpulsecore_sconv_neon.la libpulsecore_mix_neon.la libpulsecore_remap_neon.la
+ at HAVE_ORC_TRUE@am__append_51 = pulsecore/svolume_orc.c
+ at HAVE_ORC_TRUE@am__append_52 = $(ORC_CFLAGS)
+ at HAVE_ORC_TRUE@am__append_53 = $(ORC_LIBS)
+ at HAVE_X11_TRUE@am__append_54 = pulsecore/x11wrap.c pulsecore/x11wrap.h
+ at HAVE_X11_TRUE@am__append_55 = $(X11_CFLAGS)
+ at HAVE_X11_TRUE@am__append_56 = $(X11_LIBS)
+ at HAVE_DBUS_TRUE@am__append_57 = \
 @HAVE_DBUS_TRUE@		pulsecore/dbus-shared.c pulsecore/dbus-shared.h \
 @HAVE_DBUS_TRUE@		pulsecore/protocol-dbus.c pulsecore/protocol-dbus.h
 
- at HAVE_DBUS_TRUE@am__append_54 = $(DBUS_CFLAGS)
- at HAVE_DBUS_TRUE@am__append_55 = $(DBUS_LIBS)
- at HAVE_GDBM_TRUE@am__append_56 = pulsecore/database-gdbm.c
- at HAVE_GDBM_TRUE@am__append_57 = $(GDBM_CFLAGS)
- at HAVE_GDBM_TRUE@am__append_58 = $(GDBM_LIBS)
- at HAVE_TDB_TRUE@am__append_59 = pulsecore/database-tdb.c
- at HAVE_TDB_TRUE@am__append_60 = $(TDB_CFLAGS)
- at HAVE_TDB_TRUE@am__append_61 = $(TDB_LIBS)
- at HAVE_SIMPLEDB_TRUE@am__append_62 = pulsecore/database-simple.c
- at HAVE_WEBRTC_TRUE@am__append_63 = libwebrtc-util.la
- at HAVE_ESOUND_TRUE@am__append_64 = \
+ at HAVE_DBUS_TRUE@am__append_58 = $(DBUS_CFLAGS)
+ at HAVE_DBUS_TRUE@am__append_59 = $(DBUS_LIBS)
+ at HAVE_GDBM_TRUE@am__append_60 = pulsecore/database-gdbm.c
+ at HAVE_GDBM_TRUE@am__append_61 = $(GDBM_CFLAGS)
+ at HAVE_GDBM_TRUE@am__append_62 = $(GDBM_LIBS)
+ at HAVE_TDB_TRUE@am__append_63 = pulsecore/database-tdb.c
+ at HAVE_TDB_TRUE@am__append_64 = $(TDB_CFLAGS)
+ at HAVE_TDB_TRUE@am__append_65 = $(TDB_LIBS)
+ at HAVE_SIMPLEDB_TRUE@am__append_66 = pulsecore/database-simple.c
+ at HAVE_SPEEX_TRUE@am__append_67 = pulsecore/resampler/speex.c
+ at HAVE_SPEEX_TRUE@am__append_68 = $(LIBSPEEX_CFLAGS)
+ at HAVE_SPEEX_TRUE@am__append_69 = $(LIBSPEEX_LIBS)
+ at HAVE_LIBSAMPLERATE_TRUE@am__append_70 = pulsecore/resampler/libsamplerate.c
+ at HAVE_LIBSAMPLERATE_TRUE@am__append_71 = $(LIBSAMPLERATE_CFLAGS)
+ at HAVE_LIBSAMPLERATE_TRUE@am__append_72 = $(LIBSAMPLERATE_LIBS)
+ at HAVE_WEBRTC_TRUE@am__append_73 = libwebrtc-util.la
+ at HAVE_ESOUND_TRUE@am__append_74 = \
 @HAVE_ESOUND_TRUE@		libprotocol-esound.la
 
 
 # We need to emulate sendmsg/recvmsg to support this on Win32
- at OS_IS_WIN32_FALSE@am__append_65 = \
+ at OS_IS_WIN32_FALSE@am__append_75 = \
 @OS_IS_WIN32_FALSE@		librtp.la
 
- at HAVE_AVAHI_TRUE@am__append_66 = \
+ at HAVE_AVAHI_TRUE@am__append_76 = \
 @HAVE_AVAHI_TRUE@		libavahi-wrap.la
 
- at HAVE_DBUS_TRUE@am__append_67 = $(DBUS_CFLAGS)
- at HAVE_DBUS_TRUE@am__append_68 = $(DBUS_LIBS)
+ at HAVE_DBUS_TRUE@am__append_77 = $(DBUS_CFLAGS)
+ at HAVE_DBUS_TRUE@am__append_78 = $(DBUS_LIBS)
 
 ###################################
 #        Plug-in libraries        #
 ###################################
 
 # Serveral module (e.g. libalsa-util.la)
- at HAVE_DBUS_TRUE@am__append_69 = \
+ at HAVE_DBUS_TRUE@am__append_79 = \
 @HAVE_DBUS_TRUE@		module-console-kit.la
 
- at HAVE_ESOUND_TRUE@am__append_70 = \
+ at HAVE_ESOUND_TRUE@am__append_80 = \
 @HAVE_ESOUND_TRUE@		module-esound-protocol-tcp.la \
 @HAVE_ESOUND_TRUE@		module-esound-sink.la
 
 
 # See comment at librtp.la above
- at OS_IS_WIN32_FALSE@am__append_71 = \
+ at OS_IS_WIN32_FALSE@am__append_81 = \
 @OS_IS_WIN32_FALSE@		module-rtp-send.la \
 @OS_IS_WIN32_FALSE@		module-rtp-recv.la
 
- at HAVE_AF_UNIX_TRUE@am__append_72 = \
+ at HAVE_AF_UNIX_TRUE@am__append_82 = \
 @HAVE_AF_UNIX_TRUE@		module-cli-protocol-unix.la \
 @HAVE_AF_UNIX_TRUE@		module-simple-protocol-unix.la \
 @HAVE_AF_UNIX_TRUE@		module-http-protocol-unix.la \
 @HAVE_AF_UNIX_TRUE@		module-native-protocol-unix.la
 
- at HAVE_AF_UNIX_TRUE@@HAVE_ESOUND_TRUE at am__append_73 = \
+ at HAVE_AF_UNIX_TRUE@@HAVE_ESOUND_TRUE at am__append_83 = \
 @HAVE_AF_UNIX_TRUE@@HAVE_ESOUND_TRUE@		module-esound-protocol-unix.la
 
- at HAVE_MKFIFO_TRUE@am__append_74 = \
+ at HAVE_MKFIFO_TRUE@am__append_84 = \
 @HAVE_MKFIFO_TRUE@		module-pipe-sink.la \
 @HAVE_MKFIFO_TRUE@		module-pipe-source.la
 
- at HAVE_ESOUND_TRUE@@OS_IS_WIN32_FALSE at am__append_75 = \
+ at HAVE_ESOUND_TRUE@@OS_IS_WIN32_FALSE at am__append_85 = \
 @HAVE_ESOUND_TRUE@@OS_IS_WIN32_FALSE@		module-esound-compat-spawnfd.la \
 @HAVE_ESOUND_TRUE@@OS_IS_WIN32_FALSE@		module-esound-compat-spawnpid.la
 
- at HAVE_REGEX_TRUE@am__append_76 = \
+ at HAVE_REGEX_TRUE@am__append_86 = \
 @HAVE_REGEX_TRUE@		module-match.la
 
- at HAVE_X11_TRUE@am__append_77 = \
+ at HAVE_X11_TRUE@am__append_87 = \
 @HAVE_X11_TRUE@		module-x11-bell.la \
 @HAVE_X11_TRUE@		module-x11-publish.la \
 @HAVE_X11_TRUE@		module-x11-xsmp.la \
 @HAVE_X11_TRUE@		module-x11-cork-request.la
 
- at HAVE_OSS_OUTPUT_TRUE@am__append_78 = \
+ at HAVE_OSS_OUTPUT_TRUE@am__append_88 = \
 @HAVE_OSS_OUTPUT_TRUE@		liboss-util.la \
 @HAVE_OSS_OUTPUT_TRUE@		module-oss.la
 
- at HAVE_COREAUDIO_TRUE@am__append_79 = \
+ at HAVE_COREAUDIO_TRUE@am__append_89 = \
 @HAVE_COREAUDIO_TRUE@		module-coreaudio-detect.la \
 @HAVE_COREAUDIO_TRUE@		module-coreaudio-device.la
 
 pulselibexec_PROGRAMS = $(am__EXEEXT_14)
- at HAVE_ALSA_TRUE@am__append_80 = \
+ at HAVE_ALSA_TRUE@am__append_90 = \
 @HAVE_ALSA_TRUE@		libalsa-util.la \
 @HAVE_ALSA_TRUE@		module-alsa-sink.la \
 @HAVE_ALSA_TRUE@		module-alsa-source.la \
 @HAVE_ALSA_TRUE@		module-alsa-card.la
 
- at HAVE_SOLARIS_TRUE@am__append_81 = \
+ at HAVE_SOLARIS_TRUE@am__append_91 = \
 @HAVE_SOLARIS_TRUE@		module-solaris.la
 
- at HAVE_AVAHI_TRUE@am__append_82 = \
+ at HAVE_AVAHI_TRUE@am__append_92 = \
 @HAVE_AVAHI_TRUE@		module-zeroconf-publish.la \
 @HAVE_AVAHI_TRUE@		module-zeroconf-discover.la
 
- at HAVE_BONJOUR_TRUE@am__append_83 = \
+ at HAVE_BONJOUR_TRUE@am__append_93 = \
 @HAVE_BONJOUR_TRUE@		module-bonjour-publish.la
 
- at HAVE_LIRC_TRUE@am__append_84 = \
+ at HAVE_LIRC_TRUE@am__append_94 = \
 @HAVE_LIRC_TRUE@		module-lirc.la
 
- at HAVE_XEN_TRUE@am__append_85 = \
+ at HAVE_XEN_TRUE@am__append_95 = \
 @HAVE_XEN_TRUE@		module-xenpv-sink.la
 
- at HAVE_EVDEV_TRUE@am__append_86 = \
+ at HAVE_EVDEV_TRUE@am__append_96 = \
 @HAVE_EVDEV_TRUE@		module-mmkbd-evdev.la
 
- at HAVE_JACK_TRUE@am__append_87 = \
+ at HAVE_JACK_TRUE@am__append_97 = \
 @HAVE_JACK_TRUE@		module-jack-sink.la \
 @HAVE_JACK_TRUE@		module-jack-source.la
 
- at HAVE_DBUS_TRUE@@HAVE_JACK_TRUE at am__append_88 = \
+ at HAVE_DBUS_TRUE@@HAVE_JACK_TRUE at am__append_98 = \
 @HAVE_DBUS_TRUE@@HAVE_JACK_TRUE@		module-jackdbus-detect.la
 
- at HAVE_GCONF_TRUE@am__append_89 = \
+ at HAVE_GCONF_TRUE@am__append_99 = \
 @HAVE_GCONF_TRUE@		module-gconf.la
 
- at HAVE_GCONF_TRUE@am__append_90 = \
+ at HAVE_GCONF_TRUE@am__append_100 = \
 @HAVE_GCONF_TRUE@		gconf-helper
 
- at HAVE_WAVEOUT_TRUE@am__append_91 = \
+ at HAVE_WAVEOUT_TRUE@am__append_101 = \
 @HAVE_WAVEOUT_TRUE@		module-waveout.la
 
- at HAVE_HAL_COMPAT_TRUE@am__append_92 = \
+ at HAVE_HAL_COMPAT_TRUE@am__append_102 = \
 @HAVE_HAL_COMPAT_TRUE@		module-hal-detect.la
 
- at HAVE_UDEV_TRUE@am__append_93 = \
+ at HAVE_UDEV_TRUE@am__append_103 = \
 @HAVE_UDEV_TRUE@		module-udev-detect.la
 
- at HAVE_SYSTEMD_TRUE@am__append_94 = \
- at HAVE_SYSTEMD_TRUE@		module-systemd-login.la
+ at HAVE_SYSTEMD_LOGIN_TRUE@am__append_104 = \
+ at HAVE_SYSTEMD_LOGIN_TRUE@		module-systemd-login.la
 
- at HAVE_DBUS_TRUE@am__append_95 = \
+ at HAVE_DBUS_TRUE@am__append_105 = \
 @HAVE_DBUS_TRUE@		module-rygel-media-server.la \
 @HAVE_DBUS_TRUE@		module-dbus-protocol.la
 
- at HAVE_BLUEZ_TRUE@am__append_96 = \
+ at HAVE_BLUEZ_TRUE@am__append_106 = \
 @HAVE_BLUEZ_TRUE@		module-bluetooth-discover.la \
 @HAVE_BLUEZ_TRUE@		module-bluetooth-policy.la
 
- at HAVE_BLUEZ_4_TRUE@am__append_97 = \
+ at HAVE_BLUEZ_4_TRUE@am__append_107 = \
 @HAVE_BLUEZ_4_TRUE@		libbluez4-util.la \
 @HAVE_BLUEZ_4_TRUE@		module-bluez4-discover.la \
 @HAVE_BLUEZ_4_TRUE@		module-bluez4-device.la
 
- at HAVE_BLUEZ_5_TRUE@am__append_98 = \
+ at HAVE_BLUEZ_5_TRUE@am__append_108 = \
 @HAVE_BLUEZ_5_TRUE@		libbluez5-util.la \
 @HAVE_BLUEZ_5_TRUE@		module-bluez5-discover.la \
 @HAVE_BLUEZ_5_TRUE@		module-bluez5-device.la
 
- at HAVE_OPENSSL_TRUE@am__append_99 = \
- at HAVE_OPENSSL_TRUE@		libraop.la \
- at HAVE_OPENSSL_TRUE@		module-raop-sink.la
 
- at HAVE_AVAHI_TRUE@@HAVE_OPENSSL_TRUE at am__append_100 = \
- at HAVE_AVAHI_TRUE@@HAVE_OPENSSL_TRUE@		module-raop-discover.la
+# RAOP depends on RTP, and we don't support RTP on Windows, see comment at
+# librtp.la above.
+ at HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE at am__append_109 = \
+ at HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE@		libraop.la \
+ at HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE@		module-raop-sink.la
 
- at HAVE_DBUS_TRUE@@HAVE_FFTW_TRUE at am__append_101 = \
+ at HAVE_AVAHI_TRUE@@HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE at am__append_110 = \
+ at HAVE_AVAHI_TRUE@@HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE@		module-raop-discover.la
+
+ at HAVE_DBUS_TRUE@@HAVE_FFTW_TRUE at am__append_111 = \
 @HAVE_DBUS_TRUE@@HAVE_FFTW_TRUE@		module-equalizer-sink.la
 
- at HAVE_DBUS_TRUE@@HAVE_FFTW_TRUE at am__append_102 = utils/qpaeq
- at HAVE_ESOUND_TRUE@am__append_103 = \
+ at HAVE_DBUS_TRUE@@HAVE_FFTW_TRUE at am__append_112 = utils/qpaeq
+ at HAVE_ESOUND_TRUE@am__append_113 = \
 @HAVE_ESOUND_TRUE@		module-esound-protocol-tcp-symdef.h \
 @HAVE_ESOUND_TRUE@		module-esound-protocol-unix-symdef.h \
 @HAVE_ESOUND_TRUE@		module-esound-compat-spawnfd-symdef.h \
 @HAVE_ESOUND_TRUE@		module-esound-compat-spawnpid-symdef.h \
 @HAVE_ESOUND_TRUE@		module-esound-sink-symdef.h
 
- at HAVE_DBUS_TRUE@am__append_104 = $(DBUS_CFLAGS)
- at HAVE_DBUS_TRUE@am__append_105 = $(DBUS_LIBS)
- at HAVE_UDEV_TRUE@am__append_106 = modules/udev-util.h modules/udev-util.c
- at HAVE_UDEV_TRUE@am__append_107 = $(UDEV_LIBS)
- at HAVE_UDEV_TRUE@am__append_108 = $(UDEV_CFLAGS)
- at HAVE_DBUS_TRUE@am__append_109 = modules/reserve.h modules/reserve.c modules/reserve-monitor.h modules/reserve-monitor.c
- at HAVE_DBUS_TRUE@am__append_110 = $(DBUS_LIBS)
- at HAVE_DBUS_TRUE@am__append_111 = $(DBUS_CFLAGS)
- at HAVE_DBUS_TRUE@am__append_112 = $(DBUS_LIBS)
- at HAVE_DBUS_TRUE@am__append_113 = $(DBUS_CFLAGS)
- at HAVE_DBUS_TRUE@am__append_114 = $(DBUS_LIBS)
- at HAVE_DBUS_TRUE@am__append_115 = $(DBUS_CFLAGS)
- at HAVE_ADRIAN_EC_TRUE@am__append_116 = \
+ at HAVE_DBUS_TRUE@am__append_114 = $(DBUS_CFLAGS)
+ at HAVE_DBUS_TRUE@am__append_115 = $(DBUS_LIBS)
+ at HAVE_UDEV_TRUE@am__append_116 = modules/udev-util.h modules/udev-util.c
+ at HAVE_UDEV_TRUE@am__append_117 = $(UDEV_LIBS)
+ at HAVE_UDEV_TRUE@am__append_118 = $(UDEV_CFLAGS)
+ at HAVE_DBUS_TRUE@am__append_119 = modules/reserve.h modules/reserve.c modules/reserve-monitor.h modules/reserve-monitor.c
+ at HAVE_DBUS_TRUE@am__append_120 = $(DBUS_LIBS)
+ at HAVE_DBUS_TRUE@am__append_121 = $(DBUS_CFLAGS)
+ at HAVE_DBUS_TRUE@am__append_122 = $(DBUS_LIBS)
+ at HAVE_DBUS_TRUE@am__append_123 = $(DBUS_CFLAGS)
+ at HAVE_DBUS_TRUE@am__append_124 = $(DBUS_LIBS)
+ at HAVE_DBUS_TRUE@am__append_125 = $(DBUS_CFLAGS)
+ at HAVE_ADRIAN_EC_TRUE@am__append_126 = \
 @HAVE_ADRIAN_EC_TRUE@		modules/echo-cancel/adrian-aec.c modules/echo-cancel/adrian-aec.h \
 @HAVE_ADRIAN_EC_TRUE@		modules/echo-cancel/adrian.c modules/echo-cancel/adrian.h
 
- at HAVE_ADRIAN_EC_TRUE@am__append_117 = -DHAVE_ADRIAN_EC=1
- at HAVE_ADRIAN_EC_TRUE@am__append_118 = modules/echo-cancel/adrian-aec
- at HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at am__append_119 = $(ORC_LIBS)
- at HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at am__append_120 = $(ORC_CFLAGS) -I$(top_builddir)/src/modules/echo-cancel
- at HAVE_SPEEX_TRUE@am__append_121 = modules/echo-cancel/speex.c
- at HAVE_WEBRTC_TRUE@am__append_122 = -DHAVE_WEBRTC=1
- at HAVE_WEBRTC_TRUE@am__append_123 = libwebrtc-util.la
+ at HAVE_ADRIAN_EC_TRUE@am__append_127 = -DHAVE_ADRIAN_EC=1
+ at HAVE_ADRIAN_EC_TRUE@am__append_128 = modules/echo-cancel/adrian-aec
+ at HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at am__append_129 = $(ORC_LIBS)
+ at HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at am__append_130 = $(ORC_CFLAGS) -I$(top_builddir)/src/modules/echo-cancel
+ at HAVE_SPEEX_TRUE@am__append_131 = modules/echo-cancel/speex.c
+ at HAVE_WEBRTC_TRUE@am__append_132 = -DHAVE_WEBRTC=1
+ at HAVE_WEBRTC_TRUE@am__append_133 = libwebrtc-util.la
+ at HAVE_BLUEZ_5_OFONO_HEADSET_TRUE@am__append_134 = \
+ at HAVE_BLUEZ_5_OFONO_HEADSET_TRUE@		modules/bluetooth/backend-ofono.c
+
+ at HAVE_BLUEZ_5_NATIVE_HEADSET_TRUE@am__append_135 = \
+ at HAVE_BLUEZ_5_NATIVE_HEADSET_TRUE@		modules/bluetooth/backend-native.c
+
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/acx_libwrap.m4 \
@@ -453,9 +473,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = esdcompat start-pulseaudio-x11 \
-	start-pulseaudio-kde client.conf daemon.conf default.pa \
-	system.pa
+CONFIG_CLEAN_FILES = esdcompat start-pulseaudio-x11 client.conf \
+	daemon.conf default.pa system.pa pulseaudio.service
 CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
@@ -490,6 +509,7 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(modlibexecdir)" \
 	"$(DESTDIR)$(bindir)" "$(DESTDIR)$(dbuspolicydir)" \
 	"$(DESTDIR)$(alsapathsdir)" "$(DESTDIR)$(alsaprofilesetsdir)" \
 	"$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(pulseconfdir)" \
+	"$(DESTDIR)$(systemduserunitdir)" \
 	"$(DESTDIR)$(xdgautostartdir)" "$(DESTDIR)$(pulseincludedir)"
 LTLIBRARIES = $(lib_LTLIBRARIES) $(modlibexec_LTLIBRARIES) \
 	$(noinst_LTLIBRARIES) $(padsplib_LTLIBRARIES) \
@@ -559,8 +579,16 @@ libbluez4_util_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 @HAVE_BLUEZ_4_TRUE@	$(modlibexecdir)
 libbluez5_util_la_DEPENDENCIES = $(am__DEPENDENCIES_3) \
 	$(am__DEPENDENCIES_1)
+am__libbluez5_util_la_SOURCES_DIST = modules/bluetooth/bluez5-util.c \
+	modules/bluetooth/bluez5-util.h \
+	modules/bluetooth/a2dp-codecs.h \
+	modules/bluetooth/backend-ofono.c \
+	modules/bluetooth/backend-native.c
+ at HAVE_BLUEZ_5_OFONO_HEADSET_TRUE@am__objects_3 = modules/bluetooth/libbluez5_util_la-backend-ofono.lo
+ at HAVE_BLUEZ_5_NATIVE_HEADSET_TRUE@am__objects_4 = modules/bluetooth/libbluez5_util_la-backend-native.lo
 am_libbluez5_util_la_OBJECTS =  \
-	modules/bluetooth/libbluez5_util_la-bluez5-util.lo
+	modules/bluetooth/libbluez5_util_la-bluez5-util.lo \
+	$(am__objects_3) $(am__objects_4)
 libbluez5_util_la_OBJECTS = $(am_libbluez5_util_la_OBJECTS)
 libbluez5_util_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -672,7 +700,8 @@ libpulse_la_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	libpulsecommon- at PA_MAJORMINOR@.la $(am__DEPENDENCIES_5)
 am_libpulse_la_OBJECTS = pulse/libpulse_la-channelmap.lo \
-	pulse/libpulse_la-context.lo pulse/libpulse_la-error.lo \
+	pulse/libpulse_la-context.lo pulse/libpulse_la-direction.lo \
+	pulse/libpulse_la-error.lo \
 	pulse/libpulse_la-ext-device-manager.lo \
 	pulse/libpulse_la-ext-device-restore.lo \
 	pulse/libpulse_la-ext-stream-restore.lo \
@@ -712,37 +741,38 @@ am__libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES_DIST =  \
 	pulsecore/core-rtclock.c pulsecore/core-rtclock.h \
 	pulsecore/core-util.c pulsecore/core-util.h pulsecore/creds.h \
 	pulsecore/dynarray.c pulsecore/dynarray.h \
-	pulsecore/endianmacros.h pulsecore/flist.c pulsecore/flist.h \
-	pulsecore/g711.c pulsecore/g711.h pulsecore/hashmap.c \
-	pulsecore/hashmap.h pulsecore/i18n.c pulsecore/i18n.h \
-	pulsecore/idxset.c pulsecore/idxset.h pulsecore/arpa-inet.c \
-	pulsecore/arpa-inet.h pulsecore/iochannel.c \
-	pulsecore/iochannel.h pulsecore/ioline.c pulsecore/ioline.h \
-	pulsecore/ipacl.c pulsecore/ipacl.h pulsecore/llist.h \
-	pulsecore/lock-autospawn.c pulsecore/lock-autospawn.h \
-	pulsecore/log.c pulsecore/log.h pulsecore/ratelimit.c \
-	pulsecore/ratelimit.h pulsecore/macro.h pulsecore/mcalign.c \
-	pulsecore/mcalign.h pulsecore/memblock.c pulsecore/memblock.h \
-	pulsecore/memblockq.c pulsecore/memblockq.h \
-	pulsecore/memchunk.c pulsecore/memchunk.h \
-	pulsecore/native-common.h pulsecore/once.c pulsecore/once.h \
-	pulsecore/packet.c pulsecore/packet.h pulsecore/parseaddr.c \
-	pulsecore/parseaddr.h pulsecore/pdispatch.c \
-	pulsecore/pdispatch.h pulsecore/pid.c pulsecore/pid.h \
-	pulsecore/pipe.c pulsecore/pipe.h pulsecore/memtrap.c \
-	pulsecore/memtrap.h pulsecore/aupdate.c pulsecore/aupdate.h \
-	pulsecore/proplist-util.c pulsecore/proplist-util.h \
-	pulsecore/pstream-util.c pulsecore/pstream-util.h \
-	pulsecore/pstream.c pulsecore/pstream.h pulsecore/queue.c \
-	pulsecore/queue.h pulsecore/random.c pulsecore/random.h \
-	pulsecore/refcnt.h pulsecore/sample-util.c \
-	pulsecore/sample-util.h pulsecore/shm.c pulsecore/shm.h \
-	pulsecore/bitset.c pulsecore/bitset.h \
-	pulsecore/socket-client.c pulsecore/socket-client.h \
-	pulsecore/socket-server.c pulsecore/socket-server.h \
-	pulsecore/socket-util.c pulsecore/socket-util.h \
-	pulsecore/strbuf.c pulsecore/strbuf.h pulsecore/strlist.c \
-	pulsecore/strlist.h pulsecore/svolume_c.c \
+	pulsecore/endianmacros.h pulsecore/fdsem.c pulsecore/fdsem.h \
+	pulsecore/flist.c pulsecore/flist.h pulsecore/g711.c \
+	pulsecore/g711.h pulsecore/hashmap.c pulsecore/hashmap.h \
+	pulsecore/i18n.c pulsecore/i18n.h pulsecore/idxset.c \
+	pulsecore/idxset.h pulsecore/arpa-inet.c pulsecore/arpa-inet.h \
+	pulsecore/iochannel.c pulsecore/iochannel.h pulsecore/ioline.c \
+	pulsecore/ioline.h pulsecore/ipacl.c pulsecore/ipacl.h \
+	pulsecore/llist.h pulsecore/lock-autospawn.c \
+	pulsecore/lock-autospawn.h pulsecore/log.c pulsecore/log.h \
+	pulsecore/ratelimit.c pulsecore/ratelimit.h pulsecore/macro.h \
+	pulsecore/mcalign.c pulsecore/mcalign.h pulsecore/memblock.c \
+	pulsecore/memblock.h pulsecore/memblockq.c \
+	pulsecore/memblockq.h pulsecore/memchunk.c \
+	pulsecore/memchunk.h pulsecore/native-common.h \
+	pulsecore/once.c pulsecore/once.h pulsecore/packet.c \
+	pulsecore/packet.h pulsecore/parseaddr.c pulsecore/parseaddr.h \
+	pulsecore/pdispatch.c pulsecore/pdispatch.h pulsecore/pid.c \
+	pulsecore/pid.h pulsecore/pipe.c pulsecore/pipe.h \
+	pulsecore/memtrap.c pulsecore/memtrap.h pulsecore/aupdate.c \
+	pulsecore/aupdate.h pulsecore/proplist-util.c \
+	pulsecore/proplist-util.h pulsecore/pstream-util.c \
+	pulsecore/pstream-util.h pulsecore/pstream.c \
+	pulsecore/pstream.h pulsecore/queue.c pulsecore/queue.h \
+	pulsecore/random.c pulsecore/random.h pulsecore/refcnt.h \
+	pulsecore/srbchannel.c pulsecore/srbchannel.h \
+	pulsecore/sample-util.c pulsecore/sample-util.h \
+	pulsecore/shm.c pulsecore/shm.h pulsecore/bitset.c \
+	pulsecore/bitset.h pulsecore/socket-client.c \
+	pulsecore/socket-client.h pulsecore/socket-server.c \
+	pulsecore/socket-server.h pulsecore/socket-util.c \
+	pulsecore/socket-util.h pulsecore/strbuf.c pulsecore/strbuf.h \
+	pulsecore/strlist.c pulsecore/strlist.h pulsecore/svolume_c.c \
 	pulsecore/svolume_arm.c pulsecore/svolume_mmx.c \
 	pulsecore/svolume_sse.c pulsecore/tagstruct.c \
 	pulsecore/tagstruct.h pulsecore/time-smoother.c \
@@ -760,21 +790,21 @@ am__libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES_DIST =  \
 	pulsecore/semaphore-osx.c pulsecore/semaphore-posix.c \
 	pulsecore/dllmain.c pulsecore/dbus-util.c \
 	pulsecore/dbus-util.h pulsecore/rtkit.c pulsecore/rtkit.h
- at OS_IS_WIN32_TRUE@am__objects_3 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-poll-win32.lo
- at OS_IS_WIN32_FALSE@am__objects_4 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-poll-posix.lo
- at HAVE_X11_TRUE@am__objects_5 = pulse/libpulsecommon_ at PA_MAJORMINOR@_la-client-conf-x11.lo \
+ at OS_IS_WIN32_TRUE@am__objects_5 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-poll-win32.lo
+ at OS_IS_WIN32_FALSE@am__objects_6 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-poll-posix.lo
+ at HAVE_X11_TRUE@am__objects_7 = pulse/libpulsecommon_ at PA_MAJORMINOR@_la-client-conf-x11.lo \
 @HAVE_X11_TRUE@	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-x11prop.lo
- at OS_IS_WIN32_TRUE@am__objects_6 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-mutex-win32.lo \
+ at OS_IS_WIN32_TRUE@am__objects_8 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-mutex-win32.lo \
 @OS_IS_WIN32_TRUE@	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-thread-win32.lo \
 @OS_IS_WIN32_TRUE@	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-semaphore-win32.lo
- at OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE at am__objects_7 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-mutex-posix.lo \
+ at OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE at am__objects_9 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-mutex-posix.lo \
 @OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE@	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-thread-posix.lo \
 @OS_IS_DARWIN_TRUE@@OS_IS_WIN32_FALSE@	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-semaphore-osx.lo
- at OS_IS_DARWIN_FALSE@@OS_IS_WIN32_FALSE at am__objects_8 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-mutex-posix.lo \
+ at OS_IS_DARWIN_FALSE@@OS_IS_WIN32_FALSE at am__objects_10 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-mutex-posix.lo \
 @OS_IS_DARWIN_FALSE@@OS_IS_WIN32_FALSE@	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-thread-posix.lo \
 @OS_IS_DARWIN_FALSE@@OS_IS_WIN32_FALSE@	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-semaphore-posix.lo
- at OS_IS_WIN32_TRUE@am__objects_9 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-dllmain.lo
- at HAVE_DBUS_TRUE@am__objects_10 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-dbus-util.lo \
+ at OS_IS_WIN32_TRUE@am__objects_11 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-dllmain.lo
+ at HAVE_DBUS_TRUE@am__objects_12 = pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-dbus-util.lo \
 @HAVE_DBUS_TRUE@	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-rtkit.lo
 am_libpulsecommon_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	pulse/libpulsecommon_ at PA_MAJORMINOR@_la-client-conf.lo \
@@ -796,6 +826,7 @@ am_libpulsecommon_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-core-rtclock.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-core-util.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-dynarray.lo \
+	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-flist.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-g711.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-hashmap.lo \
@@ -825,6 +856,7 @@ am_libpulsecommon_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-pstream.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-queue.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-random.lo \
+	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-sample-util.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-shm.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-bitset.lo \
@@ -842,9 +874,9 @@ am_libpulsecommon_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-tokenizer.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-usergroup.lo \
 	pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-sndfile-util.lo \
-	$(am__objects_3) $(am__objects_4) $(am__objects_5) \
-	$(am__objects_6) $(am__objects_7) $(am__objects_8) \
-	$(am__objects_9) $(am__objects_10)
+	$(am__objects_5) $(am__objects_6) $(am__objects_7) \
+	$(am__objects_8) $(am__objects_9) $(am__objects_10) \
+	$(am__objects_11) $(am__objects_12)
 libpulsecommon_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	$(am_libpulsecommon_ at PA_MAJORMINOR@_la_OBJECTS)
 libpulsecommon_ at PA_MAJORMINOR@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
@@ -854,14 +886,16 @@ libpulsecommon_ at PA_MAJORMINOR@_la_LINK = $(LIBTOOL) $(AM_V_lt) \
 @HAVE_ORC_TRUE at am__DEPENDENCIES_7 = $(am__DEPENDENCIES_1)
 @HAVE_GDBM_TRUE at am__DEPENDENCIES_8 = $(am__DEPENDENCIES_1)
 @HAVE_TDB_TRUE at am__DEPENDENCIES_9 = $(am__DEPENDENCIES_1)
+ at HAVE_SPEEX_TRUE@am__DEPENDENCIES_10 = $(am__DEPENDENCIES_1)
+ at HAVE_LIBSAMPLERATE_TRUE@am__DEPENDENCIES_11 = $(am__DEPENDENCIES_1)
 libpulsecore_ at PA_MAJORMINOR@_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	libpulsecommon- at PA_MAJORMINOR@.la libpulse.la \
-	libpulsecore-foreign.la $(am__append_46) $(am__DEPENDENCIES_7) \
+	libpulsecore-foreign.la $(am__append_50) $(am__DEPENDENCIES_7) \
 	$(am__DEPENDENCIES_5) $(am__DEPENDENCIES_8) \
-	$(am__DEPENDENCIES_9)
+	$(am__DEPENDENCIES_9) $(am__DEPENDENCIES_10) \
+	$(am__DEPENDENCIES_11)
 am__libpulsecore_ at PA_MAJORMINOR@_la_SOURCES_DIST =  \
 	pulsecore/asyncmsgq.c pulsecore/asyncmsgq.h pulsecore/asyncq.c \
 	pulsecore/asyncq.h pulsecore/auth-cookie.c \
@@ -871,22 +905,24 @@ am__libpulsecore_ at PA_MAJORMINOR@_la_SOURCES_DIST =  \
 	pulsecore/card.c pulsecore/card.h pulsecore/core-scache.c \
 	pulsecore/core-scache.h pulsecore/core-subscribe.c \
 	pulsecore/core-subscribe.h pulsecore/core.c pulsecore/core.h \
-	pulsecore/fdsem.c pulsecore/fdsem.h pulsecore/hook-list.c \
-	pulsecore/hook-list.h pulsecore/ltdl-helper.c \
-	pulsecore/ltdl-helper.h pulsecore/modargs.c \
-	pulsecore/modargs.h pulsecore/modinfo.c pulsecore/modinfo.h \
-	pulsecore/module.c pulsecore/module.h pulsecore/msgobject.c \
-	pulsecore/msgobject.h pulsecore/namereg.c pulsecore/namereg.h \
-	pulsecore/object.c pulsecore/object.h \
-	pulsecore/play-memblockq.c pulsecore/play-memblockq.h \
-	pulsecore/play-memchunk.c pulsecore/play-memchunk.h \
-	pulsecore/remap.c pulsecore/remap.h pulsecore/remap_mmx.c \
-	pulsecore/remap_sse.c pulsecore/resampler.c \
-	pulsecore/resampler.h pulsecore/rtpoll.c pulsecore/rtpoll.h \
-	pulsecore/stream-util.c pulsecore/stream-util.h \
-	pulsecore/mix.c pulsecore/mix.h pulsecore/cpu.h \
-	pulsecore/cpu-arm.c pulsecore/cpu-arm.h pulsecore/cpu-x86.c \
-	pulsecore/cpu-x86.h pulsecore/cpu-orc.c pulsecore/cpu-orc.h \
+	pulsecore/hook-list.c pulsecore/hook-list.h \
+	pulsecore/ltdl-helper.c pulsecore/ltdl-helper.h \
+	pulsecore/modargs.c pulsecore/modargs.h pulsecore/modinfo.c \
+	pulsecore/modinfo.h pulsecore/module.c pulsecore/module.h \
+	pulsecore/msgobject.c pulsecore/msgobject.h \
+	pulsecore/namereg.c pulsecore/namereg.h pulsecore/object.c \
+	pulsecore/object.h pulsecore/play-memblockq.c \
+	pulsecore/play-memblockq.h pulsecore/play-memchunk.c \
+	pulsecore/play-memchunk.h pulsecore/remap.c pulsecore/remap.h \
+	pulsecore/remap_mmx.c pulsecore/remap_sse.c \
+	pulsecore/resampler.c pulsecore/resampler.h \
+	pulsecore/resampler/ffmpeg.c pulsecore/resampler/peaks.c \
+	pulsecore/resampler/trivial.c pulsecore/rtpoll.c \
+	pulsecore/rtpoll.h pulsecore/stream-util.c \
+	pulsecore/stream-util.h pulsecore/mix.c pulsecore/mix.h \
+	pulsecore/cpu.c pulsecore/cpu.h pulsecore/cpu-arm.c \
+	pulsecore/cpu-arm.h pulsecore/cpu-x86.c pulsecore/cpu-x86.h \
+	pulsecore/cpu-orc.c pulsecore/cpu-orc.h \
 	pulsecore/sconv-s16be.c pulsecore/sconv-s16be.h \
 	pulsecore/sconv-s16le.c pulsecore/sconv-s16le.h \
 	pulsecore/sconv_sse.c pulsecore/sconv.c pulsecore/sconv.h \
@@ -904,14 +940,18 @@ am__libpulsecore_ at PA_MAJORMINOR@_la_SOURCES_DIST =  \
 	pulsecore/x11wrap.h pulsecore/dbus-shared.c \
 	pulsecore/dbus-shared.h pulsecore/protocol-dbus.c \
 	pulsecore/protocol-dbus.h pulsecore/database-gdbm.c \
-	pulsecore/database-tdb.c pulsecore/database-simple.c
- at HAVE_ORC_TRUE@am__objects_11 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-svolume_orc.lo
- at HAVE_X11_TRUE@am__objects_12 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-x11wrap.lo
- at HAVE_DBUS_TRUE@am__objects_13 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-dbus-shared.lo \
+	pulsecore/database-tdb.c pulsecore/database-simple.c \
+	pulsecore/resampler/speex.c \
+	pulsecore/resampler/libsamplerate.c
+ at HAVE_ORC_TRUE@am__objects_13 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-svolume_orc.lo
+ at HAVE_X11_TRUE@am__objects_14 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-x11wrap.lo
+ at HAVE_DBUS_TRUE@am__objects_15 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-dbus-shared.lo \
 @HAVE_DBUS_TRUE@	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-protocol-dbus.lo
- at HAVE_GDBM_TRUE@am__objects_14 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-gdbm.lo
- at HAVE_TDB_TRUE@am__objects_15 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-tdb.lo
- at HAVE_SIMPLEDB_TRUE@am__objects_16 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-simple.lo
+ at HAVE_GDBM_TRUE@am__objects_16 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-gdbm.lo
+ at HAVE_TDB_TRUE@am__objects_17 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-tdb.lo
+ at HAVE_SIMPLEDB_TRUE@am__objects_18 = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-simple.lo
+ at HAVE_SPEEX_TRUE@am__objects_19 = pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-speex.lo
+ at HAVE_LIBSAMPLERATE_TRUE@am__objects_20 = pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.lo
 am_libpulsecore_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-asyncmsgq.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-asyncq.lo \
@@ -923,7 +963,6 @@ am_libpulsecore_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-core-scache.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-core-subscribe.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-core.lo \
-	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-hook-list.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-ltdl-helper.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-modargs.lo \
@@ -938,9 +977,13 @@ am_libpulsecore_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-remap_mmx.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-remap_sse.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-resampler.lo \
+	pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.lo \
+	pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-peaks.lo \
+	pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-trivial.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-rtpoll.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-stream-util.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-mix.lo \
+	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu-arm.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu-x86.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu-orc.lo \
@@ -959,8 +1002,9 @@ am_libpulsecore_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-source.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-start-child.lo \
 	pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-thread-mq.lo \
-	$(am__objects_11) $(am__objects_12) $(am__objects_13) \
-	$(am__objects_14) $(am__objects_15) $(am__objects_16)
+	$(am__objects_13) $(am__objects_14) $(am__objects_15) \
+	$(am__objects_16) $(am__objects_17) $(am__objects_18) \
+	$(am__objects_19) $(am__objects_20)
 @HAVE_ORC_TRUE at nodist_libpulsecore_@PA_MAJORMINOR at _la_OBJECTS = pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-svolume-orc-gen.lo
 libpulsecore_ at PA_MAJORMINOR@_la_OBJECTS =  \
 	$(am_libpulsecore_ at PA_MAJORMINOR@_la_OBJECTS) \
@@ -988,6 +1032,16 @@ libpulsecore_mix_neon_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(libpulsecore_mix_neon_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
 	$(LDFLAGS) -o $@
 @HAVE_NEON_TRUE at am_libpulsecore_mix_neon_la_rpath =
+libpulsecore_remap_neon_la_LIBADD =
+am__libpulsecore_remap_neon_la_SOURCES_DIST = pulsecore/remap_neon.c
+ at HAVE_NEON_TRUE@am_libpulsecore_remap_neon_la_OBJECTS = pulsecore/libpulsecore_remap_neon_la-remap_neon.lo
+libpulsecore_remap_neon_la_OBJECTS =  \
+	$(am_libpulsecore_remap_neon_la_OBJECTS)
+libpulsecore_remap_neon_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(libpulsecore_remap_neon_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+ at HAVE_NEON_TRUE@am_libpulsecore_remap_neon_la_rpath =
 libpulsecore_sconv_neon_la_LIBADD =
 am__libpulsecore_sconv_neon_la_SOURCES_DIST = pulsecore/sconv_neon.c
 @HAVE_NEON_TRUE at am_libpulsecore_sconv_neon_la_OBJECTS = pulsecore/libpulsecore_sconv_neon_la-sconv_neon.lo
@@ -1016,7 +1070,8 @@ libraop_la_OBJECTS = $(am_libraop_la_OBJECTS)
 libraop_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(libraop_la_CFLAGS) \
 	$(CFLAGS) $(libraop_la_LDFLAGS) $(LDFLAGS) -o $@
- at HAVE_OPENSSL_TRUE@am_libraop_la_rpath = -rpath $(modlibexecdir)
+ at HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE at am_libraop_la_rpath = -rpath \
+ at HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE@	$(modlibexecdir)
 librtp_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
 	libpulsecore- at PA_MAJORMINOR@.la \
 	libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
@@ -1302,22 +1357,22 @@ module_device_restore_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(module_device_restore_la_CFLAGS) $(CFLAGS) \
 	$(module_device_restore_la_LDFLAGS) $(LDFLAGS) -o $@
- at HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at am__DEPENDENCIES_10 =  \
+ at HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at am__DEPENDENCIES_12 =  \
 @HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE@	$(am__DEPENDENCIES_1)
 module_echo_cancel_la_DEPENDENCIES = $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_10) $(am__append_123)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_12) $(am__append_133)
 am__module_echo_cancel_la_SOURCES_DIST =  \
 	modules/echo-cancel/module-echo-cancel.c \
 	modules/echo-cancel/null.c modules/echo-cancel/echo-cancel.h \
 	modules/echo-cancel/adrian-aec.c \
 	modules/echo-cancel/adrian-aec.h modules/echo-cancel/adrian.c \
 	modules/echo-cancel/adrian.h modules/echo-cancel/speex.c
- at HAVE_ADRIAN_EC_TRUE@am__objects_17 = modules/echo-cancel/module_echo_cancel_la-adrian-aec.lo \
+ at HAVE_ADRIAN_EC_TRUE@am__objects_21 = modules/echo-cancel/module_echo_cancel_la-adrian-aec.lo \
 @HAVE_ADRIAN_EC_TRUE@	modules/echo-cancel/module_echo_cancel_la-adrian.lo
- at HAVE_SPEEX_TRUE@am__objects_18 = modules/echo-cancel/module_echo_cancel_la-speex.lo
+ at HAVE_SPEEX_TRUE@am__objects_22 = modules/echo-cancel/module_echo_cancel_la-speex.lo
 am_module_echo_cancel_la_OBJECTS = modules/echo-cancel/module_echo_cancel_la-module-echo-cancel.lo \
 	modules/echo-cancel/module_echo_cancel_la-null.lo \
-	$(am__objects_17) $(am__objects_18)
+	$(am__objects_21) $(am__objects_22)
 @HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at nodist_module_echo_cancel_la_OBJECTS = modules/echo-cancel/module_echo_cancel_la-adrian-aec-orc-gen.lo
 module_echo_cancel_la_OBJECTS = $(am_module_echo_cancel_la_OBJECTS) \
 	$(nodist_module_echo_cancel_la_OBJECTS)
@@ -1631,8 +1686,9 @@ module_raop_discover_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(module_raop_discover_la_CFLAGS) $(CFLAGS) \
 	$(module_raop_discover_la_LDFLAGS) $(LDFLAGS) -o $@
- at HAVE_AVAHI_TRUE@@HAVE_OPENSSL_TRUE at am_module_raop_discover_la_rpath =  \
- at HAVE_AVAHI_TRUE@@HAVE_OPENSSL_TRUE@	-rpath $(modlibexecdir)
+ at HAVE_AVAHI_TRUE@@HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE at am_module_raop_discover_la_rpath =  \
+ at HAVE_AVAHI_TRUE@@HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE@	-rpath \
+ at HAVE_AVAHI_TRUE@@HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE@	$(modlibexecdir)
 module_raop_sink_la_DEPENDENCIES = $(am__DEPENDENCIES_3) librtp.la \
 	libraop.la
 am_module_raop_sink_la_OBJECTS =  \
@@ -1642,8 +1698,8 @@ module_raop_sink_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(module_raop_sink_la_CFLAGS) $(CFLAGS) \
 	$(module_raop_sink_la_LDFLAGS) $(LDFLAGS) -o $@
- at HAVE_OPENSSL_TRUE@am_module_raop_sink_la_rpath = -rpath \
- at HAVE_OPENSSL_TRUE@	$(modlibexecdir)
+ at HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE at am_module_raop_sink_la_rpath =  \
+ at HAVE_OPENSSL_TRUE@@OS_IS_WIN32_FALSE@	-rpath $(modlibexecdir)
 module_remap_sink_la_DEPENDENCIES = $(am__DEPENDENCIES_3)
 am_module_remap_sink_la_OBJECTS = modules/module-remap-sink.lo
 module_remap_sink_la_OBJECTS = $(am_module_remap_sink_la_OBJECTS)
@@ -1797,7 +1853,7 @@ module_switch_on_port_available_la_LINK = $(LIBTOOL) $(AM_V_lt) \
 	$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(module_switch_on_port_available_la_LDFLAGS) $(LDFLAGS) -o $@
 module_systemd_login_la_DEPENDENCIES = $(am__DEPENDENCIES_3) \
-	$(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 am_module_systemd_login_la_OBJECTS =  \
 	modules/module_systemd_login_la-module-systemd-login.lo
 module_systemd_login_la_OBJECTS =  \
@@ -1806,8 +1862,8 @@ module_systemd_login_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(module_systemd_login_la_CFLAGS) $(CFLAGS) \
 	$(module_systemd_login_la_LDFLAGS) $(LDFLAGS) -o $@
- at HAVE_SYSTEMD_TRUE@am_module_systemd_login_la_rpath = -rpath \
- at HAVE_SYSTEMD_TRUE@	$(modlibexecdir)
+ at HAVE_SYSTEMD_LOGIN_TRUE@am_module_systemd_login_la_rpath = -rpath \
+ at HAVE_SYSTEMD_LOGIN_TRUE@	$(modlibexecdir)
 module_tunnel_sink_new_la_DEPENDENCIES = $(am__DEPENDENCIES_3)
 am_module_tunnel_sink_new_la_OBJECTS =  \
 	modules/module-tunnel-sink-new.lo
@@ -1977,7 +2033,8 @@ module_zeroconf_publish_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 @OS_IS_WIN32_FALSE at am__EXEEXT_1 = pasuspender$(EXEEXT)
 @HAVE_AF_UNIX_TRUE at am__EXEEXT_2 = pacmd$(EXEEXT)
 @HAVE_X11_TRUE at am__EXEEXT_3 = pax11publish$(EXEEXT)
- at OS_IS_WIN32_FALSE@am__EXEEXT_4 = sigbus-test$(EXEEXT) \
+ at OS_IS_WIN32_FALSE@am__EXEEXT_4 = srbchannel-test$(EXEEXT) \
+ at OS_IS_WIN32_FALSE@	sigbus-test$(EXEEXT) \
 @OS_IS_WIN32_FALSE@	usergroup-test$(EXEEXT)
 @OS_IS_DARWIN_FALSE at am__EXEEXT_5 = once-test$(EXEEXT)
 @HAVE_GLIB20_TRUE at am__EXEEXT_6 = mainloop-test-glib$(EXEEXT)
@@ -1992,8 +2049,9 @@ am__EXEEXT_8 = mainloop-test$(EXEEXT) strlist-test$(EXEEXT) \
 	rtpoll-test$(EXEEXT) resampler-test$(EXEEXT) \
 	smoother-test$(EXEEXT) thread-test$(EXEEXT) \
 	volume-test$(EXEEXT) mix-test$(EXEEXT) proplist-test$(EXEEXT) \
-	cpu-test$(EXEEXT) lock-autospawn-test$(EXEEXT) \
-	mult-s16-test$(EXEEXT) mix-special-test$(EXEEXT) \
+	cpu-mix-test$(EXEEXT) cpu-remap-test$(EXEEXT) \
+	cpu-sconv-test$(EXEEXT) cpu-volume-test$(EXEEXT) \
+	lock-autospawn-test$(EXEEXT) mult-s16-test$(EXEEXT) \
 	$(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \
 	$(am__EXEEXT_7)
 @HAVE_SIGXCPU_TRUE at am__EXEEXT_9 = cpulimit-test$(EXEEXT) \
@@ -2071,14 +2129,44 @@ connect_stress_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(connect_stress_CFLAGS) $(CFLAGS) $(connect_stress_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_cpu_test_OBJECTS = tests/cpu_test-cpu-test.$(OBJEXT)
-cpu_test_OBJECTS = $(am_cpu_test_OBJECTS)
-cpu_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+am_cpu_mix_test_OBJECTS = tests/cpu_mix_test-cpu-mix-test.$(OBJEXT)
+cpu_mix_test_OBJECTS = $(am_cpu_mix_test_OBJECTS)
+cpu_mix_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
 	libpulsecore- at PA_MAJORMINOR@.la libpulse.la \
 	libpulsecommon- at PA_MAJORMINOR@.la
-cpu_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(cpu_test_CFLAGS) \
-	$(CFLAGS) $(cpu_test_LDFLAGS) $(LDFLAGS) -o $@
+cpu_mix_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(cpu_mix_test_CFLAGS) \
+	$(CFLAGS) $(cpu_mix_test_LDFLAGS) $(LDFLAGS) -o $@
+am_cpu_remap_test_OBJECTS =  \
+	tests/cpu_remap_test-cpu-remap-test.$(OBJEXT)
+cpu_remap_test_OBJECTS = $(am_cpu_remap_test_OBJECTS)
+cpu_remap_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+	libpulsecore- at PA_MAJORMINOR@.la libpulse.la \
+	libpulsecommon- at PA_MAJORMINOR@.la
+cpu_remap_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(cpu_remap_test_CFLAGS) $(CFLAGS) $(cpu_remap_test_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am_cpu_sconv_test_OBJECTS =  \
+	tests/cpu_sconv_test-cpu-sconv-test.$(OBJEXT)
+cpu_sconv_test_OBJECTS = $(am_cpu_sconv_test_OBJECTS)
+cpu_sconv_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+	libpulsecore- at PA_MAJORMINOR@.la libpulse.la \
+	libpulsecommon- at PA_MAJORMINOR@.la
+cpu_sconv_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(cpu_sconv_test_CFLAGS) $(CFLAGS) $(cpu_sconv_test_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am_cpu_volume_test_OBJECTS =  \
+	tests/cpu_volume_test-cpu-volume-test.$(OBJEXT)
+cpu_volume_test_OBJECTS = $(am_cpu_volume_test_OBJECTS)
+cpu_volume_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+	libpulsecore- at PA_MAJORMINOR@.la libpulse.la \
+	libpulsecommon- at PA_MAJORMINOR@.la
+cpu_volume_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(cpu_volume_test_CFLAGS) $(CFLAGS) $(cpu_volume_test_LDFLAGS) \
+	$(LDFLAGS) -o $@
 am_cpulimit_test_OBJECTS =  \
 	tests/cpulimit_test-cpulimit-test.$(OBJEXT) \
 	daemon/cpulimit_test-cpulimit.$(OBJEXT)
@@ -2106,20 +2194,20 @@ am__echo_cancel_test_SOURCES_DIST =  \
 	modules/echo-cancel/adrian-aec.c \
 	modules/echo-cancel/adrian-aec.h modules/echo-cancel/adrian.c \
 	modules/echo-cancel/adrian.h modules/echo-cancel/speex.c
- at HAVE_ADRIAN_EC_TRUE@am__objects_19 = modules/echo-cancel/echo_cancel_test-adrian-aec.$(OBJEXT) \
+ at HAVE_ADRIAN_EC_TRUE@am__objects_23 = modules/echo-cancel/echo_cancel_test-adrian-aec.$(OBJEXT) \
 @HAVE_ADRIAN_EC_TRUE@	modules/echo-cancel/echo_cancel_test-adrian.$(OBJEXT)
- at HAVE_SPEEX_TRUE@am__objects_20 = modules/echo-cancel/echo_cancel_test-speex.$(OBJEXT)
-am__objects_21 = modules/echo-cancel/echo_cancel_test-module-echo-cancel.$(OBJEXT) \
+ at HAVE_SPEEX_TRUE@am__objects_24 = modules/echo-cancel/echo_cancel_test-speex.$(OBJEXT)
+am__objects_25 = modules/echo-cancel/echo_cancel_test-module-echo-cancel.$(OBJEXT) \
 	modules/echo-cancel/echo_cancel_test-null.$(OBJEXT) \
-	$(am__objects_19) $(am__objects_20)
-am_echo_cancel_test_OBJECTS = $(am__objects_21)
- at HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at am__objects_22 = modules/echo-cancel/echo_cancel_test-adrian-aec-orc-gen.$(OBJEXT)
-nodist_echo_cancel_test_OBJECTS = $(am__objects_22)
+	$(am__objects_23) $(am__objects_24)
+am_echo_cancel_test_OBJECTS = $(am__objects_25)
+ at HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at am__objects_26 = modules/echo-cancel/echo_cancel_test-adrian-aec-orc-gen.$(OBJEXT)
+nodist_echo_cancel_test_OBJECTS = $(am__objects_26)
 echo_cancel_test_OBJECTS = $(am_echo_cancel_test_OBJECTS) \
 	$(nodist_echo_cancel_test_OBJECTS)
-am__DEPENDENCIES_11 = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_10) $(am__append_123)
-echo_cancel_test_DEPENDENCIES = $(am__DEPENDENCIES_11)
+am__DEPENDENCIES_13 = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_12) $(am__append_133)
+echo_cancel_test_DEPENDENCIES = $(am__DEPENDENCIES_13)
 echo_cancel_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(echo_cancel_test_CFLAGS) $(CFLAGS) \
@@ -2227,12 +2315,12 @@ mainloop_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la \
 mainloop_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(mainloop_test_CFLAGS) \
 	$(CFLAGS) $(mainloop_test_LDFLAGS) $(LDFLAGS) -o $@
-am__objects_23 = tests/mainloop_test_glib-mainloop-test.$(OBJEXT)
-am_mainloop_test_glib_OBJECTS = $(am__objects_23)
+am__objects_27 = tests/mainloop_test_glib-mainloop-test.$(OBJEXT)
+am_mainloop_test_glib_OBJECTS = $(am__objects_27)
 mainloop_test_glib_OBJECTS = $(am_mainloop_test_glib_OBJECTS)
-am__DEPENDENCIES_12 = $(am__DEPENDENCIES_2) libpulse.la \
+am__DEPENDENCIES_14 = $(am__DEPENDENCIES_2) libpulse.la \
 	libpulsecommon- at PA_MAJORMINOR@.la
-mainloop_test_glib_DEPENDENCIES = $(am__DEPENDENCIES_12) \
+mainloop_test_glib_DEPENDENCIES = $(am__DEPENDENCIES_14) \
 	$(am__DEPENDENCIES_1) libpulse-mainloop-glib.la
 mainloop_test_glib_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -2265,16 +2353,6 @@ memblockq_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
 	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
 	$(memblockq_test_CFLAGS) $(CFLAGS) $(memblockq_test_LDFLAGS) \
 	$(LDFLAGS) -o $@
-am_mix_special_test_OBJECTS =  \
-	tests/mix_special_test-mix-special-test.$(OBJEXT)
-mix_special_test_OBJECTS = $(am_mix_special_test_OBJECTS)
-mix_special_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
-	libpulsecore- at PA_MAJORMINOR@.la libpulse.la \
-	libpulsecommon- at PA_MAJORMINOR@.la
-mix_special_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
-	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-	$(mix_special_test_CFLAGS) $(CFLAGS) \
-	$(mix_special_test_LDFLAGS) $(LDFLAGS) -o $@
 am_mix_test_OBJECTS = tests/mix_test-mix-test.$(OBJEXT)
 mix_test_OBJECTS = $(am_mix_test_OBJECTS)
 mix_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -2364,7 +2442,7 @@ am__pulseaudio_SOURCES_DIST = daemon/caps.c daemon/caps.h \
 	daemon/dumpmodules.c daemon/dumpmodules.h \
 	daemon/ltdl-bind-now.c daemon/ltdl-bind-now.h daemon/main.c \
 	daemon/server-lookup.c daemon/server-lookup.h
- at HAVE_DBUS_TRUE@am__objects_24 =  \
+ at HAVE_DBUS_TRUE@am__objects_28 =  \
 @HAVE_DBUS_TRUE@	daemon/pulseaudio-server-lookup.$(OBJEXT)
 am_pulseaudio_OBJECTS = daemon/pulseaudio-caps.$(OBJEXT) \
 	daemon/pulseaudio-cmdline.$(OBJEXT) \
@@ -2372,7 +2450,7 @@ am_pulseaudio_OBJECTS = daemon/pulseaudio-caps.$(OBJEXT) \
 	daemon/pulseaudio-daemon-conf.$(OBJEXT) \
 	daemon/pulseaudio-dumpmodules.$(OBJEXT) \
 	daemon/pulseaudio-ltdl-bind-now.$(OBJEXT) \
-	daemon/pulseaudio-main.$(OBJEXT) $(am__objects_24)
+	daemon/pulseaudio-main.$(OBJEXT) $(am__objects_28)
 pulseaudio_OBJECTS = $(am_pulseaudio_OBJECTS)
 pulseaudio_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(pulseaudio_CFLAGS) \
@@ -2444,6 +2522,15 @@ smoother_test_DEPENDENCIES = $(am__DEPENDENCIES_2) \
 smoother_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(smoother_test_CFLAGS) \
 	$(CFLAGS) $(smoother_test_LDFLAGS) $(LDFLAGS) -o $@
+am_srbchannel_test_OBJECTS =  \
+	tests/srbchannel_test-srbchannel-test.$(OBJEXT)
+srbchannel_test_OBJECTS = $(am_srbchannel_test_OBJECTS)
+srbchannel_test_DEPENDENCIES = $(am__DEPENDENCIES_2) libpulse.la \
+	libpulsecommon- at PA_MAJORMINOR@.la
+srbchannel_test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(srbchannel_test_CFLAGS) $(CFLAGS) $(srbchannel_test_LDFLAGS) \
+	$(LDFLAGS) -o $@
 am_stripnul_OBJECTS = tests/stripnul-stripnul.$(OBJEXT)
 stripnul_OBJECTS = $(am_stripnul_OBJECTS)
 stripnul_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -2577,6 +2664,7 @@ SOURCES = $(libalsa_util_la_SOURCES) $(libavahi_wrap_la_SOURCES) \
 	$(nodist_libpulsecore_ at PA_MAJORMINOR@_la_SOURCES) \
 	$(libpulsecore_foreign_la_SOURCES) \
 	$(libpulsecore_mix_neon_la_SOURCES) \
+	$(libpulsecore_remap_neon_la_SOURCES) \
 	$(libpulsecore_sconv_neon_la_SOURCES) \
 	$(libpulsedsp_la_SOURCES) $(libraop_la_SOURCES) \
 	$(librtp_la_SOURCES) $(libwebrtc_util_la_SOURCES) \
@@ -2666,18 +2754,19 @@ SOURCES = $(libalsa_util_la_SOURCES) $(libavahi_wrap_la_SOURCES) \
 	$(alsa_mixer_path_test_SOURCES) $(alsa_time_test_SOURCES) \
 	$(asyncmsgq_test_SOURCES) $(asyncq_test_SOURCES) \
 	$(channelmap_test_SOURCES) $(close_test_SOURCES) \
-	$(connect_stress_SOURCES) $(cpu_test_SOURCES) \
-	$(cpulimit_test_SOURCES) $(cpulimit_test2_SOURCES) \
-	$(echo_cancel_test_SOURCES) $(nodist_echo_cancel_test_SOURCES) \
-	$(extended_test_SOURCES) $(flist_test_SOURCES) \
-	$(format_test_SOURCES) $(gconf_helper_SOURCES) \
-	$(get_binary_name_test_SOURCES) $(gtk_test_SOURCES) \
-	$(hook_list_test_SOURCES) $(interpol_test_SOURCES) \
-	$(ipacl_test_SOURCES) $(lo_latency_test_SOURCES) \
-	$(lock_autospawn_test_SOURCES) $(mainloop_test_SOURCES) \
-	$(mainloop_test_glib_SOURCES) $(mcalign_test_SOURCES) \
-	$(memblock_test_SOURCES) $(memblockq_test_SOURCES) \
-	$(mix_special_test_SOURCES) $(mix_test_SOURCES) \
+	$(connect_stress_SOURCES) $(cpu_mix_test_SOURCES) \
+	$(cpu_remap_test_SOURCES) $(cpu_sconv_test_SOURCES) \
+	$(cpu_volume_test_SOURCES) $(cpulimit_test_SOURCES) \
+	$(cpulimit_test2_SOURCES) $(echo_cancel_test_SOURCES) \
+	$(nodist_echo_cancel_test_SOURCES) $(extended_test_SOURCES) \
+	$(flist_test_SOURCES) $(format_test_SOURCES) \
+	$(gconf_helper_SOURCES) $(get_binary_name_test_SOURCES) \
+	$(gtk_test_SOURCES) $(hook_list_test_SOURCES) \
+	$(interpol_test_SOURCES) $(ipacl_test_SOURCES) \
+	$(lo_latency_test_SOURCES) $(lock_autospawn_test_SOURCES) \
+	$(mainloop_test_SOURCES) $(mainloop_test_glib_SOURCES) \
+	$(mcalign_test_SOURCES) $(memblock_test_SOURCES) \
+	$(memblockq_test_SOURCES) $(mix_test_SOURCES) \
 	$(mult_s16_test_SOURCES) $(once_test_SOURCES) $(pacat_SOURCES) \
 	$(pacat_simple_SOURCES) $(pacmd_SOURCES) $(pactl_SOURCES) \
 	$(parec_simple_SOURCES) $(pasuspender_SOURCES) \
@@ -2686,14 +2775,14 @@ SOURCES = $(libalsa_util_la_SOURCES) $(libavahi_wrap_la_SOURCES) \
 	$(remix_test_SOURCES) $(resampler_test_SOURCES) \
 	$(rtpoll_test_SOURCES) $(rtstutter_SOURCES) \
 	$(sig2str_test_SOURCES) $(sigbus_test_SOURCES) \
-	$(smoother_test_SOURCES) $(stripnul_SOURCES) \
-	$(strlist_test_SOURCES) $(sync_playback_SOURCES) \
-	$(thread_mainloop_test_SOURCES) $(thread_test_SOURCES) \
-	$(usergroup_test_SOURCES) $(utf8_test_SOURCES) \
-	$(volume_test_SOURCES)
+	$(smoother_test_SOURCES) $(srbchannel_test_SOURCES) \
+	$(stripnul_SOURCES) $(strlist_test_SOURCES) \
+	$(sync_playback_SOURCES) $(thread_mainloop_test_SOURCES) \
+	$(thread_test_SOURCES) $(usergroup_test_SOURCES) \
+	$(utf8_test_SOURCES) $(volume_test_SOURCES)
 DIST_SOURCES = $(am__libalsa_util_la_SOURCES_DIST) \
 	$(libavahi_wrap_la_SOURCES) $(libbluez4_util_la_SOURCES) \
-	$(libbluez5_util_la_SOURCES) $(libcli_la_SOURCES) \
+	$(am__libbluez5_util_la_SOURCES_DIST) $(libcli_la_SOURCES) \
 	$(liblo_test_util_la_SOURCES) $(liboss_util_la_SOURCES) \
 	$(libprotocol_cli_la_SOURCES) \
 	$(am__libprotocol_esound_la_SOURCES_DIST) \
@@ -2706,6 +2795,7 @@ DIST_SOURCES = $(am__libalsa_util_la_SOURCES_DIST) \
 	$(am__libpulsecore_ at PA_MAJORMINOR@_la_SOURCES_DIST) \
 	$(libpulsecore_foreign_la_SOURCES) \
 	$(am__libpulsecore_mix_neon_la_SOURCES_DIST) \
+	$(am__libpulsecore_remap_neon_la_SOURCES_DIST) \
 	$(am__libpulsecore_sconv_neon_la_SOURCES_DIST) \
 	$(libpulsedsp_la_SOURCES) $(libraop_la_SOURCES) \
 	$(librtp_la_SOURCES) $(am__libwebrtc_util_la_SOURCES_DIST) \
@@ -2794,17 +2884,18 @@ DIST_SOURCES = $(am__libalsa_util_la_SOURCES_DIST) \
 	$(alsa_mixer_path_test_SOURCES) $(alsa_time_test_SOURCES) \
 	$(asyncmsgq_test_SOURCES) $(asyncq_test_SOURCES) \
 	$(channelmap_test_SOURCES) $(close_test_SOURCES) \
-	$(connect_stress_SOURCES) $(cpu_test_SOURCES) \
-	$(cpulimit_test_SOURCES) $(cpulimit_test2_SOURCES) \
-	$(am__echo_cancel_test_SOURCES_DIST) $(extended_test_SOURCES) \
-	$(flist_test_SOURCES) $(format_test_SOURCES) \
-	$(gconf_helper_SOURCES) $(get_binary_name_test_SOURCES) \
-	$(gtk_test_SOURCES) $(hook_list_test_SOURCES) \
-	$(interpol_test_SOURCES) $(ipacl_test_SOURCES) \
-	$(lo_latency_test_SOURCES) $(lock_autospawn_test_SOURCES) \
-	$(mainloop_test_SOURCES) $(mainloop_test_glib_SOURCES) \
-	$(mcalign_test_SOURCES) $(memblock_test_SOURCES) \
-	$(memblockq_test_SOURCES) $(mix_special_test_SOURCES) \
+	$(connect_stress_SOURCES) $(cpu_mix_test_SOURCES) \
+	$(cpu_remap_test_SOURCES) $(cpu_sconv_test_SOURCES) \
+	$(cpu_volume_test_SOURCES) $(cpulimit_test_SOURCES) \
+	$(cpulimit_test2_SOURCES) $(am__echo_cancel_test_SOURCES_DIST) \
+	$(extended_test_SOURCES) $(flist_test_SOURCES) \
+	$(format_test_SOURCES) $(gconf_helper_SOURCES) \
+	$(get_binary_name_test_SOURCES) $(gtk_test_SOURCES) \
+	$(hook_list_test_SOURCES) $(interpol_test_SOURCES) \
+	$(ipacl_test_SOURCES) $(lo_latency_test_SOURCES) \
+	$(lock_autospawn_test_SOURCES) $(mainloop_test_SOURCES) \
+	$(mainloop_test_glib_SOURCES) $(mcalign_test_SOURCES) \
+	$(memblock_test_SOURCES) $(memblockq_test_SOURCES) \
 	$(mix_test_SOURCES) $(mult_s16_test_SOURCES) \
 	$(once_test_SOURCES) $(pacat_SOURCES) $(pacat_simple_SOURCES) \
 	$(pacmd_SOURCES) $(pactl_SOURCES) $(parec_simple_SOURCES) \
@@ -2814,10 +2905,11 @@ DIST_SOURCES = $(am__libalsa_util_la_SOURCES_DIST) \
 	$(resampler_test_SOURCES) $(rtpoll_test_SOURCES) \
 	$(rtstutter_SOURCES) $(sig2str_test_SOURCES) \
 	$(sigbus_test_SOURCES) $(smoother_test_SOURCES) \
-	$(stripnul_SOURCES) $(strlist_test_SOURCES) \
-	$(sync_playback_SOURCES) $(thread_mainloop_test_SOURCES) \
-	$(thread_test_SOURCES) $(usergroup_test_SOURCES) \
-	$(utf8_test_SOURCES) $(volume_test_SOURCES)
+	$(srbchannel_test_SOURCES) $(stripnul_SOURCES) \
+	$(strlist_test_SOURCES) $(sync_playback_SOURCES) \
+	$(thread_mainloop_test_SOURCES) $(thread_test_SOURCES) \
+	$(usergroup_test_SOURCES) $(utf8_test_SOURCES) \
+	$(volume_test_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -2845,7 +2937,6 @@ am__dist_alsapaths_DATA_DIST =  \
 	modules/alsa/mixer/paths/analog-output-speaker.conf \
 	modules/alsa/mixer/paths/analog-output-speaker-always.conf \
 	modules/alsa/mixer/paths/analog-output.conf.common \
-	modules/alsa/mixer/paths/analog-output-desktop-speaker.conf \
 	modules/alsa/mixer/paths/analog-output-headphones.conf \
 	modules/alsa/mixer/paths/analog-output-headphones-2.conf \
 	modules/alsa/mixer/paths/analog-output-lineout.conf \
@@ -2854,10 +2945,13 @@ am__dist_alsapaths_DATA_DIST =  \
 	modules/alsa/mixer/paths/hdmi-output-0.conf \
 	modules/alsa/mixer/paths/hdmi-output-1.conf \
 	modules/alsa/mixer/paths/hdmi-output-2.conf \
-	modules/alsa/mixer/paths/hdmi-output-3.conf
+	modules/alsa/mixer/paths/hdmi-output-3.conf \
+	modules/alsa/mixer/paths/hdmi-output-4.conf \
+	modules/alsa/mixer/paths/hdmi-output-5.conf \
+	modules/alsa/mixer/paths/hdmi-output-6.conf \
+	modules/alsa/mixer/paths/hdmi-output-7.conf
 am__dist_alsaprofilesets_DATA_DIST =  \
 	modules/alsa/mixer/profile-sets/default.conf \
-	modules/alsa/mixer/profile-sets/extra-hdmi.conf \
 	modules/alsa/mixer/profile-sets/force-speaker.conf \
 	modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf \
 	modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf \
@@ -2873,9 +2967,9 @@ am__dist_udevrules_DATA_DIST =  \
 	modules/alsa/mixer/profile-sets/90-pulseaudio.rules
 DATA = $(dbuspolicy_DATA) $(dist_alsapaths_DATA) \
 	$(dist_alsaprofilesets_DATA) $(dist_udevrules_DATA) \
-	$(pulseconf_DATA) $(xdgautostart_DATA)
+	$(pulseconf_DATA) $(systemduserunit_DATA) $(xdgautostart_DATA)
 am__pulseinclude_HEADERS_DIST = pulse/cdecl.h pulse/channelmap.h \
-	pulse/context.h pulse/def.h pulse/error.h \
+	pulse/context.h pulse/def.h pulse/direction.h pulse/error.h \
 	pulse/ext-device-manager.h pulse/ext-device-restore.h \
 	pulse/ext-stream-restore.h pulse/format.h pulse/gccmacro.h \
 	pulse/introspect.h pulse/mainloop-api.h \
@@ -3098,6 +3192,8 @@ AUTOMAKE = @AUTOMAKE@
 AVAHI_CFLAGS = @AVAHI_CFLAGS@
 AVAHI_LIBS = @AVAHI_LIBS@
 AWK = @AWK@
+BLUEZ_CFLAGS = @BLUEZ_CFLAGS@
+BLUEZ_LIBS = @BLUEZ_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -3145,13 +3241,16 @@ HAVE_AVAHI = @HAVE_AVAHI@
 HAVE_BLUEZ = @HAVE_BLUEZ@
 HAVE_BLUEZ_4 = @HAVE_BLUEZ_4@
 HAVE_BLUEZ_5 = @HAVE_BLUEZ_5@
+HAVE_BLUEZ_5_NATIVE_HEADSET = @HAVE_BLUEZ_5_NATIVE_HEADSET@
+HAVE_BLUEZ_5_OFONO_HEADSET = @HAVE_BLUEZ_5_OFONO_HEADSET@
 HAVE_DBUS = @HAVE_DBUS@
 HAVE_GLIB20 = @HAVE_GLIB20@
 HAVE_MKFIFO = @HAVE_MKFIFO@
 HAVE_NEON = @HAVE_NEON@
 HAVE_OSS_OUTPUT = @HAVE_OSS_OUTPUT@
-HAVE_SYSTEMD = @HAVE_SYSTEMD@
+HAVE_SYSTEMD_DAEMON = @HAVE_SYSTEMD_DAEMON@
 HAVE_SYSTEMD_JOURNAL = @HAVE_SYSTEMD_JOURNAL@
+HAVE_SYSTEMD_LOGIN = @HAVE_SYSTEMD_LOGIN@
 HAVE_SYS_RESOURCE_H = @HAVE_SYS_RESOURCE_H@
 HAVE_UDEV = @HAVE_UDEV@
 HAVE_WAVEOUT = @HAVE_WAVEOUT@
@@ -3174,8 +3273,6 @@ INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
 JACK_CFLAGS = @JACK_CFLAGS@
 JACK_LIBS = @JACK_LIBS@
-JOURNAL_CFLAGS = @JOURNAL_CFLAGS@
-JOURNAL_LIBS = @JOURNAL_LIBS@
 LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBASYNCNS_CFLAGS = @LIBASYNCNS_CFLAGS@
@@ -3242,6 +3339,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
 PA_ACCESS_GROUP = @PA_ACCESS_GROUP@
 PA_API_VERSION = @PA_API_VERSION@
 PA_BINARY = @PA_BINARY@
+PA_DEFAULT_AUTOSPAWN = @PA_DEFAULT_AUTOSPAWN@
 PA_DEFAULT_CONFIG_DIR = @PA_DEFAULT_CONFIG_DIR@
 PA_DLSEARCHPATH = @PA_DLSEARCHPATH@
 PA_INCDIR = @PA_INCDIR@
@@ -3275,6 +3373,12 @@ SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STOW = @STOW@
 STRIP = @STRIP@
+SYSTEMDDAEMON_CFLAGS = @SYSTEMDDAEMON_CFLAGS@
+SYSTEMDDAEMON_LIBS = @SYSTEMDDAEMON_LIBS@
+SYSTEMDJOURNAL_CFLAGS = @SYSTEMDJOURNAL_CFLAGS@
+SYSTEMDJOURNAL_LIBS = @SYSTEMDJOURNAL_LIBS@
+SYSTEMDLOGIN_CFLAGS = @SYSTEMDLOGIN_CFLAGS@
+SYSTEMDLOGIN_LIBS = @SYSTEMDLOGIN_LIBS@
 SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
 TDB_CFLAGS = @TDB_CFLAGS@
@@ -3347,11 +3451,13 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
 sysconfdir = @sysconfdir@
+systemduserunitdir = @systemduserunitdir@
 target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 udevrulesdir = @udevrulesdir@
+zshcompletiondir = @zshcompletiondir@
 pulseincludedir = $(includedir)/pulse
 pulsecoreincludedir = $(includedir)/pulsecore
 pulselibexecdir = $(libexecdir)/pulse
@@ -3368,10 +3474,11 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)/src/modules \
 	-I$(top_builddir)/src/modules \
 	-DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
-	-DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
+	-DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" \
+	-DPA_SRCDIR=\"$(abs_srcdir)\" \
+	-DPA_BUILDDIR=\"$(abs_builddir)\"
 
-AM_CFLAGS = $(PTHREAD_CFLAGS) -DPA_SRCDIR=\"$(abs_srcdir)\" \
-	-DPA_BUILDDIR=\"$(abs_builddir)\" $(am__append_1)
+AM_CFLAGS = $(PTHREAD_CFLAGS) $(am__append_1)
 AM_CXXFLAGS = $(AM_CFLAGS) $(am__append_2)
 SERVER_CFLAGS = -D__INCLUDED_FROM_PULSE_AUDIO
 AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)
@@ -3390,9 +3497,10 @@ MODULE_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINOR@.la libpulsecommon- at PA_
 EXTRA_DIST = pulse/client.conf.in pulse/version.h.in \
 	daemon/daemon.conf.in daemon/default.pa.in daemon/system.pa.in \
 	depmod.py daemon/esdcompat.in daemon/start-pulseaudio-x11.in \
-	daemon/start-pulseaudio-kde.in utils/padsp.in utils/qpaeq \
-	modules/module-defs.h.m4 daemon/pulseaudio.desktop.in \
-	daemon/pulseaudio-kde.desktop.in map-file \
+	daemon/systemd/user/pulseaudio.service.in \
+	daemon/systemd/user/pulseaudio.socket utils/padsp.in \
+	utils/qpaeq modules/module-defs.h.m4 \
+	daemon/pulseaudio.desktop.in map-file \
 	daemon/pulseaudio-system.conf \
 	modules/echo-cancel/adrian-license.txt $(addsuffix \
 	.orc,$(ORC_SOURCE)) $(SYMDEF_FILES)
@@ -3406,8 +3514,7 @@ pulseconf_DATA = \
 @HAVE_DBUS_TRUE@		daemon/pulseaudio-system.conf
 
 @HAVE_X11_TRUE at xdgautostart_in_files = \
- at HAVE_X11_TRUE@		daemon/pulseaudio.desktop.in \
- at HAVE_X11_TRUE@		daemon/pulseaudio-kde.desktop.in
+ at HAVE_X11_TRUE@		daemon/pulseaudio.desktop.in
 
 @HAVE_X11_TRUE at xdgautostart_DATA = $(xdgautostart_in_files:.desktop.in=.desktop)
 
@@ -3419,8 +3526,8 @@ BUILT_SOURCES = $(am__append_6) $(SYMDEF_FILES) builddirs
 ###################################
 #        Some minor stuff         #
 ###################################
-CLEANFILES = $(am__append_7) $(am__append_44) \
-	daemon/pulseaudio.desktop daemon/pulseaudio-kde.desktop
+CLEANFILES = $(am__append_7) $(am__append_48) \
+	daemon/pulseaudio.desktop
 @HAVE_ORC_TRUE at ORC_BUILT_SOURCE = $(addsuffix -orc-gen.c,$(ORC_SOURCE))
 @HAVE_ORC_TRUE at ORC_BUILT_HEADER = $(addsuffix -orc-gen.h,$(ORC_SOURCE))
 @HAVE_ORC_TRUE at orcc_v_gen = $(orcc_v_gen_$(V))
@@ -3429,13 +3536,14 @@ CLEANFILES = $(am__append_7) $(am__append_44) \
 @HAVE_ORC_TRUE at cp_v_gen = $(cp_v_gen_$(V))
 @HAVE_ORC_TRUE at cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
 @HAVE_ORC_TRUE at cp_v_gen_0 = @echo "  CP     $@";
-ORC_SOURCE = pulsecore/svolume $(am__append_118)
+ORC_SOURCE = pulsecore/svolume $(am__append_128)
 pulseaudio_SOURCES = daemon/caps.c daemon/caps.h daemon/cmdline.c \
 	daemon/cmdline.h daemon/cpulimit.c daemon/cpulimit.h \
 	daemon/daemon-conf.c daemon/daemon-conf.h daemon/dumpmodules.c \
 	daemon/dumpmodules.h daemon/ltdl-bind-now.c \
 	daemon/ltdl-bind-now.h daemon/main.c $(am__append_9)
-pulseaudio_CFLAGS = $(AM_CFLAGS) $(CAP_CFLAGS) $(am__append_8)
+pulseaudio_CFLAGS = $(AM_CFLAGS) $(CAP_CFLAGS) $(am__append_8) \
+	$(am__append_11)
 pulseaudio_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la \
 	libpulsecommon- at PA_MAJORMINOR@.la libpulse.la $(LIBLTDL) \
 	$(CAP_LIBS) $(am__append_10)
@@ -3443,14 +3551,20 @@ pulseaudio_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la \
 pulseaudio_DEPENDENCIES = libpulsecore- at PA_MAJORMINOR@.la libpulsecommon- at PA_MAJORMINOR@.la libpulse.la $(PREOPEN_LIBS)
 @PREOPEN_MODS_FALSE at PREOPEN_LIBS = $(modlibexec_LTLIBRARIES)
 @PREOPEN_MODS_TRUE at PREOPEN_LIBS = $(PREOPEN_MODS)
- at FORCE_PREOPEN_FALSE@pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlopen force $(foreach f,$(PREOPEN_LIBS),-dlopen $(f))
- at FORCE_PREOPEN_TRUE@pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(IMMEDIATE_LDFLAGS) -dlpreopen force $(foreach f,$(PREOPEN_LIBS),-dlpreopen $(f))
+ at FORCE_PREOPEN_FALSE@pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) \
+ at FORCE_PREOPEN_FALSE@	$(IMMEDIATE_LDFLAGS) -dlopen force \
+ at FORCE_PREOPEN_FALSE@	$(foreach f,$(PREOPEN_LIBS),-dlopen $(f)) \
+ at FORCE_PREOPEN_FALSE@	$(am__append_12)
+ at FORCE_PREOPEN_TRUE@pulseaudio_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) \
+ at FORCE_PREOPEN_TRUE@	$(IMMEDIATE_LDFLAGS) -dlpreopen force \
+ at FORCE_PREOPEN_TRUE@	$(foreach f,$(PREOPEN_LIBS),-dlpreopen \
+ at FORCE_PREOPEN_TRUE@	$(f)) $(am__append_12)
 
 ###################################
 #       Utility programs          #
 ###################################
-bin_SCRIPTS = esdcompat $(am__append_14) $(am__append_43) \
-	$(am__append_102)
+bin_SCRIPTS = esdcompat $(am__append_16) $(am__append_47) \
+	$(am__append_112)
 pacat_SOURCES = utils/pacat.c
 pacat_LDADD = $(AM_LDADD) libpulse.la libpulsecommon- at PA_MAJORMINOR@.la $(LIBSNDFILE_LIBS)
 pacat_CFLAGS = $(AM_CFLAGS) $(LIBSNDFILE_CFLAGS)
@@ -3471,26 +3585,30 @@ pax11publish_SOURCES = utils/pax11publish.c
 pax11publish_CFLAGS = $(AM_CFLAGS) $(X11_CFLAGS)
 pax11publish_LDADD = $(AM_LDADD) libpulse.la libpulsecommon- at PA_MAJORMINOR@.la $(X11_LIBS)
 pax11publish_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+ at HAVE_SYSTEMD_DAEMON_TRUE@systemduserunit_DATA = \
+ at HAVE_SYSTEMD_DAEMON_TRUE@    pulseaudio.service \
+ at HAVE_SYSTEMD_DAEMON_TRUE@    daemon/systemd/user/pulseaudio.socket
+
 
 ###################################
 #         Test programs           #
 ###################################
 
 # We split the foreign code off to not be annoyed by warnings we don't care about
-noinst_LTLIBRARIES = liblo-test-util.la $(am__append_45) \
+noinst_LTLIBRARIES = liblo-test-util.la $(am__append_49) \
 	libpulsecore-foreign.la
 TESTS_default = mainloop-test strlist-test close-test memblockq-test \
 	channelmap-test thread-mainloop-test utf8-test format-test \
 	get-binary-name-test hook-list-test memblock-test asyncq-test \
 	asyncmsgq-test queue-test rtpoll-test resampler-test \
 	smoother-test thread-test volume-test mix-test proplist-test \
-	cpu-test lock-autospawn-test mult-s16-test mix-special-test \
-	$(am__append_15) $(am__append_16) $(am__append_18) \
-	$(am__append_21)
+	cpu-mix-test cpu-remap-test cpu-sconv-test cpu-volume-test \
+	lock-autospawn-test mult-s16-test $(am__append_17) \
+	$(am__append_18) $(am__append_20) $(am__append_23)
 TESTS_norun = ipacl-test mcalign-test pacat-simple parec-simple \
 	flist-test remix-test rtstutter sig2str-test stripnul \
-	echo-cancel-test lo-latency-test $(am__append_17) \
-	$(am__append_19) $(am__append_20)
+	echo-cancel-test lo-latency-test $(am__append_19) \
+	$(am__append_21) $(am__append_22)
 
 # These tests need a running pulseaudio daemon
 TESTS_daemon = \
@@ -3517,6 +3635,10 @@ format_test_SOURCES = tests/format-test.c
 format_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
 format_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
 format_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+srbchannel_test_SOURCES = tests/srbchannel-test.c
+srbchannel_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+srbchannel_test_LDADD = $(AM_LDADD) libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+srbchannel_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
 get_binary_name_test_SOURCES = tests/get-binary-name-test.c
 get_binary_name_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
 get_binary_name_test_LDADD = $(AM_LDADD) libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
@@ -3641,18 +3763,26 @@ proplist_test_SOURCES = tests/proplist-test.c
 proplist_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
 proplist_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
 proplist_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
-cpu_test_SOURCES = tests/cpu-test.c tests/runtime-test-util.h
-cpu_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
-cpu_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
-cpu_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+cpu_mix_test_SOURCES = tests/cpu-mix-test.c tests/runtime-test-util.h
+cpu_mix_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+cpu_mix_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+cpu_mix_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+cpu_remap_test_SOURCES = tests/cpu-remap-test.c tests/runtime-test-util.h
+cpu_remap_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+cpu_remap_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+cpu_remap_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+cpu_sconv_test_SOURCES = tests/cpu-sconv-test.c tests/runtime-test-util.h
+cpu_sconv_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+cpu_sconv_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+cpu_sconv_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
+cpu_volume_test_SOURCES = tests/cpu-volume-test.c tests/runtime-test-util.h
+cpu_volume_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
+cpu_volume_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+cpu_volume_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
 mult_s16_test_SOURCES = tests/mult-s16-test.c tests/runtime-test-util.h
 mult_s16_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
 mult_s16_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
 mult_s16_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
-mix_special_test_SOURCES = tests/mix-special-test.c tests/runtime-test-util.h
-mix_special_test_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
-mix_special_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
-mix_special_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
 rtstutter_SOURCES = tests/rtstutter.c
 rtstutter_LDADD = $(AM_LDADD) libpulsecore- at PA_MAJORMINOR@.la libpulse.la libpulsecommon- at PA_MAJORMINOR@.la
 rtstutter_CFLAGS = $(AM_CFLAGS)
@@ -3730,10 +3860,11 @@ libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES = pulse/client-conf.c \
 	pulsecore/core-rtclock.h pulsecore/core-util.c \
 	pulsecore/core-util.h pulsecore/creds.h pulsecore/dynarray.c \
 	pulsecore/dynarray.h pulsecore/endianmacros.h \
-	pulsecore/flist.c pulsecore/flist.h pulsecore/g711.c \
-	pulsecore/g711.h pulsecore/hashmap.c pulsecore/hashmap.h \
-	pulsecore/i18n.c pulsecore/i18n.h pulsecore/idxset.c \
-	pulsecore/idxset.h pulsecore/arpa-inet.c pulsecore/arpa-inet.h \
+	pulsecore/fdsem.c pulsecore/fdsem.h pulsecore/flist.c \
+	pulsecore/flist.h pulsecore/g711.c pulsecore/g711.h \
+	pulsecore/hashmap.c pulsecore/hashmap.h pulsecore/i18n.c \
+	pulsecore/i18n.h pulsecore/idxset.c pulsecore/idxset.h \
+	pulsecore/arpa-inet.c pulsecore/arpa-inet.h \
 	pulsecore/iochannel.c pulsecore/iochannel.h pulsecore/ioline.c \
 	pulsecore/ioline.h pulsecore/ipacl.c pulsecore/ipacl.h \
 	pulsecore/llist.h pulsecore/lock-autospawn.c \
@@ -3753,6 +3884,7 @@ libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES = pulse/client-conf.c \
 	pulsecore/pstream-util.h pulsecore/pstream.c \
 	pulsecore/pstream.h pulsecore/queue.c pulsecore/queue.h \
 	pulsecore/random.c pulsecore/random.h pulsecore/refcnt.h \
+	pulsecore/srbchannel.c pulsecore/srbchannel.h \
 	pulsecore/sample-util.c pulsecore/sample-util.h \
 	pulsecore/shm.c pulsecore/shm.h pulsecore/bitset.c \
 	pulsecore/bitset.h pulsecore/socket-client.c \
@@ -3766,27 +3898,29 @@ libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES = pulse/client-conf.c \
 	pulsecore/time-smoother.h pulsecore/tokenizer.c \
 	pulsecore/tokenizer.h pulsecore/usergroup.c \
 	pulsecore/usergroup.h pulsecore/sndfile-util.c \
-	pulsecore/sndfile-util.h pulsecore/socket.h $(am__append_22) \
-	$(am__append_23) $(am__append_24) $(am__append_29) \
-	$(am__append_30) $(am__append_32) $(am__append_35) \
-	$(am__append_36)
+	pulsecore/sndfile-util.h pulsecore/socket.h $(am__append_24) \
+	$(am__append_25) $(am__append_26) $(am__append_33) \
+	$(am__append_34) $(am__append_36) $(am__append_39) \
+	$(am__append_40)
 
 # proplist-util.h uses these header files, but not the library itself!
 libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) \
-	$(LIBJSON_CFLAGS) $(LIBSNDFILE_CFLAGS) $(am__append_25) \
-	$(am__append_27) $(GLIB20_CFLAGS) $(GTK30_CFLAGS) \
-	$(am__append_31) $(am__append_33) $(am__append_37)
+	$(LIBJSON_CFLAGS) $(LIBSNDFILE_CFLAGS) $(am__append_27) \
+	$(am__append_29) $(am__append_31) $(GLIB20_CFLAGS) \
+	$(GTK30_CFLAGS) $(am__append_35) $(am__append_37) \
+	$(am__append_41)
 libpulsecommon_ at PA_MAJORMINOR@_la_LDFLAGS = $(AM_LDFLAGS) \
-	-avoid-version $(am__append_26) $(am__append_28)
+	-avoid-version $(am__append_28) $(am__append_30) \
+	$(am__append_32)
 libpulsecommon_ at PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) \
 	$(LIBJSON_LIBS) $(LIBWRAP_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV) \
-	$(LIBSNDFILE_LIBS) $(am__append_34) $(am__append_38)
+	$(LIBSNDFILE_LIBS) $(am__append_38) $(am__append_42)
 
 ###################################
 #         Client library          #
 ###################################
 pulseinclude_HEADERS = pulse/cdecl.h pulse/channelmap.h \
-	pulse/context.h pulse/def.h pulse/error.h \
+	pulse/context.h pulse/def.h pulse/direction.h pulse/error.h \
 	pulse/ext-device-manager.h pulse/ext-device-restore.h \
 	pulse/ext-stream-restore.h pulse/format.h pulse/gccmacro.h \
 	pulse/introspect.h pulse/mainloop-api.h \
@@ -3795,12 +3929,12 @@ pulseinclude_HEADERS = pulse/cdecl.h pulse/channelmap.h \
 	pulse/sample.h pulse/scache.h pulse/simple.h pulse/stream.h \
 	pulse/subscribe.h pulse/thread-mainloop.h pulse/timeval.h \
 	pulse/utf8.h pulse/util.h pulse/version.h pulse/volume.h \
-	pulse/xmalloc.h $(am__append_39)
+	pulse/xmalloc.h $(am__append_43)
 
 ###################################
 #      Daemon core library        #
 ###################################
-lib_LTLIBRARIES = libpulse.la libpulse-simple.la $(am__append_40) \
+lib_LTLIBRARIES = libpulse.la libpulse-simple.la $(am__append_44) \
 	libpulsecore- at PA_MAJORMINOR@.la
 
 # Public interface
@@ -3809,6 +3943,7 @@ libpulse_la_SOURCES = \
 		pulse/channelmap.c pulse/channelmap.h \
 		pulse/context.c pulse/context.h \
 		pulse/def.h \
+		pulse/direction.c pulse/direction.h \
 		pulse/error.c pulse/error.h \
 		pulse/ext-device-manager.c pulse/ext-device-manager.h \
 		pulse/ext-device-restore.c pulse/ext-device-restore.h \
@@ -3835,10 +3970,10 @@ libpulse_la_SOURCES = \
 		pulse/volume.c pulse/volume.h \
 		pulse/xmalloc.c pulse/xmalloc.h
 
-libpulse_la_CFLAGS = $(AM_CFLAGS) $(LIBJSON_CFLAGS) $(am__append_41)
+libpulse_la_CFLAGS = $(AM_CFLAGS) $(LIBJSON_CFLAGS) $(am__append_45)
 libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LTLIBICONV) \
 	$(LIBJSON_LIBS) libpulsecommon- at PA_MAJORMINOR@.la \
-	$(am__append_42)
+	$(am__append_46)
 libpulse_la_LDFLAGS = $(AM_LDFLAGS) $(VERSIONING_LDFLAGS) -version-info $(LIBPULSE_VERSION_INFO)
 libpulse_simple_la_SOURCES = pulse/simple.c pulse/simple.h
 libpulse_simple_la_CFLAGS = $(AM_CFLAGS)
@@ -3871,27 +4006,28 @@ libpulsecore_ at PA_MAJORMINOR@_la_SOURCES = pulsecore/asyncmsgq.c \
 	pulsecore/client.h pulsecore/card.c pulsecore/card.h \
 	pulsecore/core-scache.c pulsecore/core-scache.h \
 	pulsecore/core-subscribe.c pulsecore/core-subscribe.h \
-	pulsecore/core.c pulsecore/core.h pulsecore/fdsem.c \
-	pulsecore/fdsem.h pulsecore/hook-list.c pulsecore/hook-list.h \
-	pulsecore/ltdl-helper.c pulsecore/ltdl-helper.h \
-	pulsecore/modargs.c pulsecore/modargs.h pulsecore/modinfo.c \
-	pulsecore/modinfo.h pulsecore/module.c pulsecore/module.h \
-	pulsecore/msgobject.c pulsecore/msgobject.h \
-	pulsecore/namereg.c pulsecore/namereg.h pulsecore/object.c \
-	pulsecore/object.h pulsecore/play-memblockq.c \
-	pulsecore/play-memblockq.h pulsecore/play-memchunk.c \
-	pulsecore/play-memchunk.h pulsecore/remap.c pulsecore/remap.h \
-	pulsecore/remap_mmx.c pulsecore/remap_sse.c \
-	pulsecore/resampler.c pulsecore/resampler.h pulsecore/rtpoll.c \
-	pulsecore/rtpoll.h pulsecore/stream-util.c \
+	pulsecore/core.c pulsecore/core.h pulsecore/hook-list.c \
+	pulsecore/hook-list.h pulsecore/ltdl-helper.c \
+	pulsecore/ltdl-helper.h pulsecore/modargs.c \
+	pulsecore/modargs.h pulsecore/modinfo.c pulsecore/modinfo.h \
+	pulsecore/module.c pulsecore/module.h pulsecore/msgobject.c \
+	pulsecore/msgobject.h pulsecore/namereg.c pulsecore/namereg.h \
+	pulsecore/object.c pulsecore/object.h \
+	pulsecore/play-memblockq.c pulsecore/play-memblockq.h \
+	pulsecore/play-memchunk.c pulsecore/play-memchunk.h \
+	pulsecore/remap.c pulsecore/remap.h pulsecore/remap_mmx.c \
+	pulsecore/remap_sse.c pulsecore/resampler.c \
+	pulsecore/resampler.h pulsecore/resampler/ffmpeg.c \
+	pulsecore/resampler/peaks.c pulsecore/resampler/trivial.c \
+	pulsecore/rtpoll.c pulsecore/rtpoll.h pulsecore/stream-util.c \
 	pulsecore/stream-util.h pulsecore/mix.c pulsecore/mix.h \
-	pulsecore/cpu.h pulsecore/cpu-arm.c pulsecore/cpu-arm.h \
-	pulsecore/cpu-x86.c pulsecore/cpu-x86.h pulsecore/cpu-orc.c \
-	pulsecore/cpu-orc.h pulsecore/sconv-s16be.c \
-	pulsecore/sconv-s16be.h pulsecore/sconv-s16le.c \
-	pulsecore/sconv-s16le.h pulsecore/sconv_sse.c \
-	pulsecore/sconv.c pulsecore/sconv.h pulsecore/shared.c \
-	pulsecore/shared.h pulsecore/sink-input.c \
+	pulsecore/cpu.c pulsecore/cpu.h pulsecore/cpu-arm.c \
+	pulsecore/cpu-arm.h pulsecore/cpu-x86.c pulsecore/cpu-x86.h \
+	pulsecore/cpu-orc.c pulsecore/cpu-orc.h \
+	pulsecore/sconv-s16be.c pulsecore/sconv-s16be.h \
+	pulsecore/sconv-s16le.c pulsecore/sconv-s16le.h \
+	pulsecore/sconv_sse.c pulsecore/sconv.c pulsecore/sconv.h \
+	pulsecore/shared.c pulsecore/shared.h pulsecore/sink-input.c \
 	pulsecore/sink-input.h pulsecore/sink.c pulsecore/sink.h \
 	pulsecore/device-port.c pulsecore/device-port.h \
 	pulsecore/sioman.c pulsecore/sioman.h \
@@ -3900,26 +4036,28 @@ libpulsecore_ at PA_MAJORMINOR@_la_SOURCES = pulsecore/asyncmsgq.c \
 	pulsecore/source-output.c pulsecore/source-output.h \
 	pulsecore/source.c pulsecore/source.h pulsecore/start-child.c \
 	pulsecore/start-child.h pulsecore/thread-mq.c \
-	pulsecore/thread-mq.h pulsecore/database.h $(am__append_47) \
-	$(am__append_50) $(am__append_53) $(am__append_56) \
-	$(am__append_59) $(am__append_62)
+	pulsecore/thread-mq.h pulsecore/database.h $(am__append_51) \
+	$(am__append_54) $(am__append_57) $(am__append_60) \
+	$(am__append_63) $(am__append_66) $(am__append_67) \
+	$(am__append_70)
 libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) \
-	$(LIBSAMPLERATE_CFLAGS) $(LIBSPEEX_CFLAGS) \
-	$(LIBSNDFILE_CFLAGS) $(WINSOCK_CFLAGS) $(am__append_48) \
-	$(am__append_51) $(am__append_54) $(am__append_57) \
-	$(am__append_60)
+	$(LIBSNDFILE_CFLAGS) $(WINSOCK_CFLAGS) $(am__append_52) \
+	$(am__append_55) $(am__append_58) $(am__append_61) \
+	$(am__append_64) $(am__append_68) $(am__append_71)
 libpulsecore_ at PA_MAJORMINOR@_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version \
-	$(am__append_52)
+	$(am__append_56)
 libpulsecore_ at PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) \
-	$(LIBSAMPLERATE_LIBS) $(LIBSPEEX_LIBS) $(LIBSNDFILE_LIBS) \
-	$(WINSOCK_LIBS) $(LTLIBICONV) \
+	$(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV) \
 	libpulsecommon- at PA_MAJORMINOR@.la libpulse.la \
-	libpulsecore-foreign.la $(am__append_46) $(am__append_49) \
-	$(am__append_55) $(am__append_58) $(am__append_61)
+	libpulsecore-foreign.la $(am__append_50) $(am__append_53) \
+	$(am__append_59) $(am__append_62) $(am__append_65) \
+	$(am__append_69) $(am__append_72)
 @HAVE_NEON_TRUE at libpulsecore_sconv_neon_la_SOURCES = pulsecore/sconv_neon.c
 @HAVE_NEON_TRUE at libpulsecore_sconv_neon_la_CFLAGS = $(AM_CFLAGS) $(NEON_CFLAGS)
 @HAVE_NEON_TRUE at libpulsecore_mix_neon_la_SOURCES = pulsecore/mix_neon.c
 @HAVE_NEON_TRUE at libpulsecore_mix_neon_la_CFLAGS = $(AM_CFLAGS) $(NEON_CFLAGS)
+ at HAVE_NEON_TRUE@libpulsecore_remap_neon_la_SOURCES = pulsecore/remap_neon.c
+ at HAVE_NEON_TRUE@libpulsecore_remap_neon_la_CFLAGS = $(AM_CFLAGS) $(NEON_CFLAGS)
 @HAVE_ORC_TRUE at nodist_libpulsecore_@PA_MAJORMINOR at _la_SOURCES = pulsecore/svolume-orc-gen.c pulsecore/svolume-orc-gen.h
 libpulsecore_foreign_la_SOURCES = \
 		pulsecore/ffmpeg/resample2.c pulsecore/ffmpeg/avcodec.h pulsecore/ffmpeg/dsputil.h
@@ -3936,8 +4074,8 @@ libpulsecore_foreign_la_CFLAGS = $(AM_CFLAGS) $(FOREIGN_CFLAGS)
 ### the head, and not the other way!
 modlibexec_LTLIBRARIES = libcli.la libprotocol-cli.la \
 	libprotocol-simple.la libprotocol-http.la \
-	libprotocol-native.la $(am__append_63) $(am__append_64) \
-	$(am__append_65) $(am__append_66) $(am__append_69) \
+	libprotocol-native.la $(am__append_73) $(am__append_74) \
+	$(am__append_75) $(am__append_76) $(am__append_79) \
 	module-cli.la module-cli-protocol-tcp.la \
 	module-simple-protocol-tcp.la module-null-sink.la \
 	module-null-source.la module-sine-source.la module-detect.la \
@@ -3958,17 +4096,17 @@ modlibexec_LTLIBRARIES = libcli.la libprotocol-cli.la \
 	module-virtual-source.la module-virtual-surround-sink.la \
 	module-switch-on-connect.la module-switch-on-port-available.la \
 	module-filter-apply.la module-filter-heuristics.la \
-	module-role-ducking.la $(am__append_70) $(am__append_71) \
-	$(am__append_72) $(am__append_73) $(am__append_74) \
-	$(am__append_75) $(am__append_76) $(am__append_77) \
-	$(am__append_78) $(am__append_79) $(am__append_80) \
-	$(am__append_81) $(am__append_82) $(am__append_83) \
-	$(am__append_84) $(am__append_85) $(am__append_86) \
-	$(am__append_87) $(am__append_88) $(am__append_89) \
+	module-role-ducking.la $(am__append_80) $(am__append_81) \
+	$(am__append_82) $(am__append_83) $(am__append_84) \
+	$(am__append_85) $(am__append_86) $(am__append_87) \
+	$(am__append_88) $(am__append_89) $(am__append_90) \
 	$(am__append_91) $(am__append_92) $(am__append_93) \
 	$(am__append_94) $(am__append_95) $(am__append_96) \
 	$(am__append_97) $(am__append_98) $(am__append_99) \
-	$(am__append_100) $(am__append_101)
+	$(am__append_101) $(am__append_102) $(am__append_103) \
+	$(am__append_104) $(am__append_105) $(am__append_106) \
+	$(am__append_107) $(am__append_108) $(am__append_109) \
+	$(am__append_110) $(am__append_111)
 libprotocol_simple_la_SOURCES = pulsecore/protocol-simple.c pulsecore/protocol-simple.h
 libprotocol_simple_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
 libprotocol_simple_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINOR@.la libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
@@ -3983,11 +4121,11 @@ libprotocol_http_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
 libprotocol_http_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINOR@.la libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
 libprotocol_native_la_SOURCES = pulsecore/protocol-native.c pulsecore/protocol-native.h pulsecore/native-common.h
 libprotocol_native_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) \
-	$(am__append_67)
+	$(am__append_77)
 libprotocol_native_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
 libprotocol_native_la_LIBADD = $(AM_LIBADD) \
 	libpulsecore- at PA_MAJORMINOR@.la \
-	libpulsecommon- at PA_MAJORMINOR@.la libpulse.la $(am__append_68)
+	libpulsecommon- at PA_MAJORMINOR@.la libpulse.la $(am__append_78)
 @HAVE_ESOUND_TRUE at libprotocol_esound_la_SOURCES = pulsecore/protocol-esound.c pulsecore/protocol-esound.h pulsecore/esound.h
 @HAVE_ESOUND_TRUE at libprotocol_esound_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
 @HAVE_ESOUND_TRUE at libprotocol_esound_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINOR@.la libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
@@ -4015,7 +4153,6 @@ libavahi_wrap_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
 libavahi_wrap_la_LIBADD = $(AM_LIBADD) $(AVAHI_CFLAGS) libpulsecore- at PA_MAJORMINOR@.la libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
 @HAVE_ALSA_TRUE at dist_alsaprofilesets_DATA = \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/profile-sets/default.conf \
- at HAVE_ALSA_TRUE@		modules/alsa/mixer/profile-sets/extra-hdmi.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/profile-sets/force-speaker.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf \
@@ -4053,7 +4190,6 @@ libavahi_wrap_la_LIBADD = $(AM_LIBADD) $(AVAHI_CFLAGS) libpulsecore- at PA_MAJORMIN
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/analog-output-speaker.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/analog-output-speaker-always.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/analog-output.conf.common \
- at HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/analog-output-desktop-speaker.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/analog-output-headphones.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/analog-output-headphones-2.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/analog-output-lineout.conf \
@@ -4062,7 +4198,11 @@ libavahi_wrap_la_LIBADD = $(AM_LIBADD) $(AVAHI_CFLAGS) libpulsecore- at PA_MAJORMIN
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/hdmi-output-0.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/hdmi-output-1.conf \
 @HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/hdmi-output-2.conf \
- at HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/hdmi-output-3.conf
+ at HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/hdmi-output-3.conf \
+ at HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/hdmi-output-4.conf \
+ at HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/hdmi-output-5.conf \
+ at HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/hdmi-output-6.conf \
+ at HAVE_ALSA_TRUE@		modules/alsa/mixer/paths/hdmi-output-7.conf
 
 
 # These are generated by an M4 script
@@ -4119,7 +4259,7 @@ SYMDEF_FILES = module-cli-symdef.h module-cli-protocol-tcp-symdef.h \
 	module-switch-on-connect-symdef.h \
 	module-switch-on-port-available-symdef.h \
 	module-filter-apply-symdef.h module-filter-heuristics-symdef.h \
-	$(am__append_103)
+	$(am__append_113)
 
 # Simple protocol
 module_simple_protocol_tcp_la_SOURCES = modules/module-protocol-stub.c
@@ -4254,10 +4394,10 @@ module_remap_source_la_LDFLAGS = $(MODULE_LDFLAGS)
 module_remap_source_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) $(SERVER_CFLAGS) $(am__append_104)
+	$(AM_CFLAGS) $(SERVER_CFLAGS) $(am__append_114)
 module_ladspa_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
 module_ladspa_sink_la_LIBADD = $(MODULE_LIBADD) $(LIBLTDL) \
-	$(am__append_105)
+	$(am__append_115)
 module_equalizer_sink_la_SOURCES = modules/module-equalizer-sink.c
 module_equalizer_sink_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(DBUS_CFLAGS) $(FFTW_CFLAGS)
 module_equalizer_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
@@ -4341,12 +4481,12 @@ libalsa_util_la_SOURCES = modules/alsa/alsa-util.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 $(am__append_106) $(am__append_109)
+	modules/reserve-wrap.h $(am__append_116) $(am__append_119)
 libalsa_util_la_LDFLAGS = -avoid-version
 libalsa_util_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) \
-	$(am__append_107) $(am__append_110)
+	$(am__append_117) $(am__append_120)
 libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) \
-	$(ASOUNDLIB_CFLAGS) $(am__append_108) $(am__append_111)
+	$(ASOUNDLIB_CFLAGS) $(am__append_118) $(am__append_121)
 module_alsa_sink_la_SOURCES = modules/alsa/module-alsa-sink.c
 module_alsa_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
 module_alsa_sink_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la
@@ -4453,15 +4593,15 @@ module_device_manager_la_CFLAGS = $(AM_CFLAGS)
 module_device_restore_la_SOURCES = modules/module-device-restore.c
 module_device_restore_la_LDFLAGS = $(MODULE_LDFLAGS)
 module_device_restore_la_LIBADD = $(MODULE_LIBADD) \
-	libprotocol-native.la $(am__append_112)
-module_device_restore_la_CFLAGS = $(AM_CFLAGS) $(am__append_113)
+	libprotocol-native.la $(am__append_122)
+module_device_restore_la_CFLAGS = $(AM_CFLAGS) $(am__append_123)
 
 # 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 = $(MODULE_LIBADD) \
-	libprotocol-native.la $(am__append_114)
-module_stream_restore_la_CFLAGS = $(AM_CFLAGS) $(am__append_115)
+	libprotocol-native.la $(am__append_124)
+module_stream_restore_la_CFLAGS = $(AM_CFLAGS) $(am__append_125)
 
 # Card profile restore module
 module_card_restore_la_SOURCES = modules/module-card-restore.c
@@ -4503,13 +4643,13 @@ module_suspend_on_idle_la_CFLAGS = $(AM_CFLAGS)
 module_echo_cancel_la_SOURCES =  \
 	modules/echo-cancel/module-echo-cancel.c \
 	modules/echo-cancel/null.c modules/echo-cancel/echo-cancel.h \
-	$(am__append_116) $(am__append_121)
+	$(am__append_126) $(am__append_131)
 module_echo_cancel_la_LDFLAGS = $(MODULE_LDFLAGS)
 module_echo_cancel_la_LIBADD = $(MODULE_LIBADD) $(LIBSPEEX_LIBS) \
-	$(am__append_119) $(am__append_123)
+	$(am__append_129) $(am__append_133)
 module_echo_cancel_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) \
-	$(LIBSPEEX_CFLAGS) $(am__append_117) $(am__append_120) \
-	$(am__append_122)
+	$(LIBSPEEX_CFLAGS) $(am__append_127) $(am__append_130) \
+	$(am__append_132)
 @HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE at nodist_module_echo_cancel_la_SOURCES = \
 @HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE@		modules/echo-cancel/adrian-aec-orc-gen.c \
 @HAVE_ADRIAN_EC_TRUE@@HAVE_ORC_TRUE@		modules/echo-cancel/adrian-aec-orc-gen.h
@@ -4559,8 +4699,8 @@ module_console_kit_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS)
 module_console_kit_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
 module_systemd_login_la_SOURCES = modules/module-systemd-login.c
 module_systemd_login_la_LDFLAGS = $(MODULE_LDFLAGS)
-module_systemd_login_la_LIBADD = $(MODULE_LIBADD) $(SYSTEMD_LIBS)
-module_systemd_login_la_CFLAGS = $(AM_CFLAGS) $(SYSTEMD_CFLAGS)
+module_systemd_login_la_LIBADD = $(MODULE_LIBADD) $(SYSTEMD_LIBS) $(SYSTEMDLOGIN_LIBS)
+module_systemd_login_la_CFLAGS = $(AM_CFLAGS) $(SYSTEMD_CFLAGS) $(SYSTEMDLOGIN_CFLAGS)
 
 # GConf support
 module_gconf_la_SOURCES = modules/gconf/module-gconf.c
@@ -4603,11 +4743,10 @@ module_bluez4_device_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS) $(SBC_LIBS) libbl
 module_bluez4_device_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) $(SBC_CFLAGS)
 
 # Bluetooth BlueZ 5 sink / source
-libbluez5_util_la_SOURCES = \
-		modules/bluetooth/bluez5-util.c \
-		modules/bluetooth/bluez5-util.h \
-		modules/bluetooth/a2dp-codecs.h
-
+libbluez5_util_la_SOURCES = modules/bluetooth/bluez5-util.c \
+	modules/bluetooth/bluez5-util.h \
+	modules/bluetooth/a2dp-codecs.h $(am__append_134) \
+	$(am__append_135)
 libbluez5_util_la_LDFLAGS = -avoid-version
 libbluez5_util_la_LIBADD = $(MODULE_LIBADD) $(DBUS_LIBS)
 libbluez5_util_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
@@ -4635,7 +4774,7 @@ 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 = $(MODULE_LIBADD) $(DBUS_LIBS) libprotocol-http.la
 module_rygel_media_server_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
-DISTCLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11 start-pulseaudio-kde
+DISTCLEANFILES = esdcompat client.conf default.pa system.pa daemon.conf start-pulseaudio-x11 pulseaudio.service
 @OS_IS_WIN32_FALSE at SYMLINK_PROGRAM = ln -sf
 @OS_IS_WIN32_TRUE at SYMLINK_PROGRAM = cd $(DESTDIR)$(bindir) && cp
 
@@ -4691,8 +4830,6 @@ esdcompat: $(top_builddir)/config.status $(top_srcdir)/src/daemon/esdcompat.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 start-pulseaudio-x11: $(top_builddir)/config.status $(top_srcdir)/src/daemon/start-pulseaudio-x11.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-start-pulseaudio-kde: $(top_builddir)/config.status $(top_srcdir)/src/daemon/start-pulseaudio-kde.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 client.conf: $(top_builddir)/config.status $(top_srcdir)/src/pulse/client.conf.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 daemon.conf: $(top_builddir)/config.status $(top_srcdir)/src/daemon/daemon.conf.in
@@ -4701,6 +4838,8 @@ default.pa: $(top_builddir)/config.status $(top_srcdir)/src/daemon/default.pa.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 system.pa: $(top_builddir)/config.status $(top_srcdir)/src/daemon/system.pa.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+pulseaudio.service: $(top_builddir)/config.status $(top_srcdir)/src/daemon/systemd/user/pulseaudio.service.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
 	@$(NORMAL_INSTALL)
@@ -4916,6 +5055,12 @@ libbluez4-util.la: $(libbluez4_util_la_OBJECTS) $(libbluez4_util_la_DEPENDENCIES
 modules/bluetooth/libbluez5_util_la-bluez5-util.lo:  \
 	modules/bluetooth/$(am__dirstamp) \
 	modules/bluetooth/$(DEPDIR)/$(am__dirstamp)
+modules/bluetooth/libbluez5_util_la-backend-ofono.lo:  \
+	modules/bluetooth/$(am__dirstamp) \
+	modules/bluetooth/$(DEPDIR)/$(am__dirstamp)
+modules/bluetooth/libbluez5_util_la-backend-native.lo:  \
+	modules/bluetooth/$(am__dirstamp) \
+	modules/bluetooth/$(DEPDIR)/$(am__dirstamp)
 
 libbluez5-util.la: $(libbluez5_util_la_OBJECTS) $(libbluez5_util_la_DEPENDENCIES) $(EXTRA_libbluez5_util_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(libbluez5_util_la_LINK) $(am_libbluez5_util_la_rpath) $(libbluez5_util_la_OBJECTS) $(libbluez5_util_la_LIBADD) $(LIBS)
@@ -4993,6 +5138,8 @@ pulse/libpulse_la-channelmap.lo: pulse/$(am__dirstamp) \
 	pulse/$(DEPDIR)/$(am__dirstamp)
 pulse/libpulse_la-context.lo: pulse/$(am__dirstamp) \
 	pulse/$(DEPDIR)/$(am__dirstamp)
+pulse/libpulse_la-direction.lo: pulse/$(am__dirstamp) \
+	pulse/$(DEPDIR)/$(am__dirstamp)
 pulse/libpulse_la-error.lo: pulse/$(am__dirstamp) \
 	pulse/$(DEPDIR)/$(am__dirstamp)
 pulse/libpulse_la-ext-device-manager.lo: pulse/$(am__dirstamp) \
@@ -5078,6 +5225,8 @@ pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-core-util.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-dynarray.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
+pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.lo:  \
+	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-flist.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-g711.lo:  \
@@ -5136,6 +5285,8 @@ pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-queue.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-random.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
+pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.lo:  \
+	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-sample-util.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-shm.lo:  \
@@ -5221,8 +5372,6 @@ pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-core-subscribe.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-core.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
-pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.lo:  \
-	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-hook-list.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-ltdl-helper.lo:  \
@@ -5251,12 +5400,29 @@ pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-remap_sse.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-resampler.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
+pulsecore/resampler/$(am__dirstamp):
+	@$(MKDIR_P) pulsecore/resampler
+	@: > pulsecore/resampler/$(am__dirstamp)
+pulsecore/resampler/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) pulsecore/resampler/$(DEPDIR)
+	@: > pulsecore/resampler/$(DEPDIR)/$(am__dirstamp)
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.lo:  \
+	pulsecore/resampler/$(am__dirstamp) \
+	pulsecore/resampler/$(DEPDIR)/$(am__dirstamp)
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-peaks.lo:  \
+	pulsecore/resampler/$(am__dirstamp) \
+	pulsecore/resampler/$(DEPDIR)/$(am__dirstamp)
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-trivial.lo:  \
+	pulsecore/resampler/$(am__dirstamp) \
+	pulsecore/resampler/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-rtpoll.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-stream-util.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-mix.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
+pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu.lo:  \
+	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu-arm.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu-x86.lo:  \
@@ -5307,6 +5473,12 @@ pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-tdb.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-simple.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-speex.lo:  \
+	pulsecore/resampler/$(am__dirstamp) \
+	pulsecore/resampler/$(DEPDIR)/$(am__dirstamp)
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.lo:  \
+	pulsecore/resampler/$(am__dirstamp) \
+	pulsecore/resampler/$(DEPDIR)/$(am__dirstamp)
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-svolume-orc-gen.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 
@@ -5329,6 +5501,11 @@ pulsecore/libpulsecore_mix_neon_la-mix_neon.lo:  \
 
 libpulsecore_mix_neon.la: $(libpulsecore_mix_neon_la_OBJECTS) $(libpulsecore_mix_neon_la_DEPENDENCIES) $(EXTRA_libpulsecore_mix_neon_la_DEPENDENCIES) 
 	$(AM_V_CCLD)$(libpulsecore_mix_neon_la_LINK) $(am_libpulsecore_mix_neon_la_rpath) $(libpulsecore_mix_neon_la_OBJECTS) $(libpulsecore_mix_neon_la_LIBADD) $(LIBS)
+pulsecore/libpulsecore_remap_neon_la-remap_neon.lo:  \
+	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
+
+libpulsecore_remap_neon.la: $(libpulsecore_remap_neon_la_OBJECTS) $(libpulsecore_remap_neon_la_DEPENDENCIES) $(EXTRA_libpulsecore_remap_neon_la_DEPENDENCIES) 
+	$(AM_V_CCLD)$(libpulsecore_remap_neon_la_LINK) $(am_libpulsecore_remap_neon_la_rpath) $(libpulsecore_remap_neon_la_OBJECTS) $(libpulsecore_remap_neon_la_LIBADD) $(LIBS)
 pulsecore/libpulsecore_sconv_neon_la-sconv_neon.lo:  \
 	pulsecore/$(am__dirstamp) pulsecore/$(DEPDIR)/$(am__dirstamp)
 
@@ -6125,12 +6302,30 @@ tests/connect_stress-connect-stress.$(OBJEXT): tests/$(am__dirstamp) \
 connect-stress$(EXEEXT): $(connect_stress_OBJECTS) $(connect_stress_DEPENDENCIES) $(EXTRA_connect_stress_DEPENDENCIES) 
 	@rm -f connect-stress$(EXEEXT)
 	$(AM_V_CCLD)$(connect_stress_LINK) $(connect_stress_OBJECTS) $(connect_stress_LDADD) $(LIBS)
-tests/cpu_test-cpu-test.$(OBJEXT): tests/$(am__dirstamp) \
+tests/cpu_mix_test-cpu-mix-test.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+
+cpu-mix-test$(EXEEXT): $(cpu_mix_test_OBJECTS) $(cpu_mix_test_DEPENDENCIES) $(EXTRA_cpu_mix_test_DEPENDENCIES) 
+	@rm -f cpu-mix-test$(EXEEXT)
+	$(AM_V_CCLD)$(cpu_mix_test_LINK) $(cpu_mix_test_OBJECTS) $(cpu_mix_test_LDADD) $(LIBS)
+tests/cpu_remap_test-cpu-remap-test.$(OBJEXT): tests/$(am__dirstamp) \
+	tests/$(DEPDIR)/$(am__dirstamp)
+
+cpu-remap-test$(EXEEXT): $(cpu_remap_test_OBJECTS) $(cpu_remap_test_DEPENDENCIES) $(EXTRA_cpu_remap_test_DEPENDENCIES) 
+	@rm -f cpu-remap-test$(EXEEXT)
+	$(AM_V_CCLD)$(cpu_remap_test_LINK) $(cpu_remap_test_OBJECTS) $(cpu_remap_test_LDADD) $(LIBS)
+tests/cpu_sconv_test-cpu-sconv-test.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 
-cpu-test$(EXEEXT): $(cpu_test_OBJECTS) $(cpu_test_DEPENDENCIES) $(EXTRA_cpu_test_DEPENDENCIES) 
-	@rm -f cpu-test$(EXEEXT)
-	$(AM_V_CCLD)$(cpu_test_LINK) $(cpu_test_OBJECTS) $(cpu_test_LDADD) $(LIBS)
+cpu-sconv-test$(EXEEXT): $(cpu_sconv_test_OBJECTS) $(cpu_sconv_test_DEPENDENCIES) $(EXTRA_cpu_sconv_test_DEPENDENCIES) 
+	@rm -f cpu-sconv-test$(EXEEXT)
+	$(AM_V_CCLD)$(cpu_sconv_test_LINK) $(cpu_sconv_test_OBJECTS) $(cpu_sconv_test_LDADD) $(LIBS)
+tests/cpu_volume_test-cpu-volume-test.$(OBJEXT):  \
+	tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
+
+cpu-volume-test$(EXEEXT): $(cpu_volume_test_OBJECTS) $(cpu_volume_test_DEPENDENCIES) $(EXTRA_cpu_volume_test_DEPENDENCIES) 
+	@rm -f cpu-volume-test$(EXEEXT)
+	$(AM_V_CCLD)$(cpu_volume_test_LINK) $(cpu_volume_test_OBJECTS) $(cpu_volume_test_LDADD) $(LIBS)
 tests/cpulimit_test-cpulimit-test.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 daemon/$(am__dirstamp):
@@ -6272,12 +6467,6 @@ tests/memblockq_test-memblockq-test.$(OBJEXT): tests/$(am__dirstamp) \
 memblockq-test$(EXEEXT): $(memblockq_test_OBJECTS) $(memblockq_test_DEPENDENCIES) $(EXTRA_memblockq_test_DEPENDENCIES) 
 	@rm -f memblockq-test$(EXEEXT)
 	$(AM_V_CCLD)$(memblockq_test_LINK) $(memblockq_test_OBJECTS) $(memblockq_test_LDADD) $(LIBS)
-tests/mix_special_test-mix-special-test.$(OBJEXT):  \
-	tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
-
-mix-special-test$(EXEEXT): $(mix_special_test_OBJECTS) $(mix_special_test_DEPENDENCIES) $(EXTRA_mix_special_test_DEPENDENCIES) 
-	@rm -f mix-special-test$(EXEEXT)
-	$(AM_V_CCLD)$(mix_special_test_LINK) $(mix_special_test_OBJECTS) $(mix_special_test_LDADD) $(LIBS)
 tests/mix_test-mix-test.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 
@@ -6412,6 +6601,12 @@ tests/smoother_test-smoother-test.$(OBJEXT): tests/$(am__dirstamp) \
 smoother-test$(EXEEXT): $(smoother_test_OBJECTS) $(smoother_test_DEPENDENCIES) $(EXTRA_smoother_test_DEPENDENCIES) 
 	@rm -f smoother-test$(EXEEXT)
 	$(AM_V_CCLD)$(smoother_test_LINK) $(smoother_test_OBJECTS) $(smoother_test_LDADD) $(LIBS)
+tests/srbchannel_test-srbchannel-test.$(OBJEXT):  \
+	tests/$(am__dirstamp) tests/$(DEPDIR)/$(am__dirstamp)
+
+srbchannel-test$(EXEEXT): $(srbchannel_test_OBJECTS) $(srbchannel_test_DEPENDENCIES) $(EXTRA_srbchannel_test_DEPENDENCIES) 
+	@rm -f srbchannel-test$(EXEEXT)
+	$(AM_V_CCLD)$(srbchannel_test_LINK) $(srbchannel_test_OBJECTS) $(srbchannel_test_LDADD) $(LIBS)
 tests/stripnul-stripnul.$(OBJEXT): tests/$(am__dirstamp) \
 	tests/$(DEPDIR)/$(am__dirstamp)
 
@@ -6531,6 +6726,8 @@ mostlyclean-compile:
 	-rm -f pulsecore/*.lo
 	-rm -f pulsecore/ffmpeg/*.$(OBJEXT)
 	-rm -f pulsecore/ffmpeg/*.lo
+	-rm -f pulsecore/resampler/*.$(OBJEXT)
+	-rm -f pulsecore/resampler/*.lo
 	-rm -f tests/*.$(OBJEXT)
 	-rm -f tests/*.lo
 	-rm -f utils/*.$(OBJEXT)
@@ -6628,6 +6825,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at modules/alsa/$(DEPDIR)/module_alsa_sink_la-module-alsa-sink.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at modules/alsa/$(DEPDIR)/module_alsa_source_la-module-alsa-source.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at modules/bluetooth/$(DEPDIR)/libbluez4_util_la-bluez4-util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at modules/bluetooth/$(DEPDIR)/libbluez5_util_la-backend-native.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at modules/bluetooth/$(DEPDIR)/libbluez5_util_la-backend-ofono.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at modules/bluetooth/$(DEPDIR)/libbluez5_util_la-bluez5-util.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at modules/bluetooth/$(DEPDIR)/module_bluetooth_discover_la-module-bluetooth-discover.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at modules/bluetooth/$(DEPDIR)/module_bluetooth_policy_la-module-bluetooth-policy.Plo at am__quote@
@@ -6687,6 +6886,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at modules/xen/$(DEPDIR)/module_xenpv_sink_la-module-xenpv-sink.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulse/$(DEPDIR)/libpulse_la-channelmap.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulse/$(DEPDIR)/libpulse_la-context.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulse/$(DEPDIR)/libpulse_la-direction.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulse/$(DEPDIR)/libpulse_la-error.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulse/$(DEPDIR)/libpulse_la-ext-device-manager.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulse/$(DEPDIR)/libpulse_la-ext-device-restore.Plo at am__quote@
@@ -6739,6 +6939,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-dbus-util.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-dllmain.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-dynarray.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-flist.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-g711.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-hashmap.Plo at am__quote@
@@ -6780,6 +6981,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-socket-client.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-socket-server.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-socket-util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-strbuf.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-strlist.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-svolume_arm.Plo at am__quote@
@@ -6806,12 +7008,12 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu-arm.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu-orc.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu-x86.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-database-gdbm.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-database-simple.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-database-tdb.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-dbus-shared.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-device-port.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-hook-list.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-ltdl-helper.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-mix.Plo at am__quote@
@@ -6848,6 +7050,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-thread-mq.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-x11wrap.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_mix_neon_la-mix_neon.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_remap_neon_la-remap_neon.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/libpulsecore_sconv_neon_la-sconv_neon.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/mime-type.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/protocol-cli.Plo at am__quote@
@@ -6855,6 +7058,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/protocol-http.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/$(DEPDIR)/protocol-simple.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at pulsecore/ffmpeg/$(DEPDIR)/libpulsecore_foreign_la-resample2.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-peaks.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-speex.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-trivial.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/alsa_mixer_path_test-alsa-mixer-path-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/alsa_time_test-alsa-time-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/asyncmsgq_test-asyncmsgq-test.Po at am__quote@
@@ -6862,7 +7070,10 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/channelmap_test-channelmap-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/close_test-close-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/connect_stress-connect-stress.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/cpu_test-cpu-test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/cpu_mix_test-cpu-mix-test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/cpu_remap_test-cpu-remap-test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/cpu_sconv_test-cpu-sconv-test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/cpu_volume_test-cpu-volume-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/cpulimit_test-cpulimit-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/cpulimit_test2-cpulimit-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/extended_test-extended-test.Po at am__quote@
@@ -6881,7 +7092,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/mcalign_test-mcalign-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/memblock_test-memblock-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/memblockq_test-memblockq-test.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/mix_special_test-mix-special-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/mix_test-mix-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/mult_s16_test-mult-s16-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/once_test-once-test.Po at am__quote@
@@ -6896,6 +7106,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/sig2str_test-sig2str-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/sigbus_test-sigbus-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/smoother_test-smoother-test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/srbchannel_test-srbchannel-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/stripnul-stripnul.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/strlist_test-strlist-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/sync_playback-sync-playback.Po at am__quote@
@@ -7019,6 +7230,20 @@ modules/bluetooth/libbluez5_util_la-bluez5-util.lo: modules/bluetooth/bluez5-uti
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbluez5_util_la_CFLAGS) $(CFLAGS) -c -o modules/bluetooth/libbluez5_util_la-bluez5-util.lo `test -f 'modules/bluetooth/bluez5-util.c' || echo '$(srcdir)/'`modules/bluetooth/bluez5-util.c
 
+modules/bluetooth/libbluez5_util_la-backend-ofono.lo: modules/bluetooth/backend-ofono.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbluez5_util_la_CFLAGS) $(CFLAGS) -MT modules/bluetooth/libbluez5_util_la-backend-ofono.lo -MD -MP -MF modules/bluetooth/$(DEPDIR)/libbluez5_util_la-backend-ofono.Tpo -c -o modules/bluetooth/libbluez5_util_la-backend-ofono.lo `test -f 'modules/bluetooth/backend-ofono.c' || echo '$(srcdir)/'`modules/blu [...]
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) modules/bluetooth/$(DEPDIR)/libbluez5_util_la-backend-ofono.Tpo modules/bluetooth/$(DEPDIR)/libbluez5_util_la-backend-ofono.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='modules/bluetooth/backend-ofono.c' object='modules/bluetooth/libbluez5_util_la-backend-ofono.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbluez5_util_la_CFLAGS) $(CFLAGS) -c -o modules/bluetooth/libbluez5_util_la-backend-ofono.lo `test -f 'modules/bluetooth/backend-ofono.c' || echo '$(srcdir)/'`modules/bluetooth/backend-ofono.c
+
+modules/bluetooth/libbluez5_util_la-backend-native.lo: modules/bluetooth/backend-native.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbluez5_util_la_CFLAGS) $(CFLAGS) -MT modules/bluetooth/libbluez5_util_la-backend-native.lo -MD -MP -MF modules/bluetooth/$(DEPDIR)/libbluez5_util_la-backend-native.Tpo -c -o modules/bluetooth/libbluez5_util_la-backend-native.lo `test -f 'modules/bluetooth/backend-native.c' || echo '$(srcdir)/'`modules [...]
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) modules/bluetooth/$(DEPDIR)/libbluez5_util_la-backend-native.Tpo modules/bluetooth/$(DEPDIR)/libbluez5_util_la-backend-native.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='modules/bluetooth/backend-native.c' object='modules/bluetooth/libbluez5_util_la-backend-native.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libbluez5_util_la_CFLAGS) $(CFLAGS) -c -o modules/bluetooth/libbluez5_util_la-backend-native.lo `test -f 'modules/bluetooth/backend-native.c' || echo '$(srcdir)/'`modules/bluetooth/backend-native.c
+
 pulsecore/libprotocol_native_la-protocol-native.lo: pulsecore/protocol-native.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libprotocol_native_la_CFLAGS) $(CFLAGS) -MT pulsecore/libprotocol_native_la-protocol-native.lo -MD -MP -MF pulsecore/$(DEPDIR)/libprotocol_native_la-protocol-native.Tpo -c -o pulsecore/libprotocol_native_la-protocol-native.lo `test -f 'pulsecore/protocol-native.c' || echo '$(srcdir)/'`pulsecore/protocol- [...]
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libprotocol_native_la-protocol-native.Tpo pulsecore/$(DEPDIR)/libprotocol_native_la-protocol-native.Plo
@@ -7054,6 +7279,13 @@ pulse/libpulse_la-context.lo: pulse/context.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o pulse/libpulse_la-context.lo `test -f 'pulse/context.c' || echo '$(srcdir)/'`pulse/context.c
 
+pulse/libpulse_la-direction.lo: pulse/direction.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT pulse/libpulse_la-direction.lo -MD -MP -MF pulse/$(DEPDIR)/libpulse_la-direction.Tpo -c -o pulse/libpulse_la-direction.lo `test -f 'pulse/direction.c' || echo '$(srcdir)/'`pulse/direction.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulse/$(DEPDIR)/libpulse_la-direction.Tpo pulse/$(DEPDIR)/libpulse_la-direction.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulse/direction.c' object='pulse/libpulse_la-direction.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -c -o pulse/libpulse_la-direction.lo `test -f 'pulse/direction.c' || echo '$(srcdir)/'`pulse/direction.c
+
 pulse/libpulse_la-error.lo: pulse/error.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulse_la_CFLAGS) $(CFLAGS) -MT pulse/libpulse_la-error.lo -MD -MP -MF pulse/$(DEPDIR)/libpulse_la-error.Tpo -c -o pulse/libpulse_la-error.lo `test -f 'pulse/error.c' || echo '$(srcdir)/'`pulse/error.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulse/$(DEPDIR)/libpulse_la-error.Tpo pulse/$(DEPDIR)/libpulse_la-error.Plo
@@ -7341,6 +7573,13 @@ pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-dynarray.lo: pulsecore/dynarray.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-dynarray.lo `test -f 'pulsecore/dynarray.c' || echo '$(srcdir)/'`pulsecore/dynarray.c
 
+pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.lo: pulsecore/fdsem.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.Tpo -c -o pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.lo `test -f 'pulsecore/fdsem.c' || echo '$(srcdir)/'`pulsecore/fdsem.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.Tpo pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/fdsem.c' object='pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-fdsem.lo `test -f 'pulsecore/fdsem.c' || echo '$(srcdir)/'`pulsecore/fdsem.c
+
 pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-flist.lo: pulsecore/flist.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-flist.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-flist.Tpo -c -o pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-flist.lo `test -f 'pulsecore/flist.c' || echo '$(srcdir)/'`pulsecore/flist.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-flist.Tpo pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-flist.Plo
@@ -7544,6 +7783,13 @@ pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-random.lo: pulsecore/random.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-random.lo `test -f 'pulsecore/random.c' || echo '$(srcdir)/'`pulsecore/random.c
 
+pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.lo: pulsecore/srbchannel.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.Tpo -c -o pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.lo `test -f 'pulsecore/srbchannel.c' || echo '$(s [...]
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.Tpo pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/srbchannel.c' object='pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-srbchannel.lo `test -f 'pulsecore/srbchannel.c' || echo '$(srcdir)/'`pulsecore/srbchannel.c
+
 pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-sample-util.lo: pulsecore/sample-util.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-sample-util.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-sample-util.Tpo -c -o pulsecore/libpulsecommon_ at PA_MAJORMINOR@_la-sample-util.lo `test -f 'pulsecore/sample-util.c' || echo  [...]
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-sample-util.Tpo pulsecore/$(DEPDIR)/libpulsecommon_ at PA_MAJORMINOR@_la-sample-util.Plo
@@ -7831,13 +8077,6 @@ pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-core.lo: pulsecore/core.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-core.lo `test -f 'pulsecore/core.c' || echo '$(srcdir)/'`pulsecore/core.c
 
-pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.lo: pulsecore/fdsem.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.Tpo -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.lo `test -f 'pulsecore/fdsem.c' || echo '$(srcdir)/'`pulsecore/fdsem.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.Tpo pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.Plo
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/fdsem.c' object='pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.lo' libtool=yes @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-fdsem.lo `test -f 'pulsecore/fdsem.c' || echo '$(srcdir)/'`pulsecore/fdsem.c
-
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-hook-list.lo: pulsecore/hook-list.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-hook-list.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-hook-list.Tpo -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-hook-list.lo `test -f 'pulsecore/hook-list.c' || echo '$(srcdir)/'`pul [...]
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-hook-list.Tpo pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-hook-list.Plo
@@ -7936,6 +8175,27 @@ pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-resampler.lo: pulsecore/resampler.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-resampler.lo `test -f 'pulsecore/resampler.c' || echo '$(srcdir)/'`pulsecore/resampler.c
 
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.lo: pulsecore/resampler/ffmpeg.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.lo -MD -MP -MF pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.Tpo -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.lo `test -f 'pulsecore/resampler/ffmpeg [...]
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.Tpo pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/resampler/ffmpeg.c' object='pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-ffmpeg.lo `test -f 'pulsecore/resampler/ffmpeg.c' || echo '$(srcdir)/'`pulsecore/resampler/ffmpeg.c
+
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-peaks.lo: pulsecore/resampler/peaks.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-peaks.lo -MD -MP -MF pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-peaks.Tpo -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-peaks.lo `test -f 'pulsecore/resampler/peaks.c'  [...]
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-peaks.Tpo pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-peaks.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/resampler/peaks.c' object='pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-peaks.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-peaks.lo `test -f 'pulsecore/resampler/peaks.c' || echo '$(srcdir)/'`pulsecore/resampler/peaks.c
+
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-trivial.lo: pulsecore/resampler/trivial.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-trivial.lo -MD -MP -MF pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-trivial.Tpo -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-trivial.lo `test -f 'pulsecore/resampler/tri [...]
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-trivial.Tpo pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-trivial.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/resampler/trivial.c' object='pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-trivial.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-trivial.lo `test -f 'pulsecore/resampler/trivial.c' || echo '$(srcdir)/'`pulsecore/resampler/trivial.c
+
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-rtpoll.lo: pulsecore/rtpoll.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-rtpoll.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-rtpoll.Tpo -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-rtpoll.lo `test -f 'pulsecore/rtpoll.c' || echo '$(srcdir)/'`pulsecore/rtpoll.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-rtpoll.Tpo pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-rtpoll.Plo
@@ -7957,6 +8217,13 @@ pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-mix.lo: pulsecore/mix.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-mix.lo `test -f 'pulsecore/mix.c' || echo '$(srcdir)/'`pulsecore/mix.c
 
+pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu.lo: pulsecore/cpu.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu.Tpo -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu.lo `test -f 'pulsecore/cpu.c' || echo '$(srcdir)/'`pulsecore/cpu.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu.Tpo pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/cpu.c' object='pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu.lo `test -f 'pulsecore/cpu.c' || echo '$(srcdir)/'`pulsecore/cpu.c
+
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu-arm.lo: pulsecore/cpu-arm.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu-arm.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu-arm.Tpo -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-cpu-arm.lo `test -f 'pulsecore/cpu-arm.c' || echo '$(srcdir)/'`pulsecore/c [...]
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu-arm.Tpo pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-cpu-arm.Plo
@@ -8132,6 +8399,20 @@ pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-simple.lo: pulsecore/database
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-database-simple.lo `test -f 'pulsecore/database-simple.c' || echo '$(srcdir)/'`pulsecore/database-simple.c
 
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-speex.lo: pulsecore/resampler/speex.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-speex.lo -MD -MP -MF pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-speex.Tpo -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-speex.lo `test -f 'pulsecore/resampler/speex.c'  [...]
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-speex.Tpo pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-speex.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/resampler/speex.c' object='pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-speex.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-speex.lo `test -f 'pulsecore/resampler/speex.c' || echo '$(srcdir)/'`pulsecore/resampler/speex.c
+
+pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.lo: pulsecore/resampler/libsamplerate.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.lo -MD -MP -MF pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.Tpo -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.lo `test -f 'pulse [...]
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.Tpo pulsecore/resampler/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/resampler/libsamplerate.c' object='pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o pulsecore/resampler/libpulsecore_ at PA_MAJORMINOR@_la-libsamplerate.lo `test -f 'pulsecore/resampler/libsamplerate.c' || echo '$(srcdir)/'`pulsecore/resampler/libsamplerate.c
+
 pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-svolume-orc-gen.lo: pulsecore/svolume-orc-gen.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_ at PA_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-svolume-orc-gen.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-svolume-orc-gen.Tpo -c -o pulsecore/libpulsecore_ at PA_MAJORMINOR@_la-svolume-orc-gen.lo `test -f 'pulsecore/svolume-orc-gen.c'  [...]
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-svolume-orc-gen.Tpo pulsecore/$(DEPDIR)/libpulsecore_ at PA_MAJORMINOR@_la-svolume-orc-gen.Plo
@@ -8153,6 +8434,13 @@ pulsecore/libpulsecore_mix_neon_la-mix_neon.lo: pulsecore/mix_neon.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_mix_neon_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecore_mix_neon_la-mix_neon.lo `test -f 'pulsecore/mix_neon.c' || echo '$(srcdir)/'`pulsecore/mix_neon.c
 
+pulsecore/libpulsecore_remap_neon_la-remap_neon.lo: pulsecore/remap_neon.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_remap_neon_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecore_remap_neon_la-remap_neon.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecore_remap_neon_la-remap_neon.Tpo -c -o pulsecore/libpulsecore_remap_neon_la-remap_neon.lo `test -f 'pulsecore/remap_neon.c' || echo '$(srcdir)/'`pulsecore/remap_neon.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecore_remap_neon_la-remap_neon.Tpo pulsecore/$(DEPDIR)/libpulsecore_remap_neon_la-remap_neon.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='pulsecore/remap_neon.c' object='pulsecore/libpulsecore_remap_neon_la-remap_neon.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_remap_neon_la_CFLAGS) $(CFLAGS) -c -o pulsecore/libpulsecore_remap_neon_la-remap_neon.lo `test -f 'pulsecore/remap_neon.c' || echo '$(srcdir)/'`pulsecore/remap_neon.c
+
 pulsecore/libpulsecore_sconv_neon_la-sconv_neon.lo: pulsecore/sconv_neon.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpulsecore_sconv_neon_la_CFLAGS) $(CFLAGS) -MT pulsecore/libpulsecore_sconv_neon_la-sconv_neon.lo -MD -MP -MF pulsecore/$(DEPDIR)/libpulsecore_sconv_neon_la-sconv_neon.Tpo -c -o pulsecore/libpulsecore_sconv_neon_la-sconv_neon.lo `test -f 'pulsecore/sconv_neon.c' || echo '$(srcdir)/'`pulsecore/sconv_neon.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) pulsecore/$(DEPDIR)/libpulsecore_sconv_neon_la-sconv_neon.Tpo pulsecore/$(DEPDIR)/libpulsecore_sconv_neon_la-sconv_neon.Plo
@@ -8846,19 +9134,61 @@ tests/connect_stress-connect-stress.obj: tests/connect-stress.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(connect_stress_CFLAGS) $(CFLAGS) -c -o tests/connect_stress-connect-stress.obj `if test -f 'tests/connect-stress.c'; then $(CYGPATH_W) 'tests/connect-stress.c'; else $(CYGPATH_W) '$(srcdir)/tests/connect-stress.c'; fi`
 
-tests/cpu_test-cpu-test.o: tests/cpu-test.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_test_CFLAGS) $(CFLAGS) -MT tests/cpu_test-cpu-test.o -MD -MP -MF tests/$(DEPDIR)/cpu_test-cpu-test.Tpo -c -o tests/cpu_test-cpu-test.o `test -f 'tests/cpu-test.c' || echo '$(srcdir)/'`tests/cpu-test.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_test-cpu-test.Tpo tests/$(DEPDIR)/cpu_test-cpu-test.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-test.c' object='tests/cpu_test-cpu-test.o' libtool=no @AMDEPBACKSLASH@
+tests/cpu_mix_test-cpu-mix-test.o: tests/cpu-mix-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_mix_test_CFLAGS) $(CFLAGS) -MT tests/cpu_mix_test-cpu-mix-test.o -MD -MP -MF tests/$(DEPDIR)/cpu_mix_test-cpu-mix-test.Tpo -c -o tests/cpu_mix_test-cpu-mix-test.o `test -f 'tests/cpu-mix-test.c' || echo '$(srcdir)/'`tests/cpu-mix-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_mix_test-cpu-mix-test.Tpo tests/$(DEPDIR)/cpu_mix_test-cpu-mix-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-mix-test.c' object='tests/cpu_mix_test-cpu-mix-test.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_test-cpu-test.o `test -f 'tests/cpu-test.c' || echo '$(srcdir)/'`tests/cpu-test.c
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_mix_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_mix_test-cpu-mix-test.o `test -f 'tests/cpu-mix-test.c' || echo '$(srcdir)/'`tests/cpu-mix-test.c
 
-tests/cpu_test-cpu-test.obj: tests/cpu-test.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_test_CFLAGS) $(CFLAGS) -MT tests/cpu_test-cpu-test.obj -MD -MP -MF tests/$(DEPDIR)/cpu_test-cpu-test.Tpo -c -o tests/cpu_test-cpu-test.obj `if test -f 'tests/cpu-test.c'; then $(CYGPATH_W) 'tests/cpu-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-test.c'; fi`
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_test-cpu-test.Tpo tests/$(DEPDIR)/cpu_test-cpu-test.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-test.c' object='tests/cpu_test-cpu-test.obj' libtool=no @AMDEPBACKSLASH@
+tests/cpu_mix_test-cpu-mix-test.obj: tests/cpu-mix-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_mix_test_CFLAGS) $(CFLAGS) -MT tests/cpu_mix_test-cpu-mix-test.obj -MD -MP -MF tests/$(DEPDIR)/cpu_mix_test-cpu-mix-test.Tpo -c -o tests/cpu_mix_test-cpu-mix-test.obj `if test -f 'tests/cpu-mix-test.c'; then $(CYGPATH_W) 'tests/cpu-mix-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-mix-test.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_mix_test-cpu-mix-test.Tpo tests/$(DEPDIR)/cpu_mix_test-cpu-mix-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-mix-test.c' object='tests/cpu_mix_test-cpu-mix-test.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_test-cpu-test.obj `if test -f 'tests/cpu-test.c'; then $(CYGPATH_W) 'tests/cpu-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-test.c'; fi`
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_mix_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_mix_test-cpu-mix-test.obj `if test -f 'tests/cpu-mix-test.c'; then $(CYGPATH_W) 'tests/cpu-mix-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-mix-test.c'; fi`
+
+tests/cpu_remap_test-cpu-remap-test.o: tests/cpu-remap-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_remap_test_CFLAGS) $(CFLAGS) -MT tests/cpu_remap_test-cpu-remap-test.o -MD -MP -MF tests/$(DEPDIR)/cpu_remap_test-cpu-remap-test.Tpo -c -o tests/cpu_remap_test-cpu-remap-test.o `test -f 'tests/cpu-remap-test.c' || echo '$(srcdir)/'`tests/cpu-remap-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_remap_test-cpu-remap-test.Tpo tests/$(DEPDIR)/cpu_remap_test-cpu-remap-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-remap-test.c' object='tests/cpu_remap_test-cpu-remap-test.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_remap_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_remap_test-cpu-remap-test.o `test -f 'tests/cpu-remap-test.c' || echo '$(srcdir)/'`tests/cpu-remap-test.c
+
+tests/cpu_remap_test-cpu-remap-test.obj: tests/cpu-remap-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_remap_test_CFLAGS) $(CFLAGS) -MT tests/cpu_remap_test-cpu-remap-test.obj -MD -MP -MF tests/$(DEPDIR)/cpu_remap_test-cpu-remap-test.Tpo -c -o tests/cpu_remap_test-cpu-remap-test.obj `if test -f 'tests/cpu-remap-test.c'; then $(CYGPATH_W) 'tests/cpu-remap-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-remap-test.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_remap_test-cpu-remap-test.Tpo tests/$(DEPDIR)/cpu_remap_test-cpu-remap-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-remap-test.c' object='tests/cpu_remap_test-cpu-remap-test.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_remap_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_remap_test-cpu-remap-test.obj `if test -f 'tests/cpu-remap-test.c'; then $(CYGPATH_W) 'tests/cpu-remap-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-remap-test.c'; fi`
+
+tests/cpu_sconv_test-cpu-sconv-test.o: tests/cpu-sconv-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_sconv_test_CFLAGS) $(CFLAGS) -MT tests/cpu_sconv_test-cpu-sconv-test.o -MD -MP -MF tests/$(DEPDIR)/cpu_sconv_test-cpu-sconv-test.Tpo -c -o tests/cpu_sconv_test-cpu-sconv-test.o `test -f 'tests/cpu-sconv-test.c' || echo '$(srcdir)/'`tests/cpu-sconv-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_sconv_test-cpu-sconv-test.Tpo tests/$(DEPDIR)/cpu_sconv_test-cpu-sconv-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-sconv-test.c' object='tests/cpu_sconv_test-cpu-sconv-test.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_sconv_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_sconv_test-cpu-sconv-test.o `test -f 'tests/cpu-sconv-test.c' || echo '$(srcdir)/'`tests/cpu-sconv-test.c
+
+tests/cpu_sconv_test-cpu-sconv-test.obj: tests/cpu-sconv-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_sconv_test_CFLAGS) $(CFLAGS) -MT tests/cpu_sconv_test-cpu-sconv-test.obj -MD -MP -MF tests/$(DEPDIR)/cpu_sconv_test-cpu-sconv-test.Tpo -c -o tests/cpu_sconv_test-cpu-sconv-test.obj `if test -f 'tests/cpu-sconv-test.c'; then $(CYGPATH_W) 'tests/cpu-sconv-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-sconv-test.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_sconv_test-cpu-sconv-test.Tpo tests/$(DEPDIR)/cpu_sconv_test-cpu-sconv-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-sconv-test.c' object='tests/cpu_sconv_test-cpu-sconv-test.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_sconv_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_sconv_test-cpu-sconv-test.obj `if test -f 'tests/cpu-sconv-test.c'; then $(CYGPATH_W) 'tests/cpu-sconv-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-sconv-test.c'; fi`
+
+tests/cpu_volume_test-cpu-volume-test.o: tests/cpu-volume-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_volume_test_CFLAGS) $(CFLAGS) -MT tests/cpu_volume_test-cpu-volume-test.o -MD -MP -MF tests/$(DEPDIR)/cpu_volume_test-cpu-volume-test.Tpo -c -o tests/cpu_volume_test-cpu-volume-test.o `test -f 'tests/cpu-volume-test.c' || echo '$(srcdir)/'`tests/cpu-volume-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_volume_test-cpu-volume-test.Tpo tests/$(DEPDIR)/cpu_volume_test-cpu-volume-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-volume-test.c' object='tests/cpu_volume_test-cpu-volume-test.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_volume_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_volume_test-cpu-volume-test.o `test -f 'tests/cpu-volume-test.c' || echo '$(srcdir)/'`tests/cpu-volume-test.c
+
+tests/cpu_volume_test-cpu-volume-test.obj: tests/cpu-volume-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_volume_test_CFLAGS) $(CFLAGS) -MT tests/cpu_volume_test-cpu-volume-test.obj -MD -MP -MF tests/$(DEPDIR)/cpu_volume_test-cpu-volume-test.Tpo -c -o tests/cpu_volume_test-cpu-volume-test.obj `if test -f 'tests/cpu-volume-test.c'; then $(CYGPATH_W) 'tests/cpu-volume-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-volume-test.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/cpu_volume_test-cpu-volume-test.Tpo tests/$(DEPDIR)/cpu_volume_test-cpu-volume-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/cpu-volume-test.c' object='tests/cpu_volume_test-cpu-volume-test.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpu_volume_test_CFLAGS) $(CFLAGS) -c -o tests/cpu_volume_test-cpu-volume-test.obj `if test -f 'tests/cpu-volume-test.c'; then $(CYGPATH_W) 'tests/cpu-volume-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/cpu-volume-test.c'; fi`
 
 tests/cpulimit_test-cpulimit-test.o: tests/cpulimit-test.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cpulimit_test_CFLAGS) $(CFLAGS) -MT tests/cpulimit_test-cpulimit-test.o -MD -MP -MF tests/$(DEPDIR)/cpulimit_test-cpulimit-test.Tpo -c -o tests/cpulimit_test-cpulimit-test.o `test -f 'tests/cpulimit-test.c' || echo '$(srcdir)/'`tests/cpulimit-test.c
@@ -9224,20 +9554,6 @@ tests/memblockq_test-memblockq-test.obj: tests/memblockq-test.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memblockq_test_CFLAGS) $(CFLAGS) -c -o tests/memblockq_test-memblockq-test.obj `if test -f 'tests/memblockq-test.c'; then $(CYGPATH_W) 'tests/memblockq-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/memblockq-test.c'; fi`
 
-tests/mix_special_test-mix-special-test.o: tests/mix-special-test.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mix_special_test_CFLAGS) $(CFLAGS) -MT tests/mix_special_test-mix-special-test.o -MD -MP -MF tests/$(DEPDIR)/mix_special_test-mix-special-test.Tpo -c -o tests/mix_special_test-mix-special-test.o `test -f 'tests/mix-special-test.c' || echo '$(srcdir)/'`tests/mix-special-test.c
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/mix_special_test-mix-special-test.Tpo tests/$(DEPDIR)/mix_special_test-mix-special-test.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/mix-special-test.c' object='tests/mix_special_test-mix-special-test.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mix_special_test_CFLAGS) $(CFLAGS) -c -o tests/mix_special_test-mix-special-test.o `test -f 'tests/mix-special-test.c' || echo '$(srcdir)/'`tests/mix-special-test.c
-
-tests/mix_special_test-mix-special-test.obj: tests/mix-special-test.c
- at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mix_special_test_CFLAGS) $(CFLAGS) -MT tests/mix_special_test-mix-special-test.obj -MD -MP -MF tests/$(DEPDIR)/mix_special_test-mix-special-test.Tpo -c -o tests/mix_special_test-mix-special-test.obj `if test -f 'tests/mix-special-test.c'; then $(CYGPATH_W) 'tests/mix-special-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/mix-special-test.c'; fi`
- at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/mix_special_test-mix-special-test.Tpo tests/$(DEPDIR)/mix_special_test-mix-special-test.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/mix-special-test.c' object='tests/mix_special_test-mix-special-test.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mix_special_test_CFLAGS) $(CFLAGS) -c -o tests/mix_special_test-mix-special-test.obj `if test -f 'tests/mix-special-test.c'; then $(CYGPATH_W) 'tests/mix-special-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/mix-special-test.c'; fi`
-
 tests/mix_test-mix-test.o: tests/mix-test.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mix_test_CFLAGS) $(CFLAGS) -MT tests/mix_test-mix-test.o -MD -MP -MF tests/$(DEPDIR)/mix_test-mix-test.Tpo -c -o tests/mix_test-mix-test.o `test -f 'tests/mix-test.c' || echo '$(srcdir)/'`tests/mix-test.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/mix_test-mix-test.Tpo tests/$(DEPDIR)/mix_test-mix-test.Po
@@ -9616,6 +9932,20 @@ tests/smoother_test-smoother-test.obj: tests/smoother-test.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(smoother_test_CFLAGS) $(CFLAGS) -c -o tests/smoother_test-smoother-test.obj `if test -f 'tests/smoother-test.c'; then $(CYGPATH_W) 'tests/smoother-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/smoother-test.c'; fi`
 
+tests/srbchannel_test-srbchannel-test.o: tests/srbchannel-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srbchannel_test_CFLAGS) $(CFLAGS) -MT tests/srbchannel_test-srbchannel-test.o -MD -MP -MF tests/$(DEPDIR)/srbchannel_test-srbchannel-test.Tpo -c -o tests/srbchannel_test-srbchannel-test.o `test -f 'tests/srbchannel-test.c' || echo '$(srcdir)/'`tests/srbchannel-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/srbchannel_test-srbchannel-test.Tpo tests/$(DEPDIR)/srbchannel_test-srbchannel-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/srbchannel-test.c' object='tests/srbchannel_test-srbchannel-test.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srbchannel_test_CFLAGS) $(CFLAGS) -c -o tests/srbchannel_test-srbchannel-test.o `test -f 'tests/srbchannel-test.c' || echo '$(srcdir)/'`tests/srbchannel-test.c
+
+tests/srbchannel_test-srbchannel-test.obj: tests/srbchannel-test.c
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srbchannel_test_CFLAGS) $(CFLAGS) -MT tests/srbchannel_test-srbchannel-test.obj -MD -MP -MF tests/$(DEPDIR)/srbchannel_test-srbchannel-test.Tpo -c -o tests/srbchannel_test-srbchannel-test.obj `if test -f 'tests/srbchannel-test.c'; then $(CYGPATH_W) 'tests/srbchannel-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/srbchannel-test.c'; fi`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/srbchannel_test-srbchannel-test.Tpo tests/$(DEPDIR)/srbchannel_test-srbchannel-test.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tests/srbchannel-test.c' object='tests/srbchannel_test-srbchannel-test.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srbchannel_test_CFLAGS) $(CFLAGS) -c -o tests/srbchannel_test-srbchannel-test.obj `if test -f 'tests/srbchannel-test.c'; then $(CYGPATH_W) 'tests/srbchannel-test.c'; else $(CYGPATH_W) '$(srcdir)/tests/srbchannel-test.c'; fi`
+
 tests/stripnul-stripnul.o: tests/stripnul.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(stripnul_CFLAGS) $(CFLAGS) -MT tests/stripnul-stripnul.o -MD -MP -MF tests/$(DEPDIR)/stripnul-stripnul.Tpo -c -o tests/stripnul-stripnul.o `test -f 'tests/stripnul.c' || echo '$(srcdir)/'`tests/stripnul.c
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tests/$(DEPDIR)/stripnul-stripnul.Tpo tests/$(DEPDIR)/stripnul-stripnul.Po
@@ -9780,6 +10110,7 @@ clean-libtool:
 	-rm -rf pulse/.libs pulse/_libs
 	-rm -rf pulsecore/.libs pulsecore/_libs
 	-rm -rf pulsecore/ffmpeg/.libs pulsecore/ffmpeg/_libs
+	-rm -rf pulsecore/resampler/.libs pulsecore/resampler/_libs
 	-rm -rf tests/.libs tests/_libs
 	-rm -rf utils/.libs utils/_libs
 install-dbuspolicyDATA: $(dbuspolicy_DATA)
@@ -9887,6 +10218,27 @@ uninstall-pulseconfDATA:
 	@list='$(pulseconf_DATA)'; test -n "$(pulseconfdir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	dir='$(DESTDIR)$(pulseconfdir)'; $(am__uninstall_files_from_dir)
+install-systemduserunitDATA: $(systemduserunit_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(systemduserunit_DATA)'; test -n "$(systemduserunitdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(systemduserunitdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(systemduserunitdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemduserunitdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(systemduserunitdir)" || exit $$?; \
+	done
+
+uninstall-systemduserunitDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(systemduserunit_DATA)'; test -n "$(systemduserunitdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(systemduserunitdir)'; $(am__uninstall_files_from_dir)
 install-xdgautostartDATA: $(xdgautostart_DATA)
 	@$(NORMAL_INSTALL)
 	@list='$(xdgautostart_DATA)'; test -n "$(xdgautostartdir)" || list=; \
@@ -10270,9 +10622,30 @@ proplist-test.log: proplist-test$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
-cpu-test.log: cpu-test$(EXEEXT)
-	@p='cpu-test$(EXEEXT)'; \
-	b='cpu-test'; \
+cpu-mix-test.log: cpu-mix-test$(EXEEXT)
+	@p='cpu-mix-test$(EXEEXT)'; \
+	b='cpu-mix-test'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+cpu-remap-test.log: cpu-remap-test$(EXEEXT)
+	@p='cpu-remap-test$(EXEEXT)'; \
+	b='cpu-remap-test'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+cpu-sconv-test.log: cpu-sconv-test$(EXEEXT)
+	@p='cpu-sconv-test$(EXEEXT)'; \
+	b='cpu-sconv-test'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+cpu-volume-test.log: cpu-volume-test$(EXEEXT)
+	@p='cpu-volume-test$(EXEEXT)'; \
+	b='cpu-volume-test'; \
 	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -10291,9 +10664,9 @@ mult-s16-test.log: mult-s16-test$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
-mix-special-test.log: mix-special-test$(EXEEXT)
-	@p='mix-special-test$(EXEEXT)'; \
-	b='mix-special-test'; \
+srbchannel-test.log: srbchannel-test$(EXEEXT)
+	@p='srbchannel-test$(EXEEXT)'; \
+	b='srbchannel-test'; \
 	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -10388,7 +10761,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \
 install-binPROGRAMS: install-libLTLIBRARIES
 
 installdirs:
-	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(modlibexecdir)" "$(DESTDIR)$(padsplibdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pulselibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dbuspolicydir)" "$(DESTDIR)$(alsapathsdir)" "$(DESTDIR)$(alsaprofilesetsdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(pulseconfdir)" "$(DESTDIR)$(xdgautostartdir)" "$(DESTDIR)$(pulseincludedir)"; do \
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(modlibexecdir)" "$(DESTDIR)$(padsplibdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pulselibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(dbuspolicydir)" "$(DESTDIR)$(alsapathsdir)" "$(DESTDIR)$(alsaprofilesetsdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(pulseconfdir)" "$(DESTDIR)$(systemduserunitdir)" "$(DESTDIR)$(xdgautostartdir)" "$(DESTDIR)$(pulseincludedir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: $(BUILT_SOURCES)
@@ -10456,6 +10829,8 @@ distclean-generic:
 	-rm -f pulsecore/$(am__dirstamp)
 	-rm -f pulsecore/ffmpeg/$(DEPDIR)/$(am__dirstamp)
 	-rm -f pulsecore/ffmpeg/$(am__dirstamp)
+	-rm -f pulsecore/resampler/$(DEPDIR)/$(am__dirstamp)
+	-rm -f pulsecore/resampler/$(am__dirstamp)
 	-rm -f tests/$(DEPDIR)/$(am__dirstamp)
 	-rm -f tests/$(am__dirstamp)
 	-rm -f utils/$(DEPDIR)/$(am__dirstamp)
@@ -10475,7 +10850,7 @@ clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
 	clean-pulselibexecPROGRAMS mostlyclean-am
 
 distclean: distclean-am
-	-rm -rf daemon/$(DEPDIR) modules/$(DEPDIR) modules/alsa/$(DEPDIR) modules/bluetooth/$(DEPDIR) modules/dbus/$(DEPDIR) modules/echo-cancel/$(DEPDIR) modules/gconf/$(DEPDIR) modules/jack/$(DEPDIR) modules/macosx/$(DEPDIR) modules/oss/$(DEPDIR) modules/raop/$(DEPDIR) modules/rtp/$(DEPDIR) modules/x11/$(DEPDIR) modules/xen/$(DEPDIR) pulse/$(DEPDIR) pulsecore/$(DEPDIR) pulsecore/ffmpeg/$(DEPDIR) tests/$(DEPDIR) utils/$(DEPDIR)
+	-rm -rf daemon/$(DEPDIR) modules/$(DEPDIR) modules/alsa/$(DEPDIR) modules/bluetooth/$(DEPDIR) modules/dbus/$(DEPDIR) modules/echo-cancel/$(DEPDIR) modules/gconf/$(DEPDIR) modules/jack/$(DEPDIR) modules/macosx/$(DEPDIR) modules/oss/$(DEPDIR) modules/raop/$(DEPDIR) modules/rtp/$(DEPDIR) modules/x11/$(DEPDIR) modules/xen/$(DEPDIR) pulse/$(DEPDIR) pulsecore/$(DEPDIR) pulsecore/ffmpeg/$(DEPDIR) pulsecore/resampler/$(DEPDIR) tests/$(DEPDIR) utils/$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-tags
@@ -10495,7 +10870,8 @@ info-am:
 install-data-am: install-dbuspolicyDATA install-dist_alsapathsDATA \
 	install-dist_alsaprofilesetsDATA install-dist_udevrulesDATA \
 	install-padsplibLTLIBRARIES install-pulseconfDATA \
-	install-pulseincludeHEADERS install-xdgautostartDATA
+	install-pulseincludeHEADERS install-systemduserunitDATA \
+	install-xdgautostartDATA
 
 install-dvi: install-dvi-am
 
@@ -10527,7 +10903,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-	-rm -rf daemon/$(DEPDIR) modules/$(DEPDIR) modules/alsa/$(DEPDIR) modules/bluetooth/$(DEPDIR) modules/dbus/$(DEPDIR) modules/echo-cancel/$(DEPDIR) modules/gconf/$(DEPDIR) modules/jack/$(DEPDIR) modules/macosx/$(DEPDIR) modules/oss/$(DEPDIR) modules/raop/$(DEPDIR) modules/rtp/$(DEPDIR) modules/x11/$(DEPDIR) modules/xen/$(DEPDIR) pulse/$(DEPDIR) pulsecore/$(DEPDIR) pulsecore/ffmpeg/$(DEPDIR) tests/$(DEPDIR) utils/$(DEPDIR)
+	-rm -rf daemon/$(DEPDIR) modules/$(DEPDIR) modules/alsa/$(DEPDIR) modules/bluetooth/$(DEPDIR) modules/dbus/$(DEPDIR) modules/echo-cancel/$(DEPDIR) modules/gconf/$(DEPDIR) modules/jack/$(DEPDIR) modules/macosx/$(DEPDIR) modules/oss/$(DEPDIR) modules/raop/$(DEPDIR) modules/rtp/$(DEPDIR) modules/x11/$(DEPDIR) modules/xen/$(DEPDIR) pulse/$(DEPDIR) pulsecore/$(DEPDIR) pulsecore/ffmpeg/$(DEPDIR) pulsecore/resampler/$(DEPDIR) tests/$(DEPDIR) utils/$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -10551,7 +10927,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
 	uninstall-modlibexecLTLIBRARIES uninstall-padsplibLTLIBRARIES \
 	uninstall-pkglibLTLIBRARIES uninstall-pulseconfDATA \
 	uninstall-pulseincludeHEADERS uninstall-pulselibexecPROGRAMS \
-	uninstall-xdgautostartDATA
+	uninstall-systemduserunitDATA uninstall-xdgautostartDATA
 	@$(NORMAL_INSTALL)
 	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
 .MAKE: all check check-am install install-am install-exec-am \
@@ -10576,19 +10952,21 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
 	install-pdf install-pdf-am install-pkglibLTLIBRARIES \
 	install-ps install-ps-am install-pulseconfDATA \
 	install-pulseincludeHEADERS install-pulselibexecPROGRAMS \
-	install-strip install-xdgautostartDATA installcheck \
-	installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	recheck tags tags-am uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-binSCRIPTS \
-	uninstall-dbuspolicyDATA uninstall-dist_alsapathsDATA \
+	install-strip install-systemduserunitDATA \
+	install-xdgautostartDATA installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \
+	uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-binSCRIPTS uninstall-dbuspolicyDATA \
+	uninstall-dist_alsapathsDATA \
 	uninstall-dist_alsaprofilesetsDATA \
 	uninstall-dist_udevrulesDATA uninstall-hook \
 	uninstall-libLTLIBRARIES uninstall-modlibexecLTLIBRARIES \
 	uninstall-padsplibLTLIBRARIES uninstall-pkglibLTLIBRARIES \
 	uninstall-pulseconfDATA uninstall-pulseincludeHEADERS \
-	uninstall-pulselibexecPROGRAMS uninstall-xdgautostartDATA
+	uninstall-pulselibexecPROGRAMS uninstall-systemduserunitDATA \
+	uninstall-xdgautostartDATA
 
 @HAVE_X11_TRUE@@INTLTOOL_DESKTOP_RULE@
 
diff --git a/src/daemon/.gitignore b/src/daemon/.gitignore
index 54e4299..0efa55b 100644
--- a/src/daemon/.gitignore
+++ b/src/daemon/.gitignore
@@ -1,3 +1,2 @@
 org.pulseaudio.policy
 pulseaudio.desktop
-pulseaudio-kde.desktop
diff --git a/src/daemon/caps.c b/src/daemon/caps.c
index 669d6e2..9471d3b 100644
--- a/src/daemon/caps.c
+++ b/src/daemon/caps.c
@@ -51,7 +51,7 @@ void pa_drop_root(void) {
     uid_t uid;
     gid_t gid;
 
-    pa_log_debug(_("Cleaning up privileges."));
+    pa_log_debug("Cleaning up privileges.");
     uid = getuid();
     gid = getgid();
 
@@ -86,9 +86,10 @@ void pa_drop_caps(void) {
     pa_assert_se(cap_clear(caps) == 0);
     pa_assert_se(cap_set_proc(caps) == 0);
     pa_assert_se(cap_free(caps) == 0);
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
     /* FreeBSD doesn't have this functionality, even though sys/capability.h is
-     * available. See https://bugs.freedesktop.org/show_bug.cgi?id=73967 */
+     * available. See https://bugs.freedesktop.org/show_bug.cgi?id=72580 */
+    pa_log_warn("FreeBSD cannot drop extra capabilities, implementation needed.");
 #else
 #error "Don't know how to do capabilities on your system.  Please send a patch."
 #endif /* __linux__ */
diff --git a/src/daemon/cmdline.c b/src/daemon/cmdline.c
index 68579c5..2ffc61f 100644
--- a/src/daemon/cmdline.c
+++ b/src/daemon/cmdline.c
@@ -323,7 +323,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
 
             case ARG_LOG_TARGET:
                 if (pa_daemon_conf_set_log_target(conf, optarg) < 0) {
-#ifdef HAVE_JOURNAL
+#ifdef HAVE_SYSTEMD_JOURNAL
                     pa_log(_("Invalid log target: use either 'syslog', 'journal','stderr' or 'auto' or a valid file name 'file:<path>', 'newfile:<path>'."));
 #else
                     pa_log(_("Invalid log target: use either 'syslog', 'stderr' or 'auto' or a valid file name 'file:<path>', 'newfile:<path>'."));
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index ce777a6..b7a85aa 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -139,7 +139,7 @@ static const pa_daemon_conf default_conf = {
    ,.rlimit_rtprio = { .value = 9, .is_set = true }    /* One below JACK's default for the server */
 #endif
 #ifdef RLIMIT_RTTIME
-   ,.rlimit_rttime = { .value = PA_USEC_PER_SEC, .is_set = true }
+   ,.rlimit_rttime = { .value = 200*PA_USEC_PER_MSEC, .is_set = true } /* rtkit's limit is 200 ms */
 #endif
 #endif
 };
@@ -345,8 +345,7 @@ static int parse_sample_rate(pa_config_parser_state *state) {
 
     c = state->data;
 
-    if (pa_atou(state->rvalue, &r) < 0 || !pa_sample_rate_valid(r) ||
-        !((r % 4000 == 0) || (r % 11025 == 0))) {
+    if (pa_atou(state->rvalue, &r) < 0 || !pa_sample_rate_valid(r)) {
         pa_log(_("[%s:%u] Invalid sample rate '%s'."), state->filename, state->lineno, state->rvalue);
         return -1;
     }
@@ -363,8 +362,7 @@ static int parse_alternate_sample_rate(pa_config_parser_state *state) {
 
     c = state->data;
 
-    if (pa_atou(state->rvalue, &r) < 0 || !pa_sample_rate_valid(r) ||
-        !((r % 4000==0) || (r % 11025 == 0))) {
+    if (pa_atou(state->rvalue, &r) < 0 || !pa_sample_rate_valid(r)) {
         pa_log(_("[%s:%u] Invalid sample rate '%s'."), state->filename, state->lineno, state->rvalue);
         return -1;
     }
diff --git a/src/daemon/daemon.conf.in b/src/daemon/daemon.conf.in
index 2089058..5b20130 100644
--- a/src/daemon/daemon.conf.in
+++ b/src/daemon/daemon.conf.in
@@ -75,7 +75,7 @@ ifelse(@HAVE_SYS_RESOURCE_H@, 1, [dnl
 ; rlimit-msgqueue = -1
 ; rlimit-nice = 31
 ; rlimit-rtprio = 9
-; rlimit-rttime = 1000000
+; rlimit-rttime = 200000
 ])dnl
 
 ; default-sample-format = s16le
diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
index 4e77ae9..536c405 100755
--- a/src/daemon/default.pa.in
+++ b/src/daemon/default.pa.in
@@ -27,10 +27,10 @@ ifelse(@OS_IS_WIN32@, 1, [dnl
 load-sample x11-bell %WINDIR%\Media\ding.wav
 load-sample-dir-lazy %WINDIR%\Media\*.wav
 ], [dnl
-#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
-#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
-#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
-#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
+#load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/bell.oga
+#load-sample-lazy pulse-hotplug /usr/share/sounds/freedesktop/stereo/device-added.oga
+#load-sample-lazy pulse-coldplug /usr/share/sounds/freedesktop/stereo/device-added.oga
+#load-sample-lazy pulse-access /usr/share/sounds/freedesktop/stereo/message.oga
 ])dnl
 
 .fail
@@ -176,7 +176,7 @@ ifelse(@HAVE_X11@, 1, [dnl
 # can be shared by multiple sessions.
 
 ### Load X11 bell module
-#load-module module-x11-bell sample=bell-windowing-system
+#load-module module-x11-bell sample=x11-bell
 
 ### Register ourselves in the X11 session manager
 #load-module module-x11-xsmp
diff --git a/src/daemon/main.c b/src/daemon/main.c
index e01371e..d41554f 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -58,10 +58,11 @@
 #include <dbus/dbus.h>
 #endif
 
-#include <pulse/client-conf.h>
-#ifdef HAVE_X11
-#include <pulse/client-conf-x11.h>
+#ifdef HAVE_SYSTEMD_DAEMON
+#include <systemd/sd-daemon.h>
 #endif
+
+#include <pulse/client-conf.h>
 #include <pulse/mainloop.h>
 #include <pulse/mainloop-signal.h>
 #include <pulse/timeval.h>
@@ -89,9 +90,7 @@
 #ifdef HAVE_DBUS
 #include <pulsecore/dbus-shared.h>
 #endif
-#include <pulsecore/cpu-arm.h>
-#include <pulsecore/cpu-x86.h>
-#include <pulsecore/cpu-orc.h>
+#include <pulsecore/cpu.h>
 
 #include "cmdline.h"
 #include "cpulimit.h"
@@ -114,29 +113,8 @@ int deny_severity = LOG_WARNING;
 int __padsp_disabled__ = 7;
 #endif
 
-#ifdef OS_IS_WIN32
-
-static void message_cb(pa_mainloop_api*a, pa_time_event*e, const struct timeval *tv, void *userdata) {
-    MSG msg;
-    struct timeval tvnext;
-
-    while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
-        if (msg.message == WM_QUIT)
-            raise(SIGTERM);
-        else {
-            TranslateMessage(&msg);
-            DispatchMessage(&msg);
-        }
-    }
-
-    pa_timeval_add(pa_gettimeofday(&tvnext), 100000);
-    a->time_restart(e, &tvnext);
-}
-
-#endif
-
 static void signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void *userdata) {
-    pa_log_info(_("Got signal %s."), pa_sig2str(sig));
+    pa_log_info("Got signal %s.", pa_sig2str(sig));
 
     switch (sig) {
 #ifdef SIGUSR1
@@ -163,7 +141,7 @@ static void signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void
         case SIGINT:
         case SIGTERM:
         default:
-            pa_log_info(_("Exiting."));
+            pa_log_info("Exiting.");
             m->quit(m, 1);
             break;
     }
@@ -190,7 +168,7 @@ static int change_user(void) {
         return -1;
     }
 
-    pa_log_info(_("Found user '%s' (UID %lu) and group '%s' (GID %lu)."),
+    pa_log_info("Found user '%s' (UID %lu) and group '%s' (GID %lu).",
                 PA_SYSTEM_USER, (unsigned long) pw->pw_uid,
                 PA_SYSTEM_GROUP, (unsigned long) gr->gr_gid);
 
@@ -268,7 +246,7 @@ static int change_user(void) {
     if (!getenv("PULSE_STATE_PATH"))
         pa_set_env("PULSE_STATE_PATH", PA_SYSTEM_STATE_PATH);
 
-    pa_log_info(_("Successfully changed user to \"" PA_SYSTEM_USER "\"."));
+    pa_log_info("Successfully changed user to \"" PA_SYSTEM_USER "\".");
 
     return 0;
 }
@@ -294,7 +272,7 @@ static int set_one_rlimit(const pa_rlimit *r, int resource, const char *name) {
     rl.rlim_cur = rl.rlim_max = r->value;
 
     if (setrlimit(resource, &rl) < 0) {
-        pa_log_info(_("setrlimit(%s, (%u, %u)) failed: %s"), name, (unsigned) r->value, (unsigned) r->value, pa_cstrerror(errno));
+        pa_log_info("setrlimit(%s, (%u, %u)) failed: %s", name, (unsigned) r->value, (unsigned) r->value, pa_cstrerror(errno));
         return -1;
     }
 
@@ -346,11 +324,7 @@ static char *check_configured_address(void) {
     char *default_server = NULL;
     pa_client_conf *c = pa_client_conf_new();
 
-    pa_client_conf_load(c, NULL);
-#ifdef HAVE_X11
-    pa_client_conf_from_x11(c, NULL);
-#endif
-    pa_client_conf_env(c);
+    pa_client_conf_load(c, true, true);
 
     if (c->default_server && *c->default_server)
         default_server = pa_xstrdup(c->default_server);
@@ -404,16 +378,12 @@ int main(int argc, char *argv[]) {
     int r = 0, retval = 1, d = 0;
     bool valid_pid_file = false;
     bool ltdl_init = false;
-    int passed_fd = -1;
+    int n_fds = 0, *passed_fds = NULL;
     const char *e;
 #ifdef HAVE_FORK
     int daemon_pipe[2] = { -1, -1 };
     int daemon_pipe2[2] = { -1, -1 };
 #endif
-#ifdef OS_IS_WIN32
-    pa_time_event *win32_timer;
-    struct timeval win32_tv;
-#endif
     int autospawn_fd = -1;
     bool autospawn_locked = false;
 #ifdef HAVE_DBUS
@@ -465,11 +435,28 @@ int main(int argc, char *argv[]) {
     }
 #endif
 
-    if ((e = getenv("PULSE_PASSED_FD"))) {
-        passed_fd = atoi(e);
+#ifdef HAVE_SYSTEMD_DAEMON
+    n_fds = sd_listen_fds(0);
+    if (n_fds > 0) {
+        int i = n_fds;
 
-        if (passed_fd <= 2)
-            passed_fd = -1;
+        passed_fds = pa_xnew(int, n_fds+2);
+        passed_fds[n_fds] = passed_fds[n_fds+1] = -1;
+        while (i--)
+            passed_fds[i] = SD_LISTEN_FDS_START + i;
+    }
+#endif
+
+    if (!passed_fds) {
+        n_fds = 0;
+        passed_fds = pa_xnew(int, 2);
+        passed_fds[0] = passed_fds[1] = -1;
+    }
+
+    if ((e = getenv("PULSE_PASSED_FD"))) {
+        int passed_fd = atoi(e);
+        if (passed_fd > 2)
+            passed_fds[n_fds] = passed_fd;
     }
 
     /* We might be autospawned, in which case have no idea in which
@@ -478,7 +465,8 @@ int main(int argc, char *argv[]) {
 
     pa_reset_personality();
     pa_drop_root();
-    pa_close_all(passed_fd, -1);
+    pa_close_allv(passed_fds);
+    pa_xfree(passed_fds);
     pa_reset_sigs(-1);
     pa_unblock_sigs(-1);
     pa_reset_priority();
@@ -616,9 +604,9 @@ int main(int argc, char *argv[]) {
             }
 
             if (pa_pid_file_check_running(&pid, "pulseaudio") < 0)
-                pa_log_info(_("Daemon not running"));
+                pa_log_info("Daemon not running");
             else {
-                pa_log_info(_("Daemon running as PID %u"), pid);
+                pa_log_info("Daemon running as PID %u", pid);
                 retval = 0;
             }
 
@@ -743,6 +731,10 @@ int main(int argc, char *argv[]) {
          * first take the autospawn lock to make things
          * synchronous. */
 
+        /* This locking and thread synchronisation code doesn't work reliably
+         * on kFreeBSD (Debian bug #705435), or in upstream FreeBSD ports
+         * (bug reference: ports/128947, patched in SVN r231972). */
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
         if ((autospawn_fd = pa_autospawn_lock_init()) < 0) {
             pa_log("Failed to initialize autospawn lock");
             goto finish;
@@ -754,6 +746,7 @@ int main(int argc, char *argv[]) {
         }
 
         autospawn_locked = true;
+#endif
     }
 
     if (conf->daemonize) {
@@ -796,7 +789,7 @@ int main(int argc, char *argv[]) {
             if (retval)
                 pa_log(_("Daemon startup failed."));
             else
-                pa_log_info(_("Daemon startup successful."));
+                pa_log_info("Daemon startup successful.");
 
             goto finish;
         }
@@ -817,7 +810,7 @@ int main(int argc, char *argv[]) {
 #endif
 
         if (!conf->log_target) {
-#ifdef HAVE_JOURNAL
+#ifdef HAVE_SYSTEMD_JOURNAL
             pa_log_target target = { .type = PA_LOG_JOURNAL, .file = NULL };
 #else
             pa_log_target target = { .type = PA_LOG_SYSLOG, .file = NULL };
@@ -913,67 +906,71 @@ int main(int argc, char *argv[]) {
 
     pa_set_env_and_record("PULSE_SYSTEM", conf->system_instance ? "1" : "0");
 
-    pa_log_info(_("This is PulseAudio %s"), PACKAGE_VERSION);
-    pa_log_debug(_("Compilation host: %s"), CANONICAL_HOST);
-    pa_log_debug(_("Compilation CFLAGS: %s"), PA_CFLAGS);
+    pa_log_info("This is PulseAudio %s", PACKAGE_VERSION);
+    pa_log_debug("Compilation host: %s", CANONICAL_HOST);
+    pa_log_debug("Compilation CFLAGS: %s", PA_CFLAGS);
+
+#ifdef HAVE_LIBSAMPLERATE
+    pa_log_warn("Compiled with DEPRECATED libsamplerate support!");
+#endif
 
     s = pa_uname_string();
-    pa_log_debug(_("Running on host: %s"), s);
+    pa_log_debug("Running on host: %s", s);
     pa_xfree(s);
 
-    pa_log_debug(_("Found %u CPUs."), pa_ncpus());
+    pa_log_debug("Found %u CPUs.", pa_ncpus());
 
-    pa_log_info(_("Page size is %lu bytes"), (unsigned long) PA_PAGE_SIZE);
+    pa_log_info("Page size is %lu bytes", (unsigned long) PA_PAGE_SIZE);
 
 #ifdef HAVE_VALGRIND_MEMCHECK_H
-    pa_log_debug(_("Compiled with Valgrind support: yes"));
+    pa_log_debug("Compiled with Valgrind support: yes");
 #else
-    pa_log_debug(_("Compiled with Valgrind support: no"));
+    pa_log_debug("Compiled with Valgrind support: no");
 #endif
 
-    pa_log_debug(_("Running in valgrind mode: %s"), pa_yes_no(pa_in_valgrind()));
+    pa_log_debug("Running in valgrind mode: %s", pa_yes_no(pa_in_valgrind()));
 
-    pa_log_debug(_("Running in VM: %s"), pa_yes_no(pa_running_in_vm()));
+    pa_log_debug("Running in VM: %s", pa_yes_no(pa_running_in_vm()));
 
 #ifdef __OPTIMIZE__
-    pa_log_debug(_("Optimized build: yes"));
+    pa_log_debug("Optimized build: yes");
 #else
-    pa_log_debug(_("Optimized build: no"));
+    pa_log_debug("Optimized build: no");
 #endif
 
 #ifdef NDEBUG
-    pa_log_debug(_("NDEBUG defined, all asserts disabled."));
+    pa_log_debug("NDEBUG defined, all asserts disabled.");
 #elif defined(FASTPATH)
-    pa_log_debug(_("FASTPATH defined, only fast path asserts disabled."));
+    pa_log_debug("FASTPATH defined, only fast path asserts disabled.");
 #else
-    pa_log_debug(_("All asserts enabled."));
+    pa_log_debug("All asserts enabled.");
 #endif
 
     if (!(s = pa_machine_id())) {
         pa_log(_("Failed to get machine ID"));
         goto finish;
     }
-    pa_log_info(_("Machine ID is %s."), s);
+    pa_log_info("Machine ID is %s.", s);
     pa_xfree(s);
 
     if ((s = pa_session_id())) {
-        pa_log_info(_("Session ID is %s."), s);
+        pa_log_info("Session ID is %s.", s);
         pa_xfree(s);
     }
 
     if (!(s = pa_get_runtime_dir()))
         goto finish;
-    pa_log_info(_("Using runtime directory %s."), s);
+    pa_log_info("Using runtime directory %s.", s);
     pa_xfree(s);
 
     if (!(s = pa_get_state_dir()))
         goto finish;
-    pa_log_info(_("Using state directory %s."), s);
+    pa_log_info("Using state directory %s.", s);
     pa_xfree(s);
 
-    pa_log_info(_("Using modules directory %s."), conf->dl_search_path);
+    pa_log_info("Using modules directory %s.", conf->dl_search_path);
 
-    pa_log_info(_("Running in system mode: %s"), pa_yes_no(pa_in_system_mode()));
+    pa_log_info("Running in system mode: %s", pa_yes_no(pa_in_system_mode()));
 
     if (pa_in_system_mode())
         pa_log_warn(_("OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that.\n"
@@ -1003,9 +1000,9 @@ int main(int argc, char *argv[]) {
     pa_disable_sigpipe();
 
     if (pa_rtclock_hrtimer())
-        pa_log_info(_("Fresh high-resolution timers available! Bon appetit!"));
+        pa_log_info("Fresh high-resolution timers available! Bon appetit!");
     else
-        pa_log_info(_("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!"));
+        pa_log_info("Dude, your kernel stinks! The chef's recommendation today is Linux with high-resolution timers enabled!");
 
     if (conf->lock_memory) {
 #if defined(HAVE_SYS_MMAN_H) && !defined(__ANDROID__)
@@ -1038,25 +1035,18 @@ int main(int argc, char *argv[]) {
     c->scache_idle_time = conf->scache_idle_time;
     c->resample_method = conf->resample_method;
     c->realtime_priority = conf->realtime_priority;
-    c->realtime_scheduling = !!conf->realtime_scheduling;
-    c->disable_remixing = !!conf->disable_remixing;
-    c->disable_lfe_remixing = !!conf->disable_lfe_remixing;
-    c->deferred_volume = !!conf->deferred_volume;
-    c->running_as_daemon = !!conf->daemonize;
+    c->realtime_scheduling = conf->realtime_scheduling;
+    c->disable_remixing = conf->disable_remixing;
+    c->disable_lfe_remixing = conf->disable_lfe_remixing;
+    c->deferred_volume = conf->deferred_volume;
+    c->running_as_daemon = conf->daemonize;
     c->disallow_exit = conf->disallow_exit;
     c->flat_volumes = conf->flat_volumes;
 #ifdef HAVE_DBUS
     c->server_type = conf->local_server_type;
 #endif
 
-    c->cpu_info.cpu_type = PA_CPU_UNDEFINED;
-    if (!getenv("PULSE_NO_SIMD")) {
-        if (pa_cpu_init_x86(&(c->cpu_info.flags.x86)))
-            c->cpu_info.cpu_type = PA_CPU_X86;
-        if (pa_cpu_init_arm(&(c->cpu_info.flags.arm)))
-            c->cpu_info.cpu_type = PA_CPU_ARM;
-        pa_cpu_init_orc(c->cpu_info);
-    }
+    pa_cpu_init(&c->cpu_info);
 
     pa_assert_se(pa_signal_init(pa_mainloop_get_api(mainloop)) == 0);
     pa_signal_new(SIGINT, signal_callback, c);
@@ -1071,10 +1061,6 @@ int main(int argc, char *argv[]) {
     pa_signal_new(SIGHUP, signal_callback, c);
 #endif
 
-#ifdef OS_IS_WIN32
-    win32_timer = pa_mainloop_get_api(mainloop)->time_new(pa_mainloop_get_api(mainloop), pa_gettimeofday(&win32_tv), message_cb, NULL);
-#endif
-
     if (!conf->no_cpu_limit)
         pa_assert_se(pa_cpu_limit_init(pa_mainloop_get_api(mainloop)) == 0);
 
@@ -1121,7 +1107,7 @@ int main(int argc, char *argv[]) {
 
     /* We completed the initial module loading, so let's disable it
      * from now on, if requested */
-    c->disallow_module_loading = !!conf->disallow_module_loading;
+    c->disallow_module_loading = conf->disallow_module_loading;
 
 #ifdef HAVE_DBUS
     if (!conf->system_instance) {
@@ -1144,13 +1130,13 @@ int main(int argc, char *argv[]) {
     }
 #endif
 
-    pa_log_info(_("Daemon startup complete."));
+    pa_log_info("Daemon startup complete.");
 
     retval = 0;
     if (pa_mainloop_run(mainloop, &retval) < 0)
         goto finish;
 
-    pa_log_info(_("Daemon shutdown initiated."));
+    pa_log_info("Daemon shutdown initiated.");
 
 finish:
 #ifdef HAVE_DBUS
@@ -1169,11 +1155,6 @@ finish:
         pa_autospawn_lock_done(false);
     }
 
-#ifdef OS_IS_WIN32
-    if (mainloop && win32_timer)
-        pa_mainloop_get_api(mainloop)->time_free(win32_timer);
-#endif
-
     if (c) {
         /* Ensure all the modules/samples are unloaded when the core is still ref'ed,
          * as unlink callback hooks in modules may need the core to be ref'ed */
@@ -1181,7 +1162,7 @@ finish:
         pa_scache_free_all(c);
 
         pa_core_unref(c);
-        pa_log_info(_("Daemon terminated."));
+        pa_log_info("Daemon terminated.");
     }
 
     if (!conf->no_cpu_limit)
diff --git a/src/daemon/pulseaudio-kde.desktop.in b/src/daemon/pulseaudio-kde.desktop.in
deleted file mode 100644
index f0bfa8f..0000000
--- a/src/daemon/pulseaudio-kde.desktop.in
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Version=1.0
-_Name=PulseAudio Sound System KDE Routing Policy
-_Comment=Start the PulseAudio Sound System with KDE Routing Policy
-Exec=start-pulseaudio-kde
-Terminal=false
-Type=Application
-Categories=
-GenericName=
-OnlyShowIn=KDE;
diff --git a/src/daemon/pulseaudio.desktop.in b/src/daemon/pulseaudio.desktop.in
index ce99382..06cde27 100644
--- a/src/daemon/pulseaudio.desktop.in
+++ b/src/daemon/pulseaudio.desktop.in
@@ -8,3 +8,4 @@ Type=Application
 Categories=
 GenericName=
 X-GNOME-Autostart-Phase=Initialization
+X-KDE-autostart-phase=1
diff --git a/src/daemon/server-lookup.c b/src/daemon/server-lookup.c
index 82c8851..c281530 100644
--- a/src/daemon/server-lookup.c
+++ b/src/daemon/server-lookup.c
@@ -115,7 +115,6 @@ finish:
 
 enum get_address_result_t {
     SUCCESS,
-    FAILED_TO_LOAD_CLIENT_CONF,
     SERVER_FROM_TYPE_FAILED
 };
 
@@ -126,10 +125,7 @@ static enum get_address_result_t get_address(pa_server_type_t server_type, char
 
     *address = NULL;
 
-    if (pa_client_conf_load(conf, NULL) < 0) {
-        r = FAILED_TO_LOAD_CLIENT_CONF;
-        goto finish;
-    }
+    pa_client_conf_load(conf, false, false);
 
     if (conf->default_dbus_server)
         *address = pa_xstrdup(conf->default_dbus_server);
@@ -180,18 +176,6 @@ static DBusHandlerResult handle_get_address(DBusConnection *conn, DBusMessage *m
             r = DBUS_HANDLER_RESULT_HANDLED;
             goto finish;
 
-        case FAILED_TO_LOAD_CLIENT_CONF:
-            if (!(reply = dbus_message_new_error(msg, "org.pulseaudio.ClientConfLoadError", "Failed to load client.conf."))) {
-                r = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-                goto finish;
-            }
-            if (!dbus_connection_send(conn, reply, NULL)) {
-                r = DBUS_HANDLER_RESULT_NEED_MEMORY;
-                goto finish;
-            }
-            r = DBUS_HANDLER_RESULT_HANDLED;
-            goto finish;
-
         case SERVER_FROM_TYPE_FAILED:
             if (!(reply = dbus_message_new_error(msg, DBUS_ERROR_FAILED, "PulseAudio internal error: get_dbus_server_from_type() failed."))) {
                 r = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
@@ -398,18 +382,6 @@ static DBusHandlerResult handle_get_all(DBusConnection *conn, DBusMessage *msg,
             r = DBUS_HANDLER_RESULT_HANDLED;
             goto finish;
 
-        case FAILED_TO_LOAD_CLIENT_CONF:
-            if (!(reply = dbus_message_new_error(msg, "org.pulseaudio.ClientConfLoadError", "Failed to load client.conf."))) {
-                r = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-                goto finish;
-            }
-            if (!dbus_connection_send(conn, reply, NULL)) {
-                r = DBUS_HANDLER_RESULT_NEED_MEMORY;
-                goto finish;
-            }
-            r = DBUS_HANDLER_RESULT_HANDLED;
-            goto finish;
-
         case SERVER_FROM_TYPE_FAILED:
             if (!(reply = dbus_message_new_error(msg, DBUS_ERROR_FAILED, "PulseAudio internal error: get_dbus_server_from_type() failed."))) {
                 r = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
diff --git a/src/daemon/start-pulseaudio-kde.in b/src/daemon/start-pulseaudio-kde.in
deleted file mode 100755
index c319e7d..0000000
--- a/src/daemon/start-pulseaudio-kde.in
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# This file is part of PulseAudio.
-#
-# PulseAudio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# PulseAudio is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PulseAudio; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA.
-
-set -e
-
-[ -z "$PULSE_SERVER" ]
-
- at PA_BINARY@ --start "$@"
-
-if [ x"$DISPLAY" != x ] ; then
-
-    @PACTL_BINARY@ load-module module-device-manager "do_routing=1" > /dev/null
-
-fi
diff --git a/src/daemon/start-pulseaudio-x11.in b/src/daemon/start-pulseaudio-x11.in
index 391a6d3..63ed740 100755
--- a/src/daemon/start-pulseaudio-x11.in
+++ b/src/daemon/start-pulseaudio-x11.in
@@ -19,13 +19,15 @@
 
 set -e
 
- at PA_BINARY@ --start "$@"
-
 if [ x"$DISPLAY" != x ] ; then
 
     @PACTL_BINARY@ load-module module-x11-publish "display=$DISPLAY" > /dev/null
     @PACTL_BINARY@ load-module module-x11-cork-request "display=$DISPLAY" > /dev/null
 
+    if [ x"$KDE_FULL_SESSION" = x"true" ]; then
+       @PACTL_BINARY@ load-module module-device-manager "do_routing=1" > /dev/null
+    fi
+
     if [ x"$SESSION_MANAGER" != x ] ; then
 	@PACTL_BINARY@ load-module module-x11-xsmp "display=$DISPLAY session_manager=$SESSION_MANAGER" > /dev/null
     fi
diff --git a/src/daemon/systemd/user/pulseaudio.service.in b/src/daemon/systemd/user/pulseaudio.service.in
new file mode 100644
index 0000000..e08ff1e
--- /dev/null
+++ b/src/daemon/systemd/user/pulseaudio.service.in
@@ -0,0 +1,10 @@
+[Unit]
+Description=Sound Service
+
+[Service]
+ExecStart=@PA_BINARY@ --daemonize=no
+Restart=on-failure
+
+[Install]
+Also=pulseaudio.socket
+WantedBy=default.target
diff --git a/src/daemon/systemd/user/pulseaudio.socket b/src/daemon/systemd/user/pulseaudio.socket
new file mode 100644
index 0000000..332ece8
--- /dev/null
+++ b/src/daemon/systemd/user/pulseaudio.socket
@@ -0,0 +1,10 @@
+[Unit]
+Description=Sound System
+
+[Socket]
+Priority=6
+Backlog=5
+ListenStream=%t/pulse/native
+
+[Install]
+WantedBy=sockets.target
diff --git a/src/map-file b/src/map-file
index fbad1a4..5159829 100644
--- a/src/map-file
+++ b/src/map-file
@@ -146,6 +146,8 @@ pa_cvolume_set_position;
 pa_cvolume_snprint;
 pa_cvolume_snprint_verbose;
 pa_cvolume_valid;
+pa_direction_to_string;
+pa_direction_valid;
 pa_encoding_to_string;
 pa_ext_device_manager_delete;
 pa_ext_device_manager_enable_role_device_priority_routing;
@@ -328,6 +330,7 @@ pa_stream_update_sample_rate;
 pa_stream_update_timing_info;
 pa_stream_writable_size;
 pa_stream_write;
+pa_stream_write_ext_free;
 pa_strerror;
 pa_sw_cvolume_divide;
 pa_sw_cvolume_divide_scalar;
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 99de0ec..b5d6276 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -50,6 +50,58 @@
 #include "alsa-mixer.h"
 #include "alsa-util.h"
 
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+/* These macros are workarounds for a bug in valgrind, which is not handling the
+ * ALSA TLV syscalls correctly. See
+ * http://valgrind.10908.n7.nabble.com/Missing-ioctl-for-SNDRV-CTL-IOCTL-TLV-READ-td42711.html */
+
+static inline int vgfix_get_capture_dB(snd_mixer_elem_t *a, snd_mixer_selem_channel_id_t b, long *c) {
+    int r = snd_mixer_selem_get_capture_dB(a, b, c);
+    VALGRIND_MAKE_MEM_DEFINED(c, sizeof(*c));
+    return r;
+}
+
+static inline int vgfix_get_playback_dB(snd_mixer_elem_t *a, snd_mixer_selem_channel_id_t b, long *c) {
+    int r = snd_mixer_selem_get_playback_dB(a, b, c);
+    VALGRIND_MAKE_MEM_DEFINED(c, sizeof(*c));
+    return r;
+}
+
+static inline int vgfix_ask_capture_vol_dB(snd_mixer_elem_t *a, long b, long *c) {
+    int r = snd_mixer_selem_ask_capture_vol_dB(a, b, c);
+    VALGRIND_MAKE_MEM_DEFINED(c, sizeof(*c));
+    return r;
+}
+
+static inline int vgfix_ask_playback_vol_dB(snd_mixer_elem_t *a, long b, long *c) {
+    int r = snd_mixer_selem_ask_playback_vol_dB(a, b, c);
+    VALGRIND_MAKE_MEM_DEFINED(c, sizeof(*c));
+    return r;
+}
+
+static inline int vgfix_get_capture_dB_range(snd_mixer_elem_t *a, long *b, long *c) {
+    int r = snd_mixer_selem_get_capture_dB_range(a, b, c);
+    VALGRIND_MAKE_MEM_DEFINED(b, sizeof(*b));
+    VALGRIND_MAKE_MEM_DEFINED(c, sizeof(*c));
+    return r;
+}
+
+static inline int vgfix_get_playback_dB_range(snd_mixer_elem_t *a, long *b, long *c) {
+    int r = snd_mixer_selem_get_playback_dB_range(a, b, c);
+    VALGRIND_MAKE_MEM_DEFINED(b, sizeof(*b));
+    VALGRIND_MAKE_MEM_DEFINED(c, sizeof(*c));
+    return r;
+}
+
+#define snd_mixer_selem_get_capture_dB(a, b, c) vgfix_get_capture_dB(a, b, c)
+#define snd_mixer_selem_get_playback_dB(a, b, c) vgfix_get_playback_dB(a, b, c)
+#define snd_mixer_selem_ask_capture_vol_dB(a, b, c) vgfix_ask_capture_vol_dB(a, b, c)
+#define snd_mixer_selem_ask_playback_vol_dB(a, b, c) vgfix_ask_playback_vol_dB(a, b, c)
+#define snd_mixer_selem_get_capture_dB_range(a, b, c) vgfix_get_capture_dB_range(a, b, c)
+#define snd_mixer_selem_get_playback_dB_range(a, b, c) vgfix_get_playback_dB_range(a, b, c)
+
+#endif
+
 static int setting_select(pa_alsa_setting *s, snd_mixer_t *m);
 
 struct description_map {
@@ -1001,10 +1053,6 @@ static int element_set_volume(pa_alsa_element *e, snd_mixer_t *m, const pa_chann
             if (r < 0)
                 continue;
 
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-            VALGRIND_MAKE_MEM_DEFINED(&value, sizeof(value));
-#endif
-
             f = from_alsa_dB(value);
 
         } else {
@@ -1517,11 +1565,6 @@ static int element_probe(pa_alsa_element *e, snd_mixer_t *m) {
                 }
 
                 if (e->has_dB) {
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-                    VALGRIND_MAKE_MEM_DEFINED(&min_dB, sizeof(min_dB));
-                    VALGRIND_MAKE_MEM_DEFINED(&max_dB, sizeof(max_dB));
-#endif
-
                     e->min_dB = ((double) min_dB) / 100.0;
                     e->max_dB = ((double) max_dB) / 100.0;
 
@@ -1682,12 +1725,11 @@ static int element_probe(pa_alsa_element *e, snd_mixer_t *m) {
     return 0;
 }
 
-static int jack_probe(pa_alsa_jack *j, snd_hctl_t *h) {
-    pa_assert(h);
+static int jack_probe(pa_alsa_jack *j, snd_mixer_t *m) {
     pa_assert(j);
     pa_assert(j->path);
 
-    j->has_control = pa_alsa_find_jack(h, j->alsa_name) != NULL;
+    j->has_control = pa_alsa_mixer_find(m, j->alsa_name, 0) != NULL;
 
     if (j->has_control) {
         if (j->required_absent != PA_ALSA_REQUIRED_IGNORE)
@@ -2615,7 +2657,7 @@ static void path_create_settings(pa_alsa_path *p) {
     element_create_settings(p->elements, NULL);
 }
 
-int pa_alsa_path_probe(pa_alsa_path *p, snd_mixer_t *m, snd_hctl_t *hctl, bool ignore_dB) {
+int pa_alsa_path_probe(pa_alsa_path *p, snd_mixer_t *m, bool ignore_dB) {
     pa_alsa_element *e;
     pa_alsa_jack *j;
     double min_dB[PA_CHANNEL_POSITION_MAX], max_dB[PA_CHANNEL_POSITION_MAX];
@@ -2635,7 +2677,7 @@ int pa_alsa_path_probe(pa_alsa_path *p, snd_mixer_t *m, snd_hctl_t *hctl, bool i
     pa_log_debug("Probing path '%s'", p->name);
 
     PA_LLIST_FOREACH(j, p->jacks) {
-        if (jack_probe(j, hctl) < 0) {
+        if (jack_probe(j, m) < 0) {
             p->supported = false;
             pa_log_debug("Probe of jack '%s' failed.", j->alsa_name);
             return -1;
@@ -3113,8 +3155,7 @@ static bool element_is_subset(pa_alsa_element *a, pa_alsa_element *b, snd_mixer_
             else if (a->volume_use == PA_ALSA_VOLUME_MERGE)
                 a_limit = a->volume_limit;
             else
-                /* This should never be reached */
-                pa_assert(false);
+                pa_assert_not_reached();
 
             if (a_limit > b->volume_limit)
                 return false;
@@ -3218,21 +3259,21 @@ static void path_set_condense(pa_alsa_path_set *ps, snd_mixer_t *m) {
             }
 
             /* Compare the elements of each set... */
-            ea = p->elements;
-            eb = p2->elements;
+            PA_LLIST_FOREACH(ea, p->elements) {
+                bool found_matching_element = false;
 
-            while (is_subset) {
-                if (!ea && !eb)
+                if (!is_subset)
                     break;
-                else if ((ea && !eb) || (!ea && eb))
-                    is_subset = false;
-                else if (pa_streq(ea->alsa_name, eb->alsa_name)) {
-                    if (element_is_subset(ea, eb, m)) {
-                        ea = ea->next;
-                        eb = eb->next;
-                    } else
-                        is_subset = false;
-                } else
+
+                PA_LLIST_FOREACH(eb, p2->elements) {
+                    if (pa_streq(ea->alsa_name, eb->alsa_name)) {
+                        found_matching_element = true;
+                        is_subset = element_is_subset(ea, eb, m);
+                        break;
+                    }
+                }
+
+                if (!found_matching_element)
                     is_subset = false;
             }
 
@@ -3368,6 +3409,7 @@ pa_alsa_mapping *pa_alsa_mapping_get(pa_alsa_profile_set *ps, const char *name)
 
     m = pa_xnew0(pa_alsa_mapping, 1);
     m->profile_set = ps;
+    m->exact_channels = true;
     m->name = pa_xstrdup(name);
     pa_sample_spec_init(&m->sample_spec);
     pa_channel_map_init(&m->channel_map);
@@ -3485,6 +3527,30 @@ static int mapping_parse_paths(pa_config_parser_state *state) {
     return 0;
 }
 
+static int mapping_parse_exact_channels(pa_config_parser_state *state) {
+    pa_alsa_profile_set *ps;
+    pa_alsa_mapping *m;
+    int b;
+
+    pa_assert(state);
+
+    ps = state->userdata;
+
+    if (!(m = pa_alsa_mapping_get(ps, state->section))) {
+        pa_log("[%s:%u] %s invalid in section %s", state->filename, state->lineno, state->lvalue, state->section);
+        return -1;
+    }
+
+    if ((b = pa_parse_boolean(state->rvalue)) < 0) {
+        pa_log("[%s:%u] %s has invalid value '%s'", state->filename, state->lineno, state->lvalue, state->section);
+        return -1;
+    }
+
+    m->exact_channels = b;
+
+    return 0;
+}
+
 static int mapping_parse_element(pa_config_parser_state *state) {
     pa_alsa_profile_set *ps;
     pa_alsa_mapping *m;
@@ -3586,6 +3652,34 @@ static int mapping_parse_priority(pa_config_parser_state *state) {
     return 0;
 }
 
+static int mapping_parse_fallback(pa_config_parser_state *state) {
+    pa_alsa_profile_set *ps;
+    pa_alsa_profile *p;
+    pa_alsa_mapping *m;
+    int k;
+
+    pa_assert(state);
+
+    ps = state->userdata;
+
+    if ((k = pa_parse_boolean(state->rvalue)) < 0) {
+        pa_log("[%s:%u] Fallback invalid of '%s'", state->filename, state->lineno, state->section);
+        return -1;
+    }
+
+    if ((m = pa_alsa_mapping_get(ps, state->section)))
+        m->fallback = k;
+    else if ((p = profile_get(ps, state->section)))
+        p->fallback_input = p->fallback_output = k;
+    else {
+        pa_log("[%s:%u] Section name %s invalid.", state->filename, state->lineno, state->section);
+        return -1;
+    }
+
+    return 0;
+}
+
+
 static int profile_parse_mappings(pa_config_parser_state *state) {
     pa_alsa_profile_set *ps;
     pa_alsa_profile *p;
@@ -3756,7 +3850,6 @@ static void mapping_paths_probe(pa_alsa_mapping *m, pa_alsa_profile *profile,
     snd_pcm_t *pcm_handle;
     pa_alsa_path_set *ps;
     snd_mixer_t *mixer_handle;
-    snd_hctl_t *hctl_handle;
 
     if (direction == PA_ALSA_DIRECTION_OUTPUT) {
         if (m->output_path_set)
@@ -3775,15 +3868,15 @@ static void mapping_paths_probe(pa_alsa_mapping *m, pa_alsa_profile *profile,
 
     pa_assert(pcm_handle);
 
-    mixer_handle = pa_alsa_open_mixer_for_pcm(pcm_handle, NULL, &hctl_handle);
-    if (!mixer_handle || !hctl_handle) {
-         /* Cannot open mixer, remove all entries */
+    mixer_handle = pa_alsa_open_mixer_for_pcm(pcm_handle, NULL);
+    if (!mixer_handle) {
+        /* Cannot open mixer, remove all entries */
         pa_hashmap_remove_all(ps->paths);
         return;
     }
 
     PA_HASHMAP_FOREACH(p, ps->paths, state) {
-        if (pa_alsa_path_probe(p, mixer_handle, hctl_handle, m->profile_set->ignore_dB) < 0) {
+        if (pa_alsa_path_probe(p, mixer_handle, m->profile_set->ignore_dB) < 0) {
             pa_hashmap_remove(ps->paths, p);
         }
     }
@@ -3806,6 +3899,7 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) {
     static const struct description_map well_known_descriptions[] = {
         { "analog-mono",            N_("Analog Mono") },
         { "analog-stereo",          N_("Analog Stereo") },
+        { "multichannel",           N_("Multichannel") },
         { "analog-surround-21",     N_("Analog Surround 2.1") },
         { "analog-surround-30",     N_("Analog Surround 3.0") },
         { "analog-surround-31",     N_("Analog Surround 3.1") },
@@ -3817,7 +3911,6 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) {
         { "analog-surround-61",     N_("Analog Surround 6.1") },
         { "analog-surround-70",     N_("Analog Surround 7.0") },
         { "analog-surround-71",     N_("Analog Surround 7.1") },
-        { "analog-4-channel-input", N_("Analog 4-channel Input") },
         { "iec958-stereo",          N_("Digital Stereo (IEC958)") },
         { "iec958-passthrough",     N_("Digital Passthrough  (IEC958)") },
         { "iec958-ac3-surround-40", N_("Digital Surround 4.0 (IEC958/AC3)") },
@@ -3914,12 +4007,14 @@ static void profile_set_add_auto_pair(
         p->output_mappings = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
         pa_idxset_put(p->output_mappings, m, NULL);
         p->priority += m->priority * 100;
+        p->fallback_output = m->fallback;
     }
 
     if (n) {
         p->input_mappings = pa_idxset_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
         pa_idxset_put(p->input_mappings, n, NULL);
         p->priority += n->priority;
+        p->fallback_input = n->fallback;
     }
 
     pa_hashmap_put(ps->profiles, p->name, p);
@@ -4156,10 +4251,12 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel
         { "element-input",          mapping_parse_element,        NULL, NULL },
         { "element-output",         mapping_parse_element,        NULL, NULL },
         { "direction",              mapping_parse_direction,      NULL, NULL },
+        { "exact-channels",         mapping_parse_exact_channels, NULL, NULL },
 
         /* Shared by [Mapping ...] and [Profile ...] */
         { "description",            mapping_parse_description,    NULL, NULL },
         { "priority",               mapping_parse_priority,       NULL, NULL },
+        { "fallback",               mapping_parse_fallback,       NULL, NULL },
 
         /* [Profile ...] */
         { "input-mappings",         profile_parse_mappings,       NULL, NULL },
@@ -4264,10 +4361,12 @@ static void profile_finalize_probing(pa_alsa_profile *to_be_finalized, pa_alsa_p
 static snd_pcm_t* mapping_open_pcm(pa_alsa_mapping *m,
                                    const pa_sample_spec *ss,
                                    const char *dev_id,
+                                   bool exact_channels,
                                    int mode,
                                    unsigned default_n_fragments,
                                    unsigned default_fragment_size_msec) {
 
+    snd_pcm_t* handle;
     pa_sample_spec try_ss = *ss;
     pa_channel_map try_map = m->channel_map;
     snd_pcm_uframes_t try_period_size, try_buffer_size;
@@ -4279,10 +4378,17 @@ static snd_pcm_t* mapping_open_pcm(pa_alsa_mapping *m,
         pa_frame_size(&try_ss);
     try_buffer_size = default_n_fragments * try_period_size;
 
-    return pa_alsa_open_by_template(
+    handle = pa_alsa_open_by_template(
                               m->device_strings, dev_id, NULL, &try_ss,
                               &try_map, mode, &try_period_size,
-                              &try_buffer_size, 0, NULL, NULL, true);
+                              &try_buffer_size, 0, NULL, NULL, exact_channels);
+    if (handle && !exact_channels && m->channel_map.channels != try_map.channels) {
+        char buf[PA_CHANNEL_MAP_SNPRINT_MAX];
+        pa_log_debug("Channel map for mapping '%s' permanently changed to '%s'", m->name,
+                     pa_channel_map_snprint(buf, sizeof(buf), &try_map));
+        m->channel_map = try_map;
+    }
+    return handle;
 }
 
 static void paths_drop_unused(pa_hashmap* h, pa_hashmap *keep) {
@@ -4296,14 +4402,30 @@ static void paths_drop_unused(pa_hashmap* h, pa_hashmap *keep) {
 
     p = pa_hashmap_iterate(h, &state, &key);
     while (p) {
-        if (pa_hashmap_get(keep, p) == NULL) {
-            pa_hashmap_remove(h, key);
-            pa_alsa_path_free(p);
-        }
+        if (pa_hashmap_get(keep, p) == NULL)
+            pa_hashmap_remove_and_free(h, key);
         p = pa_hashmap_iterate(h, &state, &key);
     }
 }
 
+static int add_profiles_to_probe(
+        pa_alsa_profile **list,
+        pa_hashmap *profiles,
+        bool fallback_output,
+        bool fallback_input) {
+
+    int i = 0;
+    void *state;
+    pa_alsa_profile *p;
+    PA_HASHMAP_FOREACH(p, profiles, state)
+        if (p->fallback_input == fallback_input && p->fallback_output == fallback_output) {
+            *list = p;
+            list++;
+            i++;
+        }
+    return i;
+}
+
 void pa_alsa_profile_set_probe(
         pa_alsa_profile_set *ps,
         const char *dev_id,
@@ -4311,8 +4433,10 @@ void pa_alsa_profile_set_probe(
         unsigned default_n_fragments,
         unsigned default_fragment_size_msec) {
 
-    void *state;
+    bool found_output = false, found_input = false;
+
     pa_alsa_profile *p, *last = NULL;
+    pa_alsa_profile **pp, **probe_order;
     pa_alsa_mapping *m;
     pa_hashmap *broken_inputs, *broken_outputs, *used_paths;
 
@@ -4326,9 +4450,22 @@ void pa_alsa_profile_set_probe(
     broken_inputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
     broken_outputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
     used_paths = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
+    pp = probe_order = pa_xnew0(pa_alsa_profile *, pa_hashmap_size(ps->profiles) + 1);
 
-    PA_HASHMAP_FOREACH(p, ps->profiles, state) {
+    pp += add_profiles_to_probe(pp, ps->profiles, false, false);
+    pp += add_profiles_to_probe(pp, ps->profiles, false, true);
+    pp += add_profiles_to_probe(pp, ps->profiles, true, false);
+    pp += add_profiles_to_probe(pp, ps->profiles, true, true);
+
+    for (pp = probe_order; *pp; pp++) {
         uint32_t idx;
+        p = *pp;
+
+        /* Skip if fallback and already found something */
+        if (found_input && p->fallback_input)
+            continue;
+        if (found_output && p->fallback_output)
+            continue;
 
         /* Skip if this is already marked that it is supported (i.e. from the config file) */
         if (!p->supported) {
@@ -4367,7 +4504,7 @@ void pa_alsa_profile_set_probe(
                         continue;
 
                     pa_log_debug("Checking for playback on %s (%s)", m->description, m->name);
-                    if (!(m->output_pcm = mapping_open_pcm(m, ss, dev_id,
+                    if (!(m->output_pcm = mapping_open_pcm(m, ss, dev_id, m->exact_channels,
                                                            SND_PCM_STREAM_PLAYBACK,
                                                            default_n_fragments,
                                                            default_fragment_size_msec))) {
@@ -4388,7 +4525,7 @@ void pa_alsa_profile_set_probe(
                         continue;
 
                     pa_log_debug("Checking for recording on %s (%s)", m->description, m->name);
-                    if (!(m->input_pcm = mapping_open_pcm(m, ss, dev_id,
+                    if (!(m->input_pcm = mapping_open_pcm(m, ss, dev_id, m->exact_channels,
                                                           SND_PCM_STREAM_CAPTURE,
                                                           default_n_fragments,
                                                           default_fragment_size_msec))) {
@@ -4412,13 +4549,17 @@ void pa_alsa_profile_set_probe(
 
         if (p->output_mappings)
             PA_IDXSET_FOREACH(m, p->output_mappings, idx)
-                if (m->output_pcm)
+                if (m->output_pcm) {
+                    found_output |= !p->fallback_output;
                     mapping_paths_probe(m, p, PA_ALSA_DIRECTION_OUTPUT, used_paths);
+                }
 
         if (p->input_mappings)
             PA_IDXSET_FOREACH(m, p->input_mappings, idx)
-                if (m->input_pcm)
+                if (m->input_pcm) {
+                    found_input |= !p->fallback_input;
                     mapping_paths_probe(m, p, PA_ALSA_DIRECTION_INPUT, used_paths);
+                }
     }
 
     /* Clean up */
@@ -4431,6 +4572,7 @@ void pa_alsa_profile_set_probe(
     pa_hashmap_free(broken_inputs);
     pa_hashmap_free(broken_outputs);
     pa_hashmap_free(used_paths);
+    pa_xfree(probe_order);
 
     ps->probed = true;
 }
@@ -4468,17 +4610,13 @@ void pa_alsa_profile_set_drop_unsupported(pa_alsa_profile_set *ps) {
     void *state;
 
     PA_HASHMAP_FOREACH(p, ps->profiles, state) {
-        if (!p->supported) {
-            pa_hashmap_remove(ps->profiles, p->name);
-            profile_free(p);
-        }
+        if (!p->supported)
+            pa_hashmap_remove_and_free(ps->profiles, p->name);
     }
 
     PA_HASHMAP_FOREACH(m, ps->mappings, state) {
-        if (m->supported <= 0) {
-            pa_hashmap_remove(ps->mappings, m->name);
-            mapping_free(m);
-        }
+        if (m->supported <= 0)
+            pa_hashmap_remove_and_free(ps->mappings, m->name);
     }
 }
 
diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h
index 995a34b..7e6300e 100644
--- a/src/modules/alsa/alsa-mixer.h
+++ b/src/modules/alsa/alsa-mixer.h
@@ -164,7 +164,7 @@ struct pa_alsa_jack {
     char *alsa_name; /* E g "Headphone Jack" */
     bool has_control; /* is the jack itself present? */
     bool plugged_in; /* is this jack currently plugged in? */
-    snd_hctl_elem_t *hctl_elem; /* Jack detection handle */
+    snd_mixer_elem_t *melem; /* Jack detection handle */
     pa_available_t state_unplugged, state_plugged;
 
     pa_alsa_required_t required;
@@ -226,7 +226,7 @@ void pa_alsa_element_dump(pa_alsa_element *e);
 
 pa_alsa_path *pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa_direction_t direction);
 pa_alsa_path *pa_alsa_path_synthesize(const char *element, pa_alsa_direction_t direction);
-int pa_alsa_path_probe(pa_alsa_path *p, snd_mixer_t *m, snd_hctl_t *hctl, bool ignore_dB);
+int pa_alsa_path_probe(pa_alsa_path *p, snd_mixer_t *m, bool ignore_dB);
 void pa_alsa_path_dump(pa_alsa_path *p);
 int pa_alsa_path_get_volume(pa_alsa_path *p, snd_mixer_t *m, const pa_channel_map *cm, pa_cvolume *v);
 int pa_alsa_path_get_mute(pa_alsa_path *path, snd_mixer_t *m, bool *muted);
@@ -264,6 +264,8 @@ struct pa_alsa_mapping {
     pa_alsa_path_set *output_path_set;
 
     unsigned supported;
+    bool exact_channels:1;
+    bool fallback:1;
 
     /* Temporarily used during probing */
     snd_pcm_t *input_pcm;
@@ -284,6 +286,8 @@ struct pa_alsa_profile {
     unsigned priority;
 
     bool supported:1;
+    bool fallback_input:1;
+    bool fallback_output:1;
 
     char **input_mapping_names;
     char **output_mapping_names;
@@ -331,7 +335,7 @@ void pa_alsa_profile_set_free(pa_alsa_profile_set *s);
 void pa_alsa_profile_set_dump(pa_alsa_profile_set *s);
 void pa_alsa_profile_set_drop_unsupported(pa_alsa_profile_set *s);
 
-snd_mixer_t *pa_alsa_open_mixer_for_pcm(snd_pcm_t *pcm, char **ctl_device, snd_hctl_t **hctl);
+snd_mixer_t *pa_alsa_open_mixer_for_pcm(snd_pcm_t *pcm, char **ctl_device);
 
 pa_alsa_fdlist *pa_alsa_fdlist_new(void);
 void pa_alsa_fdlist_free(pa_alsa_fdlist *fdl);
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index ccf1137..e256bbd 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -127,6 +127,8 @@ struct userdata {
         watermark_dec_threshold,
         rewind_safeguard;
 
+    snd_pcm_uframes_t frames_per_block;
+
     pa_usec_t watermark_dec_not_before;
     pa_usec_t min_latency_ref;
     pa_usec_t tsched_watermark_usec;
@@ -619,8 +621,7 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, bool polled, bo
             }
 
             /* Make sure that if these memblocks need to be copied they will fit into one slot */
-            if (frames > pa_mempool_block_size_max(u->core->mempool)/u->frame_size)
-                frames = pa_mempool_block_size_max(u->core->mempool)/u->frame_size;
+            frames = PA_MIN(frames, u->frames_per_block);
 
             if (!after_avail && frames == 0)
                 break;
@@ -630,7 +631,7 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, bool polled, bo
 
             /* Check these are multiples of 8 bit */
             pa_assert((areas[0].first & 7) == 0);
-            pa_assert((areas[0].step & 7)== 0);
+            pa_assert((areas[0].step & 7) == 0);
 
             /* We assume a single interleaved memory buffer */
             pa_assert((areas[0].first >> 3) == 0);
@@ -648,7 +649,7 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, bool polled, bo
 
             if (PA_UNLIKELY((sframes = snd_pcm_mmap_commit(u->pcm_handle, offset, frames)) < 0)) {
 
-                if (!after_avail && (int) sframes == -EAGAIN)
+                if ((int) sframes == -EAGAIN)
                     break;
 
                 if ((r = try_recover(u, "snd_pcm_mmap_commit", (int) sframes)) == 0)
@@ -1395,18 +1396,17 @@ static void sink_write_volume_cb(pa_sink *s) {
     }
 }
 
-static void sink_get_mute_cb(pa_sink *s) {
+static int sink_get_mute_cb(pa_sink *s, bool *mute) {
     struct userdata *u = s->userdata;
-    bool b;
 
     pa_assert(u);
     pa_assert(u->mixer_path);
     pa_assert(u->mixer_handle);
 
-    if (pa_alsa_path_get_mute(u->mixer_path, u->mixer_handle, &b) < 0)
-        return;
+    if (pa_alsa_path_get_mute(u->mixer_path, u->mixer_handle, mute) < 0)
+        return -1;
 
-    s->muted = b;
+    return 0;
 }
 
 static void sink_set_mute_cb(pa_sink *s) {
@@ -1797,7 +1797,7 @@ static void thread_func(void *userdata) {
             pa_rtpoll_set_timer_disabled(u->rtpoll);
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (rtpoll_sleep > 0) {
@@ -1887,12 +1887,10 @@ static void set_sink_name(pa_sink_new_data *data, pa_modargs *ma, const char *de
 }
 
 static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char *element, bool ignore_dB) {
-    snd_hctl_t *hctl;
-
     if (!mapping && !element)
         return;
 
-    if (!(u->mixer_handle = pa_alsa_open_mixer_for_pcm(u->pcm_handle, &u->control_device, &hctl))) {
+    if (!(u->mixer_handle = pa_alsa_open_mixer_for_pcm(u->pcm_handle, &u->control_device))) {
         pa_log_info("Failed to find a working mixer device.");
         return;
     }
@@ -1902,7 +1900,7 @@ static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char
         if (!(u->mixer_path = pa_alsa_path_synthesize(element, PA_ALSA_DIRECTION_OUTPUT)))
             goto fail;
 
-        if (pa_alsa_path_probe(u->mixer_path, u->mixer_handle, hctl, ignore_dB) < 0)
+        if (pa_alsa_path_probe(u->mixer_path, u->mixer_handle, ignore_dB) < 0)
             goto fail;
 
         pa_log_debug("Probed mixer path %s:", u->mixer_path->name);
@@ -2278,7 +2276,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
             pa_proplist_sets(data.proplist, key, pa_proplist_gets(mapping->proplist, key));
     }
 
-    pa_alsa_init_description(data.proplist);
+    pa_alsa_init_description(data.proplist, card);
 
     if (u->control_device)
         pa_alsa_init_proplist_ctl(data.proplist, u->control_device);
@@ -2331,6 +2329,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
     pa_sink_set_rtpoll(u->sink, u->rtpoll);
 
     u->frame_size = frame_size;
+    u->frames_per_block = pa_mempool_block_size_max(m->core->mempool) / frame_size;
     u->fragment_size = frag_size = (size_t) (period_frames * frame_size);
     u->hwbuf_size = buffer_size = (size_t) (buffer_frames * frame_size);
     pa_cvolume_mute(&u->hardware_volume, u->sink->sample_spec.channels);
@@ -2390,8 +2389,12 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
         if (u->sink->set_mute)
             u->sink->set_mute(u->sink);
     } else {
-        if (u->sink->get_mute)
-            u->sink->get_mute(u->sink);
+        if (u->sink->get_mute) {
+            bool mute;
+
+            if (u->sink->get_mute(u->sink, &mute) >= 0)
+                pa_sink_set_mute(u->sink, mute, false);
+        }
     }
 
     if ((data.volume_is_set || data.muted_is_set) && u->sink->write_volume)
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index 2e93e0f..111c517 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -116,6 +116,8 @@ struct userdata {
         watermark_inc_threshold,
         watermark_dec_threshold;
 
+    snd_pcm_uframes_t frames_per_block;
+
     pa_usec_t watermark_dec_not_before;
     pa_usec_t min_latency_ref;
     pa_usec_t tsched_watermark_usec;
@@ -576,8 +578,7 @@ static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec, bool polled, boo
             }
 
             /* Make sure that if these memblocks need to be copied they will fit into one slot */
-            if (frames > pa_mempool_block_size_max(u->core->mempool)/u->frame_size)
-                frames = pa_mempool_block_size_max(u->core->mempool)/u->frame_size;
+            frames = PA_MIN(frames, u->frames_per_block);
 
             if (!after_avail && frames == 0)
                 break;
@@ -587,7 +588,7 @@ static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec, bool polled, boo
 
             /* Check these are multiples of 8 bit */
             pa_assert((areas[0].first & 7) == 0);
-            pa_assert((areas[0].step & 7)== 0);
+            pa_assert((areas[0].step & 7) == 0);
 
             /* We assume a single interleaved memory buffer */
             pa_assert((areas[0].first >> 3) == 0);
@@ -1277,18 +1278,17 @@ static void source_write_volume_cb(pa_source *s) {
     }
 }
 
-static void source_get_mute_cb(pa_source *s) {
+static int source_get_mute_cb(pa_source *s, bool *mute) {
     struct userdata *u = s->userdata;
-    bool b;
 
     pa_assert(u);
     pa_assert(u->mixer_path);
     pa_assert(u->mixer_handle);
 
-    if (pa_alsa_path_get_mute(u->mixer_path, u->mixer_handle, &b) < 0)
-        return;
+    if (pa_alsa_path_get_mute(u->mixer_path, u->mixer_handle, mute) < 0)
+        return -1;
 
-    s->muted = b;
+    return 0;
 }
 
 static void source_set_mute_cb(pa_source *s) {
@@ -1516,7 +1516,7 @@ static void thread_func(void *userdata) {
             pa_rtpoll_set_timer_disabled(u->rtpoll);
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (rtpoll_sleep > 0) {
@@ -1605,12 +1605,10 @@ static void set_source_name(pa_source_new_data *data, pa_modargs *ma, const char
 }
 
 static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char *element, bool ignore_dB) {
-    snd_hctl_t *hctl;
-
     if (!mapping && !element)
         return;
 
-    if (!(u->mixer_handle = pa_alsa_open_mixer_for_pcm(u->pcm_handle, &u->control_device, &hctl))) {
+    if (!(u->mixer_handle = pa_alsa_open_mixer_for_pcm(u->pcm_handle, &u->control_device))) {
         pa_log_info("Failed to find a working mixer device.");
         return;
     }
@@ -1620,7 +1618,7 @@ static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char
         if (!(u->mixer_path = pa_alsa_path_synthesize(element, PA_ALSA_DIRECTION_INPUT)))
             goto fail;
 
-        if (pa_alsa_path_probe(u->mixer_path, u->mixer_handle, hctl, ignore_dB) < 0)
+        if (pa_alsa_path_probe(u->mixer_path, u->mixer_handle, ignore_dB) < 0)
             goto fail;
 
         pa_log_debug("Probed mixer path %s:", u->mixer_path->name);
@@ -1984,7 +1982,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
             pa_proplist_sets(data.proplist, key, pa_proplist_gets(mapping->proplist, key));
     }
 
-    pa_alsa_init_description(data.proplist);
+    pa_alsa_init_description(data.proplist, card);
 
     if (u->control_device)
         pa_alsa_init_proplist_ctl(data.proplist, u->control_device);
@@ -2036,6 +2034,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
     pa_source_set_rtpoll(u->source, u->rtpoll);
 
     u->frame_size = frame_size;
+    u->frames_per_block = pa_mempool_block_size_max(m->core->mempool) / frame_size;
     u->fragment_size = frag_size = (size_t) (period_frames * frame_size);
     u->hwbuf_size = buffer_size = (size_t) (buffer_frames * frame_size);
     pa_cvolume_mute(&u->hardware_volume, u->source->sample_spec.channels);
@@ -2088,8 +2087,12 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
         if (u->source->set_mute)
             u->source->set_mute(u->source);
     } else {
-        if (u->source->get_mute)
-            u->source->get_mute(u->source);
+        if (u->source->get_mute) {
+            bool mute;
+
+            if (u->source->get_mute(u->source, &mute) >= 0)
+                pa_source_set_mute(u->source, mute, false);
+        }
     }
 
     if ((data.volume_is_set || data.muted_is_set) && u->source->write_volume)
diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
index 23522c7..6c848a9 100644
--- a/src/modules/alsa/alsa-ucm.c
+++ b/src/modules/alsa/alsa-ucm.c
@@ -1426,21 +1426,20 @@ static void profile_finalize_probing(pa_alsa_profile *p) {
 static void ucm_mapping_jack_probe(pa_alsa_mapping *m) {
     snd_pcm_t *pcm_handle;
     snd_mixer_t *mixer_handle;
-    snd_hctl_t *hctl_handle;
     pa_alsa_ucm_mapping_context *context = &m->ucm_context;
     pa_alsa_ucm_device *dev;
     uint32_t idx;
 
     pcm_handle = m->direction == PA_ALSA_DIRECTION_OUTPUT ? m->output_pcm : m->input_pcm;
-    mixer_handle = pa_alsa_open_mixer_for_pcm(pcm_handle, NULL, &hctl_handle);
-    if (!mixer_handle || !hctl_handle)
+    mixer_handle = pa_alsa_open_mixer_for_pcm(pcm_handle, NULL);
+    if (!mixer_handle)
         return;
 
     PA_IDXSET_FOREACH(dev, context->ucm_devices, idx) {
         pa_alsa_jack *jack;
         jack = m->direction == PA_ALSA_DIRECTION_OUTPUT ? dev->output_jack : dev->input_jack;
         pa_assert (jack);
-        jack->has_control = pa_alsa_find_jack(hctl_handle, jack->alsa_name) != NULL;
+        jack->has_control = pa_alsa_mixer_find(mixer_handle, jack->alsa_name, 0) != NULL;
         pa_log_info("UCM jack %s has_control=%d", jack->name, jack->has_control);
     }
 
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 73b1332..4131cff 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -184,7 +184,8 @@ static int set_buffer_size(snd_pcm_t *pcm_handle, snd_pcm_hw_params_t *hwparams,
 }
 
 /* Set the hardware parameters of the given ALSA device. Returns the
- * selected fragment settings in *buffer_size and *period_size. If tsched mode can be enabled */
+ * selected fragment settings in *buffer_size and *period_size. Determine
+ * whether mmap and tsched mode can be enabled. */
 int pa_alsa_set_hw_params(
         snd_pcm_t *pcm_handle,
         pa_sample_spec *ss,
@@ -263,7 +264,7 @@ int pa_alsa_set_hw_params(
             else
                 pa_log_info("Trying to disable ALSA period wakeups, using timers only");
         } else
-            pa_log_info("cannot disable ALSA period wakeups");
+            pa_log_info("Cannot disable ALSA period wakeups");
     }
 #endif
 
@@ -327,6 +328,7 @@ int pa_alsa_set_hw_params(
                 goto success;
             }
 
+            snd_pcm_hw_params_copy(hwparams_copy, hwparams);
             /* Second try: set period size first, followed by buffer size */
             if (set_period_size(pcm_handle, hwparams_copy, _period_size) >= 0 &&
                 set_buffer_size(pcm_handle, hwparams_copy, _buffer_size) >= 0 &&
@@ -868,11 +870,11 @@ void pa_alsa_refcnt_dec(void) {
     }
 }
 
-bool pa_alsa_init_description(pa_proplist *p) {
+bool pa_alsa_init_description(pa_proplist *p, pa_card *card) {
     const char *d, *k;
     pa_assert(p);
 
-    if (pa_device_init_description(p))
+    if (pa_device_init_description(p, card))
         return true;
 
     if (!(d = pa_proplist_gets(p, "alsa.card_name")))
@@ -1456,32 +1458,72 @@ bool pa_alsa_may_tsched(bool want) {
     return true;
 }
 
-snd_hctl_elem_t* pa_alsa_find_jack(snd_hctl_t *hctl, const char* jack_name) {
-    snd_ctl_elem_id_t *id;
+#define SND_MIXER_ELEM_PULSEAUDIO (SND_MIXER_ELEM_LAST + 10)
+
+snd_mixer_elem_t *pa_alsa_mixer_find(snd_mixer_t *mixer, const char *name, unsigned int device) {
+    snd_mixer_elem_t *elem;
 
-    snd_ctl_elem_id_alloca(&id);
-    snd_ctl_elem_id_clear(id);
-    snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_CARD);
-    snd_ctl_elem_id_set_name(id, jack_name);
+    for (elem = snd_mixer_first_elem(mixer); elem; elem = snd_mixer_elem_next(elem)) {
+        snd_hctl_elem_t *helem;
+        if (snd_mixer_elem_get_type(elem) != SND_MIXER_ELEM_PULSEAUDIO)
+            continue;
+        helem = snd_mixer_elem_get_private(elem);
+        if (!pa_streq(snd_hctl_elem_get_name(helem), name))
+            continue;
+        if (snd_hctl_elem_get_device(helem) != device)
+            continue;
+        return elem;
+    }
+    return NULL;
+}
 
-    return snd_hctl_find_elem(hctl, id);
+static int mixer_class_compare(const snd_mixer_elem_t *c1, const snd_mixer_elem_t *c2)
+{
+    /* Dummy compare function */
+    return c1 == c2 ? 0 : (c1 > c2 ? 1 : -1);
 }
 
-snd_hctl_elem_t* pa_alsa_find_eld_ctl(snd_hctl_t *hctl, int device) {
-    snd_ctl_elem_id_t *id;
+static int mixer_class_event(snd_mixer_class_t *class, unsigned int mask,
+			snd_hctl_elem_t *helem, snd_mixer_elem_t *melem)
+{
+    int err;
+    const char *name = snd_hctl_elem_get_name(helem);
+    if (mask & SND_CTL_EVENT_MASK_ADD) {
+        snd_ctl_elem_iface_t iface = snd_hctl_elem_get_interface(helem);
+        if (iface == SND_CTL_ELEM_IFACE_CARD || iface == SND_CTL_ELEM_IFACE_PCM) {
+            snd_mixer_elem_t *new_melem;
+
+            /* Put the hctl pointer as our private data - it will be useful for callbacks */
+            if ((err = snd_mixer_elem_new(&new_melem, SND_MIXER_ELEM_PULSEAUDIO, 0, helem, NULL)) < 0) {
+                pa_log_warn("snd_mixer_elem_new failed: %s", pa_alsa_strerror(err));
+                return 0;
+            }
 
-    /* See if we can find the ELD control */
-    snd_ctl_elem_id_alloca(&id);
-    snd_ctl_elem_id_clear(id);
-    snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_PCM);
-    snd_ctl_elem_id_set_name(id, "ELD");
-    snd_ctl_elem_id_set_device(id, device);
+            if ((err = snd_mixer_elem_attach(new_melem, helem)) < 0) {
+                pa_log_warn("snd_mixer_elem_attach failed: %s", pa_alsa_strerror(err));
+		snd_mixer_elem_free(melem);
+                return 0;
+            }
 
-    return snd_hctl_find_elem(hctl, id);
+            if ((err = snd_mixer_elem_add(new_melem, class)) < 0) {
+                pa_log_warn("snd_mixer_elem_add failed: %s", pa_alsa_strerror(err));
+                return 0;
+            }
+        }
+    }
+    else if (mask & SND_CTL_EVENT_MASK_VALUE) {
+        snd_mixer_elem_value(melem); /* Calls the element callback */
+        return 0;
+    }
+    else
+        pa_log_info("Got an unknown mixer class event for %s: mask 0x%x\n", name, mask);
+
+    return 0;
 }
 
-static int prepare_mixer(snd_mixer_t *mixer, const char *dev, snd_hctl_t **hctl) {
+static int prepare_mixer(snd_mixer_t *mixer, const char *dev) {
     int err;
+    snd_mixer_class_t *class;
 
     pa_assert(mixer);
     pa_assert(dev);
@@ -1491,12 +1533,18 @@ static int prepare_mixer(snd_mixer_t *mixer, const char *dev, snd_hctl_t **hctl)
         return -1;
     }
 
-    /* Note: The hctl handle returned should not be freed.
-       It is closed/freed by alsa-lib on snd_mixer_close/free */
-    if (hctl && (err = snd_mixer_get_hctl(mixer, dev, hctl)) < 0) {
-        pa_log_info("Unable to get hctl of mixer %s: %s", dev, pa_alsa_strerror(err));
+    if (snd_mixer_class_malloc(&class)) {
+        pa_log_info("Failed to allocate mixer class for %s", dev);
         return -1;
     }
+    snd_mixer_class_set_event(class, mixer_class_event);
+    snd_mixer_class_set_compare(class, mixer_class_compare);
+    if ((err = snd_mixer_class_register(class, mixer)) < 0) {
+        pa_log_info("Unable register mixer class for %s: %s", dev, pa_alsa_strerror(err));
+        snd_mixer_class_free(class);
+        return -1;
+    }
+    /* From here on, the mixer class is deallocated by alsa on snd_mixer_close/free. */
 
     if ((err = snd_mixer_selem_register(mixer, NULL, NULL)) < 0) {
         pa_log_warn("Unable to register mixer: %s", pa_alsa_strerror(err));
@@ -1512,7 +1560,7 @@ static int prepare_mixer(snd_mixer_t *mixer, const char *dev, snd_hctl_t **hctl)
     return 0;
 }
 
-snd_mixer_t *pa_alsa_open_mixer(int alsa_card_index, char **ctl_device, snd_hctl_t **hctl) {
+snd_mixer_t *pa_alsa_open_mixer(int alsa_card_index, char **ctl_device) {
     int err;
     snd_mixer_t *m;
     char *md;
@@ -1526,7 +1574,7 @@ snd_mixer_t *pa_alsa_open_mixer(int alsa_card_index, char **ctl_device, snd_hctl
 
     /* Then, try by card index */
     md = pa_sprintf_malloc("hw:%i", alsa_card_index);
-    if (prepare_mixer(m, md, hctl) >= 0) {
+    if (prepare_mixer(m, md) >= 0) {
 
         if (ctl_device)
             *ctl_device = md;
@@ -1542,7 +1590,7 @@ snd_mixer_t *pa_alsa_open_mixer(int alsa_card_index, char **ctl_device, snd_hctl
     return NULL;
 }
 
-snd_mixer_t *pa_alsa_open_mixer_for_pcm(snd_pcm_t *pcm, char **ctl_device, snd_hctl_t **hctl) {
+snd_mixer_t *pa_alsa_open_mixer_for_pcm(snd_pcm_t *pcm, char **ctl_device) {
     int err;
     snd_mixer_t *m;
     const char *dev;
@@ -1558,7 +1606,7 @@ snd_mixer_t *pa_alsa_open_mixer_for_pcm(snd_pcm_t *pcm, char **ctl_device, snd_h
 
     /* First, try by name */
     if ((dev = snd_pcm_name(pcm)))
-        if (prepare_mixer(m, dev, hctl) >= 0) {
+        if (prepare_mixer(m, dev) >= 0) {
             if (ctl_device)
                 *ctl_device = pa_xstrdup(dev);
 
@@ -1575,7 +1623,7 @@ snd_mixer_t *pa_alsa_open_mixer_for_pcm(snd_pcm_t *pcm, char **ctl_device, snd_h
             md = pa_sprintf_malloc("hw:%i", card_idx);
 
             if (!dev || !pa_streq(dev, md))
-                if (prepare_mixer(m, md, hctl) >= 0) {
+                if (prepare_mixer(m, md) >= 0) {
 
                     if (ctl_device)
                         *ctl_device = md;
@@ -1593,25 +1641,19 @@ snd_mixer_t *pa_alsa_open_mixer_for_pcm(snd_pcm_t *pcm, char **ctl_device, snd_h
     return NULL;
 }
 
-int pa_alsa_get_hdmi_eld(snd_hctl_t *hctl, int device, pa_hdmi_eld *eld) {
+int pa_alsa_get_hdmi_eld(snd_hctl_elem_t *elem, pa_hdmi_eld *eld) {
 
     /* The ELD format is specific to HDA Intel sound cards and defined in the
        HDA specification: http://www.intel.com/content/www/us/en/standards/high-definition-audio-specification.html */
     int err;
-    snd_hctl_elem_t *elem;
     snd_ctl_elem_info_t *info;
     snd_ctl_elem_value_t *value;
     uint8_t *elddata;
     unsigned int eldsize, mnl;
+    unsigned int device;
 
     pa_assert(eld != NULL);
-
-    /* See if we can find the ELD control */
-    elem = pa_alsa_find_eld_ctl(hctl, device);
-    if (elem == NULL) {
-        pa_log_debug("No ELD info control found (for device=%d)", device);
-        return -1;
-    }
+    pa_assert(elem != NULL);
 
     /* Does it have any contents? */
     snd_ctl_elem_info_alloca(&info);
@@ -1622,6 +1664,7 @@ int pa_alsa_get_hdmi_eld(snd_hctl_t *hctl, int device, pa_hdmi_eld *eld) {
         return -1;
     }
 
+    device = snd_hctl_elem_get_device(elem);
     eldsize = snd_ctl_elem_info_get_count(info);
     elddata = (unsigned char *) snd_ctl_elem_value_get_bytes(value);
     if (elddata == NULL || eldsize == 0) {
diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
index 0e3ae69..fb47940 100644
--- a/src/modules/alsa/alsa-util.h
+++ b/src/modules/alsa/alsa-util.h
@@ -118,7 +118,7 @@ void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t *
 void pa_alsa_init_proplist_card(pa_core *c, pa_proplist *p, int card);
 void pa_alsa_init_proplist_pcm(pa_core *c, pa_proplist *p, snd_pcm_t *pcm);
 void pa_alsa_init_proplist_ctl(pa_proplist *p, const char *name);
-bool pa_alsa_init_description(pa_proplist *p);
+bool pa_alsa_init_description(pa_proplist *p, pa_card *card);
 
 int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents);
 
@@ -142,16 +142,15 @@ const char* pa_alsa_strerror(int errnum);
 
 bool pa_alsa_may_tsched(bool want);
 
-snd_hctl_elem_t* pa_alsa_find_jack(snd_hctl_t *hctl, const char* jack_name);
-snd_hctl_elem_t* pa_alsa_find_eld_ctl(snd_hctl_t *hctl, int device);
+snd_mixer_elem_t *pa_alsa_mixer_find(snd_mixer_t *mixer, const char *name, unsigned int device);
 
-snd_mixer_t *pa_alsa_open_mixer(int alsa_card_index, char **ctl_device, snd_hctl_t **hctl);
+snd_mixer_t *pa_alsa_open_mixer(int alsa_card_index, char **ctl_device);
 
 typedef struct pa_hdmi_eld pa_hdmi_eld;
 struct pa_hdmi_eld {
     char monitor_name[17];
 };
 
-int pa_alsa_get_hdmi_eld(snd_hctl_t *hctl, int device, pa_hdmi_eld *eld);
+int pa_alsa_get_hdmi_eld(snd_hctl_elem_t *elem, pa_hdmi_eld *eld);
 
 #endif
diff --git a/src/modules/alsa/mixer/paths/analog-input.conf b/src/modules/alsa/mixer/paths/analog-input.conf
index c8f8e3c..356b07c 100644
--- a/src/modules/alsa/mixer/paths/analog-input.conf
+++ b/src/modules/alsa/mixer/paths/analog-input.conf
@@ -61,6 +61,21 @@ required-absent = any
 [Element Rear Mic Boost]
 required-absent = any
 
+[Element Headset]
+required-absent = any
+
+[Element Headset Mic]
+required-absent = any
+
+[Element Headset Mic Boost]
+required-absent = any
+
+[Element Headphone Mic]
+required-absent = any
+
+[Element Headphone Mic Boost]
+required-absent = any
+
 [Element Line]
 required-absent = any
 
diff --git a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
deleted file mode 100644
index 2b68117..0000000
--- a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
+++ /dev/null
@@ -1,102 +0,0 @@
-# This file is part of PulseAudio.
-#
-# PulseAudio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of the
-# License, or (at your option) any later version.
-#
-# PulseAudio is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PulseAudio; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-
-; Path for mixers that have a 'Desktop Speaker' control
-;
-; See analog-output.conf.common for an explanation on the directives
-
-[General]
-priority = 101
-description-key = analog-output-speaker
-
-[Properties]
-device.icon_name = audio-speakers
-
-[Element Hardware Master]
-switch = mute
-volume = merge
-override-map.1 = all
-override-map.2 = all-left,all-right
-
-[Element Master]
-switch = mute
-volume = merge
-override-map.1 = all
-override-map.2 = all-left,all-right
-
-[Element Master Mono]
-switch = off
-volume = off
-
-; This profile path is intended to control the desktop speaker, not
-; the headphones. But it should not hurt if we leave the headphone
-; jack enabled nonetheless.
-[Element Headphone]
-switch = mute
-volume = zero
-
-[Element Headphone2]
-switch = mute
-volume = zero
-
-[Element Speaker]
-switch = off
-volume = off
-
-[Element Desktop Speaker]
-required = any
-switch = mute
-volume = merge
-override-map.1 = all
-override-map.2 = all-left,all-right
-
-[Element Front]
-switch = mute
-volume = merge
-override-map.1 = all-front
-override-map.2 = front-left,front-right
-
-[Element Rear]
-switch = mute
-volume = merge
-override-map.1 = all-rear
-override-map.2 = rear-left,rear-right
-
-[Element Surround]
-switch = mute
-volume = merge
-override-map.1 = all-rear
-override-map.2 = rear-left,rear-right
-
-[Element Side]
-switch = mute
-volume = merge
-override-map.1 = all-side
-override-map.2 = side-left,side-right
-
-[Element Center]
-switch = mute
-volume = merge
-override-map.1 = all-center
-override-map.2 = all-center,all-center
-
-[Element LFE]
-switch = mute
-volume = merge
-override-map.1 = lfe
-override-map.2 = lfe,lfe
-
-.include analog-output.conf.common
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
index 74c467a..e29331b 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
@@ -48,6 +48,14 @@ volume = off
 switch = mute
 volume = zero
 
+[Element Headphone+LO]
+switch = mute
+volume = zero
+
+[Element Speaker+LO]
+switch = off
+volume = off
+
 [Element Headphone2]
 required = any
 switch = mute
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
index 89d794f..1ef17cf 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
@@ -25,6 +25,14 @@ description-key = analog-output-headphones
 [Properties]
 device.icon_name = audio-headphones
 
+[Jack Dock Headphone]
+required-any = any
+
+[Jack Dock Headphone Phantom]
+required-any = any
+state.plugged = unknown
+state.unplugged = unknown
+
 [Jack Front Headphone]
 required-any = any
 
@@ -61,6 +69,17 @@ override-map.2 = all-left,all-right
 switch = off
 volume = off
 
+[Element Speaker+LO]
+switch = off
+volume = off
+
+[Element Headphone+LO]
+required-any = any
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+
 [Element Headphone]
 required-any = any
 switch = mute
@@ -77,6 +96,7 @@ override-map.2 = all-left,all-right
 
 [Element Line HP Swap]
 switch = on
+required-any = any
 
 ; This profile path is intended to control the first headphones, not
 ; the second headphones. But it should not hurt if we leave the second
diff --git a/src/modules/alsa/mixer/paths/analog-output-lineout.conf b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
index d5e24b1..a110c26 100644
--- a/src/modules/alsa/mixer/paths/analog-output-lineout.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
@@ -26,6 +26,10 @@ state.plugged = unknown
 state.unplugged = unknown
 required-any = any
 
+[Jack Headphone]
+state.plugged = no
+state.unplugged = unknown
+
 [Jack Line Out Front]
 required-any = any
 
@@ -76,12 +80,27 @@ volume = merge
 override-map.1 = all
 override-map.2 = all-left,all-right
 
+[Element Speaker+LO]
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+required-any = any
+
+[Element Headphone+LO]
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+required-any = any
+
 [Element Master Mono]
 switch = off
 volume = off
 
 [Element Line HP Swap]
 switch = off
+required-any = any
 
 ; This profile path is intended to control the default output, not the
 ; headphones. But it should not hurt if we leave the headphone jack
diff --git a/src/modules/alsa/mixer/paths/analog-output-mono.conf b/src/modules/alsa/mixer/paths/analog-output-mono.conf
index 87b5081..589d4ce 100644
--- a/src/modules/alsa/mixer/paths/analog-output-mono.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-mono.conf
@@ -45,6 +45,10 @@ override-map.2 = all-left,all-right
 switch = mute
 volume = zero
 
+[Element Headphone+LO]
+switch = mute
+volume = zero
+
 [Element Headphone2]
 switch = mute
 volume = zero
@@ -55,6 +59,12 @@ volume = merge
 override-map.1 = all
 override-map.2 = all-left,all-right
 
+[Element Speaker+LO]
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+
 [Element Desktop Speaker]
 switch = off
 volume = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
index c511813..645d05b 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
@@ -61,6 +61,16 @@ volume = zero
 switch = mute
 volume = zero
 
+[Element Headphone+LO]
+switch = off
+volume = off
+
+[Element Speaker+LO]
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+
 [Element Speaker]
 switch = mute
 volume = merge
@@ -68,8 +78,10 @@ override-map.1 = all
 override-map.2 = all-left,all-right
 
 [Element Desktop Speaker]
-switch = off
-volume = off
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
 
 [Element Front]
 switch = mute
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
index d79fad1..a5bf452 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
@@ -29,6 +29,10 @@ device.icon_name = audio-speakers
 state.plugged = no
 state.unplugged = unknown
 
+[Jack Dock Headphone]
+state.plugged = no
+state.unplugged = unknown
+
 [Jack Front Headphone]
 state.plugged = no
 state.unplugged = unknown
@@ -69,6 +73,17 @@ volume = off
 switch = off
 volume = off
 
+[Element Headphone+LO]
+switch = off
+volume = off
+
+[Element Speaker+LO]
+required-any = any
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+
 [Element Speaker]
 required-any = any
 switch = mute
@@ -77,8 +92,11 @@ override-map.1 = all
 override-map.2 = all-left,all-right
 
 [Element Desktop Speaker]
-switch = off
-volume = off
+required-any = any
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
 
 [Element Front]
 switch = mute
diff --git a/src/modules/alsa/mixer/paths/analog-output.conf b/src/modules/alsa/mixer/paths/analog-output.conf
index 3a552c9..4f9cc53 100644
--- a/src/modules/alsa/mixer/paths/analog-output.conf
+++ b/src/modules/alsa/mixer/paths/analog-output.conf
@@ -22,14 +22,6 @@
 [General]
 priority = 99
 
-[Jack Line Out]
-state.plugged = unknown
-state.unplugged = unknown
-
-[Jack Line Out Phantom]
-state.plugged = unknown
-state.unplugged = unknown
-
 [Element Hardware Master]
 switch = mute
 volume = merge
@@ -46,28 +38,6 @@ override-map.2 = all-left,all-right
 switch = off
 volume = off
 
-[Element Line HP Swap]
-switch = off
-
-; This profile path is intended to control the default output, not the
-; headphones. But it should not hurt if we leave the headphone jack
-; enabled nonetheless.
-[Element Headphone]
-switch = mute
-volume = zero
-
-[Element Headphone2]
-switch = mute
-volume = zero
-
-[Element Speaker]
-switch = mute
-volume = off
-
-[Element Desktop Speaker]
-switch = mute
-volume = off
-
 [Element Front]
 switch = mute
 volume = merge
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-4.conf b/src/modules/alsa/mixer/paths/hdmi-output-4.conf
new file mode 100644
index 0000000..d61ec75
--- /dev/null
+++ b/src/modules/alsa/mixer/paths/hdmi-output-4.conf
@@ -0,0 +1,10 @@
+[General]
+description = HDMI / DisplayPort 5
+priority = 55
+eld-device = 10
+
+[Properties]
+device.icon_name = video-display
+
+[Jack HDMI/DP,pcm=10]
+required = ignore
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-5.conf b/src/modules/alsa/mixer/paths/hdmi-output-5.conf
new file mode 100644
index 0000000..02c15e8
--- /dev/null
+++ b/src/modules/alsa/mixer/paths/hdmi-output-5.conf
@@ -0,0 +1,10 @@
+[General]
+description = HDMI / DisplayPort 6
+priority = 54
+eld-device = 11
+
+[Properties]
+device.icon_name = video-display
+
+[Jack HDMI/DP,pcm=11]
+required = ignore
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-6.conf b/src/modules/alsa/mixer/paths/hdmi-output-6.conf
new file mode 100644
index 0000000..188a1ad
--- /dev/null
+++ b/src/modules/alsa/mixer/paths/hdmi-output-6.conf
@@ -0,0 +1,10 @@
+[General]
+description = HDMI / DisplayPort 7
+priority = 53
+eld-device = 12
+
+[Properties]
+device.icon_name = video-display
+
+[Jack HDMI/DP,pcm=12]
+required = ignore
diff --git a/src/modules/alsa/mixer/paths/hdmi-output-7.conf b/src/modules/alsa/mixer/paths/hdmi-output-7.conf
new file mode 100644
index 0000000..80f4e37
--- /dev/null
+++ b/src/modules/alsa/mixer/paths/hdmi-output-7.conf
@@ -0,0 +1,10 @@
+[General]
+description = HDMI / DisplayPort 8
+priority = 52
+eld-device = 13
+
+[Properties]
+device.icon_name = video-display
+
+[Jack HDMI/DP,pcm=13]
+required = ignore
diff --git a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
index 560ff1c..b34b90b 100644
--- a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
+++ b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
@@ -23,10 +23,6 @@ SUBSYSTEMS=="usb", GOTO="pulseaudio_check_usb"
 
 SUBSYSTEMS=="platform", DRIVERS=="thinkpad_acpi", ENV{PULSE_IGNORE}="1"
 
-# NVidia and Intel HDAs often have more than one HDMI codec/port on the same card
-ATTRS{vendor}=="0x10de", ENV{PULSE_PROFILE_SET}="extra-hdmi.conf"
-ATTRS{vendor}=="0x8086", ENV{PULSE_PROFILE_SET}="extra-hdmi.conf"
-
 # Force enable speaker and internal mic for some laptops
 # This should only be necessary for kernels 3.3, 3.4 and 3.5 (as they are lacking the phantom jack kctls).
 # Acer AOA150
diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf
index 9326245..2d2ced7 100644
--- a/src/modules/alsa/mixer/profile-sets/default.conf
+++ b/src/modules/alsa/mixer/profile-sets/default.conf
@@ -55,6 +55,9 @@
 ; priority = ...
 ; direction = any | input | output          # Only useful for?
 ;
+; exact-channels = yes | no                 # If no, and the exact number of channels is not supported,
+;                                           # allow device to be opened with another channel count
+; fallback = no | yes                       # This mapping will only be considered if all non-fallback mappings fail
 ; [Profile id]
 ; input-mappings = ...                      # Lists mappings for sources on this profile, those mapping must be
 ;                                           # defined in this file too
@@ -66,6 +69,7 @@
 ;                                           # will be assumed as working without probing. Makes initialization
 ;                                           # a bit faster but only works if the card is really known well.
 ;
+; fallback = no | yes                       # This profile will only be considered if all non-fallback profiles fail
 ; [DecibelFix element]                      # Decibel fixes can be used to work around missing or incorrect dB
 ;                                           # information from alsa. A decibel fix is a table that maps volume steps
 ;                                           # to decibel values for one volume element. The "element" part in the
@@ -101,42 +105,49 @@ auto-profiles = yes
 [Mapping analog-mono]
 device-strings = hw:%f
 channel-map = mono
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headset-mic
-priority = 1
+priority = 2
 
 [Mapping analog-stereo]
 device-strings = front:%f hw:%f
 channel-map = left,right
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2
+paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
 priority = 10
 
+[Mapping analog-surround-21]
+device-strings = surround21:%f
+channel-map = front-left,front-right,lfe
+paths-output = analog-output analog-output-speaker
+priority = 8
+direction = output
+
 [Mapping analog-surround-40]
 device-strings = surround40:%f
 channel-map = front-left,front-right,rear-left,rear-right
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 7
 direction = output
 
 [Mapping analog-surround-41]
 device-strings = surround41:%f
 channel-map = front-left,front-right,rear-left,rear-right,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 8
 direction = output
 
 [Mapping analog-surround-50]
 device-strings = surround50:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 7
 direction = output
 
 [Mapping analog-surround-51]
 device-strings = surround51:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 8
 direction = output
 
@@ -144,19 +155,10 @@ direction = output
 device-strings = surround71:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
 description = Analog Surround 7.1
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 7
 direction = output
 
-[Mapping analog-4-channel-input]
-# Alsa doesn't currently provide any better device name than "hw" for 4-channel
-# input. If this causes trouble at some point, then we will need to get a new
-# device name standardized in alsa.
-device-strings = hw:%f
-channel-map = aux0,aux1,aux2,aux3
-priority = 1
-direction = input
-
 [Mapping iec958-stereo]
 device-strings = iec958:%f
 channel-map = left,right
@@ -186,11 +188,267 @@ priority = 3
 direction = output
 
 [Mapping hdmi-stereo]
+description = Digital Stereo (HDMI)
 device-strings = hdmi:%f
+paths-output = hdmi-output-0
 channel-map = left,right
 priority = 4
 direction = output
+
+[Mapping hdmi-surround]
+description = Digital Surround 5.1 (HDMI)
+device-strings = hdmi:%f
 paths-output = hdmi-output-0
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 3
+direction = output
+
+[Mapping hdmi-surround71]
+description = Digital Surround 7.1 (HDMI)
+device-strings = hdmi:%f
+paths-output = hdmi-output-0
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 3
+direction = output
+
+[Mapping hdmi-dts-surround]
+description = Digital Surround 5.1 (HDMI/DTS)
+device-strings = dcahdmi:%f
+paths-output = hdmi-output-0
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-stereo-extra1]
+description = Digital Stereo (HDMI 2)
+device-strings = hdmi:%f,1
+paths-output = hdmi-output-1
+channel-map = left,right
+priority = 2
+direction = output
+
+[Mapping hdmi-surround-extra1]
+description = Digital Surround 5.1 (HDMI 2)
+device-strings = hdmi:%f,1
+paths-output = hdmi-output-1
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-surround71-extra1]
+description = Digital Surround 7.1 (HDMI 2)
+device-strings = hdmi:%f,1
+paths-output = hdmi-output-1
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 1
+direction = output
+
+[Mapping hdmi-dts-surround-extra1]
+description = Digital Surround 5.1 (HDMI 2/DTS)
+device-strings = dcahdmi:%f,1
+paths-output = hdmi-output-1
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-stereo-extra2]
+description = Digital Stereo (HDMI 3)
+device-strings = hdmi:%f,2
+paths-output = hdmi-output-2
+channel-map = left,right
+priority = 2
+direction = output
+
+[Mapping hdmi-surround-extra2]
+description = Digital Surround 5.1 (HDMI 3)
+device-strings = hdmi:%f,2
+paths-output = hdmi-output-2
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-surround71-extra2]
+description = Digital Surround 7.1 (HDMI 3)
+device-strings = hdmi:%f,2
+paths-output = hdmi-output-2
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 1
+direction = output
+
+[Mapping hdmi-dts-surround-extra2]
+description = Digital Surround 5.1 (HDMI 3/DTS)
+device-strings = dcahdmi:%f,2
+paths-output = hdmi-output-2
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-stereo-extra3]
+description = Digital Stereo (HDMI 4)
+device-strings = hdmi:%f,3
+paths-output = hdmi-output-3
+channel-map = left,right
+priority = 2
+direction = output
+
+[Mapping hdmi-surround-extra3]
+description = Digital Surround 5.1 (HDMI 4)
+device-strings = hdmi:%f,3
+paths-output = hdmi-output-3
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-surround71-extra3]
+description = Digital Surround 7.1 (HDMI 4)
+device-strings = hdmi:%f,3
+paths-output = hdmi-output-3
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 1
+direction = output
+
+[Mapping hdmi-dts-surround-extra3]
+description = Digital Surround 5.1 (HDMI 4/DTS)
+device-strings = dcahdmi:%f,3
+paths-output = hdmi-output-3
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-stereo-extra4]
+description = Digital Stereo (HDMI 5)
+device-strings = hdmi:%f,4
+paths-output = hdmi-output-4
+channel-map = left,right
+priority = 2
+direction = output
+
+[Mapping hdmi-surround-extra4]
+description = Digital Surround 5.1 (HDMI 5)
+device-strings = hdmi:%f,4
+paths-output = hdmi-output-4
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-surround71-extra4]
+description = Digital Surround 7.1 (HDMI 5)
+device-strings = hdmi:%f,4
+paths-output = hdmi-output-4
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 1
+direction = output
+
+[Mapping hdmi-dts-surround-extra4]
+description = Digital Surround 5.1 (HDMI 5/DTS)
+device-strings = dcahdmi:%f,4
+paths-output = hdmi-output-4
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-stereo-extra5]
+description = Digital Stereo (HDMI 6)
+device-strings = hdmi:%f,5
+paths-output = hdmi-output-5
+channel-map = left,right
+priority = 2
+direction = output
+
+[Mapping hdmi-surround-extra5]
+description = Digital Surround 5.1 (HDMI 6)
+device-strings = hdmi:%f,5
+paths-output = hdmi-output-5
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-surround71-extra5]
+description = Digital Surround 7.1 (HDMI 6)
+device-strings = hdmi:%f,5
+paths-output = hdmi-output-5
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 1
+direction = output
+
+[Mapping hdmi-dts-surround-extra5]
+description = Digital Surround 5.1 (HDMI 6/DTS)
+device-strings = dcahdmi:%f,5
+paths-output = hdmi-output-5
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-stereo-extra6]
+description = Digital Stereo (HDMI 7)
+device-strings = hdmi:%f,6
+paths-output = hdmi-output-6
+channel-map = left,right
+priority = 2
+direction = output
+
+[Mapping hdmi-surround-extra6]
+description = Digital Surround 5.1 (HDMI 7)
+device-strings = hdmi:%f,6
+paths-output = hdmi-output-6
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-surround71-extra6]
+description = Digital Surround 7.1 (HDMI 7)
+device-strings = hdmi:%f,6
+paths-output = hdmi-output-6
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 1
+direction = output
+
+[Mapping hdmi-dts-surround-extra6]
+description = Digital Surround 5.1 (HDMI 7/DTS)
+device-strings = dcahdmi:%f,6
+paths-output = hdmi-output-6
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-stereo-extra7]
+description = Digital Stereo (HDMI 8)
+device-strings = hdmi:%f,7
+paths-output = hdmi-output-7
+channel-map = left,right
+priority = 2
+direction = output
+
+[Mapping hdmi-surround-extra7]
+description = Digital Surround 5.1 (HDMI 8)
+device-strings = hdmi:%f,7
+paths-output = hdmi-output-7
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping hdmi-surround71-extra7]
+description = Digital Surround 7.1 (HDMI 8)
+device-strings = hdmi:%f,7
+paths-output = hdmi-output-7
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 1
+direction = output
+
+[Mapping hdmi-dts-surround-extra7]
+description = Digital Surround 5.1 (HDMI 8/DTS)
+device-strings = dcahdmi:%f,7
+paths-output = hdmi-output-7
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
+
+[Mapping multichannel]
+device-strings = hw:%f
+channel-map = left,right,rear-left,rear-right
+exact-channels = false
+fallback = yes
+priority = 1
 
 ; An example for defining multiple-sink profiles
 #[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
diff --git a/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf b/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf
deleted file mode 100644
index 96652f8..0000000
--- a/src/modules/alsa/mixer/profile-sets/extra-hdmi.conf
+++ /dev/null
@@ -1,164 +0,0 @@
-# This file is part of PulseAudio.
-#
-# PulseAudio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of the
-# License, or (at your option) any later version.
-#
-# PulseAudio is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PulseAudio; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-
-; This is a profile for Nvidia and Intel cards - some cards have four HDMI codecs,
-; and which ones are working seems to vary a lot between GPU boards. In addition,
-; Nvidia and Intel make southbridges as well, so we need to keep the existing
-; analog profiles.
-; (And by not adding all these extra profiles to default.conf, we make sure
-; there is no performance hit for non-Nvidia/Intel cards.)
-
-[General]
-auto-profiles = yes
-
-[Mapping analog-mono]
-device-strings = hw:%f
-channel-map = mono
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
-paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headset-mic
-priority = 1
-
-[Mapping analog-stereo]
-device-strings = front:%f hw:%f
-channel-map = left,right
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2
-paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
-priority = 10
-
-[Mapping analog-surround-40]
-device-strings = surround40:%f
-channel-map = front-left,front-right,rear-left,rear-right
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
-priority = 7
-direction = output
-
-[Mapping analog-surround-41]
-device-strings = surround41:%f
-channel-map = front-left,front-right,rear-left,rear-right,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
-priority = 8
-direction = output
-
-[Mapping analog-surround-50]
-device-strings = surround50:%f
-channel-map = front-left,front-right,rear-left,rear-right,front-center
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
-priority = 7
-direction = output
-
-[Mapping analog-surround-51]
-device-strings = surround51:%f
-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
-priority = 8
-direction = output
-
-[Mapping analog-surround-71]
-device-strings = surround71:%f
-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
-description = Analog Surround 7.1
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
-priority = 7
-direction = output
-
-[Mapping iec958-stereo]
-device-strings = iec958:%f
-channel-map = left,right
-paths-input = iec958-stereo-input
-paths-output = iec958-stereo-output
-priority = 5
-
-[Mapping iec958-ac3-surround-40]
-device-strings = a52:%f
-channel-map = front-left,front-right,rear-left,rear-right
-priority = 2
-direction = output
-
-[Mapping iec958-ac3-surround-51]
-device-strings = a52:%f
-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-priority = 3
-direction = output
-
-[Mapping iec958-dts-surround-51]
-device-strings = dca:%f
-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-priority = 3
-direction = output
-
-[Mapping hdmi-stereo]
-device-strings = hdmi:%f
-description = Digital Stereo (HDMI)
-paths-output = hdmi-output-0
-channel-map = left,right
-priority = 4
-direction = output
-
-[Mapping hdmi-surround]
-description = Digital Surround 5.1 (HDMI)
-device-strings = hdmi:%f
-paths-output = hdmi-output-0
-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-priority = 3
-direction = output
-
-[Mapping hdmi-stereo-extra1]
-description = Digital Stereo (HDMI)
-device-strings = hdmi:%f,1
-paths-output = hdmi-output-1
-channel-map = left,right
-priority = 2
-direction = output
-
-[Mapping hdmi-surround-extra1]
-description = Digital Surround 5.1 (HDMI)
-device-strings = hdmi:%f,1
-paths-output = hdmi-output-1
-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-priority = 1
-direction = output
-
-[Mapping hdmi-stereo-extra2]
-description = Digital Stereo (HDMI)
-device-strings = hdmi:%f,2
-paths-output = hdmi-output-2
-channel-map = left,right
-priority = 2
-direction = output
-
-[Mapping hdmi-surround-extra2]
-description = Digital Surround 5.1 (HDMI)
-device-strings = hdmi:%f,2
-paths-output = hdmi-output-2
-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-priority = 1
-direction = output
-
-[Mapping hdmi-stereo-extra3]
-description = Digital Stereo (HDMI)
-device-strings = hdmi:%f,3
-paths-output = hdmi-output-3
-channel-map = left,right
-priority = 2
-direction = output
-
-[Mapping hdmi-surround-extra3]
-description = Digital Surround 5.1 (HDMI)
-device-strings = hdmi:%f,3
-paths-output = hdmi-output-3
-channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-priority = 1
-direction = output
diff --git a/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf b/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf
index 66b18b3..b9bb44f 100644
--- a/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf
+++ b/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf
@@ -24,42 +24,49 @@ auto-profiles = yes
 [Mapping analog-mono]
 device-strings = hw:%f
 channel-map = mono
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic-always analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 1
 
 [Mapping analog-stereo]
 device-strings = front:%f hw:%f
 channel-map = left,right
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic-always analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 10
 
+[Mapping analog-surround-21]
+device-strings = surround21:%f
+channel-map = front-left,front-right,lfe
+paths-output = analog-output analog-output-speaker-always
+priority = 8
+direction = output
+
 [Mapping analog-surround-40]
 device-strings = surround40:%f
 channel-map = front-left,front-right,rear-left,rear-right
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output
 
 [Mapping analog-surround-41]
 device-strings = surround41:%f
 channel-map = front-left,front-right,rear-left,rear-right,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 8
 direction = output
 
 [Mapping analog-surround-50]
 device-strings = surround50:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output
 
 [Mapping analog-surround-51]
 device-strings = surround51:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 8
 direction = output
 
@@ -67,7 +74,7 @@ direction = output
 device-strings = surround71:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
 description = Analog Surround 7.1
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output
 
@@ -109,11 +116,36 @@ priority = 3
 direction = output
 
 [Mapping hdmi-stereo]
+description = Digital Stereo (HDMI)
 device-strings = hdmi:%f
+paths-output = hdmi-output-0
 channel-map = left,right
 priority = 4
 direction = output
+
+[Mapping hdmi-surround]
+description = Digital Surround 5.1 (HDMI)
+device-strings = hdmi:%f
+paths-output = hdmi-output-0
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 3
+direction = output
+
+[Mapping hdmi-surround71]
+description = Digital Surround 7.1 (HDMI)
+device-strings = hdmi:%f
+paths-output = hdmi-output-0
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 3
+direction = output
+
+[Mapping hdmi-dts-surround]
+description = Digital Surround 5.1 (HDMI/DTS)
+device-strings = dcahdmi:%f
 paths-output = hdmi-output-0
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
 
 ; An example for defining multiple-sink profiles
 #[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
diff --git a/src/modules/alsa/mixer/profile-sets/force-speaker.conf b/src/modules/alsa/mixer/profile-sets/force-speaker.conf
index 7c5c1b8..cbcaff1 100644
--- a/src/modules/alsa/mixer/profile-sets/force-speaker.conf
+++ b/src/modules/alsa/mixer/profile-sets/force-speaker.conf
@@ -23,42 +23,49 @@ auto-profiles = yes
 [Mapping analog-mono]
 device-strings = hw:%f
 channel-map = mono
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 1
 
 [Mapping analog-stereo]
 device-strings = front:%f hw:%f
 channel-map = left,right
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 10
 
+[Mapping analog-surround-21]
+device-strings = surround21:%f
+channel-map = front-left,front-right,lfe
+paths-output = analog-output analog-output-speaker-always
+priority = 8
+direction = output
+
 [Mapping analog-surround-40]
 device-strings = surround40:%f
 channel-map = front-left,front-right,rear-left,rear-right
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output
 
 [Mapping analog-surround-41]
 device-strings = surround41:%f
 channel-map = front-left,front-right,rear-left,rear-right,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 8
 direction = output
 
 [Mapping analog-surround-50]
 device-strings = surround50:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output
 
 [Mapping analog-surround-51]
 device-strings = surround51:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 8
 direction = output
 
@@ -66,7 +73,7 @@ direction = output
 device-strings = surround71:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
 description = Analog Surround 7.1
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output
 
@@ -108,11 +115,36 @@ priority = 3
 direction = output
 
 [Mapping hdmi-stereo]
+description = Digital Stereo (HDMI)
 device-strings = hdmi:%f
+paths-output = hdmi-output-0
 channel-map = left,right
 priority = 4
 direction = output
+
+[Mapping hdmi-surround]
+description = Digital Surround 5.1 (HDMI)
+device-strings = hdmi:%f
+paths-output = hdmi-output-0
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 3
+direction = output
+
+[Mapping hdmi-surround71]
+description = Digital Surround 7.1 (HDMI)
+device-strings = hdmi:%f
+paths-output = hdmi-output-0
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
+priority = 3
+direction = output
+
+[Mapping hdmi-dts-surround]
+description = Digital Surround 5.1 (HDMI/DTS)
+device-strings = dcahdmi:%f
 paths-output = hdmi-output-0
+channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
+priority = 1
+direction = output
 
 ; An example for defining multiple-sink profiles
 #[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
index cf54c0f..fc9a772 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
@@ -111,7 +111,6 @@ struct userdata {
     int alsa_card_index;
 
     snd_mixer_t *mixer_handle;
-    snd_hctl_t *hctl_handle;
     pa_hashmap *jacks;
     pa_alsa_fdlist *mixer_fdl;
 
@@ -336,22 +335,34 @@ static void report_port_state(pa_device_port *p, struct userdata *u) {
 
         cpa = jack->plugged_in ? jack->state_plugged : jack->state_unplugged;
 
-        /* "Yes" and "no" trumphs "unknown" if we have more than one jack */
-        if (cpa == PA_AVAILABLE_UNKNOWN)
-            continue;
+        if (cpa == PA_AVAILABLE_NO) {
+          /* If a plugged-in jack causes the availability to go to NO, it
+           * should override all other availability information (like a
+           * blacklist) so set and bail */
+          if (jack->plugged_in) {
+            pa = cpa;
+            break;
+          }
 
-        if ((cpa == PA_AVAILABLE_NO && pa == PA_AVAILABLE_YES) ||
-            (pa == PA_AVAILABLE_NO && cpa == PA_AVAILABLE_YES))
-            pa_log_warn("Availability of port '%s' is inconsistent!", p->name);
-        else
+          /* If the current availablility is unknown go the more precise no,
+           * but otherwise don't change state */
+          if (pa == PA_AVAILABLE_UNKNOWN)
             pa = cpa;
+        } else if (cpa == PA_AVAILABLE_YES) {
+          /* Output is available through at least one jack, so go to that
+           * level of availability. We still need to continue iterating through
+           * the jacks in case a jack is plugged in that forces the state to no
+           */
+          pa = cpa;
+        }
     }
 
     pa_device_port_set_available(p, pa);
 }
 
-static int report_jack_state(snd_hctl_elem_t *elem, unsigned int mask) {
-    struct userdata *u = snd_hctl_elem_get_callback_private(elem);
+static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
+    struct userdata *u = snd_mixer_elem_get_callback_private(melem);
+    snd_hctl_elem_t *elem = snd_mixer_elem_get_private(melem);
     snd_ctl_elem_value_t *elem_value;
     bool plugged_in;
     void *state;
@@ -374,7 +385,7 @@ static int report_jack_state(snd_hctl_elem_t *elem, unsigned int mask) {
     pa_log_debug("Jack '%s' is now %s", pa_strnull(snd_hctl_elem_get_name(elem)), plugged_in ? "plugged in" : "unplugged");
 
     PA_HASHMAP_FOREACH(jack, u->jacks, state)
-        if (jack->hctl_elem == elem) {
+        if (jack->melem == melem) {
             jack->plugged_in = plugged_in;
             if (u->use_ucm) {
                 pa_assert(u->card->ports);
@@ -403,8 +414,9 @@ static pa_device_port* find_port_with_eld_device(pa_hashmap *ports, int device)
     return NULL;
 }
 
-static int hdmi_eld_changed(snd_hctl_elem_t *elem, unsigned int mask) {
-    struct userdata *u = snd_hctl_elem_get_callback_private(elem);
+static int hdmi_eld_changed(snd_mixer_elem_t *melem, unsigned int mask) {
+    struct userdata *u = snd_mixer_elem_get_callback_private(melem);
+    snd_hctl_elem_t *elem = snd_mixer_elem_get_private(melem);
     int device = snd_hctl_elem_get_device(elem);
     const char *old_monitor_name;
     pa_device_port *p;
@@ -420,7 +432,7 @@ static int hdmi_eld_changed(snd_hctl_elem_t *elem, unsigned int mask) {
         return 0;
     }
 
-    if (pa_alsa_get_hdmi_eld(u->hctl_handle, device, &eld) < 0)
+    if (pa_alsa_get_hdmi_eld(elem, &eld) < 0)
         memset(&eld, 0, sizeof(eld));
 
     old_monitor_name = pa_proplist_gets(p->proplist, PA_PROP_DEVICE_PRODUCT_NAME);
@@ -442,12 +454,12 @@ static void init_eld_ctls(struct userdata *u) {
     void *state;
     pa_device_port *port;
 
-    if (!u->hctl_handle)
+    if (!u->mixer_handle)
         return;
 
     PA_HASHMAP_FOREACH(port, u->card->ports, state) {
         pa_alsa_port_data *data = PA_DEVICE_PORT_DATA(port);
-        snd_hctl_elem_t* hctl_elem;
+        snd_mixer_elem_t* melem;
         int device;
 
         pa_assert(data->path);
@@ -455,15 +467,14 @@ static void init_eld_ctls(struct userdata *u) {
         if (device < 0)
             continue;
 
-        hctl_elem = pa_alsa_find_eld_ctl(u->hctl_handle, device);
-        if (!hctl_elem) {
-            pa_log_debug("No ELD device found for port %s.", port->name);
-            continue;
+        melem = pa_alsa_mixer_find(u->mixer_handle, "ELD", device);
+        if (melem) {
+            snd_mixer_elem_set_callback(melem, hdmi_eld_changed);
+            snd_mixer_elem_set_callback_private(melem, u);
+            hdmi_eld_changed(melem, 0);
         }
-
-        snd_hctl_elem_set_callback_private(hctl_elem, u);
-        snd_hctl_elem_set_callback(hctl_elem, hdmi_eld_changed);
-        hdmi_eld_changed(hctl_elem, 0);
+        else
+            pa_log_debug("No ELD device found for port %s.", port->name);
     }
 }
 
@@ -500,22 +511,22 @@ static void init_jacks(struct userdata *u) {
 
     u->mixer_fdl = pa_alsa_fdlist_new();
 
-    u->mixer_handle = pa_alsa_open_mixer(u->alsa_card_index, NULL, &u->hctl_handle);
-    if (u->mixer_handle && pa_alsa_fdlist_set_handle(u->mixer_fdl, NULL, u->hctl_handle, u->core->mainloop) >= 0) {
+    u->mixer_handle = pa_alsa_open_mixer(u->alsa_card_index, NULL);
+    if (u->mixer_handle && pa_alsa_fdlist_set_handle(u->mixer_fdl, u->mixer_handle, NULL, u->core->mainloop) >= 0) {
         PA_HASHMAP_FOREACH(jack, u->jacks, state) {
-            jack->hctl_elem = pa_alsa_find_jack(u->hctl_handle, jack->alsa_name);
-            if (!jack->hctl_elem) {
+            jack->melem = pa_alsa_mixer_find(u->mixer_handle, jack->alsa_name, 0);
+            if (!jack->melem) {
                 pa_log_warn("Jack '%s' seems to have disappeared.", jack->alsa_name);
                 jack->has_control = false;
                 continue;
             }
-            snd_hctl_elem_set_callback_private(jack->hctl_elem, u);
-            snd_hctl_elem_set_callback(jack->hctl_elem, report_jack_state);
-            report_jack_state(jack->hctl_elem, 0);
+            snd_mixer_elem_set_callback(jack->melem, report_jack_state);
+            snd_mixer_elem_set_callback_private(jack->melem, u);
+            report_jack_state(jack->melem, 0);
         }
 
     } else
-        pa_log("Failed to open hctl/mixer for jack detection");
+        pa_log("Failed to open mixer for jack detection");
 
 }
 
@@ -704,7 +715,7 @@ int pa__init(pa_module *m) {
     pa_alsa_init_proplist_card(m->core, data.proplist, u->alsa_card_index);
 
     pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, u->device_id);
-    pa_alsa_init_description(data.proplist);
+    pa_alsa_init_description(data.proplist, NULL);
     set_card_name(&data, u->modargs, u->device_id);
 
     /* We need to give pa_modargs_get_value_boolean() a pointer to a local
diff --git a/src/modules/bluetooth/backend-native.c b/src/modules/bluetooth/backend-native.c
new file mode 100644
index 0000000..e15db3d
--- /dev/null
+++ b/src/modules/bluetooth/backend-native.c
@@ -0,0 +1,501 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2014 Wim Taymans <wim.taymans at gmail.com>
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation; either version 2.1 of the
+  License, or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulsecore/shared.h>
+#include <pulsecore/core-error.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/dbus-shared.h>
+#include <pulsecore/log.h>
+
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/sco.h>
+
+#include "bluez5-util.h"
+
+struct pa_bluetooth_backend {
+  pa_core *core;
+  pa_dbus_connection *connection;
+  pa_bluetooth_discovery *discovery;
+
+  PA_LLIST_HEAD(pa_dbus_pending, pending);
+};
+
+struct transport_rfcomm {
+    int rfcomm_fd;
+    pa_io_event *rfcomm_io;
+    pa_mainloop_api *mainloop;
+};
+
+#define BLUEZ_SERVICE "org.bluez"
+#define BLUEZ_MEDIA_TRANSPORT_INTERFACE BLUEZ_SERVICE ".MediaTransport1"
+
+#define BLUEZ_ERROR_NOT_SUPPORTED "org.bluez.Error.NotSupported"
+
+#define BLUEZ_PROFILE_MANAGER_INTERFACE BLUEZ_SERVICE ".ProfileManager1"
+#define BLUEZ_PROFILE_INTERFACE BLUEZ_SERVICE ".Profile1"
+
+#define HSP_AG_PROFILE "/Profile/HSPAGProfile"
+
+#define PROFILE_INTROSPECT_XML                                          \
+    DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE                           \
+    "<node>"                                                            \
+    " <interface name=\"" BLUEZ_PROFILE_INTERFACE "\">"                 \
+    "  <method name=\"Release\">"                                       \
+    "  </method>"                                                       \
+    "  <method name=\"RequestDisconnection\">"                          \
+    "   <arg name=\"device\" direction=\"in\" type=\"o\"/>"             \
+    "  </method>"                                                       \
+    "  <method name=\"NewConnection\">"                                 \
+    "   <arg name=\"device\" direction=\"in\" type=\"o\"/>"             \
+    "   <arg name=\"fd\" direction=\"in\" type=\"h\"/>"                 \
+    "   <arg name=\"opts\" direction=\"in\" type=\"a{sv}\"/>"           \
+    "  </method>"                                                       \
+    " </interface>"                                                     \
+    " <interface name=\"org.freedesktop.DBus.Introspectable\">"         \
+    "  <method name=\"Introspect\">"                                    \
+    "   <arg name=\"data\" type=\"s\" direction=\"out\"/>"              \
+    "  </method>"                                                       \
+    " </interface>"                                                     \
+    "</node>"
+
+static pa_dbus_pending* send_and_add_to_pending(pa_bluetooth_backend *backend, DBusMessage *m,
+        DBusPendingCallNotifyFunction func, void *call_data) {
+
+    pa_dbus_pending *p;
+    DBusPendingCall *call;
+
+    pa_assert(backend);
+    pa_assert(m);
+
+    pa_assert_se(dbus_connection_send_with_reply(pa_dbus_connection_get(backend->connection), m, &call, -1));
+
+    p = pa_dbus_pending_new(pa_dbus_connection_get(backend->connection), m, call, backend, call_data);
+    PA_LLIST_PREPEND(pa_dbus_pending, backend->pending, p);
+    dbus_pending_call_set_notify(call, func, p, NULL);
+
+    return p;
+}
+
+static int bluez5_sco_acquire_cb(pa_bluetooth_transport *t, bool optional, size_t *imtu, size_t *omtu) {
+    pa_bluetooth_device *d = t->device;
+    struct sockaddr_sco addr;
+    int err, i;
+    int sock;
+    bdaddr_t src;
+    bdaddr_t dst;
+    const char *src_addr, *dst_addr;
+
+    src_addr = d->adapter->address;
+    dst_addr = d->address;
+
+    /* don't use ba2str to avoid -lbluetooth */
+    for (i = 5; i >= 0; i--, src_addr += 3)
+        src.b[i] = strtol(src_addr, NULL, 16);
+    for (i = 5; i >= 0; i--, dst_addr += 3)
+        dst.b[i] = strtol(dst_addr, NULL, 16);
+
+    sock = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO);
+    if (sock < 0) {
+        pa_log_error("socket(SEQPACKET, SCO) %s", pa_cstrerror(errno));
+        return -1;
+    }
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sco_family = AF_BLUETOOTH;
+    bacpy(&addr.sco_bdaddr, &src);
+
+    if (bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+        pa_log_error("bind(): %s", pa_cstrerror(errno));
+        goto fail_close;
+    }
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sco_family = AF_BLUETOOTH;
+    bacpy(&addr.sco_bdaddr, &dst);
+
+    pa_log_info ("doing connect\n");
+    err = connect(sock, (struct sockaddr *) &addr, sizeof(addr));
+    if (err < 0 && !(errno == EAGAIN || errno == EINPROGRESS)) {
+        pa_log_error("connect(): %s", pa_cstrerror(errno));
+        goto fail_close;
+    }
+
+    /* The "48" below is hardcoded until we get meaningful MTU values exposed
+     * by the kernel */
+
+    if (imtu)
+        *imtu = 48;
+
+    if (omtu)
+        *omtu = 48;
+
+    return sock;
+
+fail_close:
+    close(sock);
+    return -1;
+}
+
+static void bluez5_sco_release_cb(pa_bluetooth_transport *t) {
+    pa_log_info("Transport %s released", t->path);
+    /* device will close the SCO socket for us */
+}
+
+static void register_profile_reply(DBusPendingCall *pending, void *userdata) {
+    DBusMessage *r;
+    pa_dbus_pending *p;
+    pa_bluetooth_backend *b;
+    char *profile;
+
+    pa_assert(pending);
+    pa_assert_se(p = userdata);
+    pa_assert_se(b = p->context_data);
+    pa_assert_se(profile = p->call_data);
+    pa_assert_se(r = dbus_pending_call_steal_reply(pending));
+
+    if (dbus_message_is_error(r, BLUEZ_ERROR_NOT_SUPPORTED)) {
+        pa_log_info("Couldn't register profile %s because it is disabled in BlueZ", profile);
+        goto finish;
+    }
+
+    if (dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR) {
+        pa_log_error(BLUEZ_PROFILE_MANAGER_INTERFACE ".RegisterProfile() failed: %s: %s", dbus_message_get_error_name(r),
+                     pa_dbus_get_error_message(r));
+        goto finish;
+    }
+
+finish:
+    dbus_message_unref(r);
+
+    PA_LLIST_REMOVE(pa_dbus_pending, b->pending, p);
+    pa_dbus_pending_free(p);
+
+    pa_xfree(profile);
+}
+
+static void register_profile(pa_bluetooth_backend *b, const char *profile, const char *uuid) {
+    DBusMessage *m;
+    DBusMessageIter i, d;
+
+    pa_log_debug("Registering Profile %s", profile);
+
+    pa_assert_se(m = dbus_message_new_method_call(BLUEZ_SERVICE, "/org/bluez", BLUEZ_PROFILE_MANAGER_INTERFACE, "RegisterProfile"));
+
+    dbus_message_iter_init_append(m, &i);
+    dbus_message_iter_append_basic(&i, DBUS_TYPE_OBJECT_PATH, &profile);
+    dbus_message_iter_append_basic(&i, DBUS_TYPE_STRING, &uuid);
+    dbus_message_iter_open_container(&i, DBUS_TYPE_ARRAY, DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING DBUS_TYPE_STRING_AS_STRING
+            DBUS_TYPE_VARIANT_AS_STRING DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &d);
+    dbus_message_iter_close_container(&i, &d);
+
+    send_and_add_to_pending(b, m, register_profile_reply, pa_xstrdup(profile));
+}
+
+static void rfcomm_io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_io_event_flags_t events, void *userdata) {
+    pa_bluetooth_transport *t = userdata;
+
+    pa_assert(io);
+    pa_assert(t);
+
+    if (events & (PA_IO_EVENT_HANGUP|PA_IO_EVENT_ERROR)) {
+        pa_log_info("Lost RFCOMM connection.");
+        goto fail;
+    }
+
+    if (events & PA_IO_EVENT_INPUT) {
+        char buf[512];
+        ssize_t len;
+        int gain;
+
+        len = read(fd, buf, 511);
+        buf[len] = 0;
+        pa_log_debug("RFCOMM << %s", buf);
+
+        if (sscanf(buf, "AT+VGS=%d", &gain) == 1) {
+          t->speaker_gain = gain;
+          pa_hook_fire(pa_bluetooth_discovery_hook(t->device->discovery, PA_BLUETOOTH_HOOK_TRANSPORT_SPEAKER_GAIN_CHANGED), t);
+
+        } else if (sscanf(buf, "AT+VGM=%d", &gain) == 1) {
+          t->microphone_gain = gain;
+          pa_hook_fire(pa_bluetooth_discovery_hook(t->device->discovery, PA_BLUETOOTH_HOOK_TRANSPORT_MICROPHONE_GAIN_CHANGED), t);
+        }
+
+        pa_log_debug("RFCOMM >> OK");
+
+        len = write(fd, "\r\nOK\r\n", 6);
+
+        /* we ignore any errors, it's not critical and real errors should
+         * be caught with the HANGUP and ERROR events handled above */
+        if (len < 0)
+            pa_log_error("RFCOMM write error: %s", pa_cstrerror(errno));
+    }
+
+    return;
+
+fail:
+    pa_bluetooth_transport_unlink(t);
+    pa_bluetooth_transport_free(t);
+    return;
+}
+
+static void transport_destroy(pa_bluetooth_transport *t) {
+    struct transport_rfcomm *trfc = t->userdata;
+
+    trfc->mainloop->io_free(trfc->rfcomm_io);
+
+    shutdown(trfc->rfcomm_fd, SHUT_RDWR);
+    close (trfc->rfcomm_fd);
+
+    pa_xfree(trfc);
+}
+
+static void set_speaker_gain(pa_bluetooth_transport *t, uint16_t gain) {
+    struct transport_rfcomm *trfc = t->userdata;
+    char buf[512];
+    ssize_t len, written;
+
+    if (t->speaker_gain == gain)
+      return;
+
+    t->speaker_gain = gain;
+
+    len = sprintf(buf, "\r\n+VGS=%d\r\n", gain);
+    pa_log_debug("RFCOMM >> +VGS=%d", gain);
+
+    written = write(trfc->rfcomm_fd, buf, len);
+
+    if (written != len)
+        pa_log_error("RFCOMM write error: %s", pa_cstrerror(errno));
+}
+
+static void set_microphone_gain(pa_bluetooth_transport *t, uint16_t gain) {
+    struct transport_rfcomm *trfc = t->userdata;
+    char buf[512];
+    ssize_t len, written;
+
+    if (t->microphone_gain == gain)
+      return;
+
+    t->microphone_gain = gain;
+
+    len = sprintf(buf, "\r\n+VGM=%d\r\n", gain);
+    pa_log_debug("RFCOMM >> +VGM=%d", gain);
+
+    written = write (trfc->rfcomm_fd, buf, len);
+
+    if (written != len)
+        pa_log_error("RFCOMM write error: %s", pa_cstrerror(errno));
+}
+
+static DBusMessage *profile_new_connection(DBusConnection *conn, DBusMessage *m, void *userdata) {
+    pa_bluetooth_backend *b = userdata;
+    pa_bluetooth_device *d;
+    pa_bluetooth_transport *t;
+    pa_bluetooth_profile_t p;
+    DBusMessage *r;
+    int fd;
+    const char *sender, *path, PA_UNUSED *handler;
+    DBusMessageIter arg_i;
+    char *pathfd;
+    struct transport_rfcomm *trfc;
+
+    if (!dbus_message_iter_init(m, &arg_i) || !pa_streq(dbus_message_get_signature(m), "oha{sv}")) {
+        pa_log_error("Invalid signature found in NewConnection");
+        goto fail;
+    }
+
+    handler = dbus_message_get_path(m);
+    pa_assert(pa_streq(handler, HSP_AG_PROFILE));
+
+    pa_assert(dbus_message_iter_get_arg_type(&arg_i) == DBUS_TYPE_OBJECT_PATH);
+    dbus_message_iter_get_basic(&arg_i, &path);
+
+    d = pa_bluetooth_discovery_get_device_by_path(b->discovery, path);
+    if (d == NULL) {
+        pa_log_error("Device doesnt exist for %s", path);
+        goto fail;
+    }
+
+    pa_assert_se(dbus_message_iter_next(&arg_i));
+
+    pa_assert(dbus_message_iter_get_arg_type(&arg_i) == DBUS_TYPE_UNIX_FD);
+    dbus_message_iter_get_basic(&arg_i, &fd);
+
+    pa_log_debug("dbus: NewConnection path=%s, fd=%d", path, fd);
+
+    sender = dbus_message_get_sender(m);
+
+    p = PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT;
+    pathfd = pa_sprintf_malloc ("%s/fd%d", path, fd);
+    d->transports[p] = t = pa_bluetooth_transport_new(d, sender, pathfd, p, NULL, 0);
+    pa_xfree(pathfd);
+
+    t->acquire = bluez5_sco_acquire_cb;
+    t->release = bluez5_sco_release_cb;
+    t->destroy = transport_destroy;
+    t->set_speaker_gain = set_speaker_gain;
+    t->set_microphone_gain = set_microphone_gain;
+
+    trfc = pa_xnew0(struct transport_rfcomm, 1);
+    trfc->rfcomm_fd = fd;
+    trfc->mainloop = b->core->mainloop;
+    trfc->rfcomm_io = trfc->mainloop->io_new(b->core->mainloop, fd, PA_IO_EVENT_INPUT|PA_IO_EVENT_HANGUP,
+        rfcomm_io_callback, t);
+    t->userdata =  trfc;
+
+    pa_bluetooth_transport_put(t);
+
+    pa_log_debug("Transport %s available for profile %s", t->path, pa_bluetooth_profile_to_string(t->profile));
+
+    pa_assert_se(r = dbus_message_new_method_return(m));
+
+    return r;
+
+fail:
+    pa_assert_se(r = dbus_message_new_error(m, "org.bluez.Error.InvalidArguments", "Unable to handle new connection"));
+    return r;
+}
+
+static DBusMessage *profile_request_disconnection(DBusConnection *conn, DBusMessage *m, void *userdata) {
+    DBusMessage *r;
+
+    pa_assert_se(r = dbus_message_new_method_return(m));
+
+    return r;
+}
+
+static DBusHandlerResult profile_handler(DBusConnection *c, DBusMessage *m, void *userdata) {
+    pa_bluetooth_backend *b = userdata;
+    DBusMessage *r = NULL;
+    const char *path, *interface, *member;
+
+    pa_assert(b);
+
+    path = dbus_message_get_path(m);
+    interface = dbus_message_get_interface(m);
+    member = dbus_message_get_member(m);
+
+    pa_log_debug("dbus: path=%s, interface=%s, member=%s", path, interface, member);
+
+    if (!pa_streq(path, HSP_AG_PROFILE))
+        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
+    if (dbus_message_is_method_call(m, "org.freedesktop.DBus.Introspectable", "Introspect")) {
+        const char *xml = PROFILE_INTROSPECT_XML;
+
+        pa_assert_se(r = dbus_message_new_method_return(m));
+        pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
+
+    } else if (dbus_message_is_method_call(m, BLUEZ_PROFILE_INTERFACE, "Release")) {
+    } else if (dbus_message_is_method_call(m, BLUEZ_PROFILE_INTERFACE, "RequestDisconnection")) {
+        r = profile_request_disconnection(c, m, userdata);
+    } else if (dbus_message_is_method_call(m, BLUEZ_PROFILE_INTERFACE, "NewConnection"))
+        r = profile_new_connection(c, m, userdata);
+    else
+        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
+    if (r) {
+        pa_assert_se(dbus_connection_send(pa_dbus_connection_get(b->connection), r, NULL));
+        dbus_message_unref(r);
+    }
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+static void profile_init(pa_bluetooth_backend *b, pa_bluetooth_profile_t profile) {
+    static const DBusObjectPathVTable vtable_profile = {
+        .message_function = profile_handler,
+    };
+    const char *object_name;
+    const char *uuid;
+
+    pa_assert(b);
+
+    switch (profile) {
+        case PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT:
+            object_name = HSP_AG_PROFILE;
+            uuid = PA_BLUETOOTH_UUID_HSP_AG;
+            break;
+        default:
+            pa_assert_not_reached();
+            break;
+    }
+
+    pa_assert_se(dbus_connection_register_object_path(pa_dbus_connection_get(b->connection), object_name, &vtable_profile, b));
+    register_profile(b, object_name, uuid);
+}
+
+static void profile_done(pa_bluetooth_backend *b, pa_bluetooth_profile_t profile) {
+    pa_assert(b);
+
+    switch (profile) {
+        case PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT:
+            dbus_connection_unregister_object_path(pa_dbus_connection_get(b->connection), HSP_AG_PROFILE);
+            break;
+        default:
+            pa_assert_not_reached();
+            break;
+    }
+}
+
+pa_bluetooth_backend *pa_bluetooth_native_backend_new(pa_core *c, pa_bluetooth_discovery *y) {
+    pa_bluetooth_backend *backend;
+    DBusError err;
+
+    pa_log_debug("Bluetooth Headset Backend API support using the native backend");
+
+    backend = pa_xnew0(pa_bluetooth_backend, 1);
+    backend->core = c;
+
+    dbus_error_init(&err);
+    if (!(backend->connection = pa_dbus_bus_get(c, DBUS_BUS_SYSTEM, &err))) {
+        pa_log("Failed to get D-Bus connection: %s", err.message);
+        dbus_error_free(&err);
+        pa_xfree(backend);
+        return NULL;
+    }
+
+    backend->discovery = y;
+
+    profile_init(backend, PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT);
+
+    return backend;
+}
+
+void pa_bluetooth_native_backend_free(pa_bluetooth_backend *backend) {
+    pa_assert(backend);
+
+    pa_dbus_free_pending_list(&backend->pending);
+
+    profile_done(backend, PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT);
+
+    pa_dbus_connection_unref(backend->connection);
+
+    pa_xfree(backend);
+}
diff --git a/src/modules/bluetooth/backend-ofono.c b/src/modules/bluetooth/backend-ofono.c
new file mode 100644
index 0000000..1f0c80f
--- /dev/null
+++ b/src/modules/bluetooth/backend-ofono.c
@@ -0,0 +1,665 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2013 João Paulo Rechi Vita
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation; either version 2.1 of the
+  License, or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <errno.h>
+#include <poll.h>
+
+#include <pulsecore/core-util.h>
+#include <pulsecore/dbus-shared.h>
+#include <pulsecore/shared.h>
+#include <pulsecore/core-error.h>
+
+#include "bluez5-util.h"
+
+#define HFP_AUDIO_CODEC_CVSD    0x01
+#define HFP_AUDIO_CODEC_MSBC    0x02
+
+#define OFONO_SERVICE "org.ofono"
+#define HF_AUDIO_AGENT_INTERFACE OFONO_SERVICE ".HandsfreeAudioAgent"
+#define HF_AUDIO_MANAGER_INTERFACE OFONO_SERVICE ".HandsfreeAudioManager"
+
+#define HF_AUDIO_AGENT_PATH "/HandsfreeAudioAgent"
+
+#define HF_AUDIO_AGENT_XML                                          \
+    DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE                       \
+    "<node>"                                                        \
+    "  <interface name=\"org.freedesktop.DBus.Introspectable\">"    \
+    "    <method name=\"Introspect\">"                              \
+    "      <arg direction=\"out\" type=\"s\" />"                    \
+    "    </method>"                                                 \
+    "  </interface>"                                                \
+    "  <interface name=\"org.ofono.HandsfreeAudioAgent\">"          \
+    "    <method name=\"Release\">"                                 \
+    "    </method>"                                                 \
+    "    <method name=\"NewConnection\">"                           \
+    "      <arg direction=\"in\"  type=\"o\" name=\"card_path\" />" \
+    "      <arg direction=\"in\"  type=\"h\" name=\"sco_fd\" />"    \
+    "      <arg direction=\"in\"  type=\"y\" name=\"codec\" />"     \
+    "    </method>"                                                 \
+    "  </interface>"                                                \
+    "</node>"
+
+struct hf_audio_card {
+    pa_bluetooth_backend *backend;
+    char *path;
+    char *remote_address;
+    char *local_address;
+
+    int fd;
+    uint8_t codec;
+
+    pa_bluetooth_transport *transport;
+};
+
+struct pa_bluetooth_backend {
+    pa_core *core;
+    pa_bluetooth_discovery *discovery;
+    pa_dbus_connection *connection;
+    pa_hashmap *cards;
+    char *ofono_bus_id;
+
+    PA_LLIST_HEAD(pa_dbus_pending, pending);
+};
+
+static pa_dbus_pending* hf_dbus_send_and_add_to_pending(pa_bluetooth_backend *backend, DBusMessage *m,
+                                                    DBusPendingCallNotifyFunction func, void *call_data) {
+    pa_dbus_pending *p;
+    DBusPendingCall *call;
+
+    pa_assert(backend);
+    pa_assert(m);
+
+    pa_assert_se(dbus_connection_send_with_reply(pa_dbus_connection_get(backend->connection), m, &call, -1));
+
+    p = pa_dbus_pending_new(pa_dbus_connection_get(backend->connection), m, call, backend, call_data);
+    PA_LLIST_PREPEND(pa_dbus_pending, backend->pending, p);
+    dbus_pending_call_set_notify(call, func, p, NULL);
+
+    return p;
+}
+
+static struct hf_audio_card *hf_audio_card_new(pa_bluetooth_backend *backend, const char *path) {
+    struct hf_audio_card *card = pa_xnew0(struct hf_audio_card, 1);
+
+    card->path = pa_xstrdup(path);
+    card->backend = backend;
+    card->fd = -1;
+
+    return card;
+}
+
+static void hf_audio_card_free(struct hf_audio_card *card) {
+    pa_assert(card);
+
+    if (card->transport)
+        pa_bluetooth_transport_free(card->transport);
+
+    pa_xfree(card->path);
+    pa_xfree(card->remote_address);
+    pa_xfree(card->local_address);
+    pa_xfree(card);
+}
+
+static int socket_accept(int sock)
+{
+    char c;
+    struct pollfd pfd;
+
+    if (sock < 0)
+        return -ENOTCONN;
+
+    memset(&pfd, 0, sizeof(pfd));
+    pfd.fd = sock;
+    pfd.events = POLLOUT;
+
+    if (poll(&pfd, 1, 0) < 0)
+        return -errno;
+
+    /*
+     * If socket already writable then it is not in defer setup state,
+     * otherwise it needs to be read to authorize the connection.
+     */
+    if ((pfd.revents & POLLOUT))
+        return 0;
+
+    /* Enable socket by reading 1 byte */
+    if (read(sock, &c, 1) < 0)
+        return -errno;
+
+    return 0;
+}
+
+static int hf_audio_agent_transport_acquire(pa_bluetooth_transport *t, bool optional, size_t *imtu, size_t *omtu) {
+    struct hf_audio_card *card = t->userdata;
+    int err;
+
+    pa_assert(card);
+
+    if (!optional) {
+        DBusMessage *m;
+
+        pa_assert_se(m = dbus_message_new_method_call(t->owner, t->path, "org.ofono.HandsfreeAudioCard", "Connect"));
+        pa_assert_se(dbus_connection_send(pa_dbus_connection_get(card->backend->connection), m, NULL));
+
+        return -1;
+    }
+
+    /* The correct block size should take into account the SCO MTU from
+     * the Bluetooth adapter and (for adapters in the USB bus) the MxPS
+     * value from the Isoc USB endpoint in use by btusb and should be
+     * made available to userspace by the Bluetooth kernel subsystem.
+     * Meanwhile the empiric value 48 will be used. */
+    if (imtu)
+        *imtu = 48;
+    if (omtu)
+        *omtu = 48;
+
+    t->codec = card->codec;
+
+    err = socket_accept(card->fd);
+    if (err < 0) {
+        pa_log_error("Deferred setup failed on fd %d: %s", card->fd, pa_cstrerror(-err));
+        return -1;
+    }
+
+    return card->fd;
+}
+
+static void hf_audio_agent_transport_release(pa_bluetooth_transport *t) {
+    struct hf_audio_card *card = t->userdata;
+
+    pa_assert(card);
+
+    if (t->state <= PA_BLUETOOTH_TRANSPORT_STATE_IDLE) {
+        pa_log_info("Transport %s already released", t->path);
+        return;
+    }
+
+    if (card->fd < 0)
+        return;
+
+    /* shutdown to make sure connection is dropped immediately */
+    shutdown(card->fd, SHUT_RDWR);
+    close(card->fd);
+    card->fd = -1;
+}
+
+static void hf_audio_agent_card_found(pa_bluetooth_backend *backend, const char *path, DBusMessageIter *props_i) {
+    DBusMessageIter i, value_i;
+    const char *key, *value;
+    struct hf_audio_card *card;
+    pa_bluetooth_device *d;
+
+    pa_assert(backend);
+    pa_assert(path);
+    pa_assert(props_i);
+
+    pa_log_debug("New HF card found: %s", path);
+
+    card = hf_audio_card_new(backend, path);
+
+    while (dbus_message_iter_get_arg_type(props_i) != DBUS_TYPE_INVALID) {
+        char c;
+
+        dbus_message_iter_recurse(props_i, &i);
+
+        dbus_message_iter_get_basic(&i, &key);
+        dbus_message_iter_next(&i);
+        dbus_message_iter_recurse(&i, &value_i);
+
+        if ((c = dbus_message_iter_get_arg_type(&value_i)) != DBUS_TYPE_STRING) {
+            pa_log_error("Invalid properties for %s: expected 's', received '%c'", path, c);
+            goto fail;
+        }
+
+        dbus_message_iter_get_basic(&value_i, &value);
+
+        if (pa_streq(key, "RemoteAddress")) {
+            pa_xfree(card->remote_address);
+            card->remote_address = pa_xstrdup(value);
+        } else if (pa_streq(key, "LocalAddress")) {
+            pa_xfree(card->local_address);
+            card->local_address = pa_xstrdup(value);
+        }
+
+        pa_log_debug("%s: %s", key, value);
+
+        dbus_message_iter_next(props_i);
+    }
+
+    d = pa_bluetooth_discovery_get_device_by_address(backend->discovery, card->remote_address, card->local_address);
+    if (!d) {
+        pa_log_error("Device doesnt exist for %s", path);
+        goto fail;
+    }
+
+    card->transport = pa_bluetooth_transport_new(d, backend->ofono_bus_id, path, PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY, NULL, 0);
+    card->transport->acquire = hf_audio_agent_transport_acquire;
+    card->transport->release = hf_audio_agent_transport_release;
+    card->transport->userdata = card;
+
+    pa_bluetooth_transport_put(card->transport);
+    pa_hashmap_put(backend->cards, card->path, card);
+
+    return;
+
+fail:
+    hf_audio_card_free(card);
+}
+
+static void hf_audio_agent_card_removed(pa_bluetooth_backend *backend, const char *path) {
+    struct hf_audio_card *card;
+
+    pa_assert(backend);
+    pa_assert(path);
+
+    pa_log_debug("HF card removed: %s", path);
+
+    card = pa_hashmap_remove(backend->cards, path);
+    if (!card)
+        return;
+
+    hf_audio_card_free(card);
+}
+
+static void hf_audio_agent_get_cards_reply(DBusPendingCall *pending, void *userdata) {
+    DBusMessage *r;
+    pa_dbus_pending *p;
+    pa_bluetooth_backend *backend;
+    DBusMessageIter i, array_i, struct_i, props_i;
+
+    pa_assert_se(p = userdata);
+    pa_assert_se(backend = p->context_data);
+    pa_assert_se(r = dbus_pending_call_steal_reply(pending));
+
+    if (dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR) {
+        pa_log_error("Failed to get a list of handsfree audio cards from ofono: %s: %s",
+                     dbus_message_get_error_name(r), pa_dbus_get_error_message(r));
+        goto finish;
+    }
+
+    if (!dbus_message_iter_init(r, &i) || !pa_streq(dbus_message_get_signature(r), "a(oa{sv})")) {
+        pa_log_error("Invalid arguments in GetCards() reply");
+        goto finish;
+    }
+
+    dbus_message_iter_recurse(&i, &array_i);
+    while (dbus_message_iter_get_arg_type(&array_i) != DBUS_TYPE_INVALID) {
+        const char *path;
+
+        dbus_message_iter_recurse(&array_i, &struct_i);
+        dbus_message_iter_get_basic(&struct_i, &path);
+        dbus_message_iter_next(&struct_i);
+
+        dbus_message_iter_recurse(&struct_i, &props_i);
+
+        hf_audio_agent_card_found(backend, path, &props_i);
+
+        dbus_message_iter_next(&array_i);
+    }
+
+finish:
+    dbus_message_unref(r);
+
+    PA_LLIST_REMOVE(pa_dbus_pending, backend->pending, p);
+    pa_dbus_pending_free(p);
+}
+
+static void hf_audio_agent_get_cards(pa_bluetooth_backend *hf) {
+    DBusMessage *m;
+
+    pa_assert(hf);
+
+    pa_assert_se(m = dbus_message_new_method_call(OFONO_SERVICE, "/", HF_AUDIO_MANAGER_INTERFACE, "GetCards"));
+    hf_dbus_send_and_add_to_pending(hf, m, hf_audio_agent_get_cards_reply, NULL);
+}
+
+static void ofono_bus_id_destroy(pa_bluetooth_backend *backend) {
+    pa_hashmap_remove_all(backend->cards);
+
+    if (backend->ofono_bus_id) {
+        pa_xfree(backend->ofono_bus_id);
+        backend->ofono_bus_id = NULL;
+        pa_bluetooth_discovery_set_ofono_running(backend->discovery, false);
+    }
+}
+
+static void hf_audio_agent_register_reply(DBusPendingCall *pending, void *userdata) {
+    DBusMessage *r;
+    pa_dbus_pending *p;
+    pa_bluetooth_backend *backend;
+
+    pa_assert_se(p = userdata);
+    pa_assert_se(backend = p->context_data);
+    pa_assert_se(r = dbus_pending_call_steal_reply(pending));
+
+    if (dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR) {
+        pa_log_error("Failed to register as a handsfree audio agent with ofono: %s: %s",
+                     dbus_message_get_error_name(r), pa_dbus_get_error_message(r));
+        goto finish;
+    }
+
+    backend->ofono_bus_id = pa_xstrdup(dbus_message_get_sender(r));
+
+    hf_audio_agent_get_cards(backend);
+
+finish:
+    dbus_message_unref(r);
+
+    PA_LLIST_REMOVE(pa_dbus_pending, backend->pending, p);
+    pa_dbus_pending_free(p);
+
+    pa_bluetooth_discovery_set_ofono_running(backend->discovery, backend->ofono_bus_id != NULL);
+}
+
+static void hf_audio_agent_register(pa_bluetooth_backend *hf) {
+    DBusMessage *m;
+    uint8_t codecs[2];
+    const uint8_t *pcodecs = codecs;
+    int ncodecs = 0;
+    const char *path = HF_AUDIO_AGENT_PATH;
+
+    pa_assert(hf);
+
+    pa_assert_se(m = dbus_message_new_method_call(OFONO_SERVICE, "/", HF_AUDIO_MANAGER_INTERFACE, "Register"));
+
+    codecs[ncodecs++] = HFP_AUDIO_CODEC_CVSD;
+
+    pa_assert_se(dbus_message_append_args(m, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_ARRAY, DBUS_TYPE_BYTE, &pcodecs, ncodecs,
+                                          DBUS_TYPE_INVALID));
+
+    hf_dbus_send_and_add_to_pending(hf, m, hf_audio_agent_register_reply, NULL);
+}
+
+static void hf_audio_agent_unregister(pa_bluetooth_backend *backend) {
+    DBusMessage *m;
+    const char *path = HF_AUDIO_AGENT_PATH;
+
+    pa_assert(backend);
+    pa_assert(backend->connection);
+
+    if (backend->ofono_bus_id) {
+        pa_assert_se(m = dbus_message_new_method_call(backend->ofono_bus_id, "/", HF_AUDIO_MANAGER_INTERFACE, "Unregister"));
+        pa_assert_se(dbus_message_append_args(m, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID));
+        pa_assert_se(dbus_connection_send(pa_dbus_connection_get(backend->connection), m, NULL));
+
+        ofono_bus_id_destroy(backend);
+    }
+}
+
+static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *data) {
+    const char *sender;
+    DBusError err;
+    pa_bluetooth_backend *backend = data;
+
+    pa_assert(bus);
+    pa_assert(m);
+    pa_assert(backend);
+
+    sender = dbus_message_get_sender(m);
+    if (!pa_safe_streq(backend->ofono_bus_id, sender) && !pa_streq("org.freedesktop.DBus", sender))
+        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
+    dbus_error_init(&err);
+
+    if (dbus_message_is_signal(m, "org.freedesktop.DBus", "NameOwnerChanged")) {
+        const char *name, *old_owner, *new_owner;
+
+        if (!dbus_message_get_args(m, &err,
+                                   DBUS_TYPE_STRING, &name,
+                                   DBUS_TYPE_STRING, &old_owner,
+                                   DBUS_TYPE_STRING, &new_owner,
+                                   DBUS_TYPE_INVALID)) {
+            pa_log_error("Failed to parse org.freedesktop.DBus.NameOwnerChanged: %s", err.message);
+            goto fail;
+        }
+
+        if (pa_streq(name, OFONO_SERVICE)) {
+
+            if (old_owner && *old_owner) {
+                pa_log_debug("oFono disappeared");
+                ofono_bus_id_destroy(backend);
+            }
+
+            if (new_owner && *new_owner) {
+                pa_log_debug("oFono appeared");
+                hf_audio_agent_register(backend);
+            }
+        }
+
+    } else if (dbus_message_is_signal(m, "org.ofono.HandsfreeAudioManager", "CardAdded")) {
+        const char *p;
+        DBusMessageIter arg_i, props_i;
+
+        if (!dbus_message_iter_init(m, &arg_i) || !pa_streq(dbus_message_get_signature(m), "oa{sv}")) {
+            pa_log_error("Failed to parse org.ofono.HandsfreeAudioManager.CardAdded");
+            goto fail;
+        }
+
+        dbus_message_iter_get_basic(&arg_i, &p);
+
+        pa_assert_se(dbus_message_iter_next(&arg_i));
+        pa_assert(dbus_message_iter_get_arg_type(&arg_i) == DBUS_TYPE_ARRAY);
+
+        dbus_message_iter_recurse(&arg_i, &props_i);
+
+        hf_audio_agent_card_found(backend, p, &props_i);
+    } else if (dbus_message_is_signal(m, "org.ofono.HandsfreeAudioManager", "CardRemoved")) {
+        const char *p;
+
+        if (!dbus_message_get_args(m, &err, DBUS_TYPE_OBJECT_PATH, &p, DBUS_TYPE_INVALID)) {
+            pa_log_error("Failed to parse org.ofono.HandsfreeAudioManager.CardRemoved: %s", err.message);
+            goto fail;
+        }
+
+        hf_audio_agent_card_removed(backend, p);
+    }
+
+fail:
+    dbus_error_free(&err);
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+static DBusMessage *hf_audio_agent_release(DBusConnection *c, DBusMessage *m, void *data) {
+    DBusMessage *r;
+    const char *sender;
+    pa_bluetooth_backend *backend = data;
+
+    pa_assert(backend);
+
+    sender = dbus_message_get_sender(m);
+    if (!pa_safe_streq(backend->ofono_bus_id, sender)) {
+        pa_assert_se(r = dbus_message_new_error(m, "org.ofono.Error.NotAllowed", "Operation is not allowed by this sender"));
+        return r;
+    }
+
+    pa_log_debug("HF audio agent has been unregistered by oFono (%s)", backend->ofono_bus_id);
+
+    ofono_bus_id_destroy(backend);
+
+    pa_assert_se(r = dbus_message_new_method_return(m));
+
+    return r;
+}
+
+static DBusMessage *hf_audio_agent_new_connection(DBusConnection *c, DBusMessage *m, void *data) {
+    DBusMessage *r;
+    const char *sender, *path;
+    int fd;
+    uint8_t codec;
+    struct hf_audio_card *card;
+    pa_bluetooth_backend *backend = data;
+
+    pa_assert(backend);
+
+    sender = dbus_message_get_sender(m);
+    if (!pa_safe_streq(backend->ofono_bus_id, sender)) {
+        pa_assert_se(r = dbus_message_new_error(m, "org.ofono.Error.NotAllowed", "Operation is not allowed by this sender"));
+        return r;
+    }
+
+    if (dbus_message_get_args(m, NULL,
+                              DBUS_TYPE_OBJECT_PATH, &path,
+                              DBUS_TYPE_UNIX_FD, &fd,
+                              DBUS_TYPE_BYTE, &codec,
+                              DBUS_TYPE_INVALID) == FALSE) {
+        pa_assert_se(r = dbus_message_new_error(m, "org.ofono.Error.InvalidArguments", "Invalid arguments in method call"));
+        return r;
+    }
+
+    card = pa_hashmap_get(backend->cards, path);
+
+    if (!card || codec != HFP_AUDIO_CODEC_CVSD || card->transport->state == PA_BLUETOOTH_TRANSPORT_STATE_PLAYING) {
+        pa_log_warn("New audio connection invalid arguments (path=%s fd=%d, codec=%d)", path, fd, codec);
+        pa_assert_se(r = dbus_message_new_error(m, "org.ofono.Error.InvalidArguments", "Invalid arguments in method call"));
+        return r;
+    }
+
+    pa_log_debug("New audio connection on card %s (fd=%d, codec=%d)", path, fd, codec);
+
+    card->fd = fd;
+    card->transport->codec = codec;
+
+    pa_bluetooth_transport_set_state(card->transport, PA_BLUETOOTH_TRANSPORT_STATE_PLAYING);
+
+    pa_assert_se(r = dbus_message_new_method_return(m));
+
+    return r;
+}
+
+static DBusHandlerResult hf_audio_agent_handler(DBusConnection *c, DBusMessage *m, void *data) {
+    pa_bluetooth_backend *backend = data;
+    DBusMessage *r = NULL;
+    const char *path, *interface, *member;
+
+    pa_assert(backend);
+
+    path = dbus_message_get_path(m);
+    interface = dbus_message_get_interface(m);
+    member = dbus_message_get_member(m);
+
+    if (!pa_streq(path, HF_AUDIO_AGENT_PATH))
+        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
+    pa_log_debug("dbus: path=%s, interface=%s, member=%s", path, interface, member);
+
+    if (dbus_message_is_method_call(m, "org.freedesktop.DBus.Introspectable", "Introspect")) {
+        const char *xml = HF_AUDIO_AGENT_XML;
+
+        pa_assert_se(r = dbus_message_new_method_return(m));
+        pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
+
+    } else if (dbus_message_is_method_call(m, HF_AUDIO_AGENT_INTERFACE, "NewConnection"))
+        r = hf_audio_agent_new_connection(c, m, data);
+    else if (dbus_message_is_method_call(m, HF_AUDIO_AGENT_INTERFACE, "Release"))
+        r = hf_audio_agent_release(c, m, data);
+    else
+        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+
+    if (r) {
+        pa_assert_se(dbus_connection_send(pa_dbus_connection_get(backend->connection), r, NULL));
+        dbus_message_unref(r);
+    }
+
+    return DBUS_HANDLER_RESULT_HANDLED;
+}
+
+pa_bluetooth_backend *pa_bluetooth_ofono_backend_new(pa_core *c, pa_bluetooth_discovery *y) {
+    pa_bluetooth_backend *backend;
+    DBusError err;
+    static const DBusObjectPathVTable vtable_hf_audio_agent = {
+        .message_function = hf_audio_agent_handler,
+    };
+
+    pa_assert(c);
+
+    backend = pa_xnew0(pa_bluetooth_backend, 1);
+    backend->core = c;
+    backend->discovery = y;
+    backend->cards = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL,
+                                         (pa_free_cb_t) hf_audio_card_free);
+
+    dbus_error_init(&err);
+
+    if (!(backend->connection = pa_dbus_bus_get(c, DBUS_BUS_SYSTEM, &err))) {
+        pa_log("Failed to get D-Bus connection: %s", err.message);
+        dbus_error_free(&err);
+        pa_xfree(backend);
+        return NULL;
+    }
+
+    /* dynamic detection of handsfree audio cards */
+    if (!dbus_connection_add_filter(pa_dbus_connection_get(backend->connection), filter_cb, backend, NULL)) {
+        pa_log_error("Failed to add filter function");
+        pa_dbus_connection_unref(backend->connection);
+        pa_xfree(backend);
+        return NULL;
+    }
+
+    if (pa_dbus_add_matches(pa_dbus_connection_get(backend->connection), &err,
+            "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',"
+            "arg0='" OFONO_SERVICE "'",
+            "type='signal',sender='" OFONO_SERVICE "',interface='" HF_AUDIO_MANAGER_INTERFACE "',member='CardAdded'",
+            "type='signal',sender='" OFONO_SERVICE "',interface='" HF_AUDIO_MANAGER_INTERFACE "',member='CardRemoved'",
+            NULL) < 0) {
+        pa_log("Failed to add oFono D-Bus matches: %s", err.message);
+        dbus_connection_remove_filter(pa_dbus_connection_get(backend->connection), filter_cb, backend);
+        pa_dbus_connection_unref(backend->connection);
+        pa_xfree(backend);
+        return NULL;
+    }
+
+    pa_assert_se(dbus_connection_register_object_path(pa_dbus_connection_get(backend->connection), HF_AUDIO_AGENT_PATH,
+                                                      &vtable_hf_audio_agent, backend));
+
+    hf_audio_agent_register(backend);
+
+    return backend;
+}
+
+void pa_bluetooth_ofono_backend_free(pa_bluetooth_backend *backend) {
+    pa_assert(backend);
+
+    pa_dbus_free_pending_list(&backend->pending);
+
+    hf_audio_agent_unregister(backend);
+
+    dbus_connection_unregister_object_path(pa_dbus_connection_get(backend->connection), HF_AUDIO_AGENT_PATH);
+
+    pa_dbus_remove_matches(pa_dbus_connection_get(backend->connection),
+            "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',"
+            "arg0='" OFONO_SERVICE "'",
+            "type='signal',sender='" OFONO_SERVICE "',interface='" HF_AUDIO_MANAGER_INTERFACE "',member='CardAdded'",
+            "type='signal',sender='" OFONO_SERVICE "',interface='" HF_AUDIO_MANAGER_INTERFACE "',member='CardRemoved'",
+            NULL);
+
+    dbus_connection_remove_filter(pa_dbus_connection_get(backend->connection), filter_cb, backend);
+
+    pa_dbus_connection_unref(backend->connection);
+
+    pa_hashmap_free(backend->cards);
+
+    pa_xfree(backend);
+}
diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c
index 7eecc18..6894e83 100644
--- a/src/modules/bluetooth/bluez5-util.c
+++ b/src/modules/bluetooth/bluez5-util.c
@@ -87,6 +87,8 @@ struct pa_bluetooth_discovery {
     pa_hashmap *devices;
     pa_hashmap *transports;
 
+    int headset_backend;
+    pa_bluetooth_backend *ofono_backend, *native_backend;
     PA_LLIST_HEAD(pa_dbus_pending, pending);
 };
 
@@ -148,8 +150,6 @@ pa_bluetooth_transport *pa_bluetooth_transport_new(pa_bluetooth_device *d, const
         memcpy(t->config, config, size);
     }
 
-    pa_assert_se(pa_hashmap_put(d->discovery->transports, t->path, t) >= 0);
-
     return t;
 }
 
@@ -166,7 +166,7 @@ static const char *transport_state_to_string(pa_bluetooth_transport_state_t stat
     return "invalid";
 }
 
-static void transport_state_changed(pa_bluetooth_transport *t, pa_bluetooth_transport_state_t state) {
+void pa_bluetooth_transport_set_state(pa_bluetooth_transport *t, pa_bluetooth_transport_state_t state) {
     bool old_any_connected;
 
     pa_assert(t);
@@ -180,8 +180,6 @@ static void transport_state_changed(pa_bluetooth_transport *t, pa_bluetooth_tran
                  t->path, transport_state_to_string(t->state), transport_state_to_string(state));
 
     t->state = state;
-    if (state == PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED)
-        t->device->transports[t->profile] = NULL;
 
     pa_hook_fire(&t->device->discovery->hooks[PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED], t);
 
@@ -190,13 +188,28 @@ static void transport_state_changed(pa_bluetooth_transport *t, pa_bluetooth_tran
 }
 
 void pa_bluetooth_transport_put(pa_bluetooth_transport *t) {
-    transport_state_changed(t, PA_BLUETOOTH_TRANSPORT_STATE_IDLE);
+    pa_assert(t);
+
+    t->device->transports[t->profile] = t;
+    pa_assert_se(pa_hashmap_put(t->device->discovery->transports, t->path, t) >= 0);
+    pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_IDLE);
 }
 
-void pa_bluetooth_transport_free(pa_bluetooth_transport *t) {
+void pa_bluetooth_transport_unlink(pa_bluetooth_transport *t) {
     pa_assert(t);
 
+    pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED);
     pa_hashmap_remove(t->device->discovery->transports, t->path);
+    t->device->transports[t->profile] = NULL;
+}
+
+void pa_bluetooth_transport_free(pa_bluetooth_transport *t) {
+    pa_assert(t);
+
+    if (t->destroy)
+        t->destroy(t);
+    pa_bluetooth_transport_unlink(t);
+
     pa_xfree(t->owner);
     pa_xfree(t->path);
     pa_xfree(t->config);
@@ -278,7 +291,7 @@ bool pa_bluetooth_device_any_transport_connected(const pa_bluetooth_device *d) {
 
     pa_assert(d);
 
-    if (d->device_info_valid != 1)
+    if (!d->valid)
         return false;
 
     for (i = 0; i < PA_BLUETOOTH_PROFILE_COUNT; i++)
@@ -327,7 +340,7 @@ static void parse_transport_property(pa_bluetooth_transport *t, DBusMessageIter
                     return;
                 }
 
-                transport_state_changed(t, state);
+                pa_bluetooth_transport_set_state(t, state);
             }
 
             break;
@@ -378,9 +391,8 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_path(pa_bluetooth_disc
     pa_assert(PA_REFCNT_VALUE(y) > 0);
     pa_assert(path);
 
-    if ((d = pa_hashmap_get(y->devices, path)))
-        if (d->device_info_valid == 1)
-            return d;
+    if ((d = pa_hashmap_get(y->devices, path)) && d->valid)
+        return d;
 
     return NULL;
 }
@@ -395,7 +407,7 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_address(pa_bluetooth_d
     pa_assert(local);
 
     while ((d = pa_hashmap_iterate(y->devices, &state, NULL)))
-        if (d->device_info_valid == 1 && pa_streq(d->address, remote) && pa_streq(d->adapter->address, local))
+        if (d->valid && pa_streq(d->address, remote) && pa_streq(d->adapter->address, local))
             return d;
 
     return NULL;
@@ -412,15 +424,12 @@ static void device_free(pa_bluetooth_device *d) {
         if (!(t = d->transports[i]))
             continue;
 
-        transport_state_changed(t, PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED);
         pa_bluetooth_transport_free(t);
     }
 
     if (d->uuids)
         pa_hashmap_free(d->uuids);
 
-    d->discovery = NULL;
-    d->adapter = NULL;
     pa_xfree(d->path);
     pa_xfree(d->alias);
     pa_xfree(d->address);
@@ -439,22 +448,54 @@ static void device_remove(pa_bluetooth_discovery *y, const char *path) {
     }
 }
 
-static void set_device_info_valid(pa_bluetooth_device *device, int valid) {
+static void device_set_valid(pa_bluetooth_device *device, bool valid) {
     bool old_any_connected;
 
     pa_assert(device);
-    pa_assert(valid == -1 || valid == 0 || valid == 1);
 
-    if (valid == device->device_info_valid)
+    if (valid == device->valid)
         return;
 
     old_any_connected = pa_bluetooth_device_any_transport_connected(device);
-    device->device_info_valid = valid;
+    device->valid = valid;
 
     if (pa_bluetooth_device_any_transport_connected(device) != old_any_connected)
         pa_hook_fire(&device->discovery->hooks[PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED], device);
 }
 
+static void device_update_valid(pa_bluetooth_device *d) {
+    pa_assert(d);
+
+    if (!d->properties_received) {
+        pa_assert(!d->valid);
+        return;
+    }
+
+    /* Check if mandatory properties are set. */
+    if (!d->address || !d->adapter_path || !d->alias) {
+        device_set_valid(d, false);
+        return;
+    }
+
+    if (!d->adapter || !d->adapter->valid) {
+        device_set_valid(d, false);
+        return;
+    }
+
+    device_set_valid(d, true);
+}
+
+static void device_set_adapter(pa_bluetooth_device *device, pa_bluetooth_adapter *adapter) {
+    pa_assert(device);
+
+    if (adapter == device->adapter)
+        return;
+
+    device->adapter = adapter;
+
+    device_update_valid(device);
+}
+
 static pa_bluetooth_adapter* adapter_create(pa_bluetooth_discovery *y, const char *path) {
     pa_bluetooth_adapter *a;
 
@@ -478,10 +519,8 @@ static void adapter_free(pa_bluetooth_adapter *a) {
     pa_assert(a->discovery);
 
     PA_HASHMAP_FOREACH(d, a->discovery->devices, state)
-        if (d->adapter == a) {
-            set_device_info_valid(d, -1);
-            d->adapter = NULL;
-        }
+        if (d->adapter == a)
+            device_set_adapter(d, NULL);
 
     pa_xfree(a->path);
     pa_xfree(a->address);
@@ -499,7 +538,7 @@ static void adapter_remove(pa_bluetooth_discovery *y, const char *path) {
     }
 }
 
-static void parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i, bool is_property_change) {
+static void parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i) {
     const char *key;
     DBusMessageIter variant_i;
 
@@ -524,7 +563,7 @@ static void parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i, bo
                 d->alias = pa_xstrdup(value);
                 pa_log_debug("%s: %s", key, value);
             } else if (pa_streq(key, "Address")) {
-                if (is_property_change) {
+                if (d->properties_received) {
                     pa_log_warn("Device property 'Address' expected to be constant but changed for %s, ignoring", d->path);
                     return;
                 }
@@ -547,7 +586,7 @@ static void parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i, bo
 
             if (pa_streq(key, "Adapter")) {
 
-                if (is_property_change) {
+                if (d->properties_received) {
                     pa_log_warn("Device property 'Adapter' expected to be constant but changed for %s, ignoring", d->path);
                     return;
                 }
@@ -558,11 +597,6 @@ static void parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i, bo
                 }
 
                 d->adapter_path = pa_xstrdup(value);
-
-                d->adapter = pa_hashmap_get(d->discovery->adapters, value);
-                if (!d->adapter)
-                    pa_log_info("Device %s: 'Adapter' property references an unknown adapter %s.", d->path, value);
-
                 pa_log_debug("%s: %s", key, value);
             }
 
@@ -612,7 +646,7 @@ static void parse_device_property(pa_bluetooth_device *d, DBusMessageIter *i, bo
     }
 }
 
-static int parse_device_properties(pa_bluetooth_device *d, DBusMessageIter *i, bool is_property_change) {
+static void parse_device_properties(pa_bluetooth_device *d, DBusMessageIter *i) {
     DBusMessageIter element_i;
 
     dbus_message_iter_recurse(i, &element_i);
@@ -621,23 +655,16 @@ static int parse_device_properties(pa_bluetooth_device *d, DBusMessageIter *i, b
         DBusMessageIter dict_i;
 
         dbus_message_iter_recurse(&element_i, &dict_i);
-        parse_device_property(d, &dict_i, is_property_change);
+        parse_device_property(d, &dict_i);
         dbus_message_iter_next(&element_i);
     }
 
-    if (!d->address || !d->adapter_path || !d->alias) {
-        pa_log_error("Non-optional information missing for device %s", d->path);
-        set_device_info_valid(d, -1);
-        return -1;
-    }
+    if (!d->properties_received) {
+        d->properties_received = true;
 
-    if (!is_property_change && d->adapter)
-        set_device_info_valid(d, 1);
-
-    /* If d->adapter is NULL, device_info_valid will be left as 0, and updated
-     * after all interfaces have been parsed. */
-
-    return 0;
+        if (!d->address || !d->adapter_path || !d->alias)
+            pa_log_error("Non-optional information missing for device %s", d->path);
+    }
 }
 
 static void parse_adapter_properties(pa_bluetooth_adapter *a, DBusMessageIter *i, bool is_property_change) {
@@ -676,6 +703,7 @@ static void parse_adapter_properties(pa_bluetooth_adapter *a, DBusMessageIter *i
 
             dbus_message_iter_get_basic(&variant_i, &value);
             a->address = pa_xstrdup(value);
+            a->valid = true;
         }
 
         dbus_message_iter_next(&element_i);
@@ -781,7 +809,7 @@ static void parse_interfaces_and_properties(pa_bluetooth_discovery *y, DBusMessa
             pa_bluetooth_adapter *a;
 
             if ((a = pa_hashmap_get(y->adapters, path))) {
-                pa_log_error("Found duplicated D-Bus path for device %s", path);
+                pa_log_error("Found duplicated D-Bus path for adapter %s", path);
                 return;
             } else
                 a = adapter_create(y, path);
@@ -789,7 +817,8 @@ static void parse_interfaces_and_properties(pa_bluetooth_discovery *y, DBusMessa
             pa_log_debug("Adapter %s found", path);
 
             parse_adapter_properties(a, &iface_i, false);
-            if (!a->address)
+
+            if (!a->valid)
                 return;
 
             register_endpoint(y, path, A2DP_SOURCE_ENDPOINT, PA_BLUETOOTH_UUID_A2DP_SOURCE);
@@ -798,7 +827,7 @@ static void parse_interfaces_and_properties(pa_bluetooth_discovery *y, DBusMessa
         } else if (pa_streq(interface, BLUEZ_DEVICE_INTERFACE)) {
 
             if ((d = pa_hashmap_get(y->devices, path))) {
-                if (d->device_info_valid != 0) {
+                if (d->properties_received) {
                     pa_log_error("Found duplicated D-Bus path for device %s", path);
                     return;
                 }
@@ -807,7 +836,7 @@ static void parse_interfaces_and_properties(pa_bluetooth_discovery *y, DBusMessa
 
             pa_log_debug("Device %s found", d->path);
 
-            parse_device_properties(d, &iface_i, false);
+            parse_device_properties(d, &iface_i);
 
         } else
             pa_log_debug("Unknown interface %s found, skipping", interface);
@@ -816,22 +845,38 @@ static void parse_interfaces_and_properties(pa_bluetooth_discovery *y, DBusMessa
     }
 
     PA_HASHMAP_FOREACH(d, y->devices, state) {
-        if (d->device_info_valid != 0)
-            continue;
+        if (d->properties_received && !d->tried_to_link_with_adapter) {
+            if (d->adapter_path) {
+                device_set_adapter(d, pa_hashmap_get(d->discovery->adapters, d->adapter_path));
 
-        if (!d->adapter && d->adapter_path) {
-            d->adapter = pa_hashmap_get(d->discovery->adapters, d->adapter_path);
-            if (!d->adapter || !d->adapter->address) {
-                pa_log_error("Device %s is child of nonexistent or corrupted adapter %s", d->path, d->adapter_path);
-                set_device_info_valid(d, -1);
-            } else
-                set_device_info_valid(d, 1);
+                if (!d->adapter)
+                    pa_log("Device %s points to a nonexistent adapter %s.", d->path, d->adapter_path);
+                else if (!d->adapter->valid)
+                    pa_log("Device %s points to an invalid adapter %s.", d->path, d->adapter_path);
+            }
+
+            d->tried_to_link_with_adapter = true;
         }
     }
 
     return;
 }
 
+void pa_bluetooth_discovery_set_ofono_running(pa_bluetooth_discovery *y, bool is_running) {
+    pa_assert(y);
+
+    pa_log_debug("oFono is running: %s", pa_yes_no(is_running));
+    if (y->headset_backend != HEADSET_BACKEND_AUTO)
+        return;
+
+    if (is_running && y->native_backend) {
+        pa_bluetooth_native_backend_free(y->native_backend);
+        y->native_backend = NULL;
+    }
+    else if (!is_running && !y->native_backend)
+        y->native_backend = pa_bluetooth_native_backend_new(y->core, y);
+}
+
 static void get_managed_objects_reply(DBusPendingCall *pending, void *userdata) {
     pa_dbus_pending *p;
     pa_bluetooth_discovery *y;
@@ -870,6 +915,11 @@ static void get_managed_objects_reply(DBusPendingCall *pending, void *userdata)
 
     y->objects_listed = true;
 
+    if (!y->ofono_backend && y->headset_backend != HEADSET_BACKEND_NATIVE)
+        y->ofono_backend = pa_bluetooth_ofono_backend_new(y->core, y);
+    if (!y->ofono_backend && !y->native_backend && y->headset_backend != HEADSET_BACKEND_OFONO)
+        y->native_backend = pa_bluetooth_native_backend_new(y->core, y);
+
 finish:
     dbus_message_unref(r);
 
@@ -922,6 +972,14 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
                 pa_hashmap_remove_all(y->devices);
                 pa_hashmap_remove_all(y->adapters);
                 y->objects_listed = false;
+                if (y->ofono_backend) {
+                    pa_bluetooth_ofono_backend_free(y->ofono_backend);
+                    y->ofono_backend = NULL;
+                }
+                if (y->native_backend) {
+                    pa_bluetooth_native_backend_free(y->native_backend);
+                    y->native_backend = NULL;
+                }
             }
 
             if (new_owner && *new_owner) {
@@ -1019,12 +1077,10 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
                 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
             }
 
-            if (d->device_info_valid != 1) {
-                pa_log_warn("Properties changed in a device which information is unknown or invalid");
+            if (!d->properties_received)
                 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-            }
 
-            parse_device_properties(d, &arg_i, true);
+            parse_device_properties(d, &arg_i);
         } else if (pa_streq(iface, BLUEZ_MEDIA_TRANSPORT_INTERFACE)) {
             pa_bluetooth_transport *t;
 
@@ -1093,6 +1149,10 @@ const char *pa_bluetooth_profile_to_string(pa_bluetooth_profile_t profile) {
             return "a2dp_sink";
         case PA_BLUETOOTH_PROFILE_A2DP_SOURCE:
             return "a2dp_source";
+        case PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT:
+            return "headset_head_unit";
+        case PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY:
+            return "headset_audio_gateway";
         case PA_BLUETOOTH_PROFILE_OFF:
             return "off";
     }
@@ -1228,12 +1288,12 @@ static DBusMessage *endpoint_set_configuration(DBusConnection *conn, DBusMessage
     }
 
     if ((d = pa_hashmap_get(y->devices, dev_path))) {
-        if (d->device_info_valid == -1) {
+        if (!d->valid) {
             pa_log_error("Information about device %s is invalid", dev_path);
             goto fail2;
         }
     } else {
-        /* InterfacesAdded signal is probably on it's way, device_info_valid is kept as 0. */
+        /* InterfacesAdded signal is probably on its way, device_info_valid is kept as 0. */
         pa_log_warn("SetConfiguration() received for unknown device %s", dev_path);
         d = device_create(y, dev_path);
     }
@@ -1249,7 +1309,7 @@ static DBusMessage *endpoint_set_configuration(DBusConnection *conn, DBusMessage
     pa_assert_se(dbus_connection_send(pa_dbus_connection_get(y->connection), r, NULL));
     dbus_message_unref(r);
 
-    d->transports[p] = t = pa_bluetooth_transport_new(d, sender, path, p, config, size);
+    t = pa_bluetooth_transport_new(d, sender, path, p, config, size);
     t->acquire = bluez5_transport_acquire_cb;
     t->release = bluez5_transport_release_cb;
     pa_bluetooth_transport_put(t);
@@ -1412,7 +1472,6 @@ static DBusMessage *endpoint_clear_configuration(DBusConnection *conn, DBusMessa
 
     if ((t = pa_hashmap_get(y->transports, path))) {
         pa_log_debug("Clearing transport %s profile %s", t->path, pa_bluetooth_profile_to_string(t->profile));
-        transport_state_changed(t, PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED);
         pa_bluetooth_transport_free(t);
     }
 
@@ -1513,7 +1572,7 @@ static void endpoint_done(pa_bluetooth_discovery *y, pa_bluetooth_profile_t prof
     }
 }
 
-pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c) {
+pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c, int headset_backend) {
     pa_bluetooth_discovery *y;
     DBusError err;
     DBusConnection *conn;
@@ -1522,6 +1581,7 @@ pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c) {
     y = pa_xnew0(pa_bluetooth_discovery, 1);
     PA_REFCNT_INIT(y);
     y->core = c;
+    y->headset_backend = headset_backend;
     y->adapters = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL,
                                       (pa_free_cb_t) adapter_free);
     y->devices = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL,
@@ -1611,6 +1671,11 @@ void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y) {
         pa_hashmap_free(y->transports);
     }
 
+    if (y->ofono_backend)
+        pa_bluetooth_ofono_backend_free(y->ofono_backend);
+    if (y->native_backend)
+        pa_bluetooth_native_backend_free(y->native_backend);
+
     if (y->connection) {
 
         if (y->matches_added)
diff --git a/src/modules/bluetooth/bluez5-util.h b/src/modules/bluetooth/bluez5-util.h
index bbc5b71..9a6488d 100644
--- a/src/modules/bluetooth/bluez5-util.h
+++ b/src/modules/bluetooth/bluez5-util.h
@@ -26,21 +26,30 @@
 
 #define PA_BLUETOOTH_UUID_A2DP_SOURCE "0000110a-0000-1000-8000-00805f9b34fb"
 #define PA_BLUETOOTH_UUID_A2DP_SINK   "0000110b-0000-1000-8000-00805f9b34fb"
+#define PA_BLUETOOTH_UUID_HSP_HS      "00001108-0000-1000-8000-00805f9b34fb"
+#define PA_BLUETOOTH_UUID_HSP_AG      "00001112-0000-1000-8000-00805f9b34fb"
+#define PA_BLUETOOTH_UUID_HFP_HF      "0000111e-0000-1000-8000-00805f9b34fb"
+#define PA_BLUETOOTH_UUID_HFP_AG      "0000111f-0000-1000-8000-00805f9b34fb"
 
 typedef struct pa_bluetooth_transport pa_bluetooth_transport;
 typedef struct pa_bluetooth_device pa_bluetooth_device;
 typedef struct pa_bluetooth_adapter pa_bluetooth_adapter;
 typedef struct pa_bluetooth_discovery pa_bluetooth_discovery;
+typedef struct pa_bluetooth_backend pa_bluetooth_backend;
 
 typedef enum pa_bluetooth_hook {
     PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED,          /* Call data: pa_bluetooth_device */
     PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED,            /* Call data: pa_bluetooth_transport */
+    PA_BLUETOOTH_HOOK_TRANSPORT_MICROPHONE_GAIN_CHANGED,  /* Call data: pa_bluetooth_transport */
+    PA_BLUETOOTH_HOOK_TRANSPORT_SPEAKER_GAIN_CHANGED,     /* Call data: pa_bluetooth_transport */
     PA_BLUETOOTH_HOOK_MAX
 } pa_bluetooth_hook_t;
 
 typedef enum profile {
     PA_BLUETOOTH_PROFILE_A2DP_SINK,
     PA_BLUETOOTH_PROFILE_A2DP_SOURCE,
+    PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT,
+    PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY,
     PA_BLUETOOTH_PROFILE_OFF
 } pa_bluetooth_profile_t;
 #define PA_BLUETOOTH_PROFILE_COUNT PA_BLUETOOTH_PROFILE_OFF
@@ -53,6 +62,9 @@ typedef enum pa_bluetooth_transport_state {
 
 typedef int (*pa_bluetooth_transport_acquire_cb)(pa_bluetooth_transport *t, bool optional, size_t *imtu, size_t *omtu);
 typedef void (*pa_bluetooth_transport_release_cb)(pa_bluetooth_transport *t);
+typedef void (*pa_bluetooth_transport_destroy_cb)(pa_bluetooth_transport *t);
+typedef void (*pa_bluetooth_transport_set_speaker_gain_cb)(pa_bluetooth_transport *t, uint16_t gain);
+typedef void (*pa_bluetooth_transport_set_microphone_gain_cb)(pa_bluetooth_transport *t, uint16_t gain);
 
 struct pa_bluetooth_transport {
     pa_bluetooth_device *device;
@@ -65,10 +77,16 @@ struct pa_bluetooth_transport {
     uint8_t *config;
     size_t config_size;
 
+    uint16_t microphone_gain;
+    uint16_t speaker_gain;
+
     pa_bluetooth_transport_state_t state;
 
     pa_bluetooth_transport_acquire_cb acquire;
     pa_bluetooth_transport_release_cb release;
+    pa_bluetooth_transport_destroy_cb destroy;
+    pa_bluetooth_transport_set_speaker_gain_cb set_speaker_gain;
+    pa_bluetooth_transport_set_microphone_gain_cb set_microphone_gain;
     void *userdata;
 };
 
@@ -76,7 +94,9 @@ struct pa_bluetooth_device {
     pa_bluetooth_discovery *discovery;
     pa_bluetooth_adapter *adapter;
 
-    int device_info_valid;      /* 0: no results yet; 1: good results; -1: bad results ... */
+    bool properties_received;
+    bool tried_to_link_with_adapter;
+    bool valid;
 
     /* Device information */
     char *path;
@@ -93,12 +113,36 @@ struct pa_bluetooth_adapter {
     pa_bluetooth_discovery *discovery;
     char *path;
     char *address;
+
+    bool valid;
 };
 
+#ifdef HAVE_BLUEZ_5_OFONO_HEADSET
+pa_bluetooth_backend *pa_bluetooth_ofono_backend_new(pa_core *c, pa_bluetooth_discovery *y);
+void pa_bluetooth_ofono_backend_free(pa_bluetooth_backend *b);
+#else
+static inline pa_bluetooth_backend *pa_bluetooth_ofono_backend_new(pa_core *c, pa_bluetooth_discovery *y) {
+    return NULL;
+}
+static inline void pa_bluetooth_ofono_backend_free(pa_bluetooth_backend *b) {}
+#endif
+
+#ifdef HAVE_BLUEZ_5_NATIVE_HEADSET
+pa_bluetooth_backend *pa_bluetooth_native_backend_new(pa_core *c, pa_bluetooth_discovery *y);
+void pa_bluetooth_native_backend_free(pa_bluetooth_backend *b);
+#else
+static inline pa_bluetooth_backend *pa_bluetooth_native_backend_new(pa_core *c, pa_bluetooth_discovery *y) {
+    return NULL;
+}
+static inline void pa_bluetooth_native_backend_free(pa_bluetooth_backend *b) {}
+#endif
+
 pa_bluetooth_transport *pa_bluetooth_transport_new(pa_bluetooth_device *d, const char *owner, const char *path,
                                                    pa_bluetooth_profile_t p, const uint8_t *config, size_t size);
 
+void pa_bluetooth_transport_set_state(pa_bluetooth_transport *t, pa_bluetooth_transport_state_t state);
 void pa_bluetooth_transport_put(pa_bluetooth_transport *t);
+void pa_bluetooth_transport_unlink(pa_bluetooth_transport *t);
 void pa_bluetooth_transport_free(pa_bluetooth_transport *t);
 
 bool pa_bluetooth_device_any_transport_connected(const pa_bluetooth_device *d);
@@ -110,7 +154,12 @@ pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *y, pa_bluetooth_hoo
 
 const char *pa_bluetooth_profile_to_string(pa_bluetooth_profile_t profile);
 
-pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *core);
+#define HEADSET_BACKEND_OFONO 0
+#define HEADSET_BACKEND_NATIVE 1
+#define HEADSET_BACKEND_AUTO 2
+
+pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *core, int headset_backend);
 pa_bluetooth_discovery* pa_bluetooth_discovery_ref(pa_bluetooth_discovery *y);
 void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y);
+void pa_bluetooth_discovery_set_ofono_running(pa_bluetooth_discovery *y, bool is_running);
 #endif
diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
index 0bcfcf9..b54d573 100644
--- a/src/modules/bluetooth/module-bluetooth-discover.c
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
@@ -33,6 +33,9 @@ PA_MODULE_AUTHOR("João Paulo Rechi Vita");
 PA_MODULE_DESCRIPTION("Detect available Bluetooth daemon and load the corresponding discovery module");
 PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_LOAD_ONCE(true);
+PA_MODULE_USAGE(
+    "headset=ofono|native|auto (bluez 5 only)"
+);
 
 struct userdata {
     uint32_t bluez5_module_idx;
@@ -50,7 +53,7 @@ int pa__init(pa_module* m) {
     u->bluez4_module_idx = PA_INVALID_INDEX;
 
     if (pa_module_exists("module-bluez5-discover")) {
-        mm = pa_module_load(m->core, "module-bluez5-discover",  NULL);
+        mm = pa_module_load(m->core, "module-bluez5-discover", m->argument);
         if (mm)
             u->bluez5_module_idx = mm->index;
     }
diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-policy.c
index 06f9f1c..860868f 100644
--- a/src/modules/bluetooth/module-bluetooth-policy.c
+++ b/src/modules/bluetooth/module-bluetooth-policy.c
@@ -41,17 +41,19 @@ PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_LOAD_ONCE(true);
 PA_MODULE_USAGE(
         "a2dp_source=<Handle a2dp_source card profile (sink role)?> "
-        "hfgw=<Handle hfgw card profile (headset role)?>");
+        "ag=<Handle headset_audio_gateway card profile (headset role)?> "
+        "hfgw=<Handle hfgw card profile (headset role)?> DEPRECATED");
 
 static const char* const valid_modargs[] = {
     "a2dp_source",
+    "ag",
     "hfgw",
     NULL
 };
 
 struct userdata {
     bool enable_a2dp_source;
-    bool enable_hfgw;
+    bool enable_ag;
     pa_hook_slot *source_put_slot;
     pa_hook_slot *sink_put_slot;
     pa_hook_slot *profile_available_changed_slot;
@@ -79,9 +81,10 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
     if (!s)
         return PA_HOOK_OK;
 
-    if (u->enable_a2dp_source && pa_streq(s, "a2dp_source")) /* A2DP profile (we're doing sink role) */
+    if (u->enable_a2dp_source && pa_streq(s, "a2dp_source"))
         role = "music";
-    else if (u->enable_hfgw && pa_streq(s, "hfgw")) /* HFP profile (we're doing headset role) */
+    /* TODO: remove hfgw when we remove BlueZ 4 support */
+    else if (u->enable_ag && (pa_streq(s, "hfgw") || pa_streq(s, "headset_audio_gateway")))
         role = "phone";
     else {
         pa_log_debug("Profile %s cannot be selected for loopback", s);
@@ -89,7 +92,8 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
     }
 
     /* Load module-loopback */
-    args = pa_sprintf_malloc("source=\"%s\" source_dont_move=\"true\" sink_input_properties=\"media.role=%s\"", source->name, role);
+    args = pa_sprintf_malloc("source=\"%s\" source_dont_move=\"true\" sink_input_properties=\"media.role=%s\"", source->name,
+                             role);
     (void) pa_module_load(c, "module-loopback", args);
     pa_xfree(args);
 
@@ -118,7 +122,8 @@ static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, void *
     if (!s)
         return PA_HOOK_OK;
 
-    if (u->enable_hfgw && pa_streq(s, "hfgw")) /* HFP profile (we're doing headset role) */
+    /* TODO: remove hfgw when we remove BlueZ 4 support */
+    if (u->enable_ag && (pa_streq(s, "hfgw") || pa_streq(s, "headset_audio_gateway")))
         role = "phone";
     else {
         pa_log_debug("Profile %s cannot be selected for loopback", s);
@@ -126,7 +131,8 @@ static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, void *
     }
 
     /* Load module-loopback */
-    args = pa_sprintf_malloc("sink=\"%s\" sink_dont_move=\"true\" source_output_properties=\"media.role=%s\"", sink->name, role);
+    args = pa_sprintf_malloc("sink=\"%s\" sink_dont_move=\"true\" source_output_properties=\"media.role=%s\"", sink->name,
+                             role);
     (void) pa_module_load(c, "module-loopback", args);
     pa_xfree(args);
 
@@ -137,12 +143,9 @@ static pa_card_profile *find_best_profile(pa_card *card) {
     void *state;
     pa_card_profile *profile;
     pa_card_profile *result = card->active_profile;
-    pa_card_profile *off;
-
-    pa_assert_se(off = pa_hashmap_get(card->profiles, "off"));
 
     PA_HASHMAP_FOREACH(profile, card->profiles, state) {
-        if (profile->available == PA_AVAILABLE_NO || profile == off)
+        if (profile->available == PA_AVAILABLE_NO)
             continue;
 
         if (result == NULL ||
@@ -151,7 +154,7 @@ static pa_card_profile *find_best_profile(pa_card *card) {
             result = profile;
     }
 
-    return result ? result : off;
+    return result;
 }
 
 static pa_hook_result_t profile_available_hook_callback(pa_core *c, pa_card_profile *profile, void *userdata) {
@@ -170,7 +173,9 @@ static pa_hook_result_t profile_available_hook_callback(pa_core *c, pa_card_prof
         return PA_HOOK_OK;
 
     /* Do not automatically switch profiles for headsets, just in case */
-    if (pa_streq(profile->name, "hsp") || pa_streq(profile->name, "a2dp"))
+    /* TODO: remove a2dp and hsp when we remove BlueZ 4 support */
+    if (pa_streq(profile->name, "hsp") || pa_streq(profile->name, "a2dp") || pa_streq(profile->name, "a2dp_sink") ||
+        pa_streq(profile->name, "headset_head_unit"))
         return PA_HOOK_OK;
 
     is_active_profile = card->active_profile == profile;
@@ -233,15 +238,21 @@ int pa__init(pa_module *m) {
         goto fail;
     }
 
-    u->enable_hfgw = true;
-    if (pa_modargs_get_value_boolean(ma, "hfgw", &u->enable_hfgw) < 0) {
+    u->enable_ag = true;
+    if (pa_modargs_get_value_boolean(ma, "hfgw", &u->enable_ag) < 0) {
         pa_log("Failed to parse hfgw argument.");
         goto fail;
     }
+    if (pa_modargs_get_value_boolean(ma, "ag", &u->enable_ag) < 0) {
+        pa_log("Failed to parse ag argument.");
+        goto fail;
+    }
 
-    u->source_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PUT], PA_HOOK_NORMAL, (pa_hook_cb_t) source_put_hook_callback, u);
+    u->source_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PUT], PA_HOOK_NORMAL,
+                                         (pa_hook_cb_t) source_put_hook_callback, u);
 
-    u->sink_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOOK_NORMAL, (pa_hook_cb_t) sink_put_hook_callback, u);
+    u->sink_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOOK_NORMAL,
+                                       (pa_hook_cb_t) sink_put_hook_callback, u);
 
     u->profile_available_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED],
                                                         PA_HOOK_NORMAL, (pa_hook_cb_t) profile_available_hook_callback, u);
diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
index 83e603f..aa0e037 100644
--- a/src/modules/bluetooth/module-bluez4-device.c
+++ b/src/modules/bluetooth/module-bluez4-device.c
@@ -881,6 +881,7 @@ static int a2dp_process_push(struct userdata *u) {
         void *d;
         ssize_t l;
         size_t to_write, to_decode;
+        size_t total_written = 0;
 
         a2dp_prepare_buffer(u);
 
@@ -907,17 +908,12 @@ static int a2dp_process_push(struct userdata *u) {
 
         pa_assert((size_t) l <= a2dp->buffer_size);
 
-        u->read_index += (uint64_t) l;
-
         /* TODO: get timestamp from rtp */
         if (!found_tstamp) {
             /* pa_log_warn("Couldn't find SO_TIMESTAMP data in auxiliary recvmsg() data!"); */
             tstamp = pa_rtclock_now();
         }
 
-        pa_smoother_put(u->read_smoother, tstamp, pa_bytes_to_usec(u->read_index, &u->sample_spec));
-        pa_smoother_resume(u->read_smoother, tstamp, true);
-
         p = (uint8_t*) a2dp->buffer + sizeof(*header) + sizeof(*payload);
         to_decode = l - sizeof(*header) - sizeof(*payload);
 
@@ -937,12 +933,14 @@ static int a2dp_process_push(struct userdata *u) {
                 pa_log_error("SBC decoding error (%li)", (long) decoded);
                 pa_memblock_release(memchunk.memblock);
                 pa_memblock_unref(memchunk.memblock);
-                return -1;
+                return 0;
             }
 
 /*             pa_log_debug("SBC: decoded: %lu; written: %lu", (unsigned long) decoded, (unsigned long) written); */
 /*             pa_log_debug("SBC: frame_length: %lu; codesize: %lu", (unsigned long) a2dp->frame_length, (unsigned long) a2dp->codesize); */
 
+            total_written += written;
+
             /* Reset frame length, it can be changed due to bitpool change */
             a2dp->frame_length = sbc_get_frame_length(&a2dp->sbc);
 
@@ -958,6 +956,10 @@ static int a2dp_process_push(struct userdata *u) {
             to_write -= written;
         }
 
+        u->read_index += (uint64_t) total_written;
+        pa_smoother_put(u->read_smoother, tstamp, pa_bytes_to_usec(u->read_index, &u->sample_spec));
+        pa_smoother_resume(u->read_smoother, tstamp, true);
+
         memchunk.length -= to_write;
 
         pa_memblock_release(memchunk.memblock);
@@ -1039,10 +1041,12 @@ static void thread_func(void *userdata) {
                 if (n_read < 0)
                     goto io_fail;
 
-                /* We just read something, so we are supposed to write something, too */
-                pending_read_bytes += n_read;
-                do_write += pending_read_bytes / u->write_block_size;
-                pending_read_bytes = pending_read_bytes % u->write_block_size;
+                if (n_read > 0) {
+                    /* We just read something, so we are supposed to write something, too */
+                    pending_read_bytes += n_read;
+                    do_write += pending_read_bytes / u->write_block_size;
+                    pending_read_bytes = pending_read_bytes % u->write_block_size;
+                }
             }
         }
 
@@ -1147,7 +1151,7 @@ static void thread_func(void *userdata) {
             pollfd->events = (short) (((u->sink && PA_SINK_IS_LINKED(u->sink->thread_info.state) && !writable) ? POLLOUT : 0) |
                                       (u->source && PA_SOURCE_IS_LINKED(u->source->thread_info.state) ? POLLIN : 0));
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0) {
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0) {
             pa_log_debug("pa_rtpoll_run failed with: %d", ret);
             goto fail;
         }
@@ -1367,7 +1371,7 @@ static void source_set_volume_cb(pa_source *s) {
 }
 
 /* Run from main thread */
-static char *get_name(const char *type, pa_modargs *ma, const char *device_id, bool *namereg_fail) {
+static char *get_name(const char *type, pa_modargs *ma, const char *device_id, const char *profile, bool *namereg_fail) {
     char *t;
     const char *n;
 
@@ -1392,7 +1396,10 @@ static char *get_name(const char *type, pa_modargs *ma, const char *device_id, b
         *namereg_fail = false;
     }
 
-    return pa_sprintf_malloc("bluez_%s.%s", type, n);
+    if (profile)
+        return pa_sprintf_malloc("bluez_%s.%s.%s", type, n, profile);
+    else
+        return pa_sprintf_malloc("bluez_%s.%s", type, n);
 }
 
 static int sco_over_pcm_state_update(struct userdata *u, bool changed) {
@@ -1563,7 +1570,7 @@ static int add_sink(struct userdata *u) {
         if (u->profile == PA_BLUEZ4_PROFILE_HSP)
             pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone");
         data.card = u->card;
-        data.name = get_name("sink", u->modargs, u->address, &b);
+        data.name = get_name("sink", u->modargs, u->address, pa_bluez4_profile_to_string(u->profile), &b);
         data.namereg_fail = b;
 
         if (pa_modargs_get_proplist(u->modargs, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
@@ -1634,7 +1641,7 @@ static int add_source(struct userdata *u) {
             pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone");
 
         data.card = u->card;
-        data.name = get_name("source", u->modargs, u->address, &b);
+        data.name = get_name("source", u->modargs, u->address, pa_bluez4_profile_to_string(u->profile), &b);
         data.namereg_fail = b;
 
         if (pa_modargs_get_proplist(u->modargs, "source_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
@@ -2263,7 +2270,7 @@ static int add_card(struct userdata *u) {
     pa_proplist_sets(data.proplist, "bluez.path", device->path);
     pa_proplist_setf(data.proplist, "bluez.class", "0x%06x", (unsigned) device->class);
     pa_proplist_sets(data.proplist, "bluez.alias", device->alias);
-    data.name = get_name("card", u->modargs, device->address, &b);
+    data.name = get_name("card", u->modargs, device->address, NULL, &b);
     data.namereg_fail = b;
 
     if (pa_modargs_get_proplist(u->modargs, "card_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
index 287e763..e6a8071 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
@@ -33,6 +33,7 @@
 #include <pulse/timeval.h>
 
 #include <pulsecore/core-error.h>
+#include <pulsecore/core-rtclock.h>
 #include <pulsecore/core-util.h>
 #include <pulsecore/i18n.h>
 #include <pulsecore/module.h>
@@ -59,10 +60,13 @@ PA_MODULE_USAGE("path=<device object path>");
 
 #define MAX_PLAYBACK_CATCH_UP_USEC (100 * PA_USEC_PER_MSEC)
 #define FIXED_LATENCY_PLAYBACK_A2DP (25 * PA_USEC_PER_MSEC)
+#define FIXED_LATENCY_PLAYBACK_SCO (125 * PA_USEC_PER_MSEC)
 #define FIXED_LATENCY_RECORD_A2DP   (25 * PA_USEC_PER_MSEC)
+#define FIXED_LATENCY_RECORD_SCO    (25 * PA_USEC_PER_MSEC)
 
 #define BITPOOL_DEC_LIMIT 32
 #define BITPOOL_DEC_STEP 5
+#define HSP_MAX_GAIN 15
 
 static const char* const valid_modargs[] = {
     "path",
@@ -71,6 +75,7 @@ static const char* const valid_modargs[] = {
 
 enum {
     BLUETOOTH_MESSAGE_IO_THREAD_FAILED,
+    BLUETOOTH_MESSAGE_STREAM_FD_HUP,
     BLUETOOTH_MESSAGE_MAX
 };
 
@@ -99,6 +104,8 @@ struct userdata {
 
     pa_hook_slot *device_connection_changed_slot;
     pa_hook_slot *transport_state_changed_slot;
+    pa_hook_slot *transport_speaker_gain_changed_slot;
+    pa_hook_slot *transport_microphone_gain_changed_slot;
 
     pa_bluetooth_discovery *discovery;
     pa_bluetooth_device *device;
@@ -235,6 +242,157 @@ static void connect_ports(struct userdata *u, void *new_data, pa_direction_t dir
 }
 
 /* Run from IO thread */
+static int sco_process_render(struct userdata *u) {
+    ssize_t l;
+    pa_memchunk memchunk;
+
+    pa_assert(u);
+    pa_assert(u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT ||
+                u->profile == PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY);
+    pa_assert(u->sink);
+
+    pa_sink_render_full(u->sink, u->write_block_size, &memchunk);
+
+    pa_assert(memchunk.length == u->write_block_size);
+
+    for (;;) {
+        const void *p;
+
+        /* Now write that data to the socket. The socket is of type
+         * SEQPACKET, and we generated the data of the MTU size, so this
+         * should just work. */
+
+        p = (const uint8_t *) pa_memblock_acquire_chunk(&memchunk);
+        l = pa_write(u->stream_fd, p, memchunk.length, &u->stream_write_type);
+        pa_memblock_release(memchunk.memblock);
+
+        pa_assert(l != 0);
+
+        if (l > 0)
+            break;
+
+        if (errno == EINTR)
+            /* Retry right away if we got interrupted */
+            continue;
+        else if (errno == EAGAIN)
+            /* Hmm, apparently the socket was not writable, give up for now */
+            return 0;
+
+        pa_log_error("Failed to write data to SCO socket: %s", pa_cstrerror(errno));
+        return -1;
+    }
+
+    pa_assert((size_t) l <= memchunk.length);
+
+    if ((size_t) l != memchunk.length) {
+        pa_log_error("Wrote memory block to socket only partially! %llu written, wanted to write %llu.",
+                    (unsigned long long) l,
+                    (unsigned long long) memchunk.length);
+        return -1;
+    }
+
+    u->write_index += (uint64_t) memchunk.length;
+    pa_memblock_unref(memchunk.memblock);
+
+    return 1;
+}
+
+/* Run from IO thread */
+static int sco_process_push(struct userdata *u) {
+    ssize_t l;
+    pa_memchunk memchunk;
+    struct cmsghdr *cm;
+    struct msghdr m;
+    bool found_tstamp = false;
+    pa_usec_t tstamp = 0;
+
+    pa_assert(u);
+    pa_assert(u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT ||
+                u->profile == PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY);
+    pa_assert(u->source);
+    pa_assert(u->read_smoother);
+
+    memchunk.memblock = pa_memblock_new(u->core->mempool, u->read_block_size);
+    memchunk.index = memchunk.length = 0;
+
+    for (;;) {
+        void *p;
+        uint8_t aux[1024];
+        struct iovec iov;
+
+        pa_zero(m);
+        pa_zero(aux);
+        pa_zero(iov);
+
+        m.msg_iov = &iov;
+        m.msg_iovlen = 1;
+        m.msg_control = aux;
+        m.msg_controllen = sizeof(aux);
+
+        p = pa_memblock_acquire(memchunk.memblock);
+        iov.iov_base = p;
+        iov.iov_len = pa_memblock_get_length(memchunk.memblock);
+        l = recvmsg(u->stream_fd, &m, 0);
+        pa_memblock_release(memchunk.memblock);
+
+        if (l > 0)
+            break;
+
+        if (l < 0 && errno == EINTR)
+            /* Retry right away if we got interrupted */
+            continue;
+
+        pa_memblock_unref(memchunk.memblock);
+
+        if (l < 0 && errno == EAGAIN)
+            /* Hmm, apparently the socket was not readable, give up for now. */
+            return 0;
+
+        pa_log_error("Failed to read data from SCO socket: %s", l < 0 ? pa_cstrerror(errno) : "EOF");
+        return -1;
+    }
+
+    pa_assert((size_t) l <= pa_memblock_get_length(memchunk.memblock));
+
+    /* In some rare occasions, we might receive packets of a very strange
+     * size. This could potentially be possible if the SCO packet was
+     * received partially over-the-air, or more probably due to hardware
+     * issues in our Bluetooth adapter. In these cases, in order to avoid
+     * an assertion failure due to unaligned data, just discard the whole
+     * packet */
+    if (!pa_frame_aligned(l, &u->sample_spec)) {
+        pa_log_warn("SCO packet received of unaligned size: %zu", l);
+        pa_memblock_unref(memchunk.memblock);
+        return -1;
+    }
+
+    memchunk.length = (size_t) l;
+    u->read_index += (uint64_t) l;
+
+    for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm))
+        if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SO_TIMESTAMP) {
+            struct timeval *tv = (struct timeval*) CMSG_DATA(cm);
+            pa_rtclock_from_wallclock(tv);
+            tstamp = pa_timeval_load(tv);
+            found_tstamp = true;
+            break;
+        }
+
+    if (!found_tstamp) {
+        pa_log_warn("Couldn't find SO_TIMESTAMP data in auxiliary recvmsg() data!");
+        tstamp = pa_rtclock_now();
+    }
+
+    pa_smoother_put(u->read_smoother, tstamp, pa_bytes_to_usec(u->read_index, &u->sample_spec));
+    pa_smoother_resume(u->read_smoother, tstamp, true);
+
+    pa_source_post(u->source, &memchunk);
+    pa_memblock_unref(memchunk.memblock);
+
+    return l;
+}
+
+/* Run from IO thread */
 static void a2dp_prepare_buffer(struct userdata *u) {
     size_t min_buffer_size = PA_MAX(u->read_link_mtu, u->write_link_mtu);
 
@@ -402,6 +560,7 @@ static int a2dp_process_push(struct userdata *u) {
         void *d;
         ssize_t l;
         size_t to_write, to_decode;
+        size_t total_written = 0;
 
         a2dp_prepare_buffer(u);
 
@@ -428,17 +587,12 @@ static int a2dp_process_push(struct userdata *u) {
 
         pa_assert((size_t) l <= sbc_info->buffer_size);
 
-        u->read_index += (uint64_t) l;
-
         /* TODO: get timestamp from rtp */
         if (!found_tstamp) {
             /* pa_log_warn("Couldn't find SO_TIMESTAMP data in auxiliary recvmsg() data!"); */
             tstamp = pa_rtclock_now();
         }
 
-        pa_smoother_put(u->read_smoother, tstamp, pa_bytes_to_usec(u->read_index, &u->sample_spec));
-        pa_smoother_resume(u->read_smoother, tstamp, true);
-
         p = (uint8_t*) sbc_info->buffer + sizeof(*header) + sizeof(*payload);
         to_decode = l - sizeof(*header) - sizeof(*payload);
 
@@ -458,9 +612,11 @@ static int a2dp_process_push(struct userdata *u) {
                 pa_log_error("SBC decoding error (%li)", (long) decoded);
                 pa_memblock_release(memchunk.memblock);
                 pa_memblock_unref(memchunk.memblock);
-                return -1;
+                return 0;
             }
 
+            total_written += written;
+
             /* Reset frame length, it can be changed due to bitpool change */
             sbc_info->frame_length = sbc_get_frame_length(&sbc_info->sbc);
 
@@ -476,6 +632,10 @@ static int a2dp_process_push(struct userdata *u) {
             to_write -= written;
         }
 
+        u->read_index += (uint64_t) total_written;
+        pa_smoother_put(u->read_smoother, tstamp, pa_bytes_to_usec(u->read_index, &u->sample_spec));
+        pa_smoother_resume(u->read_smoother, tstamp, true);
+
         memchunk.length -= to_write;
 
         pa_memblock_release(memchunk.memblock);
@@ -608,24 +768,31 @@ static void transport_release(struct userdata *u) {
 
 /* Run from I/O thread */
 static void transport_config_mtu(struct userdata *u) {
-    u->read_block_size =
-        (u->read_link_mtu - sizeof(struct rtp_header) - sizeof(struct rtp_payload))
-        / u->sbc_info.frame_length * u->sbc_info.codesize;
+    if (u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT || u->profile == PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY) {
+        u->read_block_size = u->read_link_mtu;
+        u->write_block_size = u->write_link_mtu;
+    } else {
+        u->read_block_size =
+            (u->read_link_mtu - sizeof(struct rtp_header) - sizeof(struct rtp_payload))
+            / u->sbc_info.frame_length * u->sbc_info.codesize;
 
-    u->write_block_size =
-        (u->write_link_mtu - sizeof(struct rtp_header) - sizeof(struct rtp_payload))
-        / u->sbc_info.frame_length * u->sbc_info.codesize;
+        u->write_block_size =
+            (u->write_link_mtu - sizeof(struct rtp_header) - sizeof(struct rtp_payload))
+            / u->sbc_info.frame_length * u->sbc_info.codesize;
+    }
 
     if (u->sink) {
         pa_sink_set_max_request_within_thread(u->sink, u->write_block_size);
         pa_sink_set_fixed_latency_within_thread(u->sink,
-                                                FIXED_LATENCY_PLAYBACK_A2DP +
+                                                (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK ?
+                                                 FIXED_LATENCY_PLAYBACK_A2DP : FIXED_LATENCY_PLAYBACK_SCO) +
                                                 pa_bytes_to_usec(u->write_block_size, &u->sample_spec));
     }
 
     if (u->source)
         pa_source_set_fixed_latency_within_thread(u->source,
-                                                  FIXED_LATENCY_RECORD_A2DP +
+                                                  (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE ?
+                                                   FIXED_LATENCY_RECORD_A2DP : FIXED_LATENCY_RECORD_SCO) +
                                                   pa_bytes_to_usec(u->read_block_size, &u->sample_spec));
 }
 
@@ -739,6 +906,40 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
 }
 
 /* Run from main thread */
+static void source_set_volume_cb(pa_source *s) {
+    uint16_t gain;
+    pa_volume_t volume;
+    struct userdata *u;
+
+    pa_assert(s);
+    pa_assert(s->core);
+
+    u = s->userdata;
+
+    pa_assert(u);
+    pa_assert(u->source == s);
+    pa_assert(u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT);
+
+    if (u->transport->set_microphone_gain == NULL)
+      return;
+
+    gain = (pa_cvolume_max(&s->real_volume) * HSP_MAX_GAIN) / PA_VOLUME_NORM;
+
+    if (gain > HSP_MAX_GAIN)
+        gain = HSP_MAX_GAIN;
+
+    volume = (pa_volume_t) (gain * PA_VOLUME_NORM / HSP_MAX_GAIN);
+
+    /* increment volume by one to correct rounding errors */
+    if (volume < PA_VOLUME_NORM)
+        volume++;
+
+    pa_cvolume_set(&s->real_volume, u->sample_spec.channels, volume);
+
+    u->transport->set_microphone_gain(u->transport, gain);
+}
+
+/* Run from main thread */
 static int add_source(struct userdata *u) {
     pa_source_new_data data;
 
@@ -752,15 +953,19 @@ static int add_source(struct userdata *u) {
     data.namereg_fail = false;
     pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile));
     pa_source_new_data_set_sample_spec(&data, &u->sample_spec);
+    if (u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT)
+        pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone");
 
     connect_ports(u, &data, PA_DIRECTION_INPUT);
 
     if (!u->transport_acquired)
         switch (u->profile) {
             case PA_BLUETOOTH_PROFILE_A2DP_SOURCE:
+            case PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY:
                 data.suspend_cause = PA_SUSPEND_USER;
                 break;
             case PA_BLUETOOTH_PROFILE_A2DP_SINK:
+            case PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT:
             case PA_BLUETOOTH_PROFILE_OFF:
                 pa_assert_not_reached();
                 break;
@@ -776,6 +981,10 @@ static int add_source(struct userdata *u) {
     u->source->userdata = u;
     u->source->parent.process_msg = source_process_msg;
 
+    if (u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT) {
+        pa_source_set_set_volume_callback(u->source, source_set_volume_cb);
+        u->source->n_volume_steps = 16;
+    }
     return 0;
 }
 
@@ -854,6 +1063,40 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
 }
 
 /* Run from main thread */
+static void sink_set_volume_cb(pa_sink *s) {
+    uint16_t gain;
+    pa_volume_t volume;
+    struct userdata *u;
+
+    pa_assert(s);
+    pa_assert(s->core);
+
+    u = s->userdata;
+
+    pa_assert(u);
+    pa_assert(u->sink == s);
+    pa_assert(u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT);
+
+    if (u->transport->set_speaker_gain == NULL)
+      return;
+
+    gain = (pa_cvolume_max(&s->real_volume) * HSP_MAX_GAIN) / PA_VOLUME_NORM;
+
+    if (gain > HSP_MAX_GAIN)
+        gain = HSP_MAX_GAIN;
+
+    volume = (pa_volume_t) (gain * PA_VOLUME_NORM / HSP_MAX_GAIN);
+
+    /* increment volume by one to correct rounding errors */
+    if (volume < PA_VOLUME_NORM)
+        volume++;
+
+    pa_cvolume_set(&s->real_volume, u->sample_spec.channels, volume);
+
+    u->transport->set_speaker_gain(u->transport, gain);
+}
+
+/* Run from main thread */
 static int add_sink(struct userdata *u) {
     pa_sink_new_data data;
 
@@ -867,14 +1110,20 @@ static int add_sink(struct userdata *u) {
     data.namereg_fail = false;
     pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile));
     pa_sink_new_data_set_sample_spec(&data, &u->sample_spec);
+    if (u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT)
+        pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone");
 
     connect_ports(u, &data, PA_DIRECTION_OUTPUT);
 
     if (!u->transport_acquired)
         switch (u->profile) {
+            case PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY:
+                data.suspend_cause = PA_SUSPEND_USER;
+                break;
             case PA_BLUETOOTH_PROFILE_A2DP_SINK:
                 /* Profile switch should have failed */
             case PA_BLUETOOTH_PROFILE_A2DP_SOURCE:
+            case PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT:
             case PA_BLUETOOTH_PROFILE_OFF:
                 pa_assert_not_reached();
                 break;
@@ -890,116 +1139,126 @@ static int add_sink(struct userdata *u) {
     u->sink->userdata = u;
     u->sink->parent.process_msg = sink_process_msg;
 
+    if (u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT) {
+        pa_sink_set_set_volume_callback(u->sink, sink_set_volume_cb);
+        u->sink->n_volume_steps = 16;
+    }
     return 0;
 }
 
 /* Run from main thread */
 static void transport_config(struct userdata *u) {
-    sbc_info_t *sbc_info = &u->sbc_info;
-    a2dp_sbc_t *config;
+    if (u->profile == PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT || u->profile == PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY) {
+        u->sample_spec.format = PA_SAMPLE_S16LE;
+        u->sample_spec.channels = 1;
+        u->sample_spec.rate = 8000;
+    } else {
+        sbc_info_t *sbc_info = &u->sbc_info;
+        a2dp_sbc_t *config;
 
-    pa_assert(u->transport);
+        pa_assert(u->transport);
 
-    u->sample_spec.format = PA_SAMPLE_S16LE;
-    config = (a2dp_sbc_t *) u->transport->config;
+        u->sample_spec.format = PA_SAMPLE_S16LE;
+        config = (a2dp_sbc_t *) u->transport->config;
 
-    if (sbc_info->sbc_initialized)
-        sbc_reinit(&sbc_info->sbc, 0);
-    else
-        sbc_init(&sbc_info->sbc, 0);
-    sbc_info->sbc_initialized = true;
+        if (sbc_info->sbc_initialized)
+            sbc_reinit(&sbc_info->sbc, 0);
+        else
+            sbc_init(&sbc_info->sbc, 0);
+        sbc_info->sbc_initialized = true;
 
-    switch (config->frequency) {
-        case SBC_SAMPLING_FREQ_16000:
-            sbc_info->sbc.frequency = SBC_FREQ_16000;
-            u->sample_spec.rate = 16000U;
-            break;
-        case SBC_SAMPLING_FREQ_32000:
-            sbc_info->sbc.frequency = SBC_FREQ_32000;
-            u->sample_spec.rate = 32000U;
-            break;
-        case SBC_SAMPLING_FREQ_44100:
-            sbc_info->sbc.frequency = SBC_FREQ_44100;
-            u->sample_spec.rate = 44100U;
-            break;
-        case SBC_SAMPLING_FREQ_48000:
-            sbc_info->sbc.frequency = SBC_FREQ_48000;
-            u->sample_spec.rate = 48000U;
-            break;
-        default:
-            pa_assert_not_reached();
-    }
+        switch (config->frequency) {
+            case SBC_SAMPLING_FREQ_16000:
+                sbc_info->sbc.frequency = SBC_FREQ_16000;
+                u->sample_spec.rate = 16000U;
+                break;
+            case SBC_SAMPLING_FREQ_32000:
+                sbc_info->sbc.frequency = SBC_FREQ_32000;
+                u->sample_spec.rate = 32000U;
+                break;
+            case SBC_SAMPLING_FREQ_44100:
+                sbc_info->sbc.frequency = SBC_FREQ_44100;
+                u->sample_spec.rate = 44100U;
+                break;
+            case SBC_SAMPLING_FREQ_48000:
+                sbc_info->sbc.frequency = SBC_FREQ_48000;
+                u->sample_spec.rate = 48000U;
+                break;
+            default:
+                pa_assert_not_reached();
+        }
 
-    switch (config->channel_mode) {
-        case SBC_CHANNEL_MODE_MONO:
-            sbc_info->sbc.mode = SBC_MODE_MONO;
-            u->sample_spec.channels = 1;
-            break;
-        case SBC_CHANNEL_MODE_DUAL_CHANNEL:
-            sbc_info->sbc.mode = SBC_MODE_DUAL_CHANNEL;
-            u->sample_spec.channels = 2;
-            break;
-        case SBC_CHANNEL_MODE_STEREO:
-            sbc_info->sbc.mode = SBC_MODE_STEREO;
-            u->sample_spec.channels = 2;
-            break;
-        case SBC_CHANNEL_MODE_JOINT_STEREO:
-            sbc_info->sbc.mode = SBC_MODE_JOINT_STEREO;
-            u->sample_spec.channels = 2;
-            break;
-        default:
-            pa_assert_not_reached();
-    }
+        switch (config->channel_mode) {
+            case SBC_CHANNEL_MODE_MONO:
+                sbc_info->sbc.mode = SBC_MODE_MONO;
+                u->sample_spec.channels = 1;
+                break;
+            case SBC_CHANNEL_MODE_DUAL_CHANNEL:
+                sbc_info->sbc.mode = SBC_MODE_DUAL_CHANNEL;
+                u->sample_spec.channels = 2;
+                break;
+            case SBC_CHANNEL_MODE_STEREO:
+                sbc_info->sbc.mode = SBC_MODE_STEREO;
+                u->sample_spec.channels = 2;
+                break;
+            case SBC_CHANNEL_MODE_JOINT_STEREO:
+                sbc_info->sbc.mode = SBC_MODE_JOINT_STEREO;
+                u->sample_spec.channels = 2;
+                break;
+            default:
+                pa_assert_not_reached();
+        }
 
-    switch (config->allocation_method) {
-        case SBC_ALLOCATION_SNR:
-            sbc_info->sbc.allocation = SBC_AM_SNR;
-            break;
-        case SBC_ALLOCATION_LOUDNESS:
-            sbc_info->sbc.allocation = SBC_AM_LOUDNESS;
-            break;
-        default:
-            pa_assert_not_reached();
-    }
+        switch (config->allocation_method) {
+            case SBC_ALLOCATION_SNR:
+                sbc_info->sbc.allocation = SBC_AM_SNR;
+                break;
+            case SBC_ALLOCATION_LOUDNESS:
+                sbc_info->sbc.allocation = SBC_AM_LOUDNESS;
+                break;
+            default:
+                pa_assert_not_reached();
+        }
 
-    switch (config->subbands) {
-        case SBC_SUBBANDS_4:
-            sbc_info->sbc.subbands = SBC_SB_4;
-            break;
-        case SBC_SUBBANDS_8:
-            sbc_info->sbc.subbands = SBC_SB_8;
-            break;
-        default:
-            pa_assert_not_reached();
-    }
+        switch (config->subbands) {
+            case SBC_SUBBANDS_4:
+                sbc_info->sbc.subbands = SBC_SB_4;
+                break;
+            case SBC_SUBBANDS_8:
+                sbc_info->sbc.subbands = SBC_SB_8;
+                break;
+            default:
+                pa_assert_not_reached();
+        }
 
-    switch (config->block_length) {
-        case SBC_BLOCK_LENGTH_4:
-            sbc_info->sbc.blocks = SBC_BLK_4;
-            break;
-        case SBC_BLOCK_LENGTH_8:
-            sbc_info->sbc.blocks = SBC_BLK_8;
-            break;
-        case SBC_BLOCK_LENGTH_12:
-            sbc_info->sbc.blocks = SBC_BLK_12;
-            break;
-        case SBC_BLOCK_LENGTH_16:
-            sbc_info->sbc.blocks = SBC_BLK_16;
-            break;
-        default:
-            pa_assert_not_reached();
-    }
+        switch (config->block_length) {
+            case SBC_BLOCK_LENGTH_4:
+                sbc_info->sbc.blocks = SBC_BLK_4;
+                break;
+            case SBC_BLOCK_LENGTH_8:
+                sbc_info->sbc.blocks = SBC_BLK_8;
+                break;
+            case SBC_BLOCK_LENGTH_12:
+                sbc_info->sbc.blocks = SBC_BLK_12;
+                break;
+            case SBC_BLOCK_LENGTH_16:
+                sbc_info->sbc.blocks = SBC_BLK_16;
+                break;
+            default:
+                pa_assert_not_reached();
+        }
 
-    sbc_info->min_bitpool = config->min_bitpool;
-    sbc_info->max_bitpool = config->max_bitpool;
+        sbc_info->min_bitpool = config->min_bitpool;
+        sbc_info->max_bitpool = config->max_bitpool;
 
-    /* Set minimum bitpool for source to get the maximum possible block_size */
-    sbc_info->sbc.bitpool = u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK ? sbc_info->max_bitpool : sbc_info->min_bitpool;
-    sbc_info->codesize = sbc_get_codesize(&sbc_info->sbc);
-    sbc_info->frame_length = sbc_get_frame_length(&sbc_info->sbc);
+        /* Set minimum bitpool for source to get the maximum possible block_size */
+        sbc_info->sbc.bitpool = u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK ? sbc_info->max_bitpool : sbc_info->min_bitpool;
+        sbc_info->codesize = sbc_get_codesize(&sbc_info->sbc);
+        sbc_info->frame_length = sbc_get_frame_length(&sbc_info->sbc);
 
-    pa_log_info("SBC parameters: allocation=%u, subbands=%u, blocks=%u, bitpool=%u",
-                sbc_info->sbc.allocation, sbc_info->sbc.subbands, sbc_info->sbc.blocks, sbc_info->sbc.bitpool);
+        pa_log_info("SBC parameters: allocation=%u, subbands=%u, blocks=%u, bitpool=%u",
+                    sbc_info->sbc.allocation, sbc_info->sbc.subbands, sbc_info->sbc.blocks, sbc_info->sbc.bitpool);
+    }
 }
 
 /* Run from main thread */
@@ -1019,7 +1278,7 @@ static int setup_transport(struct userdata *u) {
 
     u->transport = t;
 
-    if (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE)
+    if (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE || u->profile == PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY)
         transport_acquire(u, true); /* In case of error, the sink/sources will be created suspended */
     else if (transport_acquire(u, false) < 0)
         return -1; /* We need to fail here until the interactions with module-suspend-on-idle and alike get improved */
@@ -1030,6 +1289,19 @@ static int setup_transport(struct userdata *u) {
 }
 
 /* Run from main thread */
+static pa_direction_t get_profile_direction(pa_bluetooth_profile_t p) {
+    static const pa_direction_t profile_direction[] = {
+        [PA_BLUETOOTH_PROFILE_A2DP_SINK] = PA_DIRECTION_OUTPUT,
+        [PA_BLUETOOTH_PROFILE_A2DP_SOURCE] = PA_DIRECTION_INPUT,
+        [PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT] = PA_DIRECTION_INPUT | PA_DIRECTION_OUTPUT,
+        [PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY] = PA_DIRECTION_INPUT | PA_DIRECTION_OUTPUT,
+        [PA_BLUETOOTH_PROFILE_OFF] = 0
+    };
+
+    return profile_direction[p];
+}
+
+/* Run from main thread */
 static int init_profile(struct userdata *u) {
     int r = 0;
     pa_assert(u);
@@ -1040,11 +1312,11 @@ static int init_profile(struct userdata *u) {
 
     pa_assert(u->transport);
 
-    if (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK)
+    if (get_profile_direction (u->profile) & PA_DIRECTION_OUTPUT)
         if (add_sink(u) < 0)
             r = -1;
 
-    if (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE)
+    if (get_profile_direction (u->profile) & PA_DIRECTION_INPUT)
         if (add_source(u) < 0)
             r = -1;
 
@@ -1079,6 +1351,24 @@ static void thread_func(void *userdata) {
 
         pollfd = u->rtpoll_item ? pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL) : NULL;
 
+        if (pollfd && (pollfd->revents & ~(POLLOUT|POLLIN))) {
+            pa_log_info("FD error: %s%s%s%s",
+                        pollfd->revents & POLLERR ? "POLLERR " :"",
+                        pollfd->revents & POLLHUP ? "POLLHUP " :"",
+                        pollfd->revents & POLLPRI ? "POLLPRI " :"",
+                        pollfd->revents & POLLNVAL ? "POLLNVAL " :"");
+
+            if (pollfd->revents & POLLHUP) {
+                pollfd = NULL;
+                teardown_stream(u);
+                do_write = 0;
+                pending_read_bytes = 0;
+                writable = false;
+                pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(u->msg), BLUETOOTH_MESSAGE_STREAM_FD_HUP, NULL, 0, NULL, NULL);
+            } else
+                goto fail;
+        }
+
         if (u->source && PA_SOURCE_IS_LINKED(u->source->thread_info.state)) {
 
             /* We should send two blocks to the device before we expect
@@ -1090,15 +1380,20 @@ static void thread_func(void *userdata) {
             if (pollfd && (pollfd->revents & POLLIN)) {
                 int n_read;
 
-                n_read = a2dp_process_push(u);
+                if (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE)
+                    n_read = a2dp_process_push(u);
+                else
+                    n_read = sco_process_push(u);
 
                 if (n_read < 0)
-                    goto io_fail;
+                    goto fail;
 
-                /* We just read something, so we are supposed to write something, too */
-                pending_read_bytes += n_read;
-                do_write += pending_read_bytes / u->write_block_size;
-                pending_read_bytes = pending_read_bytes % u->write_block_size;
+                if (n_read > 0) {
+                    /* We just read something, so we are supposed to write something, too */
+                    pending_read_bytes += n_read;
+                    do_write += pending_read_bytes / u->write_block_size;
+                    pending_read_bytes = pending_read_bytes % u->write_block_size;
+                }
             }
         }
 
@@ -1159,8 +1454,13 @@ static void thread_func(void *userdata) {
                     if (u->write_index <= 0)
                         u->started_at = pa_rtclock_now();
 
-                    if ((n_written = a2dp_process_render(u)) < 0)
-                        goto io_fail;
+                    if (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK) {
+                        if ((n_written = a2dp_process_render(u)) < 0)
+                            goto fail;
+                    } else {
+                        if ((n_written = sco_process_render(u)) < 0)
+                            goto fail;
+                    }
 
                     if (n_written == 0)
                         pa_log("Broken kernel: we got EAGAIN on write() after POLLOUT!");
@@ -1198,7 +1498,7 @@ static void thread_func(void *userdata) {
             pollfd->events = (short) (((u->sink && PA_SINK_IS_LINKED(u->sink->thread_info.state) && !writable) ? POLLOUT : 0) |
                                       (u->source && PA_SOURCE_IS_LINKED(u->source->thread_info.state) ? POLLIN : 0));
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0) {
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0) {
             pa_log_debug("pa_rtpoll_run failed with: %d", ret);
             goto fail;
         }
@@ -1207,30 +1507,6 @@ static void thread_func(void *userdata) {
             transport_release(u);
             goto finish;
         }
-
-        pollfd = u->rtpoll_item ? pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL) : NULL;
-
-        if (pollfd && (pollfd->revents & ~(POLLOUT|POLLIN))) {
-            pa_log_info("FD error: %s%s%s%s",
-                        pollfd->revents & POLLERR ? "POLLERR " :"",
-                        pollfd->revents & POLLHUP ? "POLLHUP " :"",
-                        pollfd->revents & POLLPRI ? "POLLPRI " :"",
-                        pollfd->revents & POLLNVAL ? "POLLNVAL " :"");
-            goto io_fail;
-        }
-
-        continue;
-
-io_fail:
-        /* In case of HUP, just tear down the streams */
-        if (!pollfd || (pollfd->revents & POLLHUP) == 0)
-            goto fail;
-
-        do_write = 0;
-        pending_read_bytes = 0;
-        writable = false;
-
-        teardown_stream(u);
     }
 
 fail:
@@ -1360,17 +1636,6 @@ static char *cleanup_name(const char *name) {
 }
 
 /* Run from main thread */
-static pa_direction_t get_profile_direction(pa_bluetooth_profile_t p) {
-    static const pa_direction_t profile_direction[] = {
-        [PA_BLUETOOTH_PROFILE_A2DP_SINK] = PA_DIRECTION_OUTPUT,
-        [PA_BLUETOOTH_PROFILE_A2DP_SOURCE] = PA_DIRECTION_INPUT,
-        [PA_BLUETOOTH_PROFILE_OFF] = 0
-    };
-
-    return profile_direction[p];
-}
-
-/* Run from main thread */
 static pa_available_t get_port_availability(struct userdata *u, pa_direction_t direction) {
     pa_available_t result = PA_AVAILABLE_NO;
     unsigned i;
@@ -1520,9 +1785,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
     pa_assert_se(output_port = pa_hashmap_get(ports, u->output_port_name));
 
     if (pa_streq(uuid, PA_BLUETOOTH_UUID_A2DP_SINK)) {
-	/* TODO: Change this profile's name to a2dp_sink, to reflect the remote
-         * device's role and be consistent with the a2dp source profile */
-        cp = pa_card_profile_new("a2dp", _("High Fidelity Playback (A2DP Sink)"), sizeof(pa_bluetooth_profile_t));
+        cp = pa_card_profile_new("a2dp_sink", _("High Fidelity Playback (A2DP Sink)"), sizeof(pa_bluetooth_profile_t));
         cp->priority = 10;
         cp->n_sinks = 1;
         cp->n_sources = 0;
@@ -1543,10 +1806,38 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
 
         p = PA_CARD_PROFILE_DATA(cp);
         *p = PA_BLUETOOTH_PROFILE_A2DP_SOURCE;
+    } else if (pa_streq(uuid, PA_BLUETOOTH_UUID_HSP_HS) || pa_streq(uuid, PA_BLUETOOTH_UUID_HFP_HF)) {
+        cp = pa_card_profile_new("headset_head_unit", _("Headset Head Unit (HSP/HFP)"), sizeof(pa_bluetooth_profile_t));
+        cp->priority = 20;
+        cp->n_sinks = 1;
+        cp->n_sources = 1;
+        cp->max_sink_channels = 1;
+        cp->max_source_channels = 1;
+        pa_hashmap_put(input_port->profiles, cp->name, cp);
+        pa_hashmap_put(output_port->profiles, cp->name, cp);
+
+        p = PA_CARD_PROFILE_DATA(cp);
+        *p = PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT;
+    } else if (pa_streq(uuid, PA_BLUETOOTH_UUID_HSP_AG) || pa_streq(uuid, PA_BLUETOOTH_UUID_HFP_AG)) {
+        cp = pa_card_profile_new("headset_audio_gateway", _("Headset Audio Gateway (HSP/HFP)"), sizeof(pa_bluetooth_profile_t));
+        cp->priority = 20;
+        cp->n_sinks = 1;
+        cp->n_sources = 1;
+        cp->max_sink_channels = 1;
+        cp->max_source_channels = 1;
+        pa_hashmap_put(input_port->profiles, cp->name, cp);
+        pa_hashmap_put(output_port->profiles, cp->name, cp);
+
+        p = PA_CARD_PROFILE_DATA(cp);
+        *p = PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY;
     }
 
-    if (cp && u->device->transports[*p])
-        cp->available = transport_state_to_availability(u->device->transports[*p]->state);
+    if (cp) {
+        if (u->device->transports[*p])
+            cp->available = transport_state_to_availability(u->device->transports[*p]->state);
+        else
+            cp->available = PA_AVAILABLE_NO;
+    }
 
     return cp;
 }
@@ -1680,10 +1971,8 @@ static void handle_transport_state_change(struct userdata *u, struct pa_bluetoot
 
     pa_assert(u);
     pa_assert(t);
+    pa_assert_se(cp = pa_hashmap_get(u->card->profiles, pa_bluetooth_profile_to_string(t->profile)));
 
-    /* Update profile availability */
-    if (!(cp = pa_hashmap_get(u->card->profiles, pa_bluetooth_profile_to_string(t->profile))))
-        return;
     pa_card_profile_set_available(cp, transport_state_to_availability(t->state));
 
     /* Update port availability */
@@ -1765,17 +2054,69 @@ static pa_hook_result_t transport_state_changed_cb(pa_bluetooth_discovery *y, pa
     return PA_HOOK_OK;
 }
 
+static pa_hook_result_t transport_speaker_gain_changed_cb(pa_bluetooth_discovery *y, pa_bluetooth_transport *t, struct userdata *u) {
+    pa_volume_t volume;
+    pa_cvolume v;
+    uint16_t gain;
+
+    pa_assert(t);
+    pa_assert(u);
+
+    if (t != u->transport)
+      return PA_HOOK_OK;
+
+    gain = t->speaker_gain;
+    volume = (pa_volume_t) (gain * PA_VOLUME_NORM / HSP_MAX_GAIN);
+
+    /* increment volume by one to correct rounding errors */
+    if (volume < PA_VOLUME_NORM)
+        volume++;
+
+    pa_cvolume_set(&v, u->sample_spec.channels, volume);
+    pa_sink_volume_changed(u->sink, &v);
+
+    return PA_HOOK_OK;
+}
+
+static pa_hook_result_t transport_microphone_gain_changed_cb(pa_bluetooth_discovery *y, pa_bluetooth_transport *t, struct userdata *u) {
+    pa_volume_t volume;
+    pa_cvolume v;
+    uint16_t gain;
+
+    pa_assert(t);
+    pa_assert(u);
+
+    if (t != u->transport)
+      return PA_HOOK_OK;
+
+    gain = t->microphone_gain;
+    volume = (pa_volume_t) (gain * PA_VOLUME_NORM / HSP_MAX_GAIN);
+
+    /* increment volume by one to correct rounding errors */
+    if (volume < PA_VOLUME_NORM)
+        volume++;
+
+    pa_cvolume_set(&v, u->sample_spec.channels, volume);
+    pa_source_volume_changed(u->source, &v);
+
+    return PA_HOOK_OK;
+}
+
 /* Run from main thread context */
 static int device_process_msg(pa_msgobject *obj, int code, void *data, int64_t offset, pa_memchunk *chunk) {
-    struct bluetooth_msg *u = BLUETOOTH_MSG(obj);
+    struct bluetooth_msg *m = BLUETOOTH_MSG(obj);
+    struct userdata *u = m->card->userdata;
 
     switch (code) {
         case BLUETOOTH_MESSAGE_IO_THREAD_FAILED:
-            if (u->card->module->unload_requested)
+            if (m->card->module->unload_requested)
                 break;
 
             pa_log_debug("Switching the profile to off due to IO thread failure.");
-            pa_assert_se(pa_card_set_profile(u->card, pa_hashmap_get(u->card->profiles, "off"), false) >= 0);
+            pa_assert_se(pa_card_set_profile(m->card, pa_hashmap_get(m->card->profiles, "off"), false) >= 0);
+            break;
+        case BLUETOOTH_MESSAGE_STREAM_FD_HUP:
+            pa_bluetooth_transport_set_state(u->transport, PA_BLUETOOTH_TRANSPORT_STATE_IDLE);
             break;
     }
 
@@ -1825,6 +2166,13 @@ int pa__init(pa_module* m) {
         pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery, PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED),
                         PA_HOOK_NORMAL, (pa_hook_cb_t) transport_state_changed_cb, u);
 
+    u->transport_speaker_gain_changed_slot =
+        pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery, PA_BLUETOOTH_HOOK_TRANSPORT_SPEAKER_GAIN_CHANGED), PA_HOOK_NORMAL, (pa_hook_cb_t) transport_speaker_gain_changed_cb, u);
+
+    u->transport_microphone_gain_changed_slot =
+        pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery, PA_BLUETOOTH_HOOK_TRANSPORT_MICROPHONE_GAIN_CHANGED), PA_HOOK_NORMAL, (pa_hook_cb_t) transport_microphone_gain_changed_cb, u);
+
+
     if (add_card(u) < 0)
         goto fail;
 
@@ -1877,6 +2225,12 @@ void pa__done(pa_module *m) {
     if (u->transport_state_changed_slot)
         pa_hook_slot_free(u->transport_state_changed_slot);
 
+    if (u->transport_speaker_gain_changed_slot)
+        pa_hook_slot_free(u->transport_speaker_gain_changed_slot);
+
+    if (u->transport_microphone_gain_changed_slot)
+        pa_hook_slot_free(u->transport_microphone_gain_changed_slot);
+
     if (u->sbc_info.buffer)
         pa_xfree(u->sbc_info.buffer);
 
diff --git a/src/modules/bluetooth/module-bluez5-discover.c b/src/modules/bluetooth/module-bluez5-discover.c
index 0b7bf49..570cdba 100644
--- a/src/modules/bluetooth/module-bluez5-discover.c
+++ b/src/modules/bluetooth/module-bluez5-discover.c
@@ -27,6 +27,7 @@
 #include <pulsecore/core-util.h>
 #include <pulsecore/macro.h>
 #include <pulsecore/module.h>
+#include <pulsecore/modargs.h>
 #include <pulsecore/shared.h>
 
 #include "bluez5-util.h"
@@ -37,6 +38,14 @@ PA_MODULE_AUTHOR("João Paulo Rechi Vita");
 PA_MODULE_DESCRIPTION("Detect available BlueZ 5 Bluetooth audio devices and load BlueZ 5 Bluetooth audio drivers");
 PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_LOAD_ONCE(true);
+PA_MODULE_USAGE(
+    "headset=ofono|native|auto"
+);
+
+static const char* const valid_modargs[] = {
+    "headset",
+    NULL
+};
 
 struct userdata {
     pa_module *module;
@@ -83,26 +92,54 @@ static pa_hook_result_t device_connection_changed_cb(pa_bluetooth_discovery *y,
     return PA_HOOK_OK;
 }
 
+#ifdef HAVE_BLUEZ_5_NATIVE_HEADSET
+const char *default_headset_backend = "native";
+#else
+const char *default_headset_backend = "ofono";
+#endif
+
 int pa__init(pa_module *m) {
     struct userdata *u;
+    pa_modargs *ma;
+    const char *headset_str;
+    int headset_backend;
 
     pa_assert(m);
 
+    if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
+        pa_log("failed to parse module arguments.");
+        goto fail;
+    }
+
+    pa_assert_se(headset_str = pa_modargs_get_value(ma, "headset", default_headset_backend));
+    if (pa_streq(headset_str, "ofono"))
+        headset_backend = HEADSET_BACKEND_OFONO;
+    else if (pa_streq(headset_str, "native"))
+        headset_backend = HEADSET_BACKEND_NATIVE;
+    else if (pa_streq(headset_str, "auto"))
+        headset_backend = HEADSET_BACKEND_AUTO;
+    else {
+        pa_log("headset parameter must be either ofono, native or auto (found %s)", headset_str);
+        goto fail;
+    }
+
     m->userdata = u = pa_xnew0(struct userdata, 1);
     u->module = m;
     u->core = m->core;
     u->loaded_device_paths = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
 
-    if (!(u->discovery = pa_bluetooth_discovery_get(u->core)))
+    if (!(u->discovery = pa_bluetooth_discovery_get(u->core, headset_backend)))
         goto fail;
 
     u->device_connection_changed_slot =
         pa_hook_connect(pa_bluetooth_discovery_hook(u->discovery, PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED),
                         PA_HOOK_NORMAL, (pa_hook_cb_t) device_connection_changed_cb, u);
 
+    pa_modargs_free(ma);
     return 0;
 
 fail:
+    pa_modargs_free(ma);
     pa__done(m);
     return -1;
 }
diff --git a/src/modules/dbus/iface-core.c b/src/modules/dbus/iface-core.c
index c7853cc..90f862e 100644
--- a/src/modules/dbus/iface-core.c
+++ b/src/modules/dbus/iface-core.c
@@ -544,8 +544,7 @@ static void handle_set_default_sample_rate(DBusConnection *conn, DBusMessage *ms
 
     dbus_message_iter_get_basic(iter, &default_sample_rate);
 
-    if (!pa_sample_rate_valid(default_sample_rate) ||
-        !((default_sample_rate % 4000 == 0) || (default_sample_rate % 11025 == 0)))  {
+    if (!pa_sample_rate_valid(default_sample_rate)) {
         pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "Invalid sample rate.");
         return;
     }
@@ -579,8 +578,7 @@ static void handle_set_alternate_sample_rate(DBusConnection *conn, DBusMessage *
 
     dbus_message_iter_get_basic(iter, &alternate_sample_rate);
 
-    if (!pa_sample_rate_valid(alternate_sample_rate) ||
-        !((alternate_sample_rate % 4000 == 0) || (alternate_sample_rate % 11025 == 0))) {
+    if (!pa_sample_rate_valid(alternate_sample_rate)) {
         pa_dbus_send_error(conn, msg, DBUS_ERROR_INVALID_ARGS, "Invalid sample rate.");
         return;
     }
diff --git a/src/modules/dbus/iface-device.c b/src/modules/dbus/iface-device.c
index 34b370b..4469b78 100644
--- a/src/modules/dbus/iface-device.c
+++ b/src/modules/dbus/iface-device.c
@@ -725,7 +725,9 @@ static void handle_get_active_port(DBusConnection *conn, DBusMessage *msg, void
 static void handle_set_active_port(DBusConnection *conn, DBusMessage *msg, DBusMessageIter *iter, void *userdata) {
     pa_dbusiface_device *d = userdata;
     const char *new_active_path;
-    pa_dbusiface_device_port *new_active;
+    pa_dbusiface_device_port *port;
+    void *state;
+    pa_dbusiface_device_port *new_active = NULL;
     int r;
 
     pa_assert(conn);
@@ -747,7 +749,14 @@ static void handle_set_active_port(DBusConnection *conn, DBusMessage *msg, DBusM
 
     dbus_message_iter_get_basic(iter, &new_active_path);
 
-    if (!(new_active = pa_hashmap_get(d->ports, new_active_path))) {
+    PA_HASHMAP_FOREACH(port, d->ports, state) {
+        if (pa_streq(pa_dbusiface_device_port_get_path(port), new_active_path)) {
+            new_active = port;
+            break;
+        }
+    }
+
+    if (!new_active) {
         pa_dbus_send_error(conn, msg, PA_DBUS_ERROR_NOT_FOUND, "No such port: %s", new_active_path);
         return;
     }
@@ -1248,7 +1257,7 @@ pa_dbusiface_device *pa_dbusiface_device_new_source(pa_dbusiface_core *core, pa_
     d->volume = *pa_source_get_volume(source, false);
     d->mute = pa_source_get_mute(source, false);
     d->source_state = pa_source_get_state(source);
-    d->ports = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
+    d->ports = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL, (pa_free_cb_t) pa_dbusiface_device_port_free);
     d->next_port_index = 0;
     d->active_port = source->active_port;
     d->proplist = pa_proplist_copy(source->proplist);
diff --git a/src/modules/dbus/iface-stream.c b/src/modules/dbus/iface-stream.c
index 1cff95e..4cbcd74 100644
--- a/src/modules/dbus/iface-stream.c
+++ b/src/modules/dbus/iface-stream.c
@@ -765,7 +765,7 @@ static void subscription_cb(pa_core *c, pa_subscription_event_type_t t, uint32_t
             }
         }
 
-        new_mute = pa_sink_input_get_mute(s->sink_input);
+        new_mute = s->sink_input->muted;
 
         if (s->mute != new_mute) {
             s->mute = new_mute;
@@ -861,7 +861,7 @@ pa_dbusiface_stream *pa_dbusiface_stream_new_playback(pa_dbusiface_core *core, p
     else
         pa_cvolume_init(&s->volume);
 
-    s->mute = pa_sink_input_get_mute(sink_input);
+    s->mute = sink_input->muted;
     s->proplist = pa_proplist_copy(sink_input->proplist);
     s->dbus_protocol = pa_dbus_protocol_get(sink_input->core);
     s->subscription = pa_subscription_new(sink_input->core, PA_SUBSCRIPTION_MASK_SINK_INPUT, subscription_cb, s);
diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index fbdb3b3..eed4830 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -168,7 +168,7 @@ static const pa_echo_canceller ec_table[] = {
  *    capture and playback samples, we perform a resync. This adjusts the
  *    position in the playback memblock to the requested sample. Quick
  *    adjustments include moving the playback samples before the capture
- *    samples (because else the echo canceler does not work) or when the
+ *    samples (because else the echo canceller does not work) or when the
  *    playback pointer drifts too far away.
  *
  * 2) periodically check the difference between capture and playback. We use a
@@ -224,7 +224,7 @@ struct userdata {
     pa_source *source;
     bool source_auto_desc;
     pa_source_output *source_output;
-    pa_memblockq *source_memblockq; /* echo canceler needs fixed sized chunks */
+    pa_memblockq *source_memblockq; /* echo canceller needs fixed sized chunks */
     size_t source_skip;
 
     pa_sink *sink;
@@ -362,7 +362,7 @@ static void time_callback(pa_mainloop_api *a, pa_time_event *e, const struct tim
 
     if (diff_time < 0) {
         /* recording before playback, we need to adjust quickly. The echo
-         * canceler does not work in this case. */
+         * canceller does not work in this case. */
         pa_asyncmsgq_post(u->asyncmsgq, PA_MSGOBJECT(u->source_output), SOURCE_OUTPUT_MESSAGE_APPLY_DIFF_TIME,
             NULL, diff_time, NULL, NULL);
         /*new_rate = base_rate - ((pa_usec_to_bytes(-diff_time, &u->source_output->sample_spec) / fs) * PA_USEC_PER_SEC) / u->adjust_time;*/
@@ -475,7 +475,7 @@ static int source_set_state_cb(pa_source *s, pa_source_state_t state) {
 
     if (state == PA_SOURCE_RUNNING) {
         /* restart timer when both sink and source are active */
-        if (IS_ACTIVE(u) && u->adjust_time)
+        if ((pa_sink_get_state(u->sink) == PA_SINK_RUNNING) && u->adjust_time)
             pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
 
         pa_atomic_store(&u->request_resync, 1);
@@ -500,7 +500,7 @@ static int sink_set_state_cb(pa_sink *s, pa_sink_state_t state) {
 
     if (state == PA_SINK_RUNNING) {
         /* restart timer when both sink and source are active */
-        if (IS_ACTIVE(u) && u->adjust_time)
+        if ((pa_source_get_state(u->source) == PA_SOURCE_RUNNING) && u->adjust_time)
             pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now() + u->adjust_time);
 
         pa_atomic_store(&u->request_resync, 1);
@@ -646,20 +646,6 @@ static void sink_set_mute_cb(pa_sink *s) {
     pa_sink_input_set_mute(u->sink_input, s->muted, s->save_muted);
 }
 
-/* Called from main context */
-static void source_get_mute_cb(pa_source *s) {
-    struct userdata *u;
-
-    pa_source_assert_ref(s);
-    pa_assert_se(u = s->userdata);
-
-    if (!PA_SOURCE_IS_LINKED(pa_source_get_state(s)) ||
-        !PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
-        return;
-
-    pa_source_output_get_mute(u->source_output);
-}
-
 /* Called from source I/O thread context. */
 static void apply_diff_time(struct userdata *u, int64_t diff_time) {
     int64_t diff;
@@ -1573,14 +1559,14 @@ uint32_t pa_echo_canceller_blocksize_power2(unsigned rate, unsigned ms) {
     unsigned nframes = (rate * ms) / 1000;
     uint32_t y = 1 << ((8 * sizeof(uint32_t)) - 2);
 
-    assert(rate >= 4000);
-    assert(ms >= 1);
+    pa_assert(rate >= 4000);
+    pa_assert(ms >= 1);
 
     /* nframes should be a power of 2, round down to nearest power of two */
     while (y > nframes)
         y >>= 1;
 
-    assert(y >= 1);
+    pa_assert(y >= 1);
     return y;
 }
 
@@ -1810,7 +1796,6 @@ int pa__init(pa_module*m) {
     u->source->parent.process_msg = source_process_msg_cb;
     u->source->set_state = source_set_state_cb;
     u->source->update_requested_latency = source_update_requested_latency_cb;
-    pa_source_set_get_mute_callback(u->source, source_get_mute_cb);
     pa_source_set_set_mute_callback(u->source, source_set_mute_cb);
     if (!u->use_volume_sharing) {
         pa_source_set_get_volume_callback(u->source, source_get_volume_cb);
diff --git a/src/modules/gconf/gconf-helper.c b/src/modules/gconf/gconf-helper.c
index fbd8cfd..3c1180c 100644
--- a/src/modules/gconf/gconf-helper.c
+++ b/src/modules/gconf/gconf-helper.c
@@ -99,7 +99,9 @@ int main(int argc, char *argv[]) {
     GConfClient *client;
     GSList *modules, *m;
 
+#if !GLIB_CHECK_VERSION(2,36,0)
     g_type_init();
+#endif
 
     if (!(client = gconf_client_get_default()))
         goto fail;
diff --git a/src/modules/gconf/module-gconf.c b/src/modules/gconf/module-gconf.c
index dee15af..d791b00 100644
--- a/src/modules/gconf/module-gconf.c
+++ b/src/modules/gconf/module-gconf.c
@@ -284,16 +284,11 @@ static int handle_event(struct userdata *u) {
 
             case '-': {
                 char *name;
-                struct module_info *m;
 
                 if (!(name = read_string(u)))
                     goto fail;
 
-                if ((m = pa_hashmap_get(u->module_infos, name))) {
-                    pa_hashmap_remove(u->module_infos, name);
-                    module_info_free(m);
-                }
-
+                pa_hashmap_remove_and_free(u->module_infos, name);
                 pa_xfree(name);
 
                 break;
diff --git a/src/modules/jack/module-jack-sink.c b/src/modules/jack/module-jack-sink.c
index ab97758..3c8e201 100644
--- a/src/modules/jack/module-jack-sink.c
+++ b/src/modules/jack/module-jack-sink.c
@@ -60,7 +60,7 @@
 
 PA_MODULE_AUTHOR("Lennart Poettering");
 PA_MODULE_DESCRIPTION("JACK Sink");
-PA_MODULE_LOAD_ONCE(true);
+PA_MODULE_LOAD_ONCE(false);
 PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_USAGE(
         "sink_name=<name for the sink> "
@@ -232,7 +232,7 @@ static void thread_func(void *userdata) {
         if (PA_UNLIKELY(u->sink->thread_info.rewind_requested))
             pa_sink_process_rewind(u->sink, 0);
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/modules/jack/module-jack-source.c b/src/modules/jack/module-jack-source.c
index 5d9668b..1352d43 100644
--- a/src/modules/jack/module-jack-source.c
+++ b/src/modules/jack/module-jack-source.c
@@ -51,7 +51,7 @@
 PA_MODULE_AUTHOR("Lennart Poettering");
 PA_MODULE_DESCRIPTION("JACK Source");
 PA_MODULE_VERSION(PACKAGE_VERSION);
-PA_MODULE_LOAD_ONCE(true);
+PA_MODULE_LOAD_ONCE(false);
 PA_MODULE_USAGE(
         "source_name=<name for the source> "
         "source_properties=<properties for the source> "
@@ -198,7 +198,7 @@ static void thread_func(void *userdata) {
     for (;;) {
         int ret;
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/modules/macosx/module-coreaudio-device.c b/src/modules/macosx/module-coreaudio-device.c
index 7b3a002..d100acd 100644
--- a/src/modules/macosx/module-coreaudio-device.c
+++ b/src/modules/macosx/module-coreaudio-device.c
@@ -678,7 +678,7 @@ static void thread_func(void *userdata) {
                 pa_sink_process_rewind(ca_sink->pa_sink, 0);
         }
 
-        ret = pa_rtpoll_run(u->rtpoll, true);
+        ret = pa_rtpoll_run(u->rtpoll);
 
         if (ret < 0)
             goto fail;
diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
index 5b02602..681acca 100644
--- a/src/modules/module-card-restore.c
+++ b/src/modules/module-card-restore.c
@@ -269,8 +269,10 @@ static struct entry* entry_read(struct userdata *u, const char *name) {
 
     pa_zero(data);
 
-    if (!pa_database_get(u->database, &key, &data))
-        goto fail;
+    if (!pa_database_get(u->database, &key, &data)) {
+        pa_log_debug("Database contains no data for key: %s", name);
+        return NULL;
+    }
 
     t = pa_tagstruct_new(data.data, data.size);
     e = entry_new();
diff --git a/src/modules/module-combine-sink.c b/src/modules/module-combine-sink.c
index deabceb..4ebbc3f 100644
--- a/src/modules/module-combine-sink.c
+++ b/src/modules/module-combine-sink.c
@@ -104,7 +104,8 @@ struct output {
 
     /* For communication of the stream parameters to the sink thread */
     pa_atomic_t max_request;
-    pa_atomic_t requested_latency;
+    pa_atomic_t max_latency;
+    pa_atomic_t min_latency;
 
     PA_LLIST_FIELDS(struct output);
 };
@@ -131,6 +132,8 @@ struct userdata {
     pa_resample_method_t resample_method;
 
     pa_usec_t block_usec;
+    pa_usec_t default_min_latency;
+    pa_usec_t default_max_latency;
 
     pa_idxset* outputs; /* managed in main context */
 
@@ -150,11 +153,12 @@ enum {
     SINK_MESSAGE_NEED,
     SINK_MESSAGE_UPDATE_LATENCY,
     SINK_MESSAGE_UPDATE_MAX_REQUEST,
-    SINK_MESSAGE_UPDATE_REQUESTED_LATENCY
+    SINK_MESSAGE_UPDATE_LATENCY_RANGE
 };
 
 enum {
     SINK_INPUT_MESSAGE_POST = PA_SINK_INPUT_MESSAGE_MAX,
+    SINK_INPUT_MESSAGE_SET_REQUESTED_LATENCY
 };
 
 static void output_disable(struct output *o);
@@ -331,7 +335,7 @@ static void thread_func(void *userdata) {
         }
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0) {
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0) {
             pa_log_info("pa_rtpoll_run() = %i", ret);
             goto fail;
         }
@@ -469,35 +473,44 @@ static void sink_input_update_max_request_cb(pa_sink_input *i, size_t nbytes) {
         return;
 
     pa_atomic_store(&o->max_request, (int) nbytes);
+    pa_log_debug("Sink input update max request %lu", (unsigned long) nbytes);
     pa_asyncmsgq_post(o->outq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_UPDATE_MAX_REQUEST, NULL, 0, NULL, NULL);
 }
 
 /* Called from thread context */
-static void sink_input_update_sink_requested_latency_cb(pa_sink_input *i) {
+static void sink_input_update_sink_latency_range_cb(pa_sink_input *i) {
     struct output *o;
-    pa_usec_t c;
+    pa_usec_t min, max, fix;
 
     pa_assert(i);
 
     pa_sink_input_assert_ref(i);
     pa_assert_se(o = i->userdata);
 
-    c = pa_sink_get_requested_latency_within_thread(i->sink);
-
-    if (c == (pa_usec_t) -1)
-        c = i->sink->thread_info.max_latency;
+    fix = i->sink->thread_info.fixed_latency;
+    if (fix > 0) {
+        min = fix;
+        max = fix;
+    } else {
+        min = i->sink->thread_info.min_latency;
+        max = i->sink->thread_info.max_latency;
+    }
 
-    if (pa_atomic_load(&o->requested_latency) == (int) c)
+    if ((pa_atomic_load(&o->min_latency) == (int) min) &&
+        (pa_atomic_load(&o->max_latency) == (int) max))
         return;
 
-    pa_atomic_store(&o->requested_latency, (int) c);
-    pa_asyncmsgq_post(o->outq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_UPDATE_REQUESTED_LATENCY, NULL, 0, NULL, NULL);
+    pa_atomic_store(&o->min_latency, (int) min);
+    pa_atomic_store(&o->max_latency, (int) max);
+    pa_log_debug("Sink input update latency range %lu %lu", (unsigned long) min, (unsigned long) max);
+    pa_asyncmsgq_post(o->outq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_UPDATE_LATENCY_RANGE, NULL, 0, NULL, NULL);
 }
 
 /* Called from I/O thread context */
 static void sink_input_attach_cb(pa_sink_input *i) {
     struct output *o;
-    pa_usec_t c;
+    pa_usec_t fix, min, max;
+    size_t nbytes;
 
     pa_sink_input_assert_ref(i);
     pa_assert_se(o = i->userdata);
@@ -517,13 +530,24 @@ static void sink_input_attach_cb(pa_sink_input *i) {
 
     pa_sink_input_request_rewind(i, 0, false, true, true);
 
-    pa_atomic_store(&o->max_request, (int) pa_sink_input_get_max_request(i));
+    nbytes = pa_sink_input_get_max_request(i);
+    pa_atomic_store(&o->max_request, (int) nbytes);
+    pa_log_debug("attach max request %lu", (unsigned long) nbytes);
 
-    c = pa_sink_get_requested_latency_within_thread(i->sink);
-    pa_atomic_store(&o->requested_latency, (int) (c == (pa_usec_t) -1 ? 0 : c));
+    fix = i->sink->thread_info.fixed_latency;
+    if (fix > 0) {
+        min = max = fix;
+    } else {
+        min = i->sink->thread_info.min_latency;
+        max = i->sink->thread_info.max_latency;
+    }
+    pa_atomic_store(&o->min_latency, (int) min);
+    pa_atomic_store(&o->max_latency, (int) max);
+    pa_log_debug("attach latency range %lu %lu", (unsigned long) min, (unsigned long) max);
 
-    pa_asyncmsgq_post(o->outq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_UPDATE_MAX_REQUEST, NULL, 0, NULL, NULL);
-    pa_asyncmsgq_post(o->outq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_UPDATE_REQUESTED_LATENCY, NULL, 0, NULL, NULL);
+    /* We register the output. That means that the sink will start to pass data to
+     * this output. */
+    pa_asyncmsgq_send(o->userdata->sink->asyncmsgq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_ADD_OUTPUT, o, 0, NULL);
 }
 
 /* Called from I/O thread context */
@@ -533,6 +557,10 @@ static void sink_input_detach_cb(pa_sink_input *i) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(o = i->userdata);
 
+    /* We unregister the output. That means that the sink doesn't
+     * pass any further data to this output */
+    pa_asyncmsgq_send(o->userdata->sink->asyncmsgq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_REMOVE_OUTPUT, o, 0, NULL);
+
     if (o->inq_rtpoll_item_read) {
         pa_rtpoll_item_free(o->inq_rtpoll_item_read);
         o->inq_rtpoll_item_read = NULL;
@@ -542,6 +570,7 @@ static void sink_input_detach_cb(pa_sink_input *i) {
         pa_rtpoll_item_free(o->outq_rtpoll_item_write);
         o->outq_rtpoll_item_write = NULL;
     }
+
 }
 
 /* Called from main context */
@@ -580,6 +609,14 @@ static int sink_input_process_msg(pa_msgobject *obj, int code, void *data, int64
                 pa_memblockq_flush_write(o->memblockq, true);
 
             return 0;
+
+        case SINK_INPUT_MESSAGE_SET_REQUESTED_LATENCY: {
+            pa_usec_t latency = (pa_usec_t) offset;
+
+            pa_sink_input_set_requested_latency_within_thread(o->sink_input, latency);
+
+            return 0;
+        }
     }
 
     return pa_sink_input_process_msg(obj, code, data, offset, chunk);
@@ -610,7 +647,7 @@ static void unsuspend(struct userdata *u) {
     PA_IDXSET_FOREACH(o, u->outputs, idx)
         output_enable(o);
 
-    if (!u->time_event)
+    if (!u->time_event && u->adjust_time > 0)
         u->time_event = pa_core_rttime_new(u->core, pa_rtclock_now() + u->adjust_time, time_callback, u);
 
     pa_log_info("Resumed successfully...");
@@ -671,31 +708,47 @@ static void update_max_request(struct userdata *u) {
     if (max_request <= 0)
         max_request = pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec);
 
+    pa_log_debug("Sink update max request %lu", (unsigned long) max_request);
     pa_sink_set_max_request_within_thread(u->sink, max_request);
 }
 
 /* Called from IO context */
-static void update_fixed_latency(struct userdata *u) {
-    pa_usec_t fixed_latency = 0;
+static void update_latency_range(struct userdata *u) {
+    pa_usec_t min_latency = 0, max_latency = (pa_usec_t) -1;
     struct output *o;
 
     pa_assert(u);
     pa_sink_assert_io_context(u->sink);
 
-    /* Collects the requested_latency values of all streams and sets
-     * the largest one as fixed_latency locally */
-
+    /* Collects the latency_range values of all streams and sets
+     * the max of min and min of max locally */
     PA_LLIST_FOREACH(o, u->thread_info.active_outputs) {
-        pa_usec_t rl = (size_t) pa_atomic_load(&o->requested_latency);
+        pa_usec_t min = (size_t) pa_atomic_load(&o->min_latency);
+        pa_usec_t max = (size_t) pa_atomic_load(&o->max_latency);
 
-        if (rl > fixed_latency)
-            fixed_latency = rl;
+        if (min > min_latency)
+            min_latency = min;
+        if (max_latency == (pa_usec_t) -1 || max < max_latency)
+            max_latency = max;
     }
+    if (max_latency == (pa_usec_t) -1) {
+        /* No outputs, use default limits. */
+        min_latency = u->default_min_latency;
+        max_latency = u->default_max_latency;
+    }
+
+    /* As long as we don't support rewinding, we should limit the max latency
+     * to a conservative value. */
+    if (max_latency > u->default_max_latency)
+        max_latency = u->default_max_latency;
 
-    if (fixed_latency <= 0)
-        fixed_latency = u->block_usec;
+    /* Never ever try to set lower max latency than min latency, it just
+     * doesn't make sense. */
+    if (max_latency < min_latency)
+        max_latency = min_latency;
 
-    pa_sink_set_fixed_latency_within_thread(u->sink, fixed_latency);
+    pa_log_debug("Sink update latency range %" PRIu64 " %" PRIu64, min_latency, max_latency);
+    pa_sink_set_latency_range_within_thread(u->sink, min_latency, max_latency);
 }
 
 /* Called from thread context of the io thread */
@@ -735,6 +788,28 @@ static void output_remove_within_thread(struct output *o) {
     }
 }
 
+/* Called from sink I/O thread context */
+static void sink_update_requested_latency(pa_sink *s) {
+    struct userdata *u;
+    struct output *o;
+
+    pa_sink_assert_ref(s);
+    pa_assert_se(u = s->userdata);
+
+    u->block_usec = pa_sink_get_requested_latency_within_thread(s);
+
+    if (u->block_usec == (pa_usec_t) -1)
+        u->block_usec = s->thread_info.max_latency;
+
+    pa_log_debug("Sink update requested latency %0.2f", (double) u->block_usec / PA_USEC_PER_MSEC);
+
+    /* Just hand this one over to all sink_inputs */
+    PA_LLIST_FOREACH(o, u->thread_info.active_outputs) {
+        pa_asyncmsgq_post(o->inq, PA_MSGOBJECT(o->sink_input), SINK_INPUT_MESSAGE_SET_REQUESTED_LATENCY, NULL, u->block_usec, NULL, NULL);
+    }
+}
+
+
 /* Called from thread context of the io thread */
 static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
     struct userdata *u = PA_SINK(o)->userdata;
@@ -773,13 +848,13 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
         case SINK_MESSAGE_ADD_OUTPUT:
             output_add_within_thread(data);
             update_max_request(u);
-            update_fixed_latency(u);
+            update_latency_range(u);
             return 0;
 
         case SINK_MESSAGE_REMOVE_OUTPUT:
             output_remove_within_thread(data);
             update_max_request(u);
-            update_fixed_latency(u);
+            update_latency_range(u);
             return 0;
 
         case SINK_MESSAGE_NEED:
@@ -805,9 +880,10 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
             update_max_request(u);
             break;
 
-        case SINK_MESSAGE_UPDATE_REQUESTED_LATENCY:
-            update_fixed_latency(u);
+        case SINK_MESSAGE_UPDATE_LATENCY_RANGE:
+            update_latency_range(u);
             break;
+
 }
 
     return pa_sink_process_msg(o, code, data, offset, chunk);
@@ -849,6 +925,7 @@ static void update_description(struct userdata *u) {
 }
 
 static int output_create_sink_input(struct output *o) {
+    struct userdata *u;
     pa_sink_input_new_data data;
 
     pa_assert(o);
@@ -856,18 +933,20 @@ static int output_create_sink_input(struct output *o) {
     if (o->sink_input)
         return 0;
 
+    u = o->userdata;
+
     pa_sink_input_new_data_init(&data);
     pa_sink_input_new_data_set_sink(&data, o->sink, false);
     data.driver = __FILE__;
     pa_proplist_setf(data.proplist, PA_PROP_MEDIA_NAME, "Simultaneous output on %s", pa_strnull(pa_proplist_gets(o->sink->proplist, PA_PROP_DEVICE_DESCRIPTION)));
     pa_proplist_sets(data.proplist, PA_PROP_MEDIA_ROLE, "filter");
-    pa_sink_input_new_data_set_sample_spec(&data, &o->userdata->sink->sample_spec);
-    pa_sink_input_new_data_set_channel_map(&data, &o->userdata->sink->channel_map);
-    data.module = o->userdata->module;
-    data.resample_method = o->userdata->resample_method;
+    pa_sink_input_new_data_set_sample_spec(&data, &u->sink->sample_spec);
+    pa_sink_input_new_data_set_channel_map(&data, &u->sink->channel_map);
+    data.module = u->module;
+    data.resample_method = u->resample_method;
     data.flags = PA_SINK_INPUT_VARIABLE_RATE|PA_SINK_INPUT_DONT_MOVE|PA_SINK_INPUT_NO_CREATE_ON_SUSPEND;
 
-    pa_sink_input_new(&o->sink_input, o->userdata->core, &data);
+    pa_sink_input_new(&o->sink_input, u->core, &data);
 
     pa_sink_input_new_data_done(&data);
 
@@ -879,13 +958,13 @@ static int output_create_sink_input(struct output *o) {
     o->sink_input->process_rewind = sink_input_process_rewind_cb;
     o->sink_input->update_max_rewind = sink_input_update_max_rewind_cb;
     o->sink_input->update_max_request = sink_input_update_max_request_cb;
-    o->sink_input->update_sink_requested_latency = sink_input_update_sink_requested_latency_cb;
+    o->sink_input->update_sink_latency_range = sink_input_update_sink_latency_range_cb;
     o->sink_input->attach = sink_input_attach_cb;
     o->sink_input->detach = sink_input_detach_cb;
     o->sink_input->kill = sink_input_kill_cb;
     o->sink_input->userdata = o;
 
-    pa_sink_input_set_requested_latency(o->sink_input, BLOCK_USEC);
+    pa_sink_input_set_requested_latency(o->sink_input, pa_sink_get_requested_latency(u->sink));
 
     return 0;
 }
@@ -965,18 +1044,10 @@ static void output_enable(struct output *o) {
     if (output_create_sink_input(o) >= 0) {
 
         if (pa_sink_get_state(o->sink) != PA_SINK_INIT) {
-
-            /* First we register the output. That means that the sink
-             * will start to pass data to this output. */
-            pa_asyncmsgq_send(o->userdata->sink->asyncmsgq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_ADD_OUTPUT, o, 0, NULL);
-
-            /* Then we enable the sink input. That means that the sink
+            /* Enable the sink input. That means that the sink
              * is now asked for new data. */
             pa_sink_input_put(o->sink_input);
-
-        } else
-            /* Hmm the sink is not yet started, do things right here */
-            output_add_within_thread(o);
+        }
     }
 
     o->ignore_state_change = false;
@@ -989,14 +1060,10 @@ static void output_disable(struct output *o) {
     if (!o->sink_input)
         return;
 
-    /* First we disable the sink input. That means that the sink is
+    /* We disable the sink input. That means that the sink is
      * not asked for new data anymore  */
     pa_sink_input_unlink(o->sink_input);
 
-    /* Then we unregister the output. That means that the sink doesn't
-     * pass any further data to this output */
-    pa_asyncmsgq_send(o->userdata->sink->asyncmsgq, PA_MSGOBJECT(o->userdata->sink), SINK_MESSAGE_REMOVE_OUTPUT, o, 0, NULL);
-
     /* Now deallocate the stream */
     pa_sink_input_unref(o->sink_input);
     o->sink_input = NULL;
@@ -1143,6 +1210,7 @@ int pa__init(pa_module*m) {
     uint32_t idx;
     pa_sink_new_data data;
     uint32_t adjust_time_sec;
+    size_t nbytes;
 
     pa_assert(m);
 
@@ -1271,7 +1339,7 @@ int pa__init(pa_module*m) {
         pa_proplist_sets(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Simultaneous Output");
     }
 
-    u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY);
+    u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY|PA_SINK_DYNAMIC_LATENCY);
     pa_sink_new_data_done(&data);
 
     if (!u->sink) {
@@ -1281,13 +1349,20 @@ int pa__init(pa_module*m) {
 
     u->sink->parent.process_msg = sink_process_msg;
     u->sink->set_state = sink_set_state;
+    u->sink->update_requested_latency = sink_update_requested_latency;
     u->sink->userdata = u;
 
     pa_sink_set_rtpoll(u->sink, u->rtpoll);
     pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
 
-    u->block_usec = BLOCK_USEC;
-    pa_sink_set_max_request(u->sink, pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec));
+    nbytes = pa_usec_to_bytes(BLOCK_USEC, &u->sink->sample_spec);
+    pa_sink_set_max_request(u->sink, nbytes);
+    pa_sink_set_latency_range(u->sink, 0, BLOCK_USEC);
+    /* pulse clamps the range, get the real values */
+    u->default_min_latency = u->sink->thread_info.min_latency;
+    u->default_max_latency = u->sink->thread_info.max_latency;
+    u->block_usec = u->sink->thread_info.max_latency;
+
 
     if (!u->automatic) {
         const char*split_state;
diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c
index 825fced..c8a35d4 100644
--- a/src/modules/module-console-kit.c
+++ b/src/modules/module-console-kit.c
@@ -144,12 +144,10 @@ static void free_session(struct session *session) {
 }
 
 static void remove_session(struct userdata *u, const char *id) {
-    struct session *session;
-
-    if (!(session = pa_hashmap_remove(u->sessions, id)))
-        return;
+    pa_assert(u);
+    pa_assert(id);
 
-    free_session(session);
+    pa_hashmap_remove_and_free(u->sessions, id);
 }
 
 static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, void *userdata) {
@@ -242,7 +240,7 @@ static int get_session_list(struct userdata *u) {
         if ((at = dbus_message_iter_get_arg_type(&sub)) == DBUS_TYPE_INVALID)
             break;
 
-        assert(at == DBUS_TYPE_OBJECT_PATH);
+        pa_assert(at == DBUS_TYPE_OBJECT_PATH);
         dbus_message_iter_get_basic(&sub, &id);
 
         add_session(u, id);
diff --git a/src/modules/module-device-manager.c b/src/modules/module-device-manager.c
index d86c158..9621f3e 100644
--- a/src/modules/module-device-manager.c
+++ b/src/modules/module-device-manager.c
@@ -502,7 +502,7 @@ static inline struct entry *load_or_initialize_entry(struct userdata *u, struct
         entry->description = pa_xstrdup(old->description);
         entry->icon = pa_xstrdup(old->icon);
     } else {
-        /* This is a new device, so make sure we write it's priority list correctly */
+        /* This is a new device, so make sure we write its priority list correctly */
         role_indexes_t max_priority;
         pa_datum key;
         bool done;
@@ -1328,7 +1328,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
                 }
 
                 pa_hashmap_free(h);
-                pa_log_error("Client specified an unknown device in it's reorder list.");
+                pa_log_error("Client specified an unknown device in its reorder list.");
                 goto fail;
             }
             entry_free(e);
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c
index 0490677..cb42207 100644
--- a/src/modules/module-device-restore.c
+++ b/src/modules/module-device-restore.c
@@ -233,8 +233,10 @@ static struct entry* entry_read(struct userdata *u, const char *name) {
 
     pa_zero(data);
 
-    if (!pa_database_get(u->database, &key, &data))
-        goto fail;
+    if (!pa_database_get(u->database, &key, &data)) {
+        pa_log_debug("Database contains no data for key: %s", name);
+        return NULL;
+    }
 
     t = pa_tagstruct_new(data.data, data.size);
     e = entry_new();
@@ -477,7 +479,7 @@ fail:
     }
 #endif
 
-    pa_log_debug("Database contains invalid data for key: %s", name);
+    pa_log_debug("Database contains no (or invalid) data for key: %s", name);
 
     pa_xfree(name);
 
@@ -791,9 +793,10 @@ static pa_hook_result_t sink_fixate_hook_callback(pa_core *c, pa_sink_new_data *
         if (u->restore_muted && e->muted_valid) {
 
             if (!new_data->muted_is_set) {
-                pa_log_info("Restoring mute state for sink %s.", new_data->name);
                 pa_sink_new_data_set_muted(new_data, e->muted);
                 new_data->save_muted = true;
+                pa_log_info("Restoring mute state for sink %s: %smuted", new_data->name,
+                            new_data->muted ? "" : "un");
             } else
                 pa_log_debug("Not restoring mute state for sink %s, because already set.", new_data->name);
         }
@@ -932,9 +935,10 @@ static pa_hook_result_t source_fixate_hook_callback(pa_core *c, pa_source_new_da
         if (u->restore_muted && e->muted_valid) {
 
             if (!new_data->muted_is_set) {
-                pa_log_info("Restoring mute state for source %s.", new_data->name);
                 pa_source_new_data_set_muted(new_data, e->muted);
                 new_data->save_muted = true;
+                pa_log_info("Restoring mute state for source %s: %smuted", new_data->name,
+                            new_data->muted ? "" : "un");
             } else
                 pa_log_debug("Not restoring mute state for source %s, because already set.", new_data->name);
         }
@@ -1319,8 +1323,10 @@ void pa__done(pa_module*m) {
     if (u->connection_unlink_hook_slot)
         pa_hook_slot_free(u->connection_unlink_hook_slot);
 
-    if (u->save_time_event)
+    if (u->save_time_event) {
         u->core->mainloop->time_free(u->save_time_event);
+        pa_database_sync(u->database);
+    }
 
     if (u->database)
         pa_database_close(u->database);
diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index bcaaecd..811bbc2 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -1619,7 +1619,7 @@ void dbus_done(struct userdata *u) {
 
     pa_assert_se(sink_list=pa_shared_get(u->sink->core,SINKLIST));
     pa_idxset_remove_by_data(sink_list,u,&dummy);
-    if (pa_idxset_size(sink_list)==0) {
+    if (pa_idxset_size(sink_list) == 0) {
         pa_dbus_protocol_unregister_extension(u->dbus_protocol, EXTNAME);
         pa_dbus_protocol_remove_interface(u->dbus_protocol, MANAGER_PATH, manager_info.name);
         pa_shared_remove(u->sink->core, EQDB);
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 8b74ea4..2410062 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -307,7 +307,7 @@ static void thread_func(void *userdata) {
             pollfd->events = (short) (PA_SINK_IS_OPENED(u->sink->thread_info.state) ? POLLOUT : 0);
         }
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
@@ -527,6 +527,8 @@ int pa__init(pa_module*m) {
     const char *espeaker;
     uint32_t key;
     pa_sink_new_data data;
+    char *cookie_path;
+    int r;
 
     pa_assert(m);
 
@@ -620,9 +622,18 @@ int pa__init(pa_module*m) {
 
     pa_socket_client_set_callback(u->client, on_connection, u);
 
+    cookie_path = pa_xstrdup(pa_modargs_get_value(ma, "cookie", NULL));
+    if (!cookie_path) {
+        if (pa_append_to_home_dir(".esd_auth", &cookie_path) < 0)
+            goto fail;
+    }
+
     /* Prepare the initial request */
     u->write_data = pa_xmalloc(u->write_length = ESD_KEY_LEN + sizeof(int32_t));
-    if (pa_authkey_load_auto(pa_modargs_get_value(ma, "cookie", ".esd_auth"), true, u->write_data, ESD_KEY_LEN) < 0) {
+
+    r = pa_authkey_load(cookie_path, true, u->write_data, ESD_KEY_LEN);
+    pa_xfree(cookie_path);
+    if (r < 0) {
         pa_log("Failed to load cookie");
         goto fail;
     }
diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c
index 9ab7eb9..0b04f0f 100644
--- a/src/modules/module-mmkbd-evdev.c
+++ b/src/modules/module-mmkbd-evdev.c
@@ -256,8 +256,11 @@ void pa__done(pa_module*m) {
     if (u->io)
         m->core->mainloop->io_free(u->io);
 
-    if (u->fd >= 0)
-        pa_assert_se(pa_close(u->fd) == 0);
+    if (u->fd >= 0) {
+        int r = pa_close(u->fd);
+        if (r < 0) /* https://bugs.freedesktop.org/show_bug.cgi?id=80867 */
+            pa_log("Closing fd failed: %s", pa_cstrerror(errno));
+    }
 
     pa_xfree(u->sink_name);
     pa_xfree(u);
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index c038b6c..c6493a7 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -226,7 +226,7 @@ static void thread_func(void *userdata) {
             pa_rtpoll_set_timer_disabled(u->rtpoll);
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/modules/module-null-source.c b/src/modules/module-null-source.c
index e3e0167..b852f37 100644
--- a/src/modules/module-null-source.c
+++ b/src/modules/module-null-source.c
@@ -159,7 +159,7 @@ static void thread_func(void *userdata) {
             pa_rtpoll_set_timer_disabled(u->rtpoll);
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index 4d82cc3..3404022 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -196,7 +196,7 @@ static void thread_func(void *userdata) {
         /* Hmm, nothing to do. Let's sleep */
         pollfd->events = (short) (u->sink->thread_info.state == PA_SINK_RUNNING ? POLLOUT : 0);
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index 36e8732..d8d9443 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -184,7 +184,7 @@ static void thread_func(void *userdata) {
         /* Hmm, nothing to do. Let's sleep */
         pollfd->events = (short) (u->source->thread_info.state == PA_SOURCE_RUNNING ? POLLIN : 0);
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/modules/module-protocol-stub.c b/src/modules/module-protocol-stub.c
index 3218a01..118351e 100644
--- a/src/modules/module-protocol-stub.c
+++ b/src/modules/module-protocol-stub.c
@@ -120,14 +120,17 @@
 #  endif
 
 #  if defined(HAVE_CREDS) && !defined(USE_TCP_SOCKETS)
-#    define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-group", "auth-group-enable",
+#    define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-group", "auth-group-enable", "srbchannel",
 #    define AUTH_USAGE "auth-group=<system group to allow access> auth-group-enable=<enable auth by UNIX group?> "
+#    define SRB_USAGE "srbchannel=<enable shared ringbuffer communication channel?> "
 #  elif defined(USE_TCP_SOCKETS)
 #    define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-ip-acl",
 #    define AUTH_USAGE "auth-ip-acl=<IP address ACL to allow access> "
+#    define SRB_USAGE
 #  else
 #    define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON
 #    define AUTH_USAGE
+#    define SRB_USAGE
 #    endif
 
   PA_MODULE_DESCRIPTION("Native protocol "SOCKET_DESCRIPTION);
@@ -135,6 +138,7 @@
                   "auth-cookie=<path to cookie file> "
                   "auth-cookie-enabled=<enable cookie authentication?> "
                   AUTH_USAGE
+                  SRB_USAGE
                   SOCKET_USAGE);
 #elif defined(USE_PROTOCOL_ESOUND)
 #  include <pulsecore/protocol-esound.h>
diff --git a/src/modules/module-rescue-streams.c b/src/modules/module-rescue-streams.c
index 7035a35..f456be0 100644
--- a/src/modules/module-rescue-streams.c
+++ b/src/modules/module-rescue-streams.c
@@ -52,9 +52,56 @@ struct userdata {
         *source_output_move_fail_slot;
 };
 
+static pa_source* find_source_from_port(pa_core *c, pa_device_port *port) {
+    pa_source *target;
+    uint32_t idx;
+    void *state;
+    pa_device_port *p;
+
+    if (!port)
+        return NULL;
+
+    PA_IDXSET_FOREACH(target, c->sources, idx)
+        PA_HASHMAP_FOREACH(p, target->ports, state)
+            if (port == p)
+                return target;
+
+    return NULL;
+}
+
+static pa_sink* find_sink_from_port(pa_core *c, pa_device_port *port) {
+    pa_sink *target;
+    uint32_t idx;
+    void *state;
+    pa_device_port *p;
+
+    if (!port)
+        return NULL;
+
+    PA_IDXSET_FOREACH(target, c->sinks, idx)
+        PA_HASHMAP_FOREACH(p, target->ports, state)
+            if (port == p)
+                return target;
+
+    return NULL;
+}
+
+static void build_group_ports(pa_hashmap *g_ports, pa_hashmap *s_ports) {
+    void *state;
+    pa_device_port *p;
+
+    if (!g_ports || !s_ports)
+        return;
+
+    PA_HASHMAP_FOREACH(p, s_ports, state)
+        pa_hashmap_put(g_ports, p, p);
+}
+
 static pa_sink* find_evacuation_sink(pa_core *c, pa_sink_input *i, pa_sink *skip) {
-    pa_sink *target, *def;
+    pa_sink *target, *def, *fb_sink = NULL;
     uint32_t idx;
+    pa_hashmap *all_ports;
+    pa_device_port *best_port;
 
     pa_assert(c);
     pa_assert(i);
@@ -64,6 +111,8 @@ static pa_sink* find_evacuation_sink(pa_core *c, pa_sink_input *i, pa_sink *skip
     if (def && def != skip && pa_sink_input_may_move_to(i, def))
         return def;
 
+    all_ports = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
+
     PA_IDXSET_FOREACH(target, c->sinks, idx) {
         if (target == def)
             continue;
@@ -74,12 +123,28 @@ static pa_sink* find_evacuation_sink(pa_core *c, pa_sink_input *i, pa_sink *skip
         if (!PA_SINK_IS_LINKED(pa_sink_get_state(target)))
             continue;
 
-        if (pa_sink_input_may_move_to(i, target))
-            return target;
+        if (!pa_sink_input_may_move_to(i, target))
+            continue;
+
+        if (!fb_sink)
+            fb_sink = target;
+
+        build_group_ports(all_ports, target->ports);
     }
 
-    pa_log_debug("No evacuation sink found.");
-    return NULL;
+    best_port = pa_device_port_find_best(all_ports);
+
+    pa_hashmap_free(all_ports);
+
+    if (best_port)
+        target = find_sink_from_port(c, best_port);
+    else
+        target = fb_sink;
+
+    if (!target)
+	pa_log_debug("No evacuation sink found.");
+
+    return target;
 }
 
 static pa_hook_result_t sink_unlink_hook_callback(pa_core *c, pa_sink *sink, void* userdata) {
@@ -141,8 +206,10 @@ static pa_hook_result_t sink_input_move_fail_hook_callback(pa_core *c, pa_sink_i
 }
 
 static pa_source* find_evacuation_source(pa_core *c, pa_source_output *o, pa_source *skip) {
-    pa_source *target, *def;
+    pa_source *target, *def, *fb_source = NULL;
     uint32_t idx;
+    pa_hashmap *all_ports;
+    pa_device_port *best_port;
 
     pa_assert(c);
     pa_assert(o);
@@ -152,6 +219,8 @@ static pa_source* find_evacuation_source(pa_core *c, pa_source_output *o, pa_sou
     if (def && def != skip && pa_source_output_may_move_to(o, def))
         return def;
 
+    all_ports = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func);
+
     PA_IDXSET_FOREACH(target, c->sources, idx) {
         if (target == def)
             continue;
@@ -165,12 +234,28 @@ static pa_source* find_evacuation_source(pa_core *c, pa_source_output *o, pa_sou
         if (!PA_SOURCE_IS_LINKED(pa_source_get_state(target)))
             continue;
 
-        if (pa_source_output_may_move_to(o, target))
-            return target;
+        if (!pa_source_output_may_move_to(o, target))
+            continue;
+
+        if (!fb_source)
+            fb_source = target;
+
+        build_group_ports(all_ports, target->ports);
     }
 
-    pa_log_debug("No evacuation source found.");
-    return NULL;
+    best_port = pa_device_port_find_best(all_ports);
+
+    pa_hashmap_free(all_ports);
+
+    if (best_port)
+        target = find_source_from_port(c, best_port);
+    else
+        target = fb_source;
+
+    if (!target)
+        pa_log_debug("No evacuation source found.");
+
+    return target;
 }
 
 static pa_hook_result_t source_unlink_hook_callback(pa_core *c, pa_source *source, void* userdata) {
diff --git a/src/modules/module-role-cork.c b/src/modules/module-role-cork.c
index 6573cd6..8ca2109 100644
--- a/src/modules/module-role-cork.c
+++ b/src/modules/module-role-cork.c
@@ -102,7 +102,7 @@ static inline void apply_cork_to_sink(struct userdata *u, pa_sink *s, pa_sink_in
     pa_sink_assert_ref(s);
 
     for (j = PA_SINK_INPUT(pa_idxset_first(s->inputs, &idx)); j; j = PA_SINK_INPUT(pa_idxset_next(s->inputs, &idx))) {
-        bool corked, muted, corked_here;
+        bool corked, corked_here;
         const char *role;
 
         if (j == ignore)
@@ -119,10 +119,9 @@ static inline void apply_cork_to_sink(struct userdata *u, pa_sink *s, pa_sink_in
             continue;
 
         corked = (pa_sink_input_get_state(j) == PA_SINK_INPUT_CORKED);
-        muted = pa_sink_input_get_mute(j);
         corked_here = !!pa_hashmap_get(u->cork_state, j);
 
-        if (cork && !corked && !muted) {
+        if (cork && !corked && !j->muted) {
             pa_log_debug("Found a '%s' stream that should be corked/muted.", cork_role);
             if (!corked_here)
                 pa_hashmap_put(u->cork_state, j, PA_INT_TO_PTR(1));
@@ -131,9 +130,9 @@ static inline void apply_cork_to_sink(struct userdata *u, pa_sink *s, pa_sink_in
         } else if (!cork) {
             pa_hashmap_remove(u->cork_state, j);
 
-            if (corked_here && (corked || muted)) {
+            if (corked_here && (corked || j->muted)) {
                 pa_log_debug("Found a '%s' stream that should be uncorked/unmuted.", cork_role);
-                if (muted)
+                if (j->muted)
                     pa_sink_input_set_mute(j, false, false);
                 if (corked)
                     pa_sink_input_send_event(j, PA_STREAM_EVENT_REQUEST_UNCORK, NULL);
diff --git a/src/modules/module-sine-source.c b/src/modules/module-sine-source.c
index 338fedb..1d755f1 100644
--- a/src/modules/module-sine-source.c
+++ b/src/modules/module-sine-source.c
@@ -178,7 +178,7 @@ static void thread_func(void *userdata) {
             pa_rtpoll_set_timer_disabled(u->rtpoll);
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index b4fa734..e5df90b 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -495,7 +495,7 @@ static void sink_set_volume(pa_sink *s) {
         AUDIO_INITINFO(&info);
 
         info.play.gain = pa_cvolume_max(&s->real_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
-        assert(info.play.gain <= AUDIO_MAX_GAIN);
+        pa_assert(info.play.gain <= AUDIO_MAX_GAIN);
 
         if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
             if (errno == EINVAL)
@@ -530,7 +530,7 @@ static void source_set_volume(pa_source *s) {
         AUDIO_INITINFO(&info);
 
         info.play.gain = pa_cvolume_max(&s->real_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
-        assert(info.play.gain <= AUDIO_MAX_GAIN);
+        pa_assert(info.play.gain <= AUDIO_MAX_GAIN);
 
         if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
             if (errno == EINVAL)
@@ -564,25 +564,30 @@ static void sink_set_mute(pa_sink *s) {
     if (u->fd >= 0) {
         AUDIO_INITINFO(&info);
 
-        info.output_muted = !!s->muted;
+        info.output_muted = s->muted;
 
         if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0)
             pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
     }
 }
 
-static void sink_get_mute(pa_sink *s) {
+static int sink_get_mute(pa_sink *s, bool *mute) {
     struct userdata *u = s->userdata;
     audio_info_t info;
 
     pa_assert(u);
 
-    if (u->fd >= 0) {
-        if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
-            pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
-        else
-            s->muted = !!info.output_muted;
+    if (u->fd < 0)
+        return -1;
+
+    if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0) {
+        pa_log("AUDIO_GETINFO: %s", pa_cstrerror(errno));
+        return -1;
     }
+
+    *mute = info.output_muted;
+
+    return 0;
 }
 
 static void process_rewind(struct userdata *u) {
@@ -778,7 +783,7 @@ static void thread_func(void *userdata) {
         }
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
@@ -812,7 +817,7 @@ finish:
 static void sig_callback(pa_mainloop_api *api, pa_signal_event*e, int sig, void *userdata) {
     struct userdata *u = userdata;
 
-    assert(u);
+    pa_assert(u);
 
     pa_log_debug("caught signal");
 
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index 9689e79..06ab543 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -949,8 +949,7 @@ static void handle_entry_remove(DBusConnection *conn, DBusMessage *msg, void *us
     send_entry_removed_signal(de);
     trigger_save(de->userdata);
 
-    pa_assert_se(pa_hashmap_remove(de->userdata->dbus_entries, de->entry_name));
-    dbus_entry_free(de);
+    pa_assert_se(pa_hashmap_remove_and_free(de->userdata->dbus_entries, de->entry_name) >= 0);
 
     pa_dbus_send_empty_reply(conn, msg);
 }
@@ -1300,7 +1299,7 @@ static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint3
         }
 
         if (sink_input->save_muted) {
-            entry->muted = pa_sink_input_get_mute(sink_input);
+            entry->muted = sink_input->muted;
             entry->muted_valid = true;
 
             mute_updated = !created_new_entry && (!old->muted_valid || entry->muted != old->muted);
@@ -1350,7 +1349,7 @@ static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint3
         }
 
         if (source_output->save_muted) {
-            entry->muted = pa_source_output_get_mute(source_output);
+            entry->muted = source_output->muted;
             entry->muted_valid = true;
 
             mute_updated = !created_new_entry && (!old->muted_valid || entry->muted != old->muted);
@@ -1832,7 +1831,6 @@ static int fill_db(struct userdata *u, const char *filename) {
         *d = 0;
         if (pa_atod(v, &db) >= 0) {
             if (db <= 0.0) {
-                pa_datum key, data;
                 struct entry e;
 
                 pa_zero(e);
@@ -1841,13 +1839,7 @@ static int fill_db(struct userdata *u, const char *filename) {
                 pa_cvolume_set(&e.volume, 1, pa_sw_volume_from_dB(db));
                 pa_channel_map_init_mono(&e.channel_map);
 
-                key.data = (void *) ln;
-                key.size = strlen(ln);
-
-                data.data = (void *) &e;
-                data.size = sizeof(e);
-
-                if (pa_database_set(u->database, &key, &data, false) == 0)
+                if (entry_write(u, ln, &e, false))
                     pa_log_debug("Setting %s to %0.2f dB.", ln, db);
             } else
                 pa_log_warn("[%s:%u] Positive dB values are not allowed, not setting entry %s.", fn, n, ln);
@@ -1912,7 +1904,7 @@ static void entry_apply(struct userdata *u, const char *name, struct entry *e) {
                        removed the sink element from the rule. */
                     si->save_sink = false;
                     /* This is cheating a bit. The sink input itself has not changed
-                       but the rules governing it's routing have, so we fire this event
+                       but the rules governing its routing have, so we fire this event
                        such that other routing modules (e.g. module-device-manager)
                        will pick up the change and reapply their routing */
                     pa_subscription_post(si->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, si->index);
@@ -1960,7 +1952,7 @@ static void entry_apply(struct userdata *u, const char *name, struct entry *e) {
                        removed the source element from the rule. */
                     so->save_source = false;
                     /* This is cheating a bit. The source output itself has not changed
-                       but the rules governing it's routing have, so we fire this event
+                       but the rules governing its routing have, so we fire this event
                        such that other routing modules (e.g. module-device-manager)
                        will pick up the change and reapply their routing */
                     pa_subscription_post(so->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, so->index);
@@ -2099,7 +2091,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
 
                 PA_HASHMAP_FOREACH(de, u->dbus_entries, state) {
                     send_entry_removed_signal(de);
-                    dbus_entry_free(pa_hashmap_remove(u->dbus_entries, de->entry_name));
+                    pa_hashmap_remove_and_free(u->dbus_entries, de->entry_name);
                 }
 #endif
                 pa_database_clear(u->database);
@@ -2213,7 +2205,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
 #ifdef HAVE_DBUS
                 if ((de = pa_hashmap_get(u->dbus_entries, name))) {
                     send_entry_removed_signal(de);
-                    dbus_entry_free(pa_hashmap_remove(u->dbus_entries, name));
+                    pa_hashmap_remove_and_free(u->dbus_entries, name);
                 }
 #endif
 
diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c
index 15cbf95..6fbe640 100644
--- a/src/modules/module-suspend-on-idle.c
+++ b/src/modules/module-suspend-on-idle.c
@@ -396,14 +396,11 @@ static void device_info_free(struct device_info *d) {
 }
 
 static pa_hook_result_t device_unlink_hook_cb(pa_core *c, pa_object *o, struct userdata *u) {
-    struct device_info *d;
-
     pa_assert(c);
     pa_object_assert_ref(o);
     pa_assert(u);
 
-    if ((d = pa_hashmap_remove(u->device_infos, o)))
-        device_info_free(d);
+    pa_hashmap_remove_and_free(u->device_infos, o);
 
     return PA_HOOK_OK;
 }
diff --git a/src/modules/module-switch-on-connect.c b/src/modules/module-switch-on-connect.c
index d9275d3..559db9f 100644
--- a/src/modules/module-switch-on-connect.c
+++ b/src/modules/module-switch-on-connect.c
@@ -38,11 +38,15 @@
 #include "module-switch-on-connect-symdef.h"
 
 PA_MODULE_AUTHOR("Michael Terry");
-PA_MODULE_DESCRIPTION("When a sink/source is added, switch to it");
+PA_MODULE_DESCRIPTION("When a sink/source is added, switch to it or conditionally switch to it");
 PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_LOAD_ONCE(true);
+PA_MODULE_USAGE(
+        "only_from_unavailable=<boolean, only switch from unavailable ports> "
+);
 
 static const char* const valid_modargs[] = {
+    "only_from_unavailable",
     NULL,
 };
 
@@ -50,6 +54,7 @@ struct userdata {
     pa_hook_slot
         *sink_put_slot,
         *source_put_slot;
+    bool only_from_unavailable;
 };
 
 static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, void* userdata) {
@@ -57,9 +62,11 @@ static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, void*
     uint32_t idx;
     pa_sink *def;
     const char *s;
+    struct userdata *u = userdata;
 
     pa_assert(c);
     pa_assert(sink);
+    pa_assert(userdata);
 
     /* Don't want to run during startup or shutdown */
     if (c->state != PA_CORE_RUNNING)
@@ -77,6 +84,10 @@ static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, void*
     if (def == sink)
         return PA_HOOK_OK;
 
+    if (u->only_from_unavailable)
+        if (!def->active_port || def->active_port->available != PA_AVAILABLE_NO)
+            return PA_HOOK_OK;
+
     /* Actually do the switch to the new sink */
     pa_namereg_set_default_sink(c, sink);
 
@@ -106,9 +117,11 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
     uint32_t idx;
     pa_source *def;
     const char *s;
+    struct userdata *u = userdata;
 
     pa_assert(c);
     pa_assert(source);
+    pa_assert(userdata);
 
     /* Don't want to run during startup or shutdown */
     if (c->state != PA_CORE_RUNNING)
@@ -130,6 +143,10 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
     if (def == source)
         return PA_HOOK_OK;
 
+    if (u->only_from_unavailable)
+        if (!def->active_port || def->active_port->available != PA_AVAILABLE_NO)
+            return PA_HOOK_OK;
+
     /* Actually do the switch to the new source */
     pa_namereg_set_default_source(c, source);
 
@@ -165,14 +182,27 @@ int pa__init(pa_module*m) {
         return -1;
     }
 
-    m->userdata = u = pa_xnew(struct userdata, 1);
+    m->userdata = u = pa_xnew0(struct userdata, 1);
 
     /* A little bit later than module-rescue-streams... */
     u->sink_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_PUT], PA_HOOK_LATE+30, (pa_hook_cb_t) sink_put_hook_callback, u);
     u->source_put_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PUT], PA_HOOK_LATE+20, (pa_hook_cb_t) source_put_hook_callback, u);
 
+    if (pa_modargs_get_value_boolean(ma, "only_from_unavailable", &u->only_from_unavailable) < 0) {
+	pa_log("Failed to get a boolean value for only_from_unavailable.");
+	goto fail;
+    }
+
     pa_modargs_free(ma);
     return 0;
+
+fail:
+    if (ma)
+        pa_modargs_free(ma);
+
+    pa__done(m);
+
+    return -1;
 }
 
 void pa__done(pa_module*m) {
diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
index 2c7ad17..7397bcc 100644
--- a/src/modules/module-switch-on-port-available.c
+++ b/src/modules/module-switch-on-port-available.c
@@ -36,21 +36,6 @@ struct userdata {
      pa_hook_slot *source_new_slot;
 };
 
-static pa_device_port* find_best_port(pa_hashmap *ports) {
-    void *state;
-    pa_device_port* port, *result = NULL;
-
-    PA_HASHMAP_FOREACH(port, ports, state) {
-        if (result == NULL ||
-            result->available == PA_AVAILABLE_NO ||
-            (port->available != PA_AVAILABLE_NO && port->priority > result->priority)) {
-            result = port;
-        }
-    }
-
-    return result;
-}
-
 static bool profile_good_for_output(pa_card_profile *profile) {
     pa_sink *sink;
     uint32_t idx;
@@ -153,7 +138,6 @@ static void find_sink_and_source(pa_card *card, pa_device_port *port, pa_sink **
 }
 
 static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port *port, void* userdata) {
-    uint32_t state;
     pa_card* card;
     pa_sink *sink;
     pa_source *source;
@@ -162,17 +146,18 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
     if (port->available == PA_AVAILABLE_UNKNOWN)
         return PA_HOOK_OK;
 
-    pa_log_debug("finding port %s", port->name);
-
-    PA_IDXSET_FOREACH(card, c->cards, state)
-        if (port == pa_hashmap_get(card->ports, port->name))
-            break;
+    card = port->card;
 
     if (!card) {
-        pa_log_warn("Did not find port %s in array of cards", port->name);
+        pa_log_warn("Port %s does not have a card", port->name);
         return PA_HOOK_OK;
     }
 
+    if (pa_idxset_size(card->sinks) == 0 && pa_idxset_size(card->sources) == 0)
+        /* This card is not initialized yet. We'll handle it in
+           sink_new / source_new callbacks later. */
+        return PA_HOOK_OK;
+
     find_sink_and_source(card, port, &sink, &source);
 
     is_active_profile = card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
@@ -203,7 +188,7 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
 
     if (port->available == PA_AVAILABLE_NO) {
         if (sink) {
-            pa_device_port *p2 = find_best_port(sink->ports);
+            pa_device_port *p2 = pa_device_port_find_best(sink->ports);
 
             if (p2 && p2->available != PA_AVAILABLE_NO)
                 pa_sink_set_port(sink, p2->name, false);
@@ -213,7 +198,7 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
         }
 
         if (source) {
-            pa_device_port *p2 = find_best_port(source->ports);
+            pa_device_port *p2 = pa_device_port_find_best(source->ports);
 
             if (p2 && p2->available != PA_AVAILABLE_NO)
                 pa_source_set_port(source, p2->name, false);
@@ -259,7 +244,7 @@ static pa_device_port *new_sink_source(pa_hashmap *ports, const char *name) {
     if (p->available != PA_AVAILABLE_NO)
         return NULL;
 
-    pa_assert_se(p = find_best_port(ports));
+    pa_assert_se(p = pa_device_port_find_best(ports));
     return p;
 }
 
@@ -279,8 +264,7 @@ static pa_hook_result_t source_new_hook_callback(pa_core *c, pa_source_new_data
     pa_device_port *p = new_sink_source(new_data->ports, new_data->active_port);
 
     if (p) {
-        pa_log_debug("Switching initial port for source '%s' to '%s'", new_data->name,
-                     new_data->active_port);
+        pa_log_debug("Switching initial port for source '%s' to '%s'", new_data->name, p->name);
         pa_source_new_data_set_port(new_data, p->name);
     }
     return PA_HOOK_OK;
diff --git a/src/modules/module-tunnel-sink-new.c b/src/modules/module-tunnel-sink-new.c
index 484e538..7d3bd99 100644
--- a/src/modules/module-tunnel-sink-new.c
+++ b/src/modules/module-tunnel-sink-new.c
@@ -60,6 +60,7 @@ PA_MODULE_USAGE(
         "cookie=<cookie file path>"
         );
 
+#define MAX_LATENCY_USEC (200 * PA_USEC_PER_MSEC)
 #define TUNNEL_THREAD_FAILED_MAINLOOP 1
 
 static void stream_state_cb(pa_stream *stream, void *userdata);
@@ -102,6 +103,16 @@ static const char* const valid_modargs[] = {
     NULL,
 };
 
+static void cork_stream(struct userdata *u, bool cork) {
+    pa_operation *operation;
+
+    pa_assert(u);
+    pa_assert(u->stream);
+
+    if ((operation = pa_stream_cork(u->stream, cork, NULL, NULL)))
+        pa_operation_unref(operation);
+}
+
 static void reset_bufferattr(pa_buffer_attr *bufferattr) {
     pa_assert(bufferattr);
     bufferattr->fragsize = (uint32_t) -1;
@@ -171,41 +182,34 @@ static void thread_func(void *userdata) {
         if (u->connected &&
                 pa_stream_get_state(u->stream) == PA_STREAM_READY &&
                 PA_SINK_IS_LINKED(u->sink->thread_info.state)) {
-            /* TODO: Cork the stream when the sink is suspended. */
-
-            if (pa_stream_is_corked(u->stream)) {
-                pa_operation *operation;
-                if ((operation = pa_stream_cork(u->stream, 0, NULL, NULL)))
-                    pa_operation_unref(operation);
-            } else {
-                size_t writable;
-
-                writable = pa_stream_writable_size(u->stream);
-                if (writable > 0) {
-                    pa_memchunk memchunk;
-                    const void *p;
-
-                    pa_sink_render_full(u->sink, writable, &memchunk);
-
-                    pa_assert(memchunk.length > 0);
-
-                    /* we have new data to write */
-                    p = pa_memblock_acquire(memchunk.memblock);
-                    /* TODO: Use pa_stream_begin_write() to reduce copying. */
-                    ret = pa_stream_write(u->stream,
-                                          (uint8_t*) p + memchunk.index,
-                                          memchunk.length,
-                                          NULL,     /**< A cleanup routine for the data or NULL to request an internal copy */
-                                          0,        /** offset */
-                                          PA_SEEK_RELATIVE);
-                    pa_memblock_release(memchunk.memblock);
-                    pa_memblock_unref(memchunk.memblock);
-
-                    if (ret != 0) {
-                        pa_log_error("Could not write data into the stream ... ret = %i", ret);
-                        u->thread_mainloop_api->quit(u->thread_mainloop_api, TUNNEL_THREAD_FAILED_MAINLOOP);
-                    }
+            size_t writable;
+
+            writable = pa_stream_writable_size(u->stream);
+            if (writable > 0) {
+                pa_memchunk memchunk;
+                const void *p;
+
+                pa_sink_render_full(u->sink, writable, &memchunk);
+
+                pa_assert(memchunk.length > 0);
+
+                /* we have new data to write */
+                p = pa_memblock_acquire(memchunk.memblock);
+                /* TODO: Use pa_stream_begin_write() to reduce copying. */
+                ret = pa_stream_write(u->stream,
+                                      (uint8_t*) p + memchunk.index,
+                                      memchunk.length,
+                                      NULL,     /**< A cleanup routine for the data or NULL to request an internal copy */
+                                      0,        /** offset */
+                                      PA_SEEK_RELATIVE);
+                pa_memblock_release(memchunk.memblock);
+                pa_memblock_unref(memchunk.memblock);
+
+                if (ret != 0) {
+                    pa_log_error("Could not write data into the stream ... ret = %i", ret);
+                    u->thread_mainloop_api->quit(u->thread_mainloop_api, TUNNEL_THREAD_FAILED_MAINLOOP);
                 }
+
             }
         }
     }
@@ -244,6 +248,9 @@ static void stream_state_cb(pa_stream *stream, void *userdata) {
             pa_log_debug("Stream terminated.");
             break;
         case PA_STREAM_READY:
+            if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
+                cork_stream(u, false);
+
             /* Only call our requested_latency_cb when requested_latency
              * changed between PA_STREAM_CREATING -> PA_STREAM_READY, because
              * we don't want to override the initial tlength set by the server
@@ -313,7 +320,7 @@ static void context_state_cb(pa_context *c, void *userdata) {
             }
 
             requested_latency = pa_sink_get_requested_latency_within_thread(u->sink);
-            if (requested_latency == (uint32_t) -1)
+            if (requested_latency == (pa_usec_t) -1)
                 requested_latency = u->sink->thread_info.max_latency;
 
             reset_bufferattr(&bufferattr);
@@ -415,6 +422,26 @@ static int sink_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t of
             *((pa_usec_t*) data) = remote_latency;
             return 0;
         }
+        case PA_SINK_MESSAGE_SET_STATE:
+            if (!u->stream || pa_stream_get_state(u->stream) != PA_STREAM_READY)
+                break;
+
+            switch ((pa_sink_state_t) PA_PTR_TO_UINT(data)) {
+                case PA_SINK_SUSPENDED: {
+                    cork_stream(u, true);
+                    break;
+                }
+                case PA_SINK_IDLE:
+                case PA_SINK_RUNNING: {
+                    cork_stream(u, false);
+                    break;
+                }
+                case PA_SINK_INVALID_STATE:
+                case PA_SINK_INIT:
+                case PA_SINK_UNLINKED:
+                    break;
+            }
+            break;
     }
     return pa_sink_process_msg(o, code, data, offset, chunk);
 }
@@ -499,6 +526,7 @@ int pa__init(pa_module *m) {
     u->sink->userdata = u;
     u->sink->parent.process_msg = sink_process_msg_cb;
     u->sink->update_requested_latency = sink_update_requested_latency_cb;
+    pa_sink_set_latency_range(u->sink, 0, MAX_LATENCY_USEC);
 
     /* set thread message queue */
     pa_sink_set_asyncmsgq(u->sink, u->thread_mq->inq);
diff --git a/src/modules/module-tunnel-source-new.c b/src/modules/module-tunnel-source-new.c
index d2e2d6c..c6580eb 100644
--- a/src/modules/module-tunnel-source-new.c
+++ b/src/modules/module-tunnel-source-new.c
@@ -101,6 +101,16 @@ static const char* const valid_modargs[] = {
     NULL,
 };
 
+static void cork_stream(struct userdata *u, bool cork) {
+    pa_operation *operation;
+
+    pa_assert(u);
+    pa_assert(u->stream);
+
+    if ((operation = pa_stream_cork(u->stream, cork, NULL, NULL)))
+        pa_operation_unref(operation);
+}
+
 static void reset_bufferattr(pa_buffer_attr *bufferattr) {
     pa_assert(bufferattr);
     bufferattr->fragsize = (uint32_t) -1;
@@ -142,8 +152,8 @@ static void read_new_samples(struct userdata *u) {
 
     readable = pa_stream_readable_size(u->stream);
     while (readable > 0) {
-        size_t read = 0;
-        if (PA_UNLIKELY(pa_stream_peek(u->stream, &p, &read) != 0)) {
+        size_t nbytes = 0;
+        if (PA_UNLIKELY(pa_stream_peek(u->stream, &p, &nbytes) != 0)) {
             pa_log("pa_stream_peek() failed: %s", pa_strerror(pa_context_errno(u->context)));
             u->thread_mainloop_api->quit(u->thread_mainloop_api, TUNNEL_THREAD_FAILED_MAINLOOP);
             return;
@@ -151,14 +161,14 @@ static void read_new_samples(struct userdata *u) {
 
         if (PA_LIKELY(p)) {
             /* we have valid data */
-            memchunk.memblock = pa_memblock_new_fixed(u->module->core->mempool, (void *) p, read, true);
-            memchunk.length = read;
+            memchunk.memblock = pa_memblock_new_fixed(u->module->core->mempool, (void *) p, nbytes, true);
+            memchunk.length = nbytes;
             memchunk.index = 0;
 
             pa_source_post(u->source, &memchunk);
             pa_memblock_unref_fixed(memchunk.memblock);
         } else {
-            size_t bytes_to_generate = read;
+            size_t bytes_to_generate = nbytes;
 
             /* we have a hole. generate silence */
             memchunk = u->source->silence;
@@ -176,7 +186,7 @@ static void read_new_samples(struct userdata *u) {
         }
 
         pa_stream_drop(u->stream);
-        readable -= read;
+        readable -= nbytes;
     }
 }
 
@@ -262,6 +272,9 @@ static void stream_state_cb(pa_stream *stream, void *userdata) {
             pa_log_debug("Stream terminated.");
             break;
         case PA_STREAM_READY:
+            if (PA_SOURCE_IS_OPENED(u->source->thread_info.state))
+                cork_stream(u, false);
+
             /* Only call our requested_latency_cb when requested_latency
              * changed between PA_STREAM_CREATING -> PA_STREAM_READY, because
              * we don't want to override the initial fragsize set by the server
@@ -325,7 +338,7 @@ static void context_state_cb(pa_context *c, void *userdata) {
             if (pa_stream_connect_record(u->stream,
                                          u->remote_source_name,
                                          &bufferattr,
-                                         PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_DONT_MOVE|PA_STREAM_AUTO_TIMING_UPDATE) < 0) {
+                                         PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_DONT_MOVE|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_START_CORKED) < 0) {
                 pa_log_debug("Could not create stream: %s", pa_strerror(pa_context_errno(u->context)));
                 u->thread_mainloop_api->quit(u->thread_mainloop_api, TUNNEL_THREAD_FAILED_MAINLOOP);
             }
@@ -417,6 +430,26 @@ static int source_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t
 
             return 0;
         }
+        case PA_SOURCE_MESSAGE_SET_STATE:
+            if (!u->stream || pa_stream_get_state(u->stream) != PA_STREAM_READY)
+                break;
+
+            switch ((pa_source_state_t) PA_PTR_TO_UINT(data)) {
+                case PA_SOURCE_SUSPENDED: {
+                    cork_stream(u, true);
+                    break;
+                }
+                case PA_SOURCE_IDLE:
+                case PA_SOURCE_RUNNING: {
+                    cork_stream(u, false);
+                    break;
+                }
+                case PA_SOURCE_INVALID_STATE:
+                case PA_SOURCE_INIT:
+                case PA_SOURCE_UNLINKED:
+                    break;
+            }
+            break;
     }
     return pa_source_process_msg(o, code, data, offset, chunk);
 }
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 1ddfd25..bef6ae8 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -304,9 +304,9 @@ static void command_suspended(pa_pdispatch *pd,  uint32_t command,  uint32_t tag
     pa_log_debug("Server reports device suspend.");
 
 #ifdef TUNNEL_SINK
-    pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
+    pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(suspended), 0, NULL);
 #else
-    pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
+    pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(suspended), 0, NULL);
 #endif
 
     request_latency(u);
@@ -337,9 +337,9 @@ static void command_moved(pa_pdispatch *pd,  uint32_t command,  uint32_t tag, pa
     pa_log_debug("Server reports a stream move.");
 
 #ifdef TUNNEL_SINK
-    pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
+    pa_asyncmsgq_send(u->sink->asyncmsgq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(suspended), 0, NULL);
 #else
-    pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(!!suspended), 0, NULL);
+    pa_asyncmsgq_send(u->source->asyncmsgq, PA_MSGOBJECT(u->source), SOURCE_MESSAGE_REMOTE_SUSPEND, PA_UINT32_TO_PTR(suspended), 0, NULL);
 #endif
 
     request_latency(u);
@@ -457,7 +457,7 @@ static void stream_cork(struct userdata *u, bool cork) {
 #endif
     pa_tagstruct_putu32(t, u->ctag++);
     pa_tagstruct_putu32(t, u->channel);
-    pa_tagstruct_put_boolean(t, !!cork);
+    pa_tagstruct_put_boolean(t, cork);
     pa_pstream_send_tagstruct(u->pstream, t);
 
     request_latency(u);
@@ -717,7 +717,7 @@ static void thread_func(void *userdata) {
             pa_sink_process_rewind(u->sink, 0);
 #endif
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
@@ -1251,7 +1251,7 @@ static void sink_input_info_cb(pa_pdispatch *pd, uint32_t command,  uint32_t tag
 
     pa_assert(u->sink);
 
-    if ((u->version < 11 || !!mute == !!u->sink->muted) &&
+    if ((u->version < 11 || mute == u->sink->muted) &&
         pa_cvolume_equal(&volume, &u->sink->real_volume))
         return;
 
@@ -1780,14 +1780,14 @@ static void pstream_die_callback(pa_pstream *p, void *userdata) {
 }
 
 /* Called from main context */
-static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_creds *creds, void *userdata) {
+static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data, void *userdata) {
     struct userdata *u = userdata;
 
     pa_assert(p);
     pa_assert(packet);
     pa_assert(u);
 
-    if (pa_pdispatch_run(u->pdispatch, packet, creds, u) < 0) {
+    if (pa_pdispatch_run(u->pdispatch, packet, ancil_data, u) < 0) {
         pa_log("Invalid packet");
         pa_module_unload_request(u->module, true);
         return;
@@ -1906,7 +1906,7 @@ static void sink_set_mute(pa_sink *sink) {
     pa_tagstruct_putu32(t, PA_COMMAND_SET_SINK_INPUT_MUTE);
     pa_tagstruct_putu32(t, u->ctag++);
     pa_tagstruct_putu32(t, u->device_index);
-    pa_tagstruct_put_boolean(t, !!sink->muted);
+    pa_tagstruct_put_boolean(t, sink->muted);
     pa_pstream_send_tagstruct(u->pstream, t);
 }
 
@@ -1997,7 +1997,7 @@ int pa__init(pa_module*m) {
 #endif
 
         /* Figure out the cookie the same way a normal client would */
-        if (cookie_path)
+        if (!cookie_path)
             cookie_path = getenv(ENV_COOKIE_FILE);
 
 #ifdef HAVE_X11
diff --git a/src/modules/module-virtual-surround-sink.c b/src/modules/module-virtual-surround-sink.c
index 1d6cfc6..34f23fd 100644
--- a/src/modules/module-virtual-surround-sink.c
+++ b/src/modules/module-virtual-surround-sink.c
@@ -519,6 +519,45 @@ static pa_channel_position_t mirror_channel(pa_channel_position_t channel) {
     }
 }
 
+static void normalize_hrir(struct userdata *u) {
+    /* normalize hrir to avoid audible clipping
+     *
+     * The following heuristic tries to avoid audible clipping. It cannot avoid
+     * clipping in the worst case though, because the scaling factor would
+     * become too large resulting in a too quiet signal.
+     * The idea of the heuristic is to avoid clipping when a single click is
+     * played back on all channels. The scaling factor describes the additional
+     * factor that is necessary to avoid clipping for "normal" signals.
+     *
+     * This algorithm doesn't pretend to be perfect, it's just something that
+     * appears to work (not too quiet, no audible clipping) on the material that
+     * it has been tested on. If you find a real-world example where this
+     * algorithm results in audible clipping, please write a patch that adjusts
+     * the scaling factor constants or improves the algorithm (or if you can't
+     * write a patch, at least report the problem to the PulseAudio mailing list
+     * or bug tracker). */
+
+    const float scaling_factor = 2.5;
+
+    float hrir_sum, hrir_max;
+    unsigned i, j;
+
+    hrir_max = 0;
+    for (i = 0; i < u->hrir_samples; i++) {
+        hrir_sum = 0;
+        for (j = 0; j < u->hrir_channels; j++)
+            hrir_sum += fabs(u->hrir_data[i * u->hrir_channels + j]);
+
+        if (hrir_sum > hrir_max)
+            hrir_max = hrir_sum;
+    }
+
+    for (i = 0; i < u->hrir_samples; i++) {
+        for (j = 0; j < u->hrir_channels; j++)
+            u->hrir_data[i * u->hrir_channels + j] /= hrir_max * scaling_factor;
+    }
+}
+
 int pa__init(pa_module*m) {
     struct userdata *u;
     pa_sample_spec ss, sink_input_ss;
@@ -533,7 +572,6 @@ int pa__init(pa_module*m) {
 
     const char *hrir_file;
     unsigned i, j, found_channel_left, found_channel_right;
-    float hrir_sum, hrir_max;
     float *hrir_data;
 
     pa_sample_spec hrir_ss;
@@ -758,22 +796,7 @@ int pa__init(pa_module*m) {
         goto fail;
     }
 
-    /* normalize hrir to avoid clipping */
-    hrir_max = 0;
-    for (i = 0; i < u->hrir_samples; i++) {
-        hrir_sum = 0;
-        for (j = 0; j < u->hrir_channels; j++)
-            hrir_sum += fabs(u->hrir_data[i * u->hrir_channels + j]);
-
-        if (hrir_sum > hrir_max)
-            hrir_max = hrir_sum;
-    }
-    if (hrir_max > 1) {
-        for (i = 0; i < u->hrir_samples; i++) {
-            for (j = 0; j < u->hrir_channels; j++)
-                u->hrir_data[i * u->hrir_channels + j] /= hrir_max * 1.2;
-        }
-    }
+    normalize_hrir(u);
 
     /* create mapping between hrir and input */
     u->mapping_left = (unsigned *) pa_xnew0(unsigned, u->channels);
diff --git a/src/modules/module-waveout.c b/src/modules/module-waveout.c
index b274271..c420d4a 100644
--- a/src/modules/module-waveout.c
+++ b/src/modules/module-waveout.c
@@ -276,7 +276,7 @@ static void thread_func(void *userdata) {
             pa_rtpoll_set_timer_disabled(u->rtpoll);
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
index 0110e1d..aa9e891 100644
--- a/src/modules/module-zeroconf-publish.c
+++ b/src/modules/module-zeroconf-publish.c
@@ -141,6 +141,9 @@ struct userdata {
     pa_hook_slot *sink_new_slot, *source_new_slot, *sink_unlink_slot, *source_unlink_slot, *sink_changed_slot, *source_changed_slot;
 
     pa_native_protocol *native;
+
+    bool shutting_down; /* Used in the main thread. */
+    bool client_freed; /* Used in the Avahi thread. */
 };
 
 /* Runs in PA mainloop context */
@@ -373,10 +376,8 @@ static void publish_service(pa_mainloop_api *api PA_GCC_UNUSED, void *service) {
 finish:
 
     /* Remove this service */
-    if (r < 0) {
-        pa_hashmap_remove(s->userdata->services, s->key);
-        service_free(s);
-    }
+    if (r < 0)
+        pa_hashmap_remove_and_free(s->userdata->services, s->key);
 
     avahi_string_list_free(txt);
 }
@@ -467,16 +468,11 @@ static pa_hook_result_t device_new_or_changed_cb(pa_core *c, pa_object *o, struc
 
 /* Runs in PA mainloop context */
 static pa_hook_result_t device_unlink_cb(pa_core *c, pa_object *o, struct userdata *u) {
-    struct service *s;
-
     pa_assert(c);
     pa_object_assert_ref(o);
 
     pa_threaded_mainloop_lock(u->mainloop);
-
-    if ((s = pa_hashmap_remove(u->services, o)))
-        service_free(s);
-
+    pa_hashmap_remove_and_free(u->services, o);
     pa_threaded_mainloop_unlock(u->mainloop);
 
     return PA_HOOK_OK;
@@ -638,6 +634,11 @@ static void unpublish_all_services(struct userdata *u, bool rem) {
 static int avahi_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
     struct userdata *u = (struct userdata *) data;
 
+    pa_assert(u);
+
+    if (u->shutting_down)
+        return 0;
+
     switch (code) {
         case AVAHI_MESSAGE_PUBLISH_ALL:
             publish_all_services(u);
@@ -647,10 +648,6 @@ static int avahi_process_msg(pa_msgobject *o, int code, void *data, int64_t offs
             pa_module_unload(u->core, u->module, true);
             break;
 
-        case AVAHI_MESSAGE_SHUTDOWN_COMPLETE:
-            /* pa__done() is waiting for this */
-            break;
-
         default:
             pa_assert_not_reached();
     }
@@ -704,6 +701,16 @@ static void create_client(pa_mainloop_api *api PA_GCC_UNUSED, void *userdata) {
     struct userdata *u = (struct userdata *) userdata;
     int error;
 
+    /* create_client() and client_free() are called via defer events. If the
+     * two defer events are created very quickly one after another, we can't
+     * assume that the defer event that runs create_client() will be dispatched
+     * before the defer event that runs client_free() (at the time of writing,
+     * pa_mainloop actually always dispatches queued defer events in reverse
+     * creation order). For that reason we must be prepared for the case where
+     * client_free() has already been called. */
+    if (u->client_freed)
+        return;
+
     pa_thread_mq_install(&u->thread_mq);
 
     if (!(u->client = avahi_client_new(u->avahi_poll, AVAHI_CLIENT_NO_FAIL, client_callback, u, &error))) {
@@ -730,7 +737,7 @@ int pa__init(pa_module*m) {
         goto fail;
     }
 
-    m->userdata = u = pa_xnew(struct userdata, 1);
+    m->userdata = u = pa_xnew0(struct userdata, 1);
     u->core = m->core;
     u->module = m;
     u->native = pa_native_protocol_get(u->core);
@@ -754,8 +761,6 @@ int pa__init(pa_module*m) {
     u->source_changed_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_PROPLIST_CHANGED], PA_HOOK_LATE, (pa_hook_cb_t) device_new_or_changed_cb, u);
     u->source_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_UNLINK], PA_HOOK_LATE, (pa_hook_cb_t) device_unlink_cb, u);
 
-    u->main_entry_group = NULL;
-
     un = pa_get_user_name_malloc();
     hn = pa_get_host_name_malloc();
     u->service_name = pa_truncate_utf8(pa_sprintf_malloc("%s@%s", un, hn), AVAHI_LABEL_MAX-1);
@@ -797,7 +802,9 @@ static void client_free(pa_mainloop_api *api PA_GCC_UNUSED, void *userdata) {
     if (u->avahi_poll)
         pa_avahi_poll_free(u->avahi_poll);
 
-    pa_asyncmsgq_post(u->thread_mq.outq, PA_MSGOBJECT(u->msg), AVAHI_MESSAGE_SHUTDOWN_COMPLETE, NULL, 0, NULL, NULL);
+    pa_asyncmsgq_post(u->thread_mq.outq, PA_MSGOBJECT(u->msg), AVAHI_MESSAGE_SHUTDOWN_COMPLETE, u, 0, NULL, NULL);
+
+    u->client_freed = true;
 }
 
 void pa__done(pa_module*m) {
@@ -807,7 +814,11 @@ void pa__done(pa_module*m) {
     if (!(u = m->userdata))
         return;
 
+    u->shutting_down = true;
+
+    pa_threaded_mainloop_lock(u->mainloop);
     pa_mainloop_api_once(u->api, client_free, u);
+    pa_threaded_mainloop_unlock(u->mainloop);
     pa_asyncmsgq_wait_for(u->thread_mq.outq, AVAHI_MESSAGE_SHUTDOWN_COMPLETE);
 
     pa_threaded_mainloop_stop(u->mainloop);
diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c
index d661bde..2926f67 100644
--- a/src/modules/oss/module-oss.c
+++ b/src/modules/oss/module-oss.c
@@ -1131,7 +1131,7 @@ static void thread_func(void *userdata) {
         }
 
         /* Hmm, nothing to do. Let's sleep */
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/modules/raop/module-raop-sink.c b/src/modules/raop/module-raop-sink.c
index 2d08645..c510efd 100644
--- a/src/modules/raop/module-raop-sink.c
+++ b/src/modules/raop/module-raop-sink.c
@@ -466,7 +466,7 @@ static void thread_func(void *userdata) {
             pollfd->events = POLLOUT; /*PA_SINK_IS_OPENED(u->sink->thread_info.state)  ? POLLOUT : 0;*/
         }
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
@@ -518,15 +518,17 @@ int pa__init(pa_module*m) {
         goto fail;
     }
 
-    ss = m->core->default_sample_spec;
+    ss.format = PA_SAMPLE_S16NE;
+    ss.channels = 2;
+    ss.rate = m->core->default_sample_spec.rate;
     if (pa_modargs_get_sample_spec(ma, &ss) < 0) {
         pa_log("invalid sample format specification");
         goto fail;
     }
 
-    if ((/*ss.format != PA_SAMPLE_U8 &&*/ ss.format != PA_SAMPLE_S16NE) ||
+    if ((ss.format != PA_SAMPLE_S16NE) ||
         (ss.channels > 2)) {
-        pa_log("sample type support is limited to mono/stereo and U8 or S16NE sample data");
+        pa_log("sample type support is limited to mono/stereo and S16NE sample data");
         goto fail;
     }
 
diff --git a/src/modules/raop/raop_client.c b/src/modules/raop/raop_client.c
index 5bb0bb4..7a6d009 100644
--- a/src/modules/raop/raop_client.c
+++ b/src/modules/raop/raop_client.c
@@ -372,14 +372,19 @@ pa_raop_client* pa_raop_client_new(pa_core *core, const char* host) {
     pa_assert(core);
     pa_assert(host);
 
-    if (pa_parse_address(host, &a) < 0 || a.type == PA_PARSED_ADDRESS_UNIX)
+    if (pa_parse_address(host, &a) < 0)
         return NULL;
 
+    if (a.type == PA_PARSED_ADDRESS_UNIX) {
+        pa_xfree(a.path_or_host);
+        return NULL;
+    }
+
     c = pa_xnew0(pa_raop_client, 1);
     c->core = core;
     c->fd = -1;
 
-    c->host = pa_xstrdup(a.path_or_host);
+    c->host = a.path_or_host;
     if (a.port)
         c->port = a.port;
     else
diff --git a/src/modules/rtp/headerlist.c b/src/modules/rtp/headerlist.c
index 11e076e..3ed4062 100644
--- a/src/modules/rtp/headerlist.c
+++ b/src/modules/rtp/headerlist.c
@@ -129,16 +129,10 @@ const char *pa_headerlist_gets(pa_headerlist *p, const char *key) {
 }
 
 int pa_headerlist_remove(pa_headerlist *p, const char *key) {
-    struct header *hdr;
-
     pa_assert(p);
     pa_assert(key);
 
-    if (!(hdr = pa_hashmap_remove(MAKE_HASHMAP(p), key)))
-        return -1;
-
-    header_free(hdr);
-    return 0;
+    return pa_hashmap_remove_and_free(MAKE_HASHMAP(p), key);
 }
 
 const char *pa_headerlist_iterate(pa_headerlist *p, void **state) {
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index 9dc2feb..e1b6929 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -190,8 +190,7 @@ static void sink_input_kill(pa_sink_input* i) {
     pa_sink_input_assert_ref(i);
     pa_assert_se(s = i->userdata);
 
-    pa_hashmap_remove(s->userdata->by_origin, s->sdp_info.origin);
-    session_free(s);
+    pa_hashmap_remove_and_free(s->userdata->by_origin, s->sdp_info.origin);
 }
 
 /* Called from IO context */
@@ -647,10 +646,7 @@ static void sap_event_cb(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event
         return;
 
     if (goodbye) {
-
-        if ((s = pa_hashmap_remove(u->by_origin, info.origin)))
-            session_free(s);
-
+        pa_hashmap_remove_and_free(u->by_origin, info.origin);
         pa_sdp_info_destroy(&info);
     } else {
 
@@ -687,10 +683,8 @@ static void check_death_event_cb(pa_mainloop_api *m, pa_time_event *t, const str
 
         k = pa_atomic_load(&s->timestamp);
 
-        if (k + DEATH_TIMEOUT < now.tv_sec) {
-            pa_hashmap_remove(u->by_origin, s->sdp_info.origin);
-            session_free(s);
-        }
+        if (k + DEATH_TIMEOUT < now.tv_sec)
+            pa_hashmap_remove_and_free(u->by_origin, s->sdp_info.origin);
     }
 
     /* Restart timer */
diff --git a/src/modules/rtp/module-rtp-send.c b/src/modules/rtp/module-rtp-send.c
index 0cc595b..7347f78 100644
--- a/src/modules/rtp/module-rtp-send.c
+++ b/src/modules/rtp/module-rtp-send.c
@@ -398,7 +398,7 @@ int pa__init(pa_module*m) {
 #endif
     }
 
-    j = !!loop;
+    j = loop;
     if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &j, sizeof(j)) < 0 ||
         setsockopt(sap_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &j, sizeof(j)) < 0) {
         pa_log("IP_MULTICAST_LOOP failed: %s", pa_cstrerror(errno));
diff --git a/src/modules/rtp/rtp.c b/src/modules/rtp/rtp.c
index 570737e..7b75e0e 100644
--- a/src/modules/rtp/rtp.c
+++ b/src/modules/rtp/rtp.c
@@ -182,8 +182,29 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
         goto fail;
     }
 
-    if (size <= 0)
-        return 0;
+    if (size <= 0) {
+        /* size can be 0 due to any of the following reasons:
+         *
+         * 1. Somebody sent us a perfectly valid zero-length UDP packet.
+         * 2. Somebody sent us a UDP packet with a bad CRC.
+         *
+         * It is unknown whether size can actually be less than zero.
+         *
+         * In the first case, the packet has to be read out, otherwise the
+         * kernel will tell us again and again about it, thus preventing
+         * reception of any further packets. So let's just read it out
+         * now and discard it later, when comparing the number of bytes
+         * received (0) with the number of bytes wanted (1, see below).
+         *
+         * In the second case, recvmsg() will fail, thus allowing us to
+         * return the error.
+         *
+         * Just to avoid passing zero-sized memchunks and NULL pointers to
+         * recvmsg(), let's force allocation of at least one byte by setting
+         * size to 1.
+         */
+        size = 1;
+    }
 
     if (c->memchunk.length < (unsigned) size) {
         size_t l;
diff --git a/src/modules/xen/module-xenpv-sink.c b/src/modules/xen/module-xenpv-sink.c
index 9dbd660..aa8c417 100644
--- a/src/modules/xen/module-xenpv-sink.c
+++ b/src/modules/xen/module-xenpv-sink.c
@@ -353,7 +353,7 @@ static void thread_func(void *userdata) {
 
         pollfd->events = (short) (u->sink->thread_info.state == PA_SINK_RUNNING ? POLLOUT : 0);
 
-        if ((ret = pa_rtpoll_run(u->rtpoll, true)) < 0)
+        if ((ret = pa_rtpoll_run(u->rtpoll)) < 0)
             goto fail;
 
         if (ret == 0)
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 72e4130..e1b173a 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -536,6 +536,12 @@ pa_channel_map *pa_channel_map_parse(pa_channel_map *rmap, const char *s) {
         map.map[0] = PA_CHANNEL_POSITION_LEFT;
         map.map[1] = PA_CHANNEL_POSITION_RIGHT;
         goto finish;
+    } else if (pa_streq(s, "surround-21")) {
+        map.channels = 3;
+        map.map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
+        map.map[1] = PA_CHANNEL_POSITION_FRONT_RIGHT;
+        map.map[2] = PA_CHANNEL_POSITION_LFE;
+        goto finish;
     } else if (pa_streq(s, "surround-40")) {
         map.channels = 4;
         map.map[0] = PA_CHANNEL_POSITION_FRONT_LEFT;
diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c
index 8d0c612..0036e4a 100644
--- a/src/pulse/client-conf-x11.c
+++ b/src/pulse/client-conf-x11.c
@@ -37,14 +37,15 @@
 
 #include "client-conf-x11.h"
 
-int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) {
+int pa_client_conf_from_x11(pa_client_conf *c) {
+    const char *dname;
     xcb_connection_t *xcb = NULL;
     int ret = -1, screen = 0;
     char t[1024];
 
     pa_assert(c);
 
-    if (!dname && !(dname = getenv("DISPLAY")))
+    if (!(dname = getenv("DISPLAY")))
         goto finish;
 
     if (*dname == 0)
@@ -91,10 +92,12 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) {
     }
 
     if (pa_x11_get_prop(xcb, screen, "PULSE_COOKIE", t, sizeof(t))) {
-        if (pa_client_conf_load_cookie_from_hex(c, t) < 0) {
+        if (pa_parsehex(t, c->cookie_from_x11, sizeof(c->cookie_from_x11)) != sizeof(c->cookie_from_x11)) {
             pa_log(_("Failed to parse cookie data"));
             goto finish;
         }
+
+        c->cookie_from_x11_valid = true;
     }
 
     ret = 0;
diff --git a/src/pulse/client-conf-x11.h b/src/pulse/client-conf-x11.h
index dca9f0d..3d1dea0 100644
--- a/src/pulse/client-conf-x11.h
+++ b/src/pulse/client-conf-x11.h
@@ -24,8 +24,8 @@
 
 #include "client-conf.h"
 
-/* Load client configuration data from the specified X11 display,
- * overwriting the current settings in *c */
-int pa_client_conf_from_x11(pa_client_conf *c, const char *display);
+/* Load client configuration data from X11, overwriting the current settings in
+ * *c. */
+int pa_client_conf_from_x11(pa_client_conf *c);
 
 #endif
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index ee0271b..80ddae0 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -40,6 +40,10 @@
 
 #include "client-conf.h"
 
+#ifdef HAVE_X11
+#include <pulse/client-conf-x11.h>
+#endif
+
 #define DEFAULT_CLIENT_CONFIG_FILE PA_DEFAULT_CONFIG_DIR PA_PATH_SEP "client.conf"
 #define DEFAULT_CLIENT_CONFIG_FILE_USER "client.conf"
 
@@ -57,23 +61,26 @@ static const pa_client_conf default_conf = {
     .default_source = NULL,
     .default_server = NULL,
     .default_dbus_server = NULL,
+    .cookie_file_from_env = NULL,
+    .cookie_from_x11_valid = false,
+    .cookie_file_from_application = NULL,
+    .cookie_file_from_client_conf = NULL,
+#ifdef HAVE_SYSTEMD_DAEMON
+    .autospawn = false,
+#else
     .autospawn = true,
+#endif
     .disable_shm = false,
-    .cookie_file = NULL,
-    .cookie_valid = false,
     .shm_size = 0,
     .auto_connect_localhost = false,
     .auto_connect_display = false
 };
 
-static int parse_cookie_file(pa_client_conf* c);
-
 pa_client_conf *pa_client_conf_new(void) {
     pa_client_conf *c = pa_xmemdup(&default_conf, sizeof(default_conf));
 
     c->daemon_binary = pa_xstrdup(PA_BINARY);
     c->extra_arguments = pa_xstrdup("--log-target=syslog");
-    c->cookie_file = NULL;
 
     return c;
 }
@@ -86,64 +93,13 @@ void pa_client_conf_free(pa_client_conf *c) {
     pa_xfree(c->default_source);
     pa_xfree(c->default_server);
     pa_xfree(c->default_dbus_server);
-    pa_xfree(c->cookie_file);
+    pa_xfree(c->cookie_file_from_env);
+    pa_xfree(c->cookie_file_from_application);
+    pa_xfree(c->cookie_file_from_client_conf);
     pa_xfree(c);
 }
 
-int pa_client_conf_load(pa_client_conf *c, const char *filename) {
-    FILE *f = NULL;
-    char *fn = NULL;
-    int r = -1;
-
-    /* Prepare the configuration parse table */
-    pa_config_item table[] = {
-        { "daemon-binary",          pa_config_parse_string,   &c->daemon_binary, NULL },
-        { "extra-arguments",        pa_config_parse_string,   &c->extra_arguments, NULL },
-        { "default-sink",           pa_config_parse_string,   &c->default_sink, NULL },
-        { "default-source",         pa_config_parse_string,   &c->default_source, NULL },
-        { "default-server",         pa_config_parse_string,   &c->default_server, NULL },
-        { "default-dbus-server",    pa_config_parse_string,   &c->default_dbus_server, NULL },
-        { "autospawn",              pa_config_parse_bool,     &c->autospawn, NULL },
-        { "cookie-file",            pa_config_parse_string,   &c->cookie_file, NULL },
-        { "disable-shm",            pa_config_parse_bool,     &c->disable_shm, NULL },
-        { "enable-shm",             pa_config_parse_not_bool, &c->disable_shm, NULL },
-        { "shm-size-bytes",         pa_config_parse_size,     &c->shm_size, NULL },
-        { "auto-connect-localhost", pa_config_parse_bool,     &c->auto_connect_localhost, NULL },
-        { "auto-connect-display",   pa_config_parse_bool,     &c->auto_connect_display, NULL },
-        { NULL,                     NULL,                     NULL, NULL },
-    };
-
-    if (filename) {
-
-        if (!(f = pa_fopen_cloexec(filename, "r"))) {
-            pa_log(_("Failed to open configuration file '%s': %s"), fn, pa_cstrerror(errno));
-            goto finish;
-        }
-
-        fn = pa_xstrdup(fn);
-
-    } else {
-
-        if (!(f = pa_open_config_file(DEFAULT_CLIENT_CONFIG_FILE, DEFAULT_CLIENT_CONFIG_FILE_USER, ENV_CLIENT_CONFIG_FILE, &fn)))
-            if (errno != ENOENT)
-                goto finish;
-    }
-
-    r = f ? pa_config_parse(fn, f, table, NULL, NULL) : 0;
-
-    if (!r)
-        r = parse_cookie_file(c);
-
-finish:
-    pa_xfree(fn);
-
-    if (f)
-        fclose(f);
-
-    return r;
-}
-
-int pa_client_conf_env(pa_client_conf *c) {
+static void load_env(pa_client_conf *c) {
     char *e;
 
     if ((e = getenv(ENV_DEFAULT_SINK))) {
@@ -169,73 +125,120 @@ int pa_client_conf_env(pa_client_conf *c) {
         c->daemon_binary = pa_xstrdup(e);
     }
 
-    if ((e = getenv(ENV_COOKIE_FILE))) {
-        return pa_client_conf_load_cookie_from_file(c, e);
+    if ((e = getenv(ENV_COOKIE_FILE)) && *e) {
+        pa_xfree(c->cookie_file_from_env);
+        c->cookie_file_from_env = pa_xstrdup(e);
+    }
+}
+
+void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_env) {
+    FILE *f = NULL;
+    char *fn = NULL;
+
+    /* Prepare the configuration parse table */
+    pa_config_item table[] = {
+        { "daemon-binary",          pa_config_parse_string,   &c->daemon_binary, NULL },
+        { "extra-arguments",        pa_config_parse_string,   &c->extra_arguments, NULL },
+        { "default-sink",           pa_config_parse_string,   &c->default_sink, NULL },
+        { "default-source",         pa_config_parse_string,   &c->default_source, NULL },
+        { "default-server",         pa_config_parse_string,   &c->default_server, NULL },
+        { "default-dbus-server",    pa_config_parse_string,   &c->default_dbus_server, NULL },
+        { "autospawn",              pa_config_parse_bool,     &c->autospawn, NULL },
+        { "cookie-file",            pa_config_parse_string,   &c->cookie_file_from_client_conf, NULL },
+        { "disable-shm",            pa_config_parse_bool,     &c->disable_shm, NULL },
+        { "enable-shm",             pa_config_parse_not_bool, &c->disable_shm, NULL },
+        { "shm-size-bytes",         pa_config_parse_size,     &c->shm_size, NULL },
+        { "auto-connect-localhost", pa_config_parse_bool,     &c->auto_connect_localhost, NULL },
+        { "auto-connect-display",   pa_config_parse_bool,     &c->auto_connect_display, NULL },
+        { NULL,                     NULL,                     NULL, NULL },
+    };
+
+    f = pa_open_config_file(DEFAULT_CLIENT_CONFIG_FILE, DEFAULT_CLIENT_CONFIG_FILE_USER, ENV_CLIENT_CONFIG_FILE, &fn);
+    if (f) {
+        pa_config_parse(fn, f, table, NULL, NULL);
+        pa_xfree(fn);
+        fclose(f);
+    }
+
+    if (load_from_x11) {
+#ifdef HAVE_X11
+        pa_client_conf_from_x11(c);
+#endif
     }
 
-    return 0;
+    if (load_from_env)
+        load_env(c);
 }
 
-static int parse_cookie_file(pa_client_conf* c) {
-    int k;
+int pa_client_conf_load_cookie(pa_client_conf *c, uint8_t *cookie, size_t cookie_length) {
+    int r;
+    char *fallback_path;
 
     pa_assert(c);
+    pa_assert(cookie);
+    pa_assert(cookie_length > 0);
 
-    c->cookie_valid = false;
-
-    if (c->cookie_file)
-        k = pa_authkey_load_auto(c->cookie_file, true, c->cookie, sizeof(c->cookie));
-    else {
-        k = pa_authkey_load_auto(PA_NATIVE_COOKIE_FILE, false, c->cookie, sizeof(c->cookie));
+    if (c->cookie_file_from_env) {
+        r = pa_authkey_load(c->cookie_file_from_env, true, cookie, cookie_length);
+        if (r >= 0)
+            return 0;
 
-        if (k < 0) {
-            k = pa_authkey_load_auto(PA_NATIVE_COOKIE_FILE_FALLBACK, false, c->cookie, sizeof(c->cookie));
+        pa_log_warn("Failed to load cookie from %s (configured with environment variable PULSE_COOKIE): %s",
+                    c->cookie_file_from_env, pa_cstrerror(errno));
+    }
 
-            if (k < 0)
-                k = pa_authkey_load_auto(PA_NATIVE_COOKIE_FILE, true, c->cookie, sizeof(c->cookie));
+    if (c->cookie_from_x11_valid) {
+        if (cookie_length == sizeof(c->cookie_from_x11)) {
+            memcpy(cookie, c->cookie_from_x11, cookie_length);
+            return 0;
         }
-    }
 
-    if (k < 0)
-        return k;
+        pa_log_warn("Failed to load cookie from X11 root window property PULSE_COOKIE: size mismatch.");
+    }
 
-    c->cookie_valid = true;
-    return 0;
-}
+    if (c->cookie_file_from_application) {
+        r = pa_authkey_load(c->cookie_file_from_application, true, cookie, cookie_length);
+        if (r >= 0)
+            return 0;
 
-int pa_client_conf_load_cookie_from_hex(pa_client_conf* c, const char *cookie_in_hex) {
-    uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
+        pa_log_warn("Failed to load cookie from %s (configured by the application): %s", c->cookie_file_from_application,
+                    pa_cstrerror(errno));
+    }
 
-    pa_assert(c);
-    pa_assert(cookie_in_hex);
+    if (c->cookie_file_from_client_conf) {
+        r = pa_authkey_load(c->cookie_file_from_client_conf, true, cookie, cookie_length);
+        if (r >= 0)
+            return 0;
 
-    if (pa_parsehex(cookie_in_hex, cookie, sizeof(cookie)) != sizeof(cookie)) {
-        pa_log(_("Failed to parse cookie data"));
-        return -PA_ERR_INVALID;
+        pa_log_warn("Failed to load cookie from %s (configured in client.conf): %s", c->cookie_file_from_client_conf,
+                    pa_cstrerror(errno));
     }
 
-    pa_xfree(c->cookie_file);
-    c->cookie_file = NULL;
+    r = pa_authkey_load(PA_NATIVE_COOKIE_FILE, false, cookie, cookie_length);
+    if (r >= 0)
+        return 0;
 
-    return pa_client_conf_set_cookie(c, cookie, PA_NATIVE_COOKIE_LENGTH);
-}
+    if (pa_append_to_home_dir(PA_NATIVE_COOKIE_FILE_FALLBACK, &fallback_path) > 0) {
+        r = pa_authkey_load(fallback_path, false, cookie, cookie_length);
+        pa_xfree(fallback_path);
+        if (r >= 0)
+            return 0;
+    }
 
-int pa_client_conf_load_cookie_from_file(pa_client_conf *c, const char *cookie_file_path) {
-    pa_assert(c);
-    pa_assert(cookie_file_path);
+    r = pa_authkey_load(PA_NATIVE_COOKIE_FILE, true, cookie, cookie_length);
+    if (r >= 0)
+        return 0;
 
-    pa_xfree(c->cookie_file);
-    c->cookie_file = pa_xstrdup(cookie_file_path);
-    return parse_cookie_file(c);
+    pa_log("Failed to load cookie file from %s: %s", PA_NATIVE_COOKIE_FILE, pa_cstrerror(errno));
+    memset(cookie, 0, cookie_length);
+
+    return -1;
 }
 
-int pa_client_conf_set_cookie(pa_client_conf *c, uint8_t *cookie, size_t cookie_size) {
+void pa_client_conf_set_cookie_file_from_application(pa_client_conf *c, const char *cookie_file) {
     pa_assert(c);
-    pa_assert(cookie);
+    pa_assert(!cookie_file || *cookie_file);
 
-    if (cookie_size != PA_NATIVE_COOKIE_LENGTH)
-        return -PA_ERR_INVALID;
-    memcpy(c->cookie, cookie, cookie_size);
-    c->cookie_valid = true;
-    return 0;
+    pa_xfree(c->cookie_file_from_application);
+    c->cookie_file_from_application = pa_xstrdup(cookie_file);
 }
diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h
index 87d42d8..3c7fd7d 100644
--- a/src/pulse/client-conf.h
+++ b/src/pulse/client-conf.h
@@ -28,10 +28,18 @@
 /* A structure containing configuration data for PulseAudio clients. */
 
 typedef struct pa_client_conf {
-    char *daemon_binary, *extra_arguments, *default_sink, *default_source, *default_server, *default_dbus_server, *cookie_file;
+    char *daemon_binary;
+    char *extra_arguments;
+    char *default_sink;
+    char *default_source;
+    char *default_server;
+    char *default_dbus_server;
+    char *cookie_file_from_env;
+    uint8_t cookie_from_x11[PA_NATIVE_COOKIE_LENGTH];
+    bool cookie_from_x11_valid;
+    char *cookie_file_from_application;
+    char *cookie_file_from_client_conf;
     bool autospawn, disable_shm, auto_connect_localhost, auto_connect_display;
-    uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
-    bool cookie_valid; /* non-zero, when cookie is valid */
     size_t shm_size;
 } pa_client_conf;
 
@@ -39,22 +47,17 @@ typedef struct pa_client_conf {
 pa_client_conf *pa_client_conf_new(void);
 void pa_client_conf_free(pa_client_conf *c);
 
-/* Load the configuration data from the specified file, overwriting
- * the current settings in *c. When the filename is NULL, the
- * default client configuration file name is used. */
-int pa_client_conf_load(pa_client_conf *c, const char *filename);
+/* Load the configuration data from the client configuration file and
+ * optionally from X11 and/or environment variables, overwriting the current
+ * settings in *c. */
+void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_env);
 
-/* Load the configuration data from the environment of the current
-   process, overwriting the current settings in *c. */
-int pa_client_conf_env(pa_client_conf *c);
+/* Load the cookie from the cookie sources specified in the configuration, or
+ * if nothing is specified or none of the sources work, load the cookie from
+ * the default source. If the default source doesn't work either, this function
+ * returns a negative value and initializes the cookie to all-zeroes. */
+int pa_client_conf_load_cookie(pa_client_conf *c, uint8_t *cookie, size_t cookie_length);
 
-/* Load cookie data from cookie_file_path into c->cookie */
-int pa_client_conf_load_cookie_from_file(pa_client_conf *c, const char *cookie_file_path);
-
-/* Load cookie data from hexdecimal string into c->cookie */
-int pa_client_conf_load_cookie_from_hex(pa_client_conf *c, const char *cookie_in_hex);
-
-/* Set cookie direct from memory */
-int pa_client_conf_set_cookie(pa_client_conf *c, uint8_t *cookie, size_t cookie_size);
+void pa_client_conf_set_cookie_file_from_application(pa_client_conf *c, const char *cookie_file);
 
 #endif
diff --git a/src/pulse/client.conf.in b/src/pulse/client.conf.in
index 17753b0..446e22a 100644
--- a/src/pulse/client.conf.in
+++ b/src/pulse/client.conf.in
@@ -24,7 +24,7 @@
 ; default-server =
 ; default-dbus-server =
 
-; autospawn = yes
+; autospawn = @PA_DEFAULT_AUTOSPAWN@
 ; daemon-binary = @PA_BINARY@
 ; extra-arguments = --log-target=syslog
 
diff --git a/src/pulse/context.c b/src/pulse/context.c
index b78df27..d5da9b8 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -48,9 +48,6 @@
 #include <pulse/timeval.h>
 #include <pulse/fork-detect.h>
 #include <pulse/client-conf.h>
-#ifdef HAVE_X11
-#include <pulse/client-conf-x11.h>
-#endif
 
 #include <pulsecore/core-error.h>
 #include <pulsecore/i18n.h>
@@ -72,6 +69,8 @@
 #include "context.h"
 
 void pa_command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void pa_command_enable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void pa_command_disable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
 
 static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
     [PA_COMMAND_REQUEST] = pa_command_request,
@@ -90,7 +89,9 @@ static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
     [PA_COMMAND_RECORD_STREAM_EVENT] = pa_command_stream_event,
     [PA_COMMAND_CLIENT_EVENT] = pa_command_client_event,
     [PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED] = pa_command_stream_buffer_attr,
-    [PA_COMMAND_RECORD_BUFFER_ATTR_CHANGED] = pa_command_stream_buffer_attr
+    [PA_COMMAND_RECORD_BUFFER_ATTR_CHANGED] = pa_command_stream_buffer_attr,
+    [PA_COMMAND_ENABLE_SRBCHANNEL] = pa_command_enable_srbchannel,
+    [PA_COMMAND_DISABLE_SRBCHANNEL] = pa_command_disable_srbchannel,
 };
 static void context_free(pa_context *c);
 
@@ -166,11 +167,10 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *
 #endif
 
     c->conf = pa_client_conf_new();
-    pa_client_conf_load(c->conf, NULL);
-#ifdef HAVE_X11
-    pa_client_conf_from_x11(c->conf, NULL);
-#endif
-    pa_client_conf_env(c->conf);
+    pa_client_conf_load(c->conf, true, true);
+
+    c->srb_template.readfd = -1;
+    c->srb_template.writefd = -1;
 
     if (!(c->mempool = pa_mempool_new(!c->conf->disable_shm, c->conf->shm_size))) {
 
@@ -213,6 +213,11 @@ static void context_unlink(pa_context *c) {
         c->pstream = NULL;
     }
 
+    if (c->srb_template.memblock) {
+        pa_memblock_unref(c->srb_template.memblock);
+        c->srb_template.memblock = NULL;
+    }
+
     if (c->client) {
         pa_socket_client_unref(c->client);
         c->client = NULL;
@@ -323,7 +328,7 @@ static void pstream_die_callback(pa_pstream *p, void *userdata) {
     pa_context_fail(c, PA_ERR_CONNECTIONTERMINATED);
 }
 
-static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_creds *creds, void *userdata) {
+static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data, void *userdata) {
     pa_context *c = userdata;
 
     pa_assert(p);
@@ -332,12 +337,49 @@ static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_c
 
     pa_context_ref(c);
 
-    if (pa_pdispatch_run(c->pdispatch, packet, creds, c) < 0)
+    if (pa_pdispatch_run(c->pdispatch, packet, ancil_data, c) < 0)
         pa_context_fail(c, PA_ERR_PROTOCOL);
 
     pa_context_unref(c);
 }
 
+static void handle_srbchannel_memblock(pa_context *c, pa_memblock *memblock) {
+    pa_srbchannel *sr;
+    pa_tagstruct *t;
+
+    pa_assert(c);
+
+    /* Memblock sanity check */
+    if (!memblock) {
+        pa_context_fail(c, PA_ERR_PROTOCOL);
+        return;
+    } else if (pa_memblock_is_read_only(memblock)) {
+        pa_context_fail(c, PA_ERR_PROTOCOL);
+        return;
+    } else if (pa_memblock_is_ours(memblock)) {
+        pa_context_fail(c, PA_ERR_PROTOCOL);
+        return;
+    }
+
+    /* Create the srbchannel */
+    c->srb_template.memblock = memblock;
+    pa_memblock_ref(memblock);
+    sr = pa_srbchannel_new_from_template(c->mainloop, &c->srb_template);
+    if (!sr) {
+        pa_context_fail(c, PA_ERR_PROTOCOL);
+        return;
+    }
+
+    /* Ack the enable command */
+    t = pa_tagstruct_new(NULL, 0);
+    pa_tagstruct_putu32(t, PA_COMMAND_ENABLE_SRBCHANNEL);
+    pa_tagstruct_putu32(t, c->srb_setup_tag);
+    pa_pstream_send_tagstruct(c->pstream, t);
+
+    /* ...and switch over */
+    pa_pstream_set_srbchannel(c->pstream, sr);
+}
+
 static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata) {
     pa_context *c = userdata;
     pa_stream *s;
@@ -350,6 +392,12 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o
 
     pa_context_ref(c);
 
+    if (c->srb_template.readfd != -1 && c->srb_template.memblock == NULL) {
+        handle_srbchannel_memblock(c, chunk->memblock);
+        pa_context_unref(c);
+        return;
+    }
+
     if ((s = pa_hashmap_get(c->record_streams, PA_UINT32_TO_PTR(channel)))) {
 
         if (chunk->memblock) {
@@ -506,6 +554,7 @@ finish:
 }
 
 static void setup_context(pa_context *c, pa_iochannel *io) {
+    uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
     pa_tagstruct *t;
     uint32_t tag;
 
@@ -524,8 +573,8 @@ static void setup_context(pa_context *c, pa_iochannel *io) {
     pa_assert(!c->pdispatch);
     c->pdispatch = pa_pdispatch_new(c->mainloop, c->use_rtclock, command_table, PA_COMMAND_MAX);
 
-    if (!c->conf->cookie_valid)
-        pa_log_info(_("No cookie loaded. Attempting to connect without."));
+    if (pa_client_conf_load_cookie(c->conf, cookie, sizeof(cookie)) < 0)
+        pa_log_info("No cookie loaded. Attempting to connect without.");
 
     t = pa_tagstruct_command(c, PA_COMMAND_AUTH, &tag);
 
@@ -538,7 +587,7 @@ static void setup_context(pa_context *c, pa_iochannel *io) {
     /* Starting with protocol version 13 we use the MSB of the version
      * tag for informing the other side if we could do SHM or not */
     pa_tagstruct_putu32(t, PA_PROTOCOL_VERSION | (c->do_shm ? 0x80000000U : 0));
-    pa_tagstruct_put_arbitrary(t, c->conf->cookie, sizeof(c->conf->cookie));
+    pa_tagstruct_put_arbitrary(t, cookie, sizeof(cookie));
 
 #ifdef HAVE_CREDS
 {
@@ -782,7 +831,7 @@ static int try_next_connection(pa_context *c) {
         if (!(c->client = pa_socket_client_new_string(c->mainloop, c->use_rtclock, u, PA_NATIVE_DEFAULT_PORT)))
             continue;
 
-        c->is_local = !!pa_socket_client_is_local(c->client);
+        c->is_local = pa_socket_client_is_local(c->client);
         pa_socket_client_set_callback(c->client, on_connection, c);
         break;
     }
@@ -1181,7 +1230,7 @@ int pa_context_is_local(pa_context *c) {
     PA_CHECK_VALIDITY_RETURN_ANY(c, !pa_detect_fork(), PA_ERR_FORKED, -1);
     PA_CHECK_VALIDITY_RETURN_ANY(c, PA_CONTEXT_IS_GOOD(c->state), PA_ERR_BADSTATE, -1);
 
-    return !!c->is_local;
+    return c->is_local;
 }
 
 pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata) {
@@ -1368,6 +1417,72 @@ finish:
     pa_context_unref(c);
 }
 
+static void pa_command_enable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+    pa_context *c = userdata;
+
+#ifdef HAVE_CREDS
+    const int *fds;
+    int nfd;
+
+    pa_assert(pd);
+    pa_assert(command == PA_COMMAND_ENABLE_SRBCHANNEL);
+    pa_assert(t);
+    pa_assert(c);
+    pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+    /* Currently only one srb channel is supported, might change in future versions */
+    if (c->srb_template.readfd != -1) {
+        pa_context_fail(c, PA_ERR_PROTOCOL);
+        return;
+    }
+
+    fds = pa_pdispatch_fds(pd, &nfd);
+    if (nfd != 2 || !fds || fds[0] == -1 || fds[1] == -1) {
+        pa_context_fail(c, PA_ERR_PROTOCOL);
+        return;
+    }
+
+    pa_context_ref(c);
+
+    c->srb_template.readfd = fds[0];
+    c->srb_template.writefd = fds[1];
+    c->srb_setup_tag = tag;
+
+    pa_context_unref(c);
+
+#else
+    pa_assert(c);
+    pa_context_fail(c, PA_ERR_PROTOCOL);
+#endif
+}
+
+static void pa_command_disable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+    pa_context *c = userdata;
+    pa_tagstruct *t2;
+
+    pa_assert(pd);
+    pa_assert(command == PA_COMMAND_DISABLE_SRBCHANNEL);
+    pa_assert(t);
+    pa_assert(c);
+    pa_assert(PA_REFCNT_VALUE(c) >= 1);
+
+    pa_pstream_set_srbchannel(c->pstream, NULL);
+
+    c->srb_template.readfd = -1;
+    c->srb_template.writefd = -1;
+    if (c->srb_template.memblock) {
+        pa_memblock_unref(c->srb_template.memblock);
+        c->srb_template.memblock = NULL;
+    }
+
+    /* Send disable command back again */
+    t2 = pa_tagstruct_new(NULL, 0);
+    pa_tagstruct_putu32(t2, PA_COMMAND_DISABLE_SRBCHANNEL);
+    pa_tagstruct_putu32(t2, tag);
+    pa_pstream_send_tagstruct(c->pstream, t2);
+}
+
+
 void pa_command_client_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
     pa_context *c = userdata;
     pa_proplist *pl = NULL;
@@ -1451,11 +1566,13 @@ size_t pa_context_get_tile_size(pa_context *c, const pa_sample_spec *ss) {
 
 int pa_context_load_cookie_from_file(pa_context *c, const char *cookie_file_path) {
     pa_assert(c);
-    pa_assert(cookie_file_path);
     pa_assert(PA_REFCNT_VALUE(c) >= 1);
 
     PA_CHECK_VALIDITY(c, !pa_detect_fork(), PA_ERR_FORKED);
     PA_CHECK_VALIDITY(c, c->state == PA_CONTEXT_UNCONNECTED, PA_ERR_BADSTATE);
+    PA_CHECK_VALIDITY(c, !cookie_file_path || *cookie_file_path, PA_ERR_INVALID);
 
-    return pa_client_conf_load_cookie_from_file(c->conf, cookie_file_path);
+    pa_client_conf_set_cookie_file_from_application(c->conf, cookie_file_path);
+
+    return 0;
 }
diff --git a/src/pulse/def.h b/src/pulse/def.h
index d6fa912..ee7404d 100644
--- a/src/pulse/def.h
+++ b/src/pulse/def.h
@@ -197,7 +197,7 @@ typedef enum pa_stream_flags {
      * return always monotonically increasing time values on each
      * call. This may confuse applications which cannot deal with time
      * going 'backwards', but has the advantage that bad transport
-     * latency estimations that caused the time to to jump ahead can
+     * latency estimations that caused the time to jump ahead can
      * be corrected quickly, without the need to wait. (Please note
      * that this flag was named PA_STREAM_NOT_MONOTONOUS in releases
      * prior to 0.9.11. The old name is still defined too, for
@@ -464,7 +464,7 @@ typedef enum pa_error_code {
     PA_ERR_CONNECTIONREFUSED,      /**< Connection refused */
     PA_ERR_PROTOCOL,               /**< Protocol error */
     PA_ERR_TIMEOUT,                /**< Timeout */
-    PA_ERR_AUTHKEY,                /**< No authorization key */
+    PA_ERR_AUTHKEY,                /**< No authentication key */
     PA_ERR_INTERNAL,               /**< Internal error */
     PA_ERR_CONNECTIONTERMINATED,   /**< Connection terminated */
     PA_ERR_KILLED,                 /**< Entity killed */
diff --git a/src/pulsecore/cpu.h b/src/pulse/direction.c
similarity index 52%
copy from src/pulsecore/cpu.h
copy to src/pulse/direction.c
index 7fe6f0b..95f5e00 100644
--- a/src/pulsecore/cpu.h
+++ b/src/pulse/direction.c
@@ -1,10 +1,7 @@
-#ifndef foocpuhfoo
-#define foocpuhfoo
-
 /***
   This file is part of PulseAudio.
 
-  Copyright 2010 Arun Raghavan
+  Copyright 2014 Intel Corporation
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
@@ -22,24 +19,28 @@
   USA.
 ***/
 
-#include <pulsecore/cpu-x86.h>
-#include <pulsecore/cpu-arm.h>
+#include "direction.h"
+
+#include <pulsecore/i18n.h>
 
-typedef enum {
-    PA_CPU_UNDEFINED = 0,
-    PA_CPU_X86,
-    PA_CPU_ARM,
-} pa_cpu_type_t;
+int pa_direction_valid(pa_direction_t direction) {
+    if (direction != PA_DIRECTION_INPUT
+            && direction != PA_DIRECTION_OUTPUT
+            && direction != (PA_DIRECTION_INPUT | PA_DIRECTION_OUTPUT))
+        return 0;
 
-typedef struct pa_cpu_info pa_cpu_info;
+    return 1;
+}
 
-struct pa_cpu_info {
-    pa_cpu_type_t cpu_type;
+const char *pa_direction_to_string(pa_direction_t direction) {
+    pa_init_i18n();
 
-    union {
-        pa_cpu_x86_flag_t x86;
-        pa_cpu_arm_flag_t arm;
-    } flags;
-};
+    if (direction == PA_DIRECTION_INPUT)
+        return _("input");
+    if (direction == PA_DIRECTION_OUTPUT)
+        return _("output");
+    if (direction == (PA_DIRECTION_INPUT | PA_DIRECTION_OUTPUT))
+        return _("bidirectional");
 
-#endif /* foocpuhfoo */
+    return _("invalid");
+}
diff --git a/src/pulse/client-conf-x11.h b/src/pulse/direction.h
similarity index 61%
copy from src/pulse/client-conf-x11.h
copy to src/pulse/direction.h
index dca9f0d..127f07a 100644
--- a/src/pulse/client-conf-x11.h
+++ b/src/pulse/direction.h
@@ -1,10 +1,10 @@
-#ifndef fooclientconfx11hfoo
-#define fooclientconfx11hfoo
+#ifndef foodirectionhfoo
+#define foodirectionhfoo
 
 /***
   This file is part of PulseAudio.
 
-  Copyright 2004-2006 Lennart Poettering
+  Copyright 2014 Intel Corporation
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
@@ -22,10 +22,16 @@
   USA.
 ***/
 
-#include "client-conf.h"
+#include <pulse/def.h>
 
-/* Load client configuration data from the specified X11 display,
- * overwriting the current settings in *c */
-int pa_client_conf_from_x11(pa_client_conf *c, const char *display);
+/** \file
+ * Utility functions for \ref pa_direction_t. */
+
+/** Return non-zero if the given value is a valid direction (either input,
+ * output or bidirectional). \since 6.0 */
+int pa_direction_valid(pa_direction_t direction) PA_GCC_CONST;
+
+/** Return a textual representation of the direction. \since 6.0 */
+const char *pa_direction_to_string(pa_direction_t direction);
 
 #endif
diff --git a/src/pulse/error.c b/src/pulse/error.c
index 751d42a..27b8ec4 100644
--- a/src/pulse/error.c
+++ b/src/pulse/error.c
@@ -46,7 +46,7 @@ const char*pa_strerror(int error) {
         [PA_ERR_CONNECTIONREFUSED] = N_("Connection refused"),
         [PA_ERR_PROTOCOL] = N_("Protocol error"),
         [PA_ERR_TIMEOUT] = N_("Timeout"),
-        [PA_ERR_AUTHKEY] = N_("No authorization key"),
+        [PA_ERR_AUTHKEY] = N_("No authentication key"),
         [PA_ERR_INTERNAL] = N_("Internal error"),
         [PA_ERR_CONNECTIONTERMINATED] = N_("Connection terminated"),
         [PA_ERR_KILLED] = N_("Entity killed"),
diff --git a/src/pulse/ext-device-manager.c b/src/pulse/ext-device-manager.c
index 7fbb7de..9158068 100644
--- a/src/pulse/ext-device-manager.c
+++ b/src/pulse/ext-device-manager.c
@@ -225,6 +225,7 @@ pa_operation *pa_ext_device_manager_set_device_description(
     PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED);
     PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE);
     PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 14, PA_ERR_NOTSUPPORTED);
+    PA_CHECK_VALIDITY_RETURN_NULL(c, *description, PA_ERR_INVALID);
 
     o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);
 
diff --git a/src/pulse/ext-device-manager.h b/src/pulse/ext-device-manager.h
index 1e41ebd..1ee6830 100644
--- a/src/pulse/ext-device-manager.h
+++ b/src/pulse/ext-device-manager.h
@@ -34,6 +34,9 @@
 
 PA_C_DECL_BEGIN
 
+/* Don't extend this struct! It will break binary compatibility, because
+ * pa_ext_device_manager_info.role_priorities points to an array of structs
+ * instead of an array of pointers to structs. */
 typedef struct pa_ext_device_manager_role_priority_info {
     const char *role;
     uint32_t priority;
diff --git a/src/pulse/format.c b/src/pulse/format.c
index 729c2d2..1aa3377 100644
--- a/src/pulse/format.c
+++ b/src/pulse/format.c
@@ -249,7 +249,7 @@ pa_prop_type_t pa_format_info_get_prop_type(const pa_format_info *f, const char
         return PA_PROP_TYPE_INVALID;
 
     o = json_tokener_parse(str);
-    if (is_error(o))
+    if (!o)
         return PA_PROP_TYPE_INVALID;
 
     switch (json_object_get_type(o)) {
@@ -278,25 +278,20 @@ pa_prop_type_t pa_format_info_get_prop_type(const pa_format_info *f, const char
             else
                 type = PA_PROP_TYPE_INVALID;
 
-            json_object_put(o1);
             break;
 
         case json_type_object:
             /* We actually know at this point that it's a int range, but let's
              * confirm. */
-            o1 = json_object_object_get(o, PA_JSON_MIN_KEY);
-            if (!o1) {
+            if (!json_object_object_get_ex(o, PA_JSON_MIN_KEY, NULL)) {
                 type = PA_PROP_TYPE_INVALID;
                 break;
             }
-            json_object_put(o1);
 
-            o1 = json_object_object_get(o, PA_JSON_MAX_KEY);
-            if (!o1) {
+            if (!json_object_object_get_ex(o, PA_JSON_MAX_KEY, NULL)) {
                 type = PA_PROP_TYPE_INVALID;
                 break;
             }
-            json_object_put(o1);
 
             type = PA_PROP_TYPE_INT_RANGE;
             break;
@@ -323,7 +318,7 @@ int pa_format_info_get_prop_int(const pa_format_info *f, const char *key, int *v
         return -PA_ERR_NOENTITY;
 
     o = json_tokener_parse(str);
-    if (is_error(o)) {
+    if (!o) {
         pa_log_debug("Failed to parse format info property '%s'.", key);
         return -PA_ERR_INVALID;
     }
@@ -355,7 +350,7 @@ int pa_format_info_get_prop_int_range(const pa_format_info *f, const char *key,
         return -PA_ERR_NOENTITY;
 
     o = json_tokener_parse(str);
-    if (is_error(o)) {
+    if (!o) {
         pa_log_debug("Failed to parse format info property '%s'.", key);
         return -PA_ERR_INVALID;
     }
@@ -363,17 +358,15 @@ int pa_format_info_get_prop_int_range(const pa_format_info *f, const char *key,
     if (json_object_get_type(o) != json_type_object)
         goto out;
 
-    if (!(o1 = json_object_object_get(o, PA_JSON_MIN_KEY)))
+    if (!json_object_object_get_ex(o, PA_JSON_MIN_KEY, &o1))
         goto out;
 
     *min = json_object_get_int(o1);
-    json_object_put(o1);
 
-    if (!(o1 = json_object_object_get(o, PA_JSON_MAX_KEY)))
+    if (!json_object_object_get_ex(o, PA_JSON_MAX_KEY, &o1))
         goto out;
 
     *max = json_object_get_int(o1);
-    json_object_put(o1);
 
     ret = 0;
 
@@ -400,7 +393,7 @@ int pa_format_info_get_prop_int_array(const pa_format_info *f, const char *key,
         return -PA_ERR_NOENTITY;
 
     o = json_tokener_parse(str);
-    if (is_error(o)) {
+    if (!o) {
         pa_log_debug("Failed to parse format info property '%s'.", key);
         return -PA_ERR_INVALID;
     }
@@ -415,12 +408,10 @@ int pa_format_info_get_prop_int_array(const pa_format_info *f, const char *key,
         o1 = json_object_array_get_idx(o, i);
 
         if (json_object_get_type(o1) != json_type_int) {
-            json_object_put(o1);
             goto out;
         }
 
         (*values)[i] = json_object_get_int(o1);
-        json_object_put(o1);
     }
 
     ret = 0;
@@ -446,7 +437,7 @@ int pa_format_info_get_prop_string(const pa_format_info *f, const char *key, cha
         return -PA_ERR_NOENTITY;
 
     o = json_tokener_parse(str);
-    if (is_error(o)) {
+    if (!o) {
         pa_log_debug("Failed to parse format info property '%s'.", key);
         return -PA_ERR_INVALID;
     }
@@ -478,7 +469,7 @@ int pa_format_info_get_prop_string_array(const pa_format_info *f, const char *ke
         return -PA_ERR_NOENTITY;
 
     o = json_tokener_parse(str);
-    if (is_error(o)) {
+    if (!o) {
         pa_log_debug("Failed to parse format info property '%s'.", key);
         return -PA_ERR_INVALID;
     }
@@ -493,12 +484,10 @@ int pa_format_info_get_prop_string_array(const pa_format_info *f, const char *ke
         o1 = json_object_array_get_idx(o, i);
 
         if (json_object_get_type(o1) != json_type_string) {
-            json_object_put(o1);
             goto out;
         }
 
         (*values)[i] = pa_xstrdup(json_object_get_string(o1));
-        json_object_put(o1);
     }
 
     ret = 0;
@@ -637,11 +626,11 @@ static int pa_format_info_prop_compatible(const char *one, const char *two) {
     int i, ret = 0;
 
     o1 = json_tokener_parse(one);
-    if (is_error(o1))
+    if (!o1)
         goto out;
 
     o2 = json_tokener_parse(two);
-    if (is_error(o2))
+    if (!o2)
         goto out;
 
     /* We don't deal with both values being non-fixed - just because there is no immediate need (FIXME) */
@@ -677,12 +666,12 @@ static int pa_format_info_prop_compatible(const char *one, const char *two) {
             goto out;
         }
 
-        o_min = json_object_object_get(o1, PA_JSON_MIN_KEY);
-        if (!o_min || json_object_get_type(o_min) != json_type_int)
+        if (!json_object_object_get_ex(o1, PA_JSON_MIN_KEY, &o_min) ||
+            json_object_get_type(o_min) != json_type_int)
             goto out;
 
-        o_max = json_object_object_get(o1, PA_JSON_MAX_KEY);
-        if (!o_max || json_object_get_type(o_max) != json_type_int)
+        if (!json_object_object_get_ex(o1, PA_JSON_MAX_KEY, &o_max) ||
+            json_object_get_type(o_max) != json_type_int)
             goto out;
 
         v = json_object_get_int(o2);
diff --git a/src/pulse/internal.h b/src/pulse/internal.h
index c5084d5..fc2b702 100644
--- a/src/pulse/internal.h
+++ b/src/pulse/internal.h
@@ -66,6 +66,9 @@ struct pa_context {
     pa_pstream *pstream;
     pa_pdispatch *pdispatch;
 
+    pa_srbchannel_template srb_template;
+    uint32_t srb_setup_tag;
+
     pa_hashmap *record_streams, *playback_streams;
     PA_LLIST_HEAD(pa_stream, streams);
     PA_LLIST_HEAD(pa_operation, operations);
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 2d54fdb..d7696df 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -25,6 +25,7 @@
 #endif
 
 #include <pulse/context.h>
+#include <pulse/direction.h>
 #include <pulse/xmalloc.h>
 #include <pulse/fork-detect.h>
 
@@ -823,15 +824,14 @@ static int fill_card_port_info(pa_context *context, pa_tagstruct* t, pa_card_inf
             pa_tagstruct_getu32(t, &port->priority) < 0 ||
             pa_tagstruct_getu32(t, &available) < 0 ||
             pa_tagstruct_getu8(t, &direction) < 0 ||
+            !pa_direction_valid(direction) ||
             pa_tagstruct_get_proplist(t, port->proplist) < 0 ||
             pa_tagstruct_getu32(t, &port->n_profiles) < 0) {
 
             return -PA_ERR_PROTOCOL;
         }
 
-        if (available > PA_PORT_AVAILABLE_YES ||
-            direction > PA_DIRECTION_OUTPUT + PA_DIRECTION_INPUT) {
-
+        if (available > PA_PORT_AVAILABLE_YES ) {
             return -PA_ERR_PROTOCOL;
         }
 
diff --git a/src/pulse/mainloop-api.h b/src/pulse/mainloop-api.h
index 600e0e3..d03e0e6 100644
--- a/src/pulse/mainloop-api.h
+++ b/src/pulse/mainloop-api.h
@@ -61,21 +61,21 @@ typedef enum pa_io_event_flags {
 typedef struct pa_io_event pa_io_event;
 /** An IO event callback prototype \since 0.9.3 */
 typedef void (*pa_io_event_cb_t)(pa_mainloop_api*ea, pa_io_event* e, int fd, pa_io_event_flags_t events, void *userdata);
-/** A IO event destroy callback prototype \ since 0.9.3 */
+/** A IO event destroy callback prototype \since 0.9.3 */
 typedef void (*pa_io_event_destroy_cb_t)(pa_mainloop_api*a, pa_io_event *e, void *userdata);
 
 /** An opaque timer event source object */
 typedef struct pa_time_event pa_time_event;
 /** A time event callback prototype \since 0.9.3 */
 typedef void (*pa_time_event_cb_t)(pa_mainloop_api*a, pa_time_event* e, const struct timeval *tv, void *userdata);
-/** A time event destroy callback prototype \ since 0.9.3 */
+/** A time event destroy callback prototype \since 0.9.3 */
 typedef void (*pa_time_event_destroy_cb_t)(pa_mainloop_api*a, pa_time_event *e, void *userdata);
 
 /** An opaque deferred event source object. Events of this type are triggered once in every main loop iteration */
 typedef struct pa_defer_event pa_defer_event;
 /** A defer event callback prototype \since 0.9.3 */
 typedef void (*pa_defer_event_cb_t)(pa_mainloop_api*a, pa_defer_event* e, void *userdata);
-/** A defer event destroy callback prototype \ since 0.9.3 */
+/** A defer event destroy callback prototype \since 0.9.3 */
 typedef void (*pa_defer_event_destroy_cb_t)(pa_mainloop_api*a, pa_defer_event *e, void *userdata);
 
 /** An abstract mainloop API vtable */
@@ -114,9 +114,11 @@ struct pa_mainloop_api {
     void (*quit)(pa_mainloop_api*a, int retval);
 };
 
-/** Run the specified callback function once from the main loop using an anonymous defer event. Note that this performs
- * multiple mainloop operations non-atomically. If, for example, you are using a \ref pa_threaded_mainloop, you will need to
- * take the mainloop lock before this call. */
+/** Run the specified callback function once from the main loop using an
+ * anonymous defer event. If the mainloop runs in a different thread, you need
+ * to follow the mainloop implementation's rules regarding how to safely create
+ * defer events. In particular, if you're using \ref pa_threaded_mainloop, you
+ * must lock the mainloop before calling this function. */
 void pa_mainloop_api_once(pa_mainloop_api*m, void (*callback)(pa_mainloop_api*m, void *userdata), void *userdata);
 
 PA_C_DECL_END
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 66a1475..c7a5236 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
@@ -114,7 +114,6 @@ struct pa_mainloop {
     int retval;
     bool quit:1;
 
-    pa_atomic_t wakeup_requested;
     int wakeup_pipe[2];
     int wakeup_pipe_type;
 
@@ -772,10 +771,8 @@ void pa_mainloop_wakeup(pa_mainloop *m) {
     pa_assert(m);
 
     if (pa_write(m->wakeup_pipe[1], &c, sizeof(c), &m->wakeup_pipe_type) < 0)
-        /* Not much options for recovering from the error. Let's at least log something. */
+        /* Not many options for recovering from the error. Let's at least log something. */
         pa_log("pa_write() failed while trying to wake up the mainloop: %s", pa_cstrerror(errno));
-
-    pa_atomic_store(&m->wakeup_requested, true);
 }
 
 static void clear_wakeup(pa_mainloop *m) {
@@ -783,10 +780,8 @@ static void clear_wakeup(pa_mainloop *m) {
 
     pa_assert(m);
 
-    if (pa_atomic_cmpxchg(&m->wakeup_requested, true, false)) {
-        while (pa_read(m->wakeup_pipe[0], &c, sizeof(c), &m->wakeup_pipe_type) == sizeof(c))
-            ;
-    }
+    while (pa_read(m->wakeup_pipe[0], &c, sizeof(c), &m->wakeup_pipe_type) == sizeof(c))
+        ;
 }
 
 int pa_mainloop_prepare(pa_mainloop *m, int timeout) {
@@ -842,7 +837,7 @@ int pa_mainloop_poll(pa_mainloop *m) {
 
     m->state = STATE_POLLING;
 
-    if (m->n_enabled_defer_events )
+    if (m->n_enabled_defer_events)
         m->poll_func_ret = 0;
     else {
         pa_assert(!m->rebuild_pollfds);
diff --git a/src/pulse/proplist.c b/src/pulse/proplist.c
index 0c2bd60..a5ab7d2 100644
--- a/src/pulse/proplist.c
+++ b/src/pulse/proplist.c
@@ -343,18 +343,15 @@ void pa_proplist_update(pa_proplist *p, pa_update_mode_t mode, const pa_proplist
 }
 
 int pa_proplist_unset(pa_proplist *p, const char *key) {
-    struct property *prop;
-
     pa_assert(p);
     pa_assert(key);
 
     if (!pa_proplist_key_valid(key))
         return -1;
 
-    if (!(prop = pa_hashmap_remove(MAKE_HASHMAP(p), key)))
+    if (pa_hashmap_remove_and_free(MAKE_HASHMAP(p), key) < 0)
         return -2;
 
-    property_free(prop);
     return 0;
 }
 
diff --git a/src/pulse/proplist.h b/src/pulse/proplist.h
index dc3cddc..e55a479 100644
--- a/src/pulse/proplist.h
+++ b/src/pulse/proplist.h
@@ -71,7 +71,7 @@ PA_C_DECL_BEGIN
 /** For streams: the name of a filter that is desired, e.g.\ "echo-cancel" or "equalizer-sink". Differs from PA_PROP_FILTER_WANT in that it forces PulseAudio to apply the filter, regardless of whether PulseAudio thinks it makes sense to do so or not. If this is set, PA_PROP_FILTER_WANT is ignored. In other words, you almost certainly do not want to use this. \since 1.0 */
 #define PA_PROP_FILTER_APPLY                   "filter.apply"
 
-/** For streams: the name of a filter that should specifically suppressed (i.e.\ overrides PA_PROP_FILTER_WANT). Useful for the times that PA_PROP_FILTER_WANT is automatically added (e.g. echo-cancellation for phone streams when $VOIP_APP does it's own, internal AEC) \since 1.0 */
+/** For streams: the name of a filter that should specifically suppressed (i.e.\ overrides PA_PROP_FILTER_WANT). Useful for the times that PA_PROP_FILTER_WANT is automatically added (e.g. echo-cancellation for phone streams when $VOIP_APP does its own, internal AEC) \since 1.0 */
 #define PA_PROP_FILTER_SUPPRESS                "filter.suppress"
 
 /** For event sound streams: XDG event sound name. e.g.\ "message-new-email" (Event sound streams are those with media.role set to "event") */
diff --git a/src/pulse/pulseaudio.h b/src/pulse/pulseaudio.h
index 21b7213..2e270dd 100644
--- a/src/pulse/pulseaudio.h
+++ b/src/pulse/pulseaudio.h
@@ -23,6 +23,7 @@
   USA.
 ***/
 
+#include <pulse/direction.h>
 #include <pulse/mainloop-api.h>
 #include <pulse/sample.h>
 #include <pulse/format.h>
@@ -49,8 +50,8 @@
 
 /** \file
  * Include all libpulse header files at once. The following files are
- * included: \ref mainloop-api.h, \ref sample.h, \ref def.h, \ref
- * context.h, \ref stream.h, \ref introspect.h, \ref subscribe.h, \ref
+ * included: \ref direction.h, \ref mainloop-api.h, \ref sample.h, \ref def.h,
+ * \ref context.h, \ref stream.h, \ref introspect.h, \ref subscribe.h, \ref
  * scache.h, \ref version.h, \ref error.h, \ref channelmap.h, \ref
  * operation.h,\ref volume.h, \ref xmalloc.h, \ref utf8.h, \ref
  * thread-mainloop.h, \ref mainloop.h, \ref util.h, \ref proplist.h,
diff --git a/src/pulse/simple.c b/src/pulse/simple.c
index 1891131..f005cf8 100644
--- a/src/pulse/simple.c
+++ b/src/pulse/simple.c
@@ -454,17 +454,32 @@ unlock_and_fail:
 
 pa_usec_t pa_simple_get_latency(pa_simple *p, int *rerror) {
     pa_usec_t t;
-    int negative;
 
     pa_assert(p);
 
     pa_threaded_mainloop_lock(p->mainloop);
 
     for (;;) {
+        int negative;
+
         CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
 
-        if (pa_stream_get_latency(p->stream, &t, &negative) >= 0)
+        if (pa_stream_get_latency(p->stream, &t, &negative) >= 0) {
+            pa_usec_t extra = 0;
+
+            if (p->direction == PA_STREAM_RECORD)
+                extra = pa_bytes_to_usec(p->read_length, pa_stream_get_sample_spec(p->stream));
+
+            if (negative) {
+                if (extra > t)
+                    t = extra - t;
+                else
+                    t = 0;
+            } else
+                t += extra;
+
             break;
+        }
 
         CHECK_SUCCESS_GOTO(p, rerror, pa_context_errno(p->context) == PA_ERR_NODATA, unlock_and_fail);
 
@@ -474,7 +489,7 @@ pa_usec_t pa_simple_get_latency(pa_simple *p, int *rerror) {
 
     pa_threaded_mainloop_unlock(p->mainloop);
 
-    return negative ? 0 : t;
+    return t;
 
 unlock_and_fail:
 
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index 8e35c29..f549036 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
@@ -1464,11 +1464,12 @@ int pa_stream_cancel_write(
     return 0;
 }
 
-int pa_stream_write(
+int pa_stream_write_ext_free(
         pa_stream *s,
         const void *data,
         size_t length,
         pa_free_cb_t free_cb,
+        void *free_cb_data,
         int64_t offset,
         pa_seek_mode_t seek) {
 
@@ -1486,6 +1487,8 @@ int pa_stream_write(
                       ((data >= s->write_data) &&
                        ((const char*) data + length <= (const char*) s->write_data + pa_memblock_get_length(s->write_memblock))),
                       PA_ERR_INVALID);
+    PA_CHECK_VALIDITY(s->context, offset % pa_frame_size(&s->sample_spec) == 0, PA_ERR_INVALID);
+    PA_CHECK_VALIDITY(s->context, length % pa_frame_size(&s->sample_spec) == 0, PA_ERR_INVALID);
     PA_CHECK_VALIDITY(s->context, !free_cb || !s->write_memblock, PA_ERR_INVALID);
 
     if (s->write_memblock) {
@@ -1519,7 +1522,7 @@ int pa_stream_write(
             chunk.index = 0;
 
             if (free_cb && !pa_pstream_get_shm(s->context->pstream)) {
-                chunk.memblock = pa_memblock_new_user(s->context->mempool, (void*) t_data, t_length, free_cb, 1);
+                chunk.memblock = pa_memblock_new_user(s->context->mempool, (void*) t_data, t_length, free_cb, free_cb_data, 1);
                 chunk.length = t_length;
             } else {
                 void *d;
@@ -1544,7 +1547,7 @@ int pa_stream_write(
         }
 
         if (free_cb && pa_pstream_get_shm(s->context->pstream))
-            free_cb((void*) data);
+            free_cb(free_cb_data);
     }
 
     /* This is obviously wrong since we ignore the seeking index . But
@@ -1591,6 +1594,17 @@ int pa_stream_write(
     return 0;
 }
 
+int pa_stream_write(
+        pa_stream *s,
+        const void *data,
+        size_t length,
+        pa_free_cb_t free_cb,
+        int64_t offset,
+        pa_seek_mode_t seek) {
+
+    return pa_stream_write_ext_free(s, data, length, free_cb, (void*) data, offset, seek);
+}
+
 int pa_stream_peek(pa_stream *s, const void **data, size_t *length) {
     pa_assert(s);
     pa_assert(PA_REFCNT_VALUE(s) >= 1);
diff --git a/src/pulse/stream.h b/src/pulse/stream.h
index 47e0c68..bc17143 100644
--- a/src/pulse/stream.h
+++ b/src/pulse/stream.h
@@ -554,6 +554,17 @@ int pa_stream_write(
         int64_t offset,          /**< Offset for seeking, must be 0 for upload streams */
         pa_seek_mode_t seek      /**< Seek mode, must be PA_SEEK_RELATIVE for upload streams */);
 
+/** Function does exactly the same as pa_stream_write() with the difference
+ *  that free_cb_data is passed to free_cb instead of data. \since 6.0 */
+int pa_stream_write_ext_free(
+        pa_stream *p             /**< The stream to use */,
+        const void *data         /**< The data to write */,
+        size_t nbytes            /**< The length of the data to write in bytes */,
+        pa_free_cb_t free_cb     /**< A cleanup routine for the data or NULL to request an internal copy */,
+        void *free_cb_data       /**< Argument passed to free_cb function */,
+        int64_t offset           /**< Offset for seeking, must be 0 for upload streams */,
+        pa_seek_mode_t seek      /**< Seek mode, must be PA_SEEK_RELATIVE for upload streams */);
+
 /** Read the next fragment from the buffer (for recording streams).
  * If there is data at the current read index, \a data will point to
  * the actual data and \a nbytes will contain the size of the data in
@@ -628,7 +639,7 @@ void pa_stream_set_started_callback(pa_stream *p, pa_stream_notify_cb_t cb, void
 
 /** Set the callback function that is called whenever a latency
  * information update happens. Useful on PA_STREAM_AUTO_TIMING_UPDATE
- * streams only. (Only for playback streams) */
+ * streams only. */
 void pa_stream_set_latency_update_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
 
 /** Set the callback function that is called whenever the stream is
diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c
index 435e9f6..631b6ae 100644
--- a/src/pulse/thread-mainloop.c
+++ b/src/pulse/thread-mainloop.c
@@ -97,7 +97,7 @@ pa_threaded_mainloop *pa_threaded_mainloop_new(void) {
 
     pa_init_i18n();
 
-    m = pa_xnew(pa_threaded_mainloop, 1);
+    m = pa_xnew0(pa_threaded_mainloop, 1);
 
     if (!(m->real_mainloop = pa_mainloop_new())) {
         pa_xfree(m);
@@ -107,14 +107,9 @@ pa_threaded_mainloop *pa_threaded_mainloop_new(void) {
     m->mutex = pa_mutex_new(true, true);
     m->cond = pa_cond_new();
     m->accept_cond = pa_cond_new();
-    m->thread = NULL;
-    m->name = NULL;
 
     pa_mainloop_set_poll_func(m->real_mainloop, poll_func, m->mutex);
 
-    m->n_waiting = 0;
-    m->n_waiting_for_accept = 0;
-
     return m;
 }
 
diff --git a/src/pulse/thread-mainloop.h b/src/pulse/thread-mainloop.h
index 8e8cbfe..6a786fc 100644
--- a/src/pulse/thread-mainloop.h
+++ b/src/pulse/thread-mainloop.h
@@ -272,7 +272,7 @@ void pa_threaded_mainloop_stop(pa_threaded_mainloop *m);
  * are executed with this lock held. */
 void pa_threaded_mainloop_lock(pa_threaded_mainloop *m);
 
-/** Unlock the event loop object, inverse of pa_threaded_mainloop_lock() */
+/** Unlock the event loop object, inverse of pa_threaded_mainloop_lock(). */
 void pa_threaded_mainloop_unlock(pa_threaded_mainloop *m);
 
 /** Wait for an event to be signalled by the event loop thread. You
@@ -287,7 +287,7 @@ void pa_threaded_mainloop_unlock(pa_threaded_mainloop *m);
 void pa_threaded_mainloop_wait(pa_threaded_mainloop *m);
 
 /** Signal all threads waiting for a signalling event in
- * pa_threaded_mainloop_wait(). If wait_for_release is non-zero, do
+ * pa_threaded_mainloop_wait(). If wait_for_accept is non-zero, do
  * not return before the signal was accepted by a
  * pa_threaded_mainloop_accept() call. While waiting for that condition
  * the event loop object is unlocked. */
diff --git a/src/pulse/util.c b/src/pulse/util.c
index 6656bc3..d672f53 100644
--- a/src/pulse/util.c
+++ b/src/pulse/util.c
@@ -64,6 +64,15 @@
 
 #include "util.h"
 
+#if defined(HAVE_DLADDR) && defined(PA_GCC_WEAKREF)
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+#include <dlfcn.h>
+
+static int _main() PA_GCC_WEAKREF(main);
+#endif
+
 char *pa_get_user_name(char *s, size_t l) {
     const char *p;
     char *name = NULL;
@@ -132,19 +141,23 @@ char *pa_get_host_name(char *s, size_t l) {
 
 char *pa_get_home_dir(char *s, size_t l) {
     char *e;
-#ifdef HAVE_PWD_H
     char *dir;
+#ifdef HAVE_PWD_H
     struct passwd *r;
 #endif
 
     pa_assert(s);
     pa_assert(l > 0);
 
-    if ((e = getenv("HOME")))
-        return pa_strlcpy(s, e, l);
+    if ((e = getenv("HOME"))) {
+        dir = pa_strlcpy(s, e, l);
+        goto finish;
+    }
 
-    if ((e = getenv("USERPROFILE")))
-        return pa_strlcpy(s, e, l);
+    if ((e = getenv("USERPROFILE"))) {
+        dir = pa_strlcpy(s, e, l);
+        goto finish;
+    }
 
 #ifdef HAVE_PWD_H
     errno = 0;
@@ -158,13 +171,21 @@ char *pa_get_home_dir(char *s, size_t l) {
     dir = pa_strlcpy(s, r->pw_dir, l);
 
     pa_getpwuid_free(r);
+#endif /* HAVE_PWD_H */
 
-    return dir;
-#else /* HAVE_PWD_H */
+finish:
+    if (!dir) {
+        errno = ENOENT;
+        return NULL;
+    }
 
-    errno = ENOENT;
-    return NULL;
-#endif
+    if (!pa_is_path_absolute(dir)) {
+        pa_log("Failed to get the home directory, not an absolute path: %s", dir);
+        errno = ENOENT;
+        return NULL;
+    }
+
+    return dir;
 }
 
 char *pa_get_binary_name(char *s, size_t l) {
@@ -181,10 +202,10 @@ char *pa_get_binary_name(char *s, size_t l) {
     }
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
     {
         char *rp;
-        /* This works on Linux only */
+        /* This works on Linux and Debian/kFreeBSD */
 
         if ((rp = pa_readlink("/proc/self/exe"))) {
             pa_strlcpy(s, pa_path_get_filename(rp), l);
@@ -206,6 +227,20 @@ char *pa_get_binary_name(char *s, size_t l) {
     }
 #endif
 
+#if defined(HAVE_DLADDR) && defined(PA_GCC_WEAKREF)
+    {
+        Dl_info info;
+        if(_main) {
+            int err = dladdr(&_main, &info);
+            if (err != 0) {
+                char *p = pa_realpath(info.dli_fname);
+                if (p)
+                    return p;
+            }
+        }
+    }
+#endif
+
 #if defined(HAVE_SYS_PRCTL_H) && defined(PR_GET_NAME)
     {
 
diff --git a/src/pulse/version.h b/src/pulse/version.h
index 4bc647c..d386794 100644
--- a/src/pulse/version.h
+++ b/src/pulse/version.h
@@ -35,7 +35,7 @@ PA_C_DECL_BEGIN
 /** Return the version of the header files. Keep in mind that this is
 a macro and not a function, so it is impossible to get the pointer of
 it. */
-#define pa_get_headers_version() ("5.0.0")
+#define pa_get_headers_version() ("5.99.0")
 
 /** Return the version of the library the current application is
  * linked to. */
@@ -49,13 +49,13 @@ const char* pa_get_library_version(void);
 
 /** The current protocol version. Version 8 relates to Polypaudio
  * 0.8/PulseAudio 0.9. */
-#define PA_PROTOCOL_VERSION 29
+#define PA_PROTOCOL_VERSION 30
 
 /** The major version of PA. \since 0.9.15 */
 #define PA_MAJOR 5
 
 /** The minor version of PA. \since 0.9.15 */
-#define PA_MINOR 0
+#define PA_MINOR 99
 
 /** The micro version of PA (will always be 0 from v1.0 onwards). \since 0.9.15 */
 #define PA_MICRO 0
diff --git a/src/pulse/volume.h b/src/pulse/volume.h
index 7806954..97fc10b 100644
--- a/src/pulse/volume.h
+++ b/src/pulse/volume.h
@@ -216,7 +216,7 @@ char *pa_volume_snprint(char *s, size_t l, pa_volume_t v);
  * any release without warning and without being considered API or ABI
  * breakage. You should not use this definition anywhere where it
  * might become part of an ABI. \since 0.9.15 */
-#define PA_SW_VOLUME_SNPRINT_DB_MAX 10
+#define PA_SW_VOLUME_SNPRINT_DB_MAX 11
 
 /** Pretty print a volume but show dB values. \since 0.9.15 */
 char *pa_sw_volume_snprint_dB(char *s, size_t l, pa_volume_t v);
diff --git a/src/pulsecore/asyncmsgq.c b/src/pulsecore/asyncmsgq.c
index 58cd7ac..2ed550a 100644
--- a/src/pulsecore/asyncmsgq.c
+++ b/src/pulsecore/asyncmsgq.c
@@ -157,8 +157,6 @@ int pa_asyncmsgq_send(pa_asyncmsgq *a, pa_msgobject *object, int code, const voi
     if (!(i.semaphore = pa_flist_pop(PA_STATIC_FLIST_GET(semaphores))))
         i.semaphore = pa_semaphore_new(0);
 
-    pa_assert_se(i.semaphore);
-
     /* This mutex makes the queue multiple-writer safe. This lock is only used on the writing side */
     pa_mutex_lock(a->mutex);
     pa_assert_se(pa_asyncq_push(a->asyncq, &i, true) == 0);
diff --git a/src/pulsecore/aupdate.c b/src/pulsecore/aupdate.c
index 2a7241a..2b2fa87 100644
--- a/src/pulsecore/aupdate.c
+++ b/src/pulsecore/aupdate.c
@@ -79,7 +79,7 @@ unsigned pa_aupdate_read_begin(pa_aupdate *a) {
 }
 
 void pa_aupdate_read_end(pa_aupdate *a) {
-    unsigned n;
+    unsigned PA_UNUSED n;
 
     pa_assert(a);
 
diff --git a/src/pulsecore/auth-cookie.c b/src/pulsecore/auth-cookie.c
index a3d9ca4..09e73ab 100644
--- a/src/pulsecore/auth-cookie.c
+++ b/src/pulsecore/auth-cookie.c
@@ -69,7 +69,7 @@ pa_auth_cookie* pa_auth_cookie_get(pa_core *core, const char *cn, bool create, s
 
     pa_assert_se(pa_shared_set(core, t, c) >= 0);
 
-    if (pa_authkey_load_auto(cn, create, (uint8_t*) c + PA_ALIGN(sizeof(pa_auth_cookie)), size) < 0) {
+    if (pa_authkey_load(cn, create, (uint8_t*) c + PA_ALIGN(sizeof(pa_auth_cookie)), size) < 0) {
         pa_auth_cookie_unref(c);
         return NULL;
     }
diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c
index 03c0c4b..7f91f16 100644
--- a/src/pulsecore/authkey.c
+++ b/src/pulsecore/authkey.c
@@ -42,7 +42,7 @@
 
 #include "authkey.h"
 
-/* Generate a new authorization key, store it in file fd and return it in *data  */
+/* Generate a new authentication key, store it in file fd and return it in *data  */
 static int generate(int fd, void *ret_data, size_t length) {
     ssize_t r;
 
@@ -70,7 +70,7 @@ static int generate(int fd, void *ret_data, size_t length) {
 #define O_BINARY 0
 #endif
 
-/* Load an authorization cookie from file fn and store it in data. If
+/* Load an authentication cookie from file fn and store it in data. If
  * the cookie file doesn't exist, create it */
 static int load(const char *fn, bool create, void *data, size_t length) {
     int fd = -1;
@@ -131,48 +131,20 @@ finish:
     return ret;
 }
 
-/* Load a cookie from a cookie file. If the file doesn't exist, create it. */
-int pa_authkey_load(const char *path, bool create, void *data, size_t length) {
-    int ret;
-
-    pa_assert(path);
-    pa_assert(data);
-    pa_assert(length > 0);
-
-    if ((ret = load(path, create, data, length)) < 0)
-        pa_log_warn("Failed to load authorization key '%s': %s", path, (ret < 0) ? pa_cstrerror(errno) : "File corrupt");
-
-    return ret;
-}
-
 /* If the specified file path starts with / return it, otherwise
- * return path prepended with home directory */
-static char *normalize_path(const char *fn) {
-
+ * return path prepended with the config home directory. */
+static int normalize_path(const char *fn, char **_r) {
     pa_assert(fn);
+    pa_assert(_r);
 
-#ifndef OS_IS_WIN32
-    if (fn[0] != '/') {
-#else
-    if (strlen(fn) < 3 || !IsCharAlpha(fn[0]) || fn[1] != ':' || fn[2] != '\\') {
-#endif
-        char *homedir, *s;
-
-        if (!(homedir = pa_get_home_dir_malloc()))
-            return NULL;
-
-        s = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", homedir, fn);
-        pa_xfree(homedir);
-
-        return s;
-    }
+    if (!pa_is_path_absolute(fn))
+        return pa_append_to_config_home_dir(fn, _r);
 
-    return pa_xstrdup(fn);
+    *_r = pa_xstrdup(fn);
+    return 0;
 }
 
-/* Load a cookie from a file in the home directory. If the specified
- * path starts with /, use it as absolute path instead. */
-int pa_authkey_load_auto(const char *fn, bool create, void *data, size_t length) {
+int pa_authkey_load(const char *fn, bool create, void *data, size_t length) {
     char *p;
     int ret;
 
@@ -180,10 +152,12 @@ int pa_authkey_load_auto(const char *fn, bool create, void *data, size_t length)
     pa_assert(data);
     pa_assert(length > 0);
 
-    if (!(p = normalize_path(fn)))
-        return -2;
+    if ((ret = normalize_path(fn, &p)) < 0)
+        return ret;
+
+    if ((ret = load(p, create, data, length)) < 0)
+        pa_log_warn("Failed to load authentication key '%s': %s", p, (ret < 0) ? pa_cstrerror(errno) : "File corrupt");
 
-    ret = pa_authkey_load(p, create, data, length);
     pa_xfree(p);
 
     return ret;
@@ -192,7 +166,7 @@ int pa_authkey_load_auto(const char *fn, bool create, void *data, size_t length)
 /* Store the specified cookie in the specified cookie file */
 int pa_authkey_save(const char *fn, const void *data, size_t length) {
     int fd = -1;
-    int unlock = 0, ret = -1;
+    int unlock = 0, ret;
     ssize_t r;
     char *p;
 
@@ -200,11 +174,12 @@ int pa_authkey_save(const char *fn, const void *data, size_t length) {
     pa_assert(data);
     pa_assert(length > 0);
 
-    if (!(p = normalize_path(fn)))
-        return -2;
+    if ((ret = normalize_path(fn, &p)) < 0)
+        return ret;
 
     if ((fd = pa_open_cloexec(p, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR)) < 0) {
         pa_log_warn("Failed to open cookie file '%s': %s", fn, pa_cstrerror(errno));
+        ret = -1;
         goto finish;
     }
 
@@ -212,11 +187,10 @@ int pa_authkey_save(const char *fn, const void *data, size_t length) {
 
     if ((r = pa_loop_write(fd, data, length, NULL)) < 0 || (size_t) r != length) {
         pa_log("Failed to read cookie file '%s': %s", fn, pa_cstrerror(errno));
+        ret = -1;
         goto finish;
     }
 
-    ret = 0;
-
 finish:
 
     if (fd >= 0) {
diff --git a/src/pulsecore/authkey.h b/src/pulsecore/authkey.h
index df62d0c..cadf89d 100644
--- a/src/pulsecore/authkey.h
+++ b/src/pulsecore/authkey.h
@@ -24,8 +24,7 @@
 
 #include <sys/types.h>
 
-int pa_authkey_load(const char *path, bool create, void *data, size_t len);
-int pa_authkey_load_auto(const char *fn, bool create, void *data, size_t length);
+int pa_authkey_load(const char *fn, bool create, void *data, size_t length);
 
 int pa_authkey_save(const char *path, const void *data, size_t length);
 
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index 9a29aeb..eca1e60 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
@@ -201,7 +201,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
     c->userdata = NULL;
     c->set_profile = NULL;
 
-    pa_device_init_description(c->proplist);
+    pa_device_init_description(c->proplist, c);
     pa_device_init_icon(c->proplist, true);
     pa_device_init_intended_roles(c->proplist);
 
diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c
index c7db0a6..2992ae8 100644
--- a/src/pulsecore/cli-text.c
+++ b/src/pulsecore/cli-text.c
@@ -536,7 +536,7 @@ char *pa_source_output_list_to_string(pa_core *c) {
             state_table[pa_source_output_get_state(o)],
             o->source->index, o->source->name,
             volume_str,
-            pa_yes_no(pa_source_output_get_mute(o)),
+            pa_yes_no(o->muted),
             (double) pa_source_output_get_latency(o, NULL) / PA_USEC_PER_MSEC,
             clt,
             pa_sample_spec_snprint(ss, sizeof(ss), &o->sample_spec),
@@ -634,7 +634,7 @@ char *pa_sink_input_list_to_string(pa_core *c) {
             state_table[pa_sink_input_get_state(i)],
             i->sink->index, i->sink->name,
             volume_str,
-            pa_yes_no(pa_sink_input_get_mute(i)),
+            pa_yes_no(i->muted),
             (double) pa_sink_input_get_latency(i, NULL) / PA_USEC_PER_MSEC,
             clt,
             pa_sample_spec_snprint(ss, sizeof(ss), &i->sample_spec),
diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c
index 200252b..1683d46 100644
--- a/src/pulsecore/conf-parser.c
+++ b/src/pulsecore/conf-parser.c
@@ -175,6 +175,7 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_p
         pa_log_warn("Failed to open configuration file '%s': %s", filename, pa_cstrerror(errno));
         goto finish;
     }
+    pa_log_debug("Parsing configuration file '%s'", filename);
 
     state.filename = filename;
     state.item_table = t;
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 0d9e354..e9843ef 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -336,37 +336,23 @@ again:
         uid = getuid();
     if (gid == (gid_t) -1)
         gid = getgid();
-    if (fchown(fd, uid, gid) < 0) {
+    if (((st.st_uid != uid) || (st.st_gid != gid)) && fchown(fd, uid, gid) < 0) {
         pa_assert_se(pa_close(fd) >= 0);
         goto fail;
     }
 #endif
 
 #ifdef HAVE_FCHMOD
-    (void) fchmod(fd, m);
+    if (fchmod(fd, m) < 0) {
+        pa_assert_se(pa_close(fd) >= 0);
+        goto fail;
+    };
 #endif
 
     pa_assert_se(pa_close(fd) >= 0);
 }
-#endif
-
-#ifdef HAVE_LSTAT
-    if (lstat(dir, &st) < 0)
-#else
-    if (stat(dir, &st) < 0)
-#endif
-        goto fail;
-
-#ifndef OS_IS_WIN32
-    if (!S_ISDIR(st.st_mode) ||
-        (st.st_uid != uid) ||
-        (st.st_gid != gid) ||
-        ((st.st_mode & 0777) != m)) {
-        errno = EACCES;
-        goto fail;
-    }
 #else
-    pa_log_warn("Secure directory creation not supported on Win32.");
+    pa_log_warn("Secure directory creation not supported on this platform.");
 #endif
 
     return 0;
@@ -1563,16 +1549,6 @@ int pa_unlock_lockfile(const char *fn, int fd) {
     return r;
 }
 
-static char *get_config_home(char *home) {
-    char *t;
-
-    t = getenv("XDG_CONFIG_HOME");
-    if (t)
-        return pa_xstrdup(t);
-
-    return pa_sprintf_malloc("%s" PA_PATH_SEP ".config", home);
-}
-
 static int check_ours(const char *p) {
     struct stat st;
 
@@ -1590,7 +1566,7 @@ static int check_ours(const char *p) {
 }
 
 static char *get_pulse_home(void) {
-    char *h, *ret, *config_home;
+    char *h, *ret;
     int t;
 
     h = pa_get_home_dir_malloc();
@@ -1608,17 +1584,14 @@ static char *get_pulse_home(void) {
 
     /* If the old directory exists, use it. */
     ret = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse", h);
-    if (access(ret, F_OK) >= 0) {
-        free(h);
+    pa_xfree(h);
+    if (access(ret, F_OK) >= 0)
         return ret;
-    }
     free(ret);
 
     /* Otherwise go for the XDG compliant directory. */
-    config_home = get_config_home(h);
-    free(h);
-    ret = pa_sprintf_malloc("%s" PA_PATH_SEP "pulse", config_home);
-    free(config_home);
+    if (pa_get_config_home_dir(&ret) < 0)
+        return NULL;
 
     return ret;
 }
@@ -1667,6 +1640,60 @@ char *pa_get_home_dir_malloc(void) {
     return homedir;
 }
 
+int pa_append_to_home_dir(const char *path, char **_r) {
+    char *home_dir;
+
+    pa_assert(path);
+    pa_assert(_r);
+
+    home_dir = pa_get_home_dir_malloc();
+    if (!home_dir) {
+        pa_log("Failed to get home directory.");
+        return -PA_ERR_NOENTITY;
+    }
+
+    *_r = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", home_dir, path);
+    pa_xfree(home_dir);
+    return 0;
+}
+
+int pa_get_config_home_dir(char **_r) {
+    const char *e;
+    char *home_dir;
+
+    pa_assert(_r);
+
+    e = getenv("XDG_CONFIG_HOME");
+    if (e && *e) {
+        *_r = pa_sprintf_malloc("%s" PA_PATH_SEP "pulse", e);
+        return 0;
+    }
+
+    home_dir = pa_get_home_dir_malloc();
+    if (!home_dir)
+        return -PA_ERR_NOENTITY;
+
+    *_r = pa_sprintf_malloc("%s" PA_PATH_SEP ".config" PA_PATH_SEP "pulse", home_dir);
+    pa_xfree(home_dir);
+    return 0;
+}
+
+int pa_append_to_config_home_dir(const char *path, char **_r) {
+    int r;
+    char *config_home_dir;
+
+    pa_assert(path);
+    pa_assert(_r);
+
+    r = pa_get_config_home_dir(&config_home_dir);
+    if (r < 0)
+        return r;
+
+    *_r = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", config_home_dir, path);
+    pa_xfree(config_home_dir);
+    return 0;
+}
+
 char *pa_get_binary_name_malloc(void) {
     char *t;
     size_t allocated = 128;
@@ -1789,6 +1816,14 @@ char *pa_get_runtime_dir(void) {
     /* Use the XDG standard for the runtime directory. */
     d = getenv("XDG_RUNTIME_DIR");
     if (d) {
+        struct stat st;
+        if (stat(d, &st) == 0 && st.st_uid != getuid()) {
+            pa_log(_("XDG_RUNTIME_DIR (%s) is not owned by us (uid %d), but by uid %d! "
+                   "(This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)"),
+                   d, getuid(), st.st_uid);
+            goto fail;
+        }
+
         k = pa_sprintf_malloc("%s" PA_PATH_SEP "pulse", d);
 
         if (pa_make_secure_dir(k, m, (uid_t) -1, (gid_t) -1, true) < 0) {
@@ -2824,6 +2859,18 @@ void pa_set_env(const char *key, const char *value) {
 #endif
 }
 
+void pa_unset_env(const char *key) {
+    pa_assert(key);
+
+    /* This is not thread-safe */
+
+#ifdef OS_IS_WIN32
+    SetEnvironmentVariable(key, NULL);
+#else
+    unsetenv(key);
+#endif
+}
+
 void pa_set_env_and_record(const char *key, const char *value) {
     pa_assert(key);
     pa_assert(value);
@@ -2846,11 +2893,7 @@ void pa_unset_env_recorded(void) {
         if (!s)
             break;
 
-#ifdef OS_IS_WIN32
-        SetEnvironmentVariable(s, NULL);
-#else
-        unsetenv(s);
-#endif
+        pa_unset_env(s);
         pa_xfree(s);
     }
 }
@@ -3315,8 +3358,11 @@ int pa_open_cloexec(const char *fn, int flags, mode_t mode) {
         return fd;
 #endif
 
-    if ((fd = open(fn, flags, mode)) < 0)
-        return fd;
+    if ((fd = open(fn, flags, mode)) >= 0)
+        goto finish;
+
+    /* return error */
+    return fd;
 
 finish:
     /* Some implementations might simply ignore O_CLOEXEC if it is not
@@ -3337,8 +3383,11 @@ int pa_socket_cloexec(int domain, int type, int protocol) {
         return fd;
 #endif
 
-    if ((fd = socket(domain, type, protocol)) < 0)
-        return fd;
+    if ((fd = socket(domain, type, protocol)) >= 0)
+        goto finish;
+
+    /* return error */
+    return fd;
 
 finish:
     /* Some implementations might simply ignore SOCK_CLOEXEC if it is
@@ -3360,8 +3409,11 @@ int pa_pipe_cloexec(int pipefd[2]) {
 
 #endif
 
-    if ((r = pipe(pipefd)) < 0)
-        return r;
+    if ((r = pipe(pipefd)) >= 0)
+        goto finish;
+
+    /* return error */
+    return r;
 
 finish:
     pa_make_fd_cloexec(pipefd[0]);
@@ -3382,8 +3434,11 @@ int pa_accept_cloexec(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
 
 #endif
 
-    if ((fd = accept(sockfd, addr, addrlen)) < 0)
-        return fd;
+    if ((fd = accept(sockfd, addr, addrlen)) >= 0)
+        goto finish;
+
+    /* return error */
+    return fd;
 
 finish:
     pa_make_fd_cloexec(fd);
diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h
index e6cb261..8db56c5 100644
--- a/src/pulsecore/core-util.h
+++ b/src/pulsecore/core-util.h
@@ -35,6 +35,8 @@
 
 #include <pulse/gccmacro.h>
 #include <pulse/volume.h>
+
+#include <pulsecore/i18n.h>
 #include <pulsecore/macro.h>
 #include <pulsecore/socket.h>
 
@@ -90,7 +92,7 @@ int pa_parse_boolean(const char *s) PA_GCC_PURE;
 int pa_parse_volume(const char *s, pa_volume_t *volume);
 
 static inline const char *pa_yes_no(bool b) {
-    return b ? "yes" : "no";
+    return b ? _("yes") : _("no");
 }
 
 static inline const char *pa_strnull(const char *x) {
@@ -136,6 +138,9 @@ char* pa_find_config_file(const char *global, const char *local, const char *env
 char *pa_get_runtime_dir(void);
 char *pa_get_state_dir(void);
 char *pa_get_home_dir_malloc(void);
+int pa_append_to_home_dir(const char *path, char **_r);
+int pa_get_config_home_dir(char **_r);
+int pa_append_to_config_home_dir(const char *path, char **_r);
 char *pa_get_binary_name_malloc(void);
 char *pa_runtime_path(const char *fn);
 char *pa_state_path(const char *fn, bool prepend_machine_id);
@@ -205,6 +210,7 @@ int pa_reset_sigs(int except, ...);
 int pa_reset_sigsv(const int except[]);
 
 void pa_set_env(const char *key, const char *value);
+void pa_unset_env(const char *key);
 void pa_set_env_and_record(const char *key, const char *value);
 void pa_unset_env_recorded(void);
 
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c
index e6f2dfc..e461963 100644
--- a/src/pulsecore/core.c
+++ b/src/pulsecore/core.c
@@ -72,7 +72,7 @@ pa_core* pa_core_new(pa_mainloop_api *m, bool shared, size_t shm_size) {
 
     if (shared) {
         if (!(pool = pa_mempool_new(shared, shm_size))) {
-            pa_log_warn("failed to allocate shared memory pool. Falling back to a normal memory pool.");
+            pa_log_warn("Failed to allocate shared memory pool. Falling back to a normal memory pool.");
             shared = false;
         }
     }
@@ -127,6 +127,11 @@ pa_core* pa_core_new(pa_mainloop_api *m, bool shared, size_t shm_size) {
     c->mempool = pool;
     pa_silence_cache_init(&c->silence_cache);
 
+    if (shared && !(c->rw_mempool = pa_mempool_new(shared, shm_size)))
+        pa_log_warn("Failed to allocate shared writable memory pool.");
+    if (c->rw_mempool)
+        pa_mempool_set_is_remote_writable(c->rw_mempool, true);
+
     c->exit_event = NULL;
 
     c->exit_idle_time = -1;
@@ -208,6 +213,8 @@ static void core_free(pa_object *o) {
     pa_assert(!c->default_sink);
 
     pa_silence_cache_done(&c->silence_cache);
+    if (c->rw_mempool)
+        pa_mempool_free(c->rw_mempool);
     pa_mempool_free(c->mempool);
 
     for (j = 0; j < PA_CORE_HOOK_MAX; j++)
@@ -254,7 +261,6 @@ void pa_core_maybe_vacuum(pa_core *c) {
 
     if (pa_idxset_isempty(c->sink_inputs) && pa_idxset_isempty(c->source_outputs)) {
         pa_log_debug("Hmm, no streams around, trying to vacuum.");
-        pa_mempool_vacuum(c->mempool);
     } else {
         pa_sink *si;
         pa_source *so;
@@ -271,8 +277,12 @@ void pa_core_maybe_vacuum(pa_core *c) {
                 return;
 
         pa_log_info("All sinks and sources are suspended, vacuuming memory");
-        pa_mempool_vacuum(c->mempool);
     }
+
+    pa_mempool_vacuum(c->mempool);
+
+    if (c->rw_mempool)
+        pa_mempool_vacuum(c->rw_mempool);
 }
 
 pa_time_event* pa_core_rttime_new(pa_core *c, pa_usec_t usec, pa_time_event_cb_t cb, void *userdata) {
diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
index f268e42..1f9df73 100644
--- a/src/pulsecore/core.h
+++ b/src/pulsecore/core.h
@@ -76,6 +76,8 @@ typedef enum pa_core_hook {
     PA_CORE_HOOK_SINK_PROPLIST_CHANGED,
     PA_CORE_HOOK_SINK_PORT_CHANGED,
     PA_CORE_HOOK_SINK_FLAGS_CHANGED,
+    PA_CORE_HOOK_SINK_VOLUME_CHANGED,
+    PA_CORE_HOOK_SINK_MUTE_CHANGED,
     PA_CORE_HOOK_SOURCE_NEW,
     PA_CORE_HOOK_SOURCE_FIXATE,
     PA_CORE_HOOK_SOURCE_PUT,
@@ -85,6 +87,8 @@ typedef enum pa_core_hook {
     PA_CORE_HOOK_SOURCE_PROPLIST_CHANGED,
     PA_CORE_HOOK_SOURCE_PORT_CHANGED,
     PA_CORE_HOOK_SOURCE_FLAGS_CHANGED,
+    PA_CORE_HOOK_SOURCE_VOLUME_CHANGED,
+    PA_CORE_HOOK_SOURCE_MUTE_CHANGED,
     PA_CORE_HOOK_SINK_INPUT_NEW,
     PA_CORE_HOOK_SINK_INPUT_FIXATE,
     PA_CORE_HOOK_SINK_INPUT_PUT,
@@ -95,6 +99,8 @@ typedef enum pa_core_hook {
     PA_CORE_HOOK_SINK_INPUT_MOVE_FAIL,
     PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED,
     PA_CORE_HOOK_SINK_INPUT_PROPLIST_CHANGED,
+    PA_CORE_HOOK_SINK_INPUT_VOLUME_CHANGED,
+    PA_CORE_HOOK_SINK_INPUT_MUTE_CHANGED,
     PA_CORE_HOOK_SINK_INPUT_SEND_EVENT,
     PA_CORE_HOOK_SOURCE_OUTPUT_NEW,
     PA_CORE_HOOK_SOURCE_OUTPUT_FIXATE,
@@ -106,6 +112,8 @@ typedef enum pa_core_hook {
     PA_CORE_HOOK_SOURCE_OUTPUT_MOVE_FAIL,
     PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED,
     PA_CORE_HOOK_SOURCE_OUTPUT_PROPLIST_CHANGED,
+    PA_CORE_HOOK_SOURCE_OUTPUT_VOLUME_CHANGED,
+    PA_CORE_HOOK_SOURCE_OUTPUT_MUTE_CHANGED,
     PA_CORE_HOOK_SOURCE_OUTPUT_SEND_EVENT,
     PA_CORE_HOOK_CLIENT_NEW,
     PA_CORE_HOOK_CLIENT_PUT,
@@ -162,7 +170,10 @@ struct pa_core {
     PA_LLIST_HEAD(pa_subscription_event, subscription_event_queue);
     pa_subscription_event *subscription_event_last;
 
-    pa_mempool *mempool;
+    /* The mempool is used for data we write to, it's readonly for the client.
+       The rw_mempool is used for data writable by both server and client (and
+       can be NULL in some cases). */
+    pa_mempool *mempool, *rw_mempool;
     pa_silence_cache silence_cache;
 
     pa_time_event *exit_event;
diff --git a/src/pulsecore/cpu-arm.c b/src/pulsecore/cpu-arm.c
index cce3b91..ad09c87 100644
--- a/src/pulsecore/cpu-arm.c
+++ b/src/pulsecore/cpu-arm.c
@@ -80,10 +80,9 @@ static char *get_cpuinfo(void) {
 #endif /* defined (__arm__) && defined (__linux__) */
 
 void pa_cpu_get_arm_flags(pa_cpu_arm_flag_t *flags) {
-#if defined (__arm__)
-#if defined (__linux__)
+#if defined (__arm__) && defined (__linux__)
     char *cpuinfo, *line;
-    int arch;
+    int arch, part;
 
     /* We need to read the CPU flags from /proc/cpuinfo because there is no user
      * space support to get the CPU features. This only works on linux AFAIK. */
@@ -104,6 +103,7 @@ void pa_cpu_get_arm_flags(pa_cpu_arm_flag_t *flags) {
 
         pa_xfree(line);
     }
+
     /* get the CPU features */
     if ((line = get_cpuinfo_line(cpuinfo, "Features"))) {
         const char *state = NULL;
@@ -122,16 +122,24 @@ void pa_cpu_get_arm_flags(pa_cpu_arm_flag_t *flags) {
             pa_xfree(current);
         }
     }
+
+    /* get the CPU part number */
+    if ((line = get_cpuinfo_line(cpuinfo, "CPU part"))) {
+        part = strtoul(line, NULL, 0);
+        if (part == 0xc08)
+            *flags |= PA_CPU_ARM_CORTEX_A8;
+        pa_xfree(line);
+    }
     pa_xfree(cpuinfo);
 
-    pa_log_info("CPU flags: %s%s%s%s%s%s",
+    pa_log_info("CPU flags: %s%s%s%s%s%s%s",
           (*flags & PA_CPU_ARM_V6) ? "V6 " : "",
           (*flags & PA_CPU_ARM_V7) ? "V7 " : "",
           (*flags & PA_CPU_ARM_VFP) ? "VFP " : "",
           (*flags & PA_CPU_ARM_EDSP) ? "EDSP " : "",
           (*flags & PA_CPU_ARM_NEON) ? "NEON " : "",
-          (*flags & PA_CPU_ARM_VFPV3) ? "VFPV3 " : "");
-#endif
+          (*flags & PA_CPU_ARM_VFPV3) ? "VFPV3 " : "",
+          (*flags & PA_CPU_ARM_CORTEX_A8) ? "Cortex-A8 " : "");
 #endif
 }
 
@@ -142,10 +150,12 @@ bool pa_cpu_init_arm(pa_cpu_arm_flag_t *flags) {
 
     if (*flags & PA_CPU_ARM_V6)
         pa_volume_func_init_arm(*flags);
+
 #ifdef HAVE_NEON
     if (*flags & PA_CPU_ARM_NEON) {
         pa_convert_func_init_neon(*flags);
         pa_mix_func_init_neon(*flags);
+        pa_remap_func_init_neon(*flags);
     }
 #endif
 
diff --git a/src/pulsecore/cpu-arm.h b/src/pulsecore/cpu-arm.h
index 5bc7d3b..4ee7dff 100644
--- a/src/pulsecore/cpu-arm.h
+++ b/src/pulsecore/cpu-arm.h
@@ -36,7 +36,8 @@ typedef enum pa_cpu_arm_flag {
     PA_CPU_ARM_VFP      = (1 << 2),
     PA_CPU_ARM_EDSP     = (1 << 3),
     PA_CPU_ARM_NEON     = (1 << 4),
-    PA_CPU_ARM_VFPV3    = (1 << 5)
+    PA_CPU_ARM_VFPV3    = (1 << 5),
+    PA_CPU_ARM_CORTEX_A8 = (1 << 6),
 } pa_cpu_arm_flag_t;
 
 void pa_cpu_get_arm_flags(pa_cpu_arm_flag_t *flags);
@@ -48,6 +49,7 @@ void pa_volume_func_init_arm(pa_cpu_arm_flag_t flags);
 #ifdef HAVE_NEON
 void pa_convert_func_init_neon(pa_cpu_arm_flag_t flags);
 void pa_mix_func_init_neon(pa_cpu_arm_flag_t flags);
+void pa_remap_func_init_neon(pa_cpu_arm_flag_t flags);
 #endif
 
 #endif /* foocpuarmhfoo */
diff --git a/src/pulsecore/cpu.c b/src/pulsecore/cpu.c
new file mode 100644
index 0000000..e0c110e
--- /dev/null
+++ b/src/pulsecore/cpu.c
@@ -0,0 +1,38 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2014 Peter Meerwald <pmeerw at pmeerw.net>
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "cpu.h"
+#include "cpu-orc.h"
+
+void pa_cpu_init(pa_cpu_info *cpu_info) {
+    cpu_info->cpu_type = PA_CPU_UNDEFINED;
+    /* don't force generic code, used for testing only */
+    cpu_info->force_generic_code = false;
+    if (!getenv("PULSE_NO_SIMD")) {
+        if (pa_cpu_init_x86(&cpu_info->flags.x86))
+            cpu_info->cpu_type = PA_CPU_X86;
+        else if (pa_cpu_init_arm(&cpu_info->flags.arm))
+            cpu_info->cpu_type = PA_CPU_ARM;
+        pa_cpu_init_orc(*cpu_info);
+    }
+
+    pa_remap_func_init(cpu_info);
+    pa_mix_func_init(cpu_info);
+}
diff --git a/src/pulsecore/cpu.h b/src/pulsecore/cpu.h
index 7fe6f0b..03507de 100644
--- a/src/pulsecore/cpu.h
+++ b/src/pulsecore/cpu.h
@@ -40,6 +40,12 @@ struct pa_cpu_info {
         pa_cpu_x86_flag_t x86;
         pa_cpu_arm_flag_t arm;
     } flags;
+    bool force_generic_code;
 };
 
+void pa_cpu_init(pa_cpu_info *cpu_info);
+
+void pa_remap_func_init(const pa_cpu_info *cpu_info);
+void pa_mix_func_init(const pa_cpu_info *cpu_info);
+
 #endif /* foocpuhfoo */
diff --git a/src/pulsecore/creds.h b/src/pulsecore/creds.h
index aa1d560..43f6166 100644
--- a/src/pulsecore/creds.h
+++ b/src/pulsecore/creds.h
@@ -29,8 +29,12 @@
 #endif
 
 #include <pulsecore/socket.h>
+#include <stdbool.h>
+
+#define MAX_ANCIL_DATA_FDS 2
 
 typedef struct pa_creds pa_creds;
+typedef struct pa_cmsg_ancil_data pa_cmsg_ancil_data;
 
 #if defined(SCM_CREDENTIALS)
 
@@ -41,6 +45,15 @@ struct pa_creds {
     uid_t uid;
 };
 
+/* Struct for handling ancillary data, i e, extra data that can be sent together with a message
+ * over unix pipes. Supports sending and receiving credentials and file descriptors. */
+struct pa_cmsg_ancil_data {
+    pa_creds creds;
+    bool creds_valid;
+    int nfd;
+    int fds[MAX_ANCIL_DATA_FDS];
+};
+
 #else
 #undef HAVE_CREDS
 #endif
diff --git a/src/pulsecore/database-simple.c b/src/pulsecore/database-simple.c
index 562c9ab..155a5fa 100644
--- a/src/pulsecore/database-simple.c
+++ b/src/pulsecore/database-simple.c
@@ -322,18 +322,11 @@ int pa_database_set(pa_database *database, const pa_datum *key, const pa_datum*
 
 int pa_database_unset(pa_database *database, const pa_datum *key) {
     simple_data *db = (simple_data*)database;
-    entry *e;
 
     pa_assert(db);
     pa_assert(key);
 
-    e = pa_hashmap_remove(db->map, key);
-    if (!e)
-        return -1;
-
-    free_entry(e);
-
-    return 0;
+    return pa_hashmap_remove_and_free(db->map, key);
 }
 
 int pa_database_clear(pa_database *database) {
diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c
index 0b65d5c..8cfb117 100644
--- a/src/pulsecore/device-port.c
+++ b/src/pulsecore/device-port.c
@@ -176,3 +176,30 @@ void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset) {
     pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, p->card->index);
     pa_hook_fire(&core->hooks[PA_CORE_HOOK_PORT_LATENCY_OFFSET_CHANGED], p);
 }
+
+pa_device_port *pa_device_port_find_best(pa_hashmap *ports)
+{
+    void *state;
+    pa_device_port *p, *best = NULL;
+
+    if (!ports)
+        return NULL;
+
+    /* First run: skip unavailable ports */
+    PA_HASHMAP_FOREACH(p, ports, state) {
+        if (p->available == PA_AVAILABLE_NO)
+            continue;
+
+        if (!best || p->priority > best->priority)
+            best = p;
+    }
+
+    /* Second run: if only unavailable ports exist, still suggest a port */
+    if (!best) {
+        PA_HASHMAP_FOREACH(p, ports, state)
+            if (!best || p->priority > best->priority)
+                best = p;
+    }
+
+    return best;
+}
diff --git a/src/pulsecore/device-port.h b/src/pulsecore/device-port.h
index b10d554..ef700ac 100644
--- a/src/pulsecore/device-port.h
+++ b/src/pulsecore/device-port.h
@@ -83,4 +83,6 @@ void pa_device_port_set_available(pa_device_port *p, pa_available_t available);
 
 void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset);
 
+pa_device_port *pa_device_port_find_best(pa_hashmap *ports);
+
 #endif
diff --git a/src/pulsecore/endianmacros.h b/src/pulsecore/endianmacros.h
index 2b18cf8..2e73136 100644
--- a/src/pulsecore/endianmacros.h
+++ b/src/pulsecore/endianmacros.h
@@ -71,25 +71,32 @@ static inline void PA_WRITE24LE(uint8_t *p, uint32_t u) {
     p[0] = (uint8_t) u;
 }
 
-static inline float PA_FLOAT32_SWAP(float x) {
+static inline float PA_READ_FLOAT32RE(const void *p) {
     union {
         float f;
         uint32_t u;
     } t;
 
-    t.f = x;
-    t.u = PA_UINT32_SWAP(t.u);
+    t.u = PA_UINT32_SWAP(*(uint32_t *) p);
     return t.f;
 }
 
-#define PA_MAYBE_INT16_SWAP(c,x) ((c) ? PA_INT32_SWAP(x) : (x))
-#define PA_MAYBE_UINT16_SWAP(c,x) ((c) ? PA_UINT32_SWAP(x) : (x))
+static inline void PA_WRITE_FLOAT32RE(void *p, float x) {
+    union {
+        float f;
+        uint32_t u;
+    } t;
+
+    t.f = x;
+    *(uint32_t *) p = PA_UINT32_SWAP(t.u);
+}
+
+#define PA_MAYBE_INT16_SWAP(c,x) ((c) ? PA_INT16_SWAP(x) : (x))
+#define PA_MAYBE_UINT16_SWAP(c,x) ((c) ? PA_UINT16_SWAP(x) : (x))
 
 #define PA_MAYBE_INT32_SWAP(c,x) ((c) ? PA_INT32_SWAP(x) : (x))
 #define PA_MAYBE_UINT32_SWAP(c,x) ((c) ? PA_UINT32_SWAP(x) : (x))
 
-#define PA_MAYBE_FLOAT32_SWAP(c,x) ((c) ? PA_FLOAT32_SWAP(x) : (x))
-
 #ifdef WORDS_BIGENDIAN
  #define PA_INT16_FROM_LE(x) PA_INT16_SWAP(x)
  #define PA_INT16_FROM_BE(x) ((int16_t)(x))
@@ -115,9 +122,6 @@ static inline float PA_FLOAT32_SWAP(float x) {
  #define PA_UINT32_TO_LE(x) PA_UINT32_SWAP(x)
  #define PA_UINT32_TO_BE(x) ((uint32_t)(x))
 
- #define PA_FLOAT32_TO_LE(x) PA_FLOAT32_SWAP(x)
- #define PA_FLOAT32_TO_BE(x) ((float) (x))
-
  #define PA_READ24NE(x) PA_READ24BE(x)
  #define PA_WRITE24NE(x,y) PA_WRITE24BE((x),(y))
 
@@ -148,9 +152,6 @@ static inline float PA_FLOAT32_SWAP(float x) {
  #define PA_UINT32_TO_LE(x) ((uint32_t)(x))
  #define PA_UINT32_TO_BE(x) PA_UINT32_SWAP(x)
 
- #define PA_FLOAT32_TO_LE(x) ((float) (x))
- #define PA_FLOAT32_TO_BE(x) PA_FLOAT32_SWAP(x)
-
  #define PA_READ24NE(x) PA_READ24LE(x)
  #define PA_WRITE24NE(x,y) PA_WRITE24LE((x),(y))
 
diff --git a/src/pulsecore/esound.h b/src/pulsecore/esound.h
index 5d6ec95..5fc91db 100644
--- a/src/pulsecore/esound.h
+++ b/src/pulsecore/esound.h
@@ -33,7 +33,7 @@
 /* maximum size we can write().  Otherwise we might overflow */
 #define ESD_MAX_WRITE_SIZE (21 * 4096)
 
-/* length of the authorization key, octets */
+/* length of the authentication key, octets */
 #define ESD_KEY_LEN (16)
 
 /* default port for the EsounD server */
diff --git a/src/pulsecore/fdsem.c b/src/pulsecore/fdsem.c
index ec32461..b153ddd 100644
--- a/src/pulsecore/fdsem.c
+++ b/src/pulsecore/fdsem.c
@@ -100,11 +100,10 @@ pa_fdsem *pa_fdsem_open_shm(pa_fdsem_data *data, int event_fd) {
     return f;
 }
 
-pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data, int* event_fd) {
+pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data) {
     pa_fdsem *f = NULL;
 
     pa_assert(data);
-    pa_assert(event_fd);
 
 #ifdef HAVE_SYS_EVENTFD_H
 
diff --git a/src/pulsecore/fdsem.h b/src/pulsecore/fdsem.h
index a434ac3..1b1a5a5 100644
--- a/src/pulsecore/fdsem.h
+++ b/src/pulsecore/fdsem.h
@@ -28,6 +28,8 @@
  * the best case all functions are lock-free unless sleeping is
  * required.  */
 
+#include <pulsecore/atomic.h>
+
 typedef struct pa_fdsem pa_fdsem;
 
 typedef struct pa_fdsem_data {
@@ -38,7 +40,7 @@ typedef struct pa_fdsem_data {
 
 pa_fdsem *pa_fdsem_new(void);
 pa_fdsem *pa_fdsem_open_shm(pa_fdsem_data *data, int event_fd);
-pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data, int* event_fd);
+pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data);
 void pa_fdsem_free(pa_fdsem *f);
 
 void pa_fdsem_post(pa_fdsem *f);
diff --git a/src/pulsecore/hashmap.c b/src/pulsecore/hashmap.c
index acac1e0..2cc03cb 100644
--- a/src/pulsecore/hashmap.c
+++ b/src/pulsecore/hashmap.c
@@ -207,6 +207,19 @@ void* pa_hashmap_remove(pa_hashmap *h, const void *key) {
     return data;
 }
 
+int pa_hashmap_remove_and_free(pa_hashmap *h, const void *key) {
+    void *data;
+
+    pa_assert(h);
+
+    data = pa_hashmap_remove(h, key);
+
+    if (data && h->value_free_func)
+        h->value_free_func(data);
+
+    return data ? 0 : -1;
+}
+
 void pa_hashmap_remove_all(pa_hashmap *h) {
     pa_assert(h);
 
diff --git a/src/pulsecore/hashmap.h b/src/pulsecore/hashmap.h
index e42732a..8042f7b 100644
--- a/src/pulsecore/hashmap.h
+++ b/src/pulsecore/hashmap.h
@@ -52,6 +52,13 @@ void* pa_hashmap_get(pa_hashmap *h, const void *key);
 /* Returns the data of the entry while removing */
 void* pa_hashmap_remove(pa_hashmap *h, const void *key);
 
+/* Removes the entry and frees the entry data. Returns a negative value if the
+ * entry is not found. FIXME: This function shouldn't be needed.
+ * pa_hashmap_remove() should free the entry data, and the current semantics of
+ * pa_hashmap_remove() should be implemented by a function called
+ * pa_hashmap_steal(). */
+int pa_hashmap_remove_and_free(pa_hashmap *h, const void *key);
+
 /* Remove all entries but don't free the hashmap */
 void pa_hashmap_remove_all(pa_hashmap *h);
 
diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c
index dce6734..93cd0fd 100644
--- a/src/pulsecore/iochannel.c
+++ b/src/pulsecore/iochannel.c
@@ -348,27 +348,73 @@ ssize_t pa_iochannel_write_with_creds(pa_iochannel*io, const void*data, size_t l
     return r;
 }
 
-ssize_t pa_iochannel_read_with_creds(pa_iochannel*io, void*data, size_t l, pa_creds *creds, bool *creds_valid) {
+ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l, int nfd, const int *fds) {
     ssize_t r;
+    int *msgdata;
     struct msghdr mh;
     struct iovec iov;
     union {
         struct cmsghdr hdr;
-        uint8_t data[CMSG_SPACE(sizeof(struct ucred))];
+        uint8_t data[CMSG_SPACE(sizeof(int) * MAX_ANCIL_DATA_FDS)];
     } cmsg;
 
     pa_assert(io);
     pa_assert(data);
     pa_assert(l);
-    pa_assert(io->ifd >= 0);
-    pa_assert(creds);
-    pa_assert(creds_valid);
+    pa_assert(io->ofd >= 0);
+    pa_assert(fds);
+    pa_assert(nfd > 0);
+    pa_assert(nfd <= MAX_ANCIL_DATA_FDS);
 
     pa_zero(iov);
-    iov.iov_base = data;
+    iov.iov_base = (void*) data;
     iov.iov_len = l;
 
     pa_zero(cmsg);
+    cmsg.hdr.cmsg_level = SOL_SOCKET;
+    cmsg.hdr.cmsg_type = SCM_RIGHTS;
+
+    msgdata = (int*) CMSG_DATA(&cmsg.hdr);
+    memcpy(msgdata, fds, nfd * sizeof(int));
+    cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(int) * nfd);
+
+    pa_zero(mh);
+    mh.msg_iov = &iov;
+    mh.msg_iovlen = 1;
+    mh.msg_control = &cmsg;
+    mh.msg_controllen = sizeof(cmsg);
+
+    if ((r = sendmsg(io->ofd, &mh, MSG_NOSIGNAL)) >= 0) {
+        io->writable = io->hungup = false;
+        enable_events(io);
+    }
+    return r;
+}
+
+ssize_t pa_iochannel_read_with_ancil_data(pa_iochannel*io, void*data, size_t l, pa_cmsg_ancil_data *ancil_data) {
+    ssize_t r;
+    struct msghdr mh;
+    struct iovec iov;
+    union {
+        struct cmsghdr hdr;
+        uint8_t data[CMSG_SPACE(sizeof(struct ucred)) + CMSG_SPACE(sizeof(int) * MAX_ANCIL_DATA_FDS)];
+    } cmsg;
+
+    pa_assert(io);
+    pa_assert(data);
+    pa_assert(l);
+    pa_assert(io->ifd >= 0);
+    pa_assert(ancil_data);
+
+    if (io->ifd_type > 0) {
+        ancil_data->creds_valid = false;
+        ancil_data->nfd = 0;
+        return pa_iochannel_read(io, data, l);
+    }
+
+    iov.iov_base = data;
+    iov.iov_len = l;
+
     pa_zero(mh);
     mh.msg_iov = &iov;
     mh.msg_iovlen = 1;
@@ -378,19 +424,34 @@ ssize_t pa_iochannel_read_with_creds(pa_iochannel*io, void*data, size_t l, pa_cr
     if ((r = recvmsg(io->ifd, &mh, 0)) >= 0) {
         struct cmsghdr *cmh;
 
-        *creds_valid = false;
+        ancil_data->creds_valid = false;
+        ancil_data->nfd = 0;
 
         for (cmh = CMSG_FIRSTHDR(&mh); cmh; cmh = CMSG_NXTHDR(&mh, cmh)) {
 
-            if (cmh->cmsg_level == SOL_SOCKET && cmh->cmsg_type == SCM_CREDENTIALS) {
+            if (cmh->cmsg_level != SOL_SOCKET)
+                continue;
+
+            if (cmh->cmsg_type == SCM_CREDENTIALS) {
                 struct ucred u;
                 pa_assert(cmh->cmsg_len == CMSG_LEN(sizeof(struct ucred)));
                 memcpy(&u, CMSG_DATA(cmh), sizeof(struct ucred));
 
-                creds->gid = u.gid;
-                creds->uid = u.uid;
-                *creds_valid = true;
-                break;
+                ancil_data->creds.gid = u.gid;
+                ancil_data->creds.uid = u.uid;
+                ancil_data->creds_valid = true;
+            }
+            else if (cmh->cmsg_type == SCM_RIGHTS) {
+                int nfd = (cmh->cmsg_len - CMSG_LEN(0)) / sizeof(int);
+                if (nfd > MAX_ANCIL_DATA_FDS) {
+                    int i;
+                    pa_log("Trying to receive too many file descriptors!");
+                    for (i = 0; i < nfd; i++)
+                        pa_close(((int*) CMSG_DATA(cmh))[i]);
+                    continue;
+                }
+                memcpy(ancil_data->fds, CMSG_DATA(cmh), nfd * sizeof(int));
+                ancil_data->nfd = nfd;
             }
         }
 
@@ -398,6 +459,11 @@ ssize_t pa_iochannel_read_with_creds(pa_iochannel*io, void*data, size_t l, pa_cr
         enable_events(io);
     }
 
+    if (r == -1 && errno == ENOTSOCK) {
+        io->ifd_type = 1;
+        return pa_iochannel_read_with_ancil_data(io, data, l, ancil_data);
+    }
+
     return r;
 }
 
@@ -413,7 +479,7 @@ void pa_iochannel_set_callback(pa_iochannel*io, pa_iochannel_cb_t _callback, voi
 void pa_iochannel_set_noclose(pa_iochannel*io, bool b) {
     pa_assert(io);
 
-    io->no_close = !!b;
+    io->no_close = b;
 }
 
 void pa_iochannel_socket_peer_to_string(pa_iochannel*io, char*s, size_t l) {
diff --git a/src/pulsecore/iochannel.h b/src/pulsecore/iochannel.h
index e95f46f..959ee88 100644
--- a/src/pulsecore/iochannel.h
+++ b/src/pulsecore/iochannel.h
@@ -57,8 +57,9 @@ ssize_t pa_iochannel_read(pa_iochannel*io, void*data, size_t l);
 bool pa_iochannel_creds_supported(pa_iochannel *io);
 int pa_iochannel_creds_enable(pa_iochannel *io);
 
+ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l, int nfd, const int *fds);
 ssize_t pa_iochannel_write_with_creds(pa_iochannel*io, const void*data, size_t l, const pa_creds *ucred);
-ssize_t pa_iochannel_read_with_creds(pa_iochannel*io, void*data, size_t l, pa_creds *ucred, bool *creds_valid);
+ssize_t pa_iochannel_read_with_ancil_data(pa_iochannel*io, void*data, size_t l, pa_cmsg_ancil_data *ancil_data);
 #endif
 
 bool pa_iochannel_is_readable(pa_iochannel*io);
diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c
index cf96dce..9e29c78 100644
--- a/src/pulsecore/log.c
+++ b/src/pulsecore/log.c
@@ -40,7 +40,7 @@
 #include <syslog.h>
 #endif
 
-#ifdef HAVE_JOURNAL
+#ifdef HAVE_SYSTEMD_JOURNAL
 #include <systemd/sd-journal.h>
 #endif
 
@@ -96,7 +96,7 @@ static const int level_to_syslog[] = {
 
 /* These are actually equivalent to the syslog ones
  * but we don't want to depend on syslog.h */
-#ifdef HAVE_JOURNAL
+#ifdef HAVE_SYSTEMD_JOURNAL
 static const int level_to_journal[] = {
     [PA_LOG_ERROR]  = 3,
     [PA_LOG_WARN]   = 4,
@@ -145,7 +145,7 @@ int pa_log_set_target(pa_log_target *t) {
     switch (t->type) {
         case PA_LOG_STDERR:
         case PA_LOG_SYSLOG:
-#ifdef HAVE_JOURNAL
+#ifdef HAVE_SYSTEMD_JOURNAL
         case PA_LOG_JOURNAL:
 #endif
         case PA_LOG_NULL:
@@ -488,7 +488,7 @@ void pa_log_levelv_meta(
                 break;
 #endif
 
-#ifdef HAVE_JOURNAL
+#ifdef HAVE_SYSTEMD_JOURNAL
             case PA_LOG_JOURNAL:
                 if (sd_journal_send("MESSAGE=%s", t,
                                 "PRIORITY=%i", level_to_journal[level],
@@ -619,7 +619,7 @@ pa_log_target *pa_log_parse_target(const char *string) {
         t = pa_log_target_new(PA_LOG_STDERR, NULL);
     else if (pa_streq(string, "syslog"))
         t = pa_log_target_new(PA_LOG_SYSLOG, NULL);
-#ifdef HAVE_JOURNAL
+#ifdef HAVE_SYSTEMD_JOURNAL
     else if (pa_streq(string, "journal"))
         t = pa_log_target_new(PA_LOG_JOURNAL, NULL);
 #endif
@@ -647,7 +647,7 @@ char *pa_log_target_to_string(const pa_log_target *t) {
         case PA_LOG_SYSLOG:
             string = pa_xstrdup("syslog");
             break;
-#ifdef HAVE_JOURNAL
+#ifdef HAVE_SYSTEMD_JOURNAL
         case PA_LOG_JOURNAL:
             string = pa_xstrdup("journal");
             break;
diff --git a/src/pulsecore/log.h b/src/pulsecore/log.h
index 5e9611d..65abed9 100644
--- a/src/pulsecore/log.h
+++ b/src/pulsecore/log.h
@@ -35,7 +35,7 @@
 typedef enum pa_log_target_type {
     PA_LOG_STDERR,      /* default */
     PA_LOG_SYSLOG,
-#ifdef HAVE_JOURNAL
+#ifdef HAVE_SYSTEMD_JOURNAL
     PA_LOG_JOURNAL,     /* systemd journal */
 #endif
     PA_LOG_NULL,        /* to /dev/null */
@@ -48,7 +48,7 @@ typedef enum pa_log_level {
     PA_LOG_WARN   = 1,    /* Warning messages */
     PA_LOG_NOTICE = 2,    /* Notice messages */
     PA_LOG_INFO   = 3,    /* Info messages */
-    PA_LOG_DEBUG  = 4,    /* debug message */
+    PA_LOG_DEBUG  = 4,    /* Debug messages */
     PA_LOG_LEVEL_MAX
 } pa_log_level_t;
 
diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h
index 4d5e80f..21c3e6c 100644
--- a/src/pulsecore/macro.h
+++ b/src/pulsecore/macro.h
@@ -77,6 +77,12 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
     return (l + PA_PAGE_SIZE - 1) & ~(PA_PAGE_SIZE - 1);
 }
 
+#if defined(__GNUC__)
+    #define PA_UNUSED __attribute__ ((unused))
+#else
+    #define PA_UNUSED
+#endif
+
 #define PA_ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0]))
 
 #if defined(__GNUC__)
@@ -231,7 +237,7 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
 #endif
 
 #ifdef NDEBUG
-#define pa_assert_not_reached() pa_nop()
+#define pa_assert_not_reached() abort()
 #else
 #define pa_assert_not_reached()                                         \
     do {                                                                \
diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c
index 9cc02c1..f8b008f 100644
--- a/src/pulsecore/memblock.c
+++ b/src/pulsecore/memblock.c
@@ -83,6 +83,8 @@ struct pa_memblock {
         struct {
             /* If type == PA_MEMBLOCK_USER this points to a function for freeing this memory block */
             pa_free_cb_t free_cb;
+            /* If type == PA_MEMBLOCK_USER this is passed as free_cb argument */
+            void *free_cb_data;
         } user;
 
         struct {
@@ -97,6 +99,7 @@ struct pa_memimport_segment {
     pa_shm memory;
     pa_memtrap *trap;
     unsigned n_blocks;
+    bool writable;
 };
 
 /* A collection of multiple segments */
@@ -146,6 +149,7 @@ struct pa_mempool {
     pa_shm memory;
     size_t block_size;
     unsigned n_blocks;
+    bool is_remote_writable;
 
     pa_atomic_t n_init;
 
@@ -303,6 +307,19 @@ static struct mempool_slot* mempool_slot_by_ptr(pa_mempool *p, void *ptr) {
 }
 
 /* No lock necessary */
+bool pa_mempool_is_remote_writable(pa_mempool *p) {
+    pa_assert(p);
+    return p->is_remote_writable;
+}
+
+/* No lock necessary */
+void pa_mempool_set_is_remote_writable(pa_mempool *p, bool writable) {
+    pa_assert(p);
+    pa_assert(!writable || pa_mempool_is_shared(p));
+    p->is_remote_writable = writable;
+}
+
+/* No lock necessary */
 pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) {
     pa_memblock *b = NULL;
     struct mempool_slot *slot;
@@ -387,7 +404,13 @@ pa_memblock *pa_memblock_new_fixed(pa_mempool *p, void *d, size_t length, bool r
 }
 
 /* No lock necessary */
-pa_memblock *pa_memblock_new_user(pa_mempool *p, void *d, size_t length, pa_free_cb_t free_cb, bool read_only) {
+pa_memblock *pa_memblock_new_user(
+        pa_mempool *p,
+        void *d,
+        size_t length,
+        pa_free_cb_t free_cb,
+        void *free_cb_data,
+        bool read_only) {
     pa_memblock *b;
 
     pa_assert(p);
@@ -410,12 +433,21 @@ pa_memblock *pa_memblock_new_user(pa_mempool *p, void *d, size_t length, pa_free
     pa_atomic_store(&b->please_signal, 0);
 
     b->per_type.user.free_cb = free_cb;
+    b->per_type.user.free_cb_data = free_cb_data;
 
     stat_add(b);
     return b;
 }
 
 /* No lock necessary */
+bool pa_memblock_is_ours(pa_memblock *b) {
+    pa_assert(b);
+    pa_assert(PA_REFCNT_VALUE(b) > 0);
+
+    return b->type != PA_MEMBLOCK_IMPORTED;
+}
+
+/* No lock necessary */
 bool pa_memblock_is_read_only(pa_memblock *b) {
     pa_assert(b);
     pa_assert(PA_REFCNT_VALUE(b) > 0);
@@ -513,7 +545,7 @@ static void memblock_free(pa_memblock *b) {
     switch (b->type) {
         case PA_MEMBLOCK_USER :
             pa_assert(b->per_type.user.free_cb);
-            b->per_type.user.free_cb(pa_atomic_ptr_load(&b->data));
+            b->per_type.user.free_cb(b->per_type.user.free_cb_data);
 
             /* Fall through */
 
@@ -647,6 +679,7 @@ static void memblock_make_local(pa_memblock *b) {
     /* Humm, not enough space in the pool, so lets allocate the memory with malloc() */
     b->per_type.user.free_cb = pa_xfree;
     pa_atomic_ptr_store(&b->data, pa_xmemdup(pa_atomic_ptr_load(&b->data), b->length));
+    b->per_type.user.free_cb_data = pa_atomic_ptr_load(&b->data);
 
     b->type = PA_MEMBLOCK_USER;
     b->read_only = false;
@@ -877,7 +910,7 @@ int pa_mempool_get_shm_id(pa_mempool *p, uint32_t *id) {
 bool pa_mempool_is_shared(pa_mempool *p) {
     pa_assert(p);
 
-    return !!p->memory.shared;
+    return p->memory.shared;
 }
 
 /* For receiving blocks from other nodes */
@@ -905,7 +938,7 @@ pa_memimport* pa_memimport_new(pa_mempool *p, pa_memimport_release_cb_t cb, void
 static void memexport_revoke_blocks(pa_memexport *e, pa_memimport *i);
 
 /* Should be called locked */
-static pa_memimport_segment* segment_attach(pa_memimport *i, uint32_t shm_id) {
+static pa_memimport_segment* segment_attach(pa_memimport *i, uint32_t shm_id, bool writable) {
     pa_memimport_segment* seg;
 
     if (pa_hashmap_size(i->segments) >= PA_MEMIMPORT_SEGMENTS_MAX)
@@ -913,11 +946,12 @@ static pa_memimport_segment* segment_attach(pa_memimport *i, uint32_t shm_id) {
 
     seg = pa_xnew0(pa_memimport_segment, 1);
 
-    if (pa_shm_attach_ro(&seg->memory, shm_id) < 0) {
+    if (pa_shm_attach(&seg->memory, shm_id, writable) < 0) {
         pa_xfree(seg);
         return NULL;
     }
 
+    seg->writable = writable;
     seg->import = i;
     seg->trap = pa_memtrap_add(seg->memory.ptr, seg->memory.size);
 
@@ -973,7 +1007,8 @@ void pa_memimport_free(pa_memimport *i) {
 }
 
 /* Self-locked */
-pa_memblock* pa_memimport_get(pa_memimport *i, uint32_t block_id, uint32_t shm_id, size_t offset, size_t size) {
+pa_memblock* pa_memimport_get(pa_memimport *i, uint32_t block_id, uint32_t shm_id,
+                              size_t offset, size_t size, bool writable) {
     pa_memblock *b = NULL;
     pa_memimport_segment *seg;
 
@@ -990,9 +1025,14 @@ pa_memblock* pa_memimport_get(pa_memimport *i, uint32_t block_id, uint32_t shm_i
         goto finish;
 
     if (!(seg = pa_hashmap_get(i->segments, PA_UINT32_TO_PTR(shm_id))))
-        if (!(seg = segment_attach(i, shm_id)))
+        if (!(seg = segment_attach(i, shm_id, writable)))
             goto finish;
 
+    if (writable != seg->writable) {
+        pa_log("Cannot open segment - writable status changed!");
+        goto finish;
+    }
+
     if (offset+size > seg->memory.size)
         goto finish;
 
@@ -1002,7 +1042,7 @@ pa_memblock* pa_memimport_get(pa_memimport *i, uint32_t block_id, uint32_t shm_i
     PA_REFCNT_INIT(b);
     b->pool = i->pool;
     b->type = PA_MEMBLOCK_IMPORTED;
-    b->read_only = true;
+    b->read_only = !writable;
     b->is_silence = false;
     pa_atomic_ptr_store(&b->data, (uint8_t*) seg->memory.ptr + offset);
     b->length = size;
diff --git a/src/pulsecore/memblock.h b/src/pulsecore/memblock.h
index 502f207..9ce88ca 100644
--- a/src/pulsecore/memblock.h
+++ b/src/pulsecore/memblock.h
@@ -85,10 +85,10 @@ pa_memblock *pa_memblock_new(pa_mempool *, size_t length);
 pa_memblock *pa_memblock_new_pool(pa_mempool *, size_t length);
 
 /* Allocate a new memory block of type PA_MEMBLOCK_USER */
-pa_memblock *pa_memblock_new_user(pa_mempool *, void *data, size_t length, pa_free_cb_t free_cb, bool read_only);
+pa_memblock *pa_memblock_new_user(pa_mempool *, void *data, size_t length, pa_free_cb_t free_cb, void *free_cb_data, bool read_only);
 
 /* A special case of pa_memblock_new_user: take a memory buffer previously allocated with pa_xmalloc()  */
-#define pa_memblock_new_malloced(p,data,length) pa_memblock_new_user(p, data, length, pa_xfree, 0)
+#define pa_memblock_new_malloced(p,data,length) pa_memblock_new_user(p, data, length, pa_xfree, data, 0)
 
 /* Allocate a new memory block of type PA_MEMBLOCK_FIXED */
 pa_memblock *pa_memblock_new_fixed(pa_mempool *, void *data, size_t length, bool read_only);
@@ -104,6 +104,7 @@ function is not multiple caller safe, i.e. needs to be locked
 manually if called from more than one thread at the same time. */
 void pa_memblock_unref_fixed(pa_memblock*b);
 
+bool pa_memblock_is_ours(pa_memblock *b);
 bool pa_memblock_is_read_only(pa_memblock *b);
 bool pa_memblock_is_silence(pa_memblock *b);
 bool pa_memblock_ref_is_one(pa_memblock *b);
@@ -125,12 +126,15 @@ const pa_mempool_stat* pa_mempool_get_stat(pa_mempool *p);
 void pa_mempool_vacuum(pa_mempool *p);
 int pa_mempool_get_shm_id(pa_mempool *p, uint32_t *id);
 bool pa_mempool_is_shared(pa_mempool *p);
+bool pa_mempool_is_remote_writable(pa_mempool *p);
+void pa_mempool_set_is_remote_writable(pa_mempool *p, bool writable);
 size_t pa_mempool_block_size_max(pa_mempool *p);
 
 /* For receiving blocks from other nodes */
 pa_memimport* pa_memimport_new(pa_mempool *p, pa_memimport_release_cb_t cb, void *userdata);
 void pa_memimport_free(pa_memimport *i);
-pa_memblock* pa_memimport_get(pa_memimport *i, uint32_t block_id, uint32_t shm_id, size_t offset, size_t size);
+pa_memblock* pa_memimport_get(pa_memimport *i, uint32_t block_id, uint32_t shm_id,
+                              size_t offset, size_t size, bool writable);
 int pa_memimport_process_revoke(pa_memimport *i, uint32_t block_id);
 
 /* For sending blocks to other nodes */
diff --git a/src/pulsecore/memblockq.c b/src/pulsecore/memblockq.c
index 571107d..16a62da 100644
--- a/src/pulsecore/memblockq.c
+++ b/src/pulsecore/memblockq.c
@@ -287,7 +287,8 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
     pa_assert(uchunk->length > 0);
     pa_assert(uchunk->index + uchunk->length <= pa_memblock_get_length(uchunk->memblock));
 
-    pa_assert_se(uchunk->length % bq->base == 0);
+    pa_assert(uchunk->length % bq->base == 0);
+    pa_assert(uchunk->index % bq->base == 0);
 
     if (!can_push(bq, uchunk->length))
         return -1;
diff --git a/src/pulsecore/memchunk.c b/src/pulsecore/memchunk.c
index 5f8545f..792b4c7 100644
--- a/src/pulsecore/memchunk.c
+++ b/src/pulsecore/memchunk.c
@@ -111,7 +111,7 @@ pa_memchunk* pa_memchunk_memcpy(pa_memchunk *dst, pa_memchunk *src) {
 }
 
 bool pa_memchunk_isset(pa_memchunk *chunk) {
-    assert(chunk);
+    pa_assert(chunk);
 
     return
         chunk->memblock ||
diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c
index 87ea4fe..d04f278 100644
--- a/src/pulsecore/memtrap.c
+++ b/src/pulsecore/memtrap.c
@@ -237,5 +237,8 @@ void pa_memtrap_install(void) {
     sa.sa_flags = SA_RESTART|SA_SIGINFO;
 
     pa_assert_se(sigaction(SIGBUS, &sa, NULL) == 0);
+#ifdef __FreeBSD_kernel__
+    pa_assert_se(sigaction(SIGSEGV, &sa, NULL) == 0);
+#endif
 #endif
 }
diff --git a/src/pulsecore/mix.c b/src/pulsecore/mix.c
index 4b789a6..c66a2ec 100644
--- a/src/pulsecore/mix.c
+++ b/src/pulsecore/mix.c
@@ -32,6 +32,7 @@
 #include <pulsecore/g711.h>
 #include <pulsecore/endianmacros.h>
 
+#include "cpu.h"
 #include "mix.h"
 
 #define VOLUME_PADDING 32
@@ -445,7 +446,7 @@ static void pa_mix_s24_32re_c(pa_mix_info streams[], unsigned nstreams, unsigned
                 v = (v * cv) >> 16;
                 sum += v;
             }
-            m->ptr = (uint8_t*) m->ptr + 3;
+            m->ptr = (uint8_t*) m->ptr + sizeof(int32_t);
         }
 
         sum = PA_CLAMP_UNLIKELY(sum, -0x80000000LL, 0x7FFFFFFFLL);
@@ -576,17 +577,14 @@ static void pa_mix_float32re_c(pa_mix_info streams[], unsigned nstreams, unsigne
 
         for (i = 0; i < nstreams; i++) {
             pa_mix_info *m = streams + i;
-            float v, cv = m->linear[channel].f;
+            float cv = m->linear[channel].f;
 
-            if (PA_LIKELY(cv > 0)) {
-                v = PA_FLOAT32_SWAP(*(float*) m->ptr);
-                v *= cv;
-                sum += v;
-            }
+            if (PA_LIKELY(cv > 0))
+                sum += PA_READ_FLOAT32RE(m->ptr) * cv;
             m->ptr = (uint8_t*) m->ptr + sizeof(float);
         }
 
-        *data = PA_FLOAT32_SWAP(sum);
+        PA_WRITE_FLOAT32RE(data, sum);
 
         if (PA_UNLIKELY(++channel >= channels))
             channel = 0;
@@ -609,6 +607,13 @@ static pa_do_mix_func_t do_mix_table[] = {
     [PA_SAMPLE_S24_32RE]  = (pa_do_mix_func_t) pa_mix_s24_32re_c
 };
 
+void pa_mix_func_init(const pa_cpu_info *cpu_info) {
+    if (cpu_info->force_generic_code)
+        do_mix_table[PA_SAMPLE_S16NE] = (pa_do_mix_func_t) pa_mix_generic_s16ne;
+    else
+        do_mix_table[PA_SAMPLE_S16NE] = (pa_do_mix_func_t) pa_mix_s16ne_c;
+}
+
 size_t pa_mix(
         pa_mix_info streams[],
         unsigned nstreams,
@@ -625,19 +630,19 @@ size_t pa_mix(
     pa_assert(data);
     pa_assert(length);
     pa_assert(spec);
+    pa_assert(nstreams > 1);
 
     if (!volume)
         volume = pa_cvolume_reset(&full_volume, spec->channels);
 
-    if (mute || pa_cvolume_is_muted(volume) || nstreams <= 0) {
+    if (mute || pa_cvolume_is_muted(volume)) {
         pa_silence_memory(data, length, spec);
         return length;
     }
 
     for (k = 0; k < nstreams; k++) {
+        pa_assert(length <= streams[k].chunk.length);
         streams[k].ptr = pa_memblock_acquire_chunk(&streams[k].chunk);
-        if (length > streams[k].chunk.length)
-            length = streams[k].chunk.length;
     }
 
     calc_stream_volumes_table[spec->format](streams, nstreams, volume, spec);
@@ -702,10 +707,10 @@ void pa_volume_memchunk(
     if (pa_memblock_is_silence(c->memblock))
         return;
 
-    if (pa_cvolume_channels_equal_to(volume, PA_VOLUME_NORM))
+    if (pa_cvolume_is_norm(volume))
         return;
 
-    if (pa_cvolume_channels_equal_to(volume, PA_VOLUME_MUTED)) {
+    if (pa_cvolume_is_muted(volume)) {
         pa_silence_memchunk(c, spec);
         return;
     }
diff --git a/src/pulsecore/mix_neon.c b/src/pulsecore/mix_neon.c
index ff05ccf..eb02d81 100644
--- a/src/pulsecore/mix_neon.c
+++ b/src/pulsecore/mix_neon.c
@@ -20,6 +20,7 @@
 
 #include <pulsecore/macro.h>
 #include <pulsecore/endianmacros.h>
+#include <pulsecore/sample-util.h>
 
 #include "cpu-arm.h"
 #include "mix.h"
@@ -79,8 +80,136 @@ static void pa_mix_ch2_s16ne_neon(pa_mix_info streams[], unsigned nstreams, uint
     fallback(streams, nstreams, 2, data, length & mask);
 }
 
+/* special case: mix 2 s16ne streams, 1 channel each */
+static void pa_mix2_ch1_s16ne_neon(pa_mix_info streams[], int16_t *data, unsigned length) {
+    const int16_t *ptr0 = streams[0].ptr;
+    const int16_t *ptr1 = streams[1].ptr;
+
+    int32x4_t sv0, sv1;
+    __asm__ __volatile__ (
+        "vdup.s32    %q[sv0], %[lin0]        \n\t"
+        "vdup.s32    %q[sv1], %[lin1]        \n\t"
+        : [sv0] "=w" (sv0), [sv1] "=w" (sv1)
+        : [lin0] "r" (streams[0].linear[0]), [lin1] "r" (streams[1].linear[0])
+        : /* clobber list */
+    );
+
+    length /= sizeof(int16_t);
+    for (; length >= 4; length -= 4) {
+        __asm__ __volatile__ (
+            "vld1.s16    d0, [%[ptr0]]!      \n\t"
+            "vld1.s16    d2, [%[ptr1]]!      \n\t"
+            "vshll.s16   q0, d0, #15         \n\t"
+            "vshll.s16   q1, d2, #15         \n\t"
+            "vqdmulh.s32 q0, q0, %q[sv0]     \n\t"
+            "vqdmulh.s32 q1, q1, %q[sv1]     \n\t"
+            "vqadd.s32   q0, q0, q1          \n\t"
+            "vqmovn.s32  d0, q0              \n\t"
+            "vst1.s16    d0, [%[data]]!      \n\t"
+            : [ptr0] "+r" (ptr0), [ptr1] "+r" (ptr1), [data] "+r" (data)
+            : [sv0] "w" (sv0), [sv1] "w" (sv1)
+            : "memory", "cc", "q0", "q1" /* clobber list */
+        );
+    }
+
+    for (; length > 0; length--) {
+        int32_t sum = pa_mult_s16_volume(*ptr0++, streams[0].linear[0].i);
+        sum += pa_mult_s16_volume(*ptr1++, streams[1].linear[0].i);
+        *data++ = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
+    }
+}
+
+/* special case: mix 2 s16ne streams, 2 channel each */
+static void pa_mix2_ch2_s16ne_neon(pa_mix_info streams[], int16_t *data, unsigned length) {
+    const int16_t *ptr0 = streams[0].ptr;
+    const int16_t *ptr1 = streams[1].ptr;
+
+    int32x4_t sv0, sv1;
+    __asm__ __volatile__ (
+        "vld1.s32 d0, [%[lin0]]              \n\t"
+        "vmov.s32 d1, d0                     \n\t"
+        "vmov.s32 %q[sv0], q0                \n\t"
+        "vld1.s32 d0, [%[lin1]]              \n\t"
+        "vmov.s32 d1, d0                     \n\t"
+        "vmov.s32 %q[sv1], q0                \n\t"
+        : [sv0] "=w" (sv0), [sv1] "=w" (sv1)
+        : [lin0] "r" (streams[0].linear), [lin1] "r" (streams[1].linear)
+        : "q0" /* clobber list */
+    );
+
+    length /= sizeof(int16_t);
+    for (; length >= 4; length -= 4) {
+        __asm__ __volatile__ (
+            "vld1.s16    d0, [%[ptr0]]!      \n\t"
+            "vld1.s16    d2, [%[ptr1]]!      \n\t"
+            "vshll.s16   q0, d0, #15         \n\t"
+            "vshll.s16   q1, d2, #15         \n\t"
+            "vqdmulh.s32 q0, q0, %q[sv0]     \n\t"
+            "vqdmulh.s32 q1, q1, %q[sv1]     \n\t"
+            "vqadd.s32   q0, q0, q1          \n\t"
+            "vqmovn.s32  d0, q0              \n\t"
+            "vst1.s16    d0, [%[data]]!      \n\t"
+            : [ptr0] "+r" (ptr0), [ptr1] "+r" (ptr1), [data] "+r" (data)
+            : [sv0] "w" (sv0), [sv1] "w" (sv1)
+            : "memory", "cc", "q0", "q1" /* clobber list */
+        );
+    }
+
+    if (length > 0) {
+        int32_t sum;
+
+        sum = pa_mult_s16_volume(*ptr0++, streams[0].linear[0].i);
+        sum += pa_mult_s16_volume(*ptr1++, streams[1].linear[0].i);
+        *data++ = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
+
+        sum = pa_mult_s16_volume(*ptr0++, streams[0].linear[1].i);
+        sum += pa_mult_s16_volume(*ptr1++, streams[1].linear[1].i);
+        *data++ = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
+    }
+}
+
+/* special case: mix 2 s16ne streams, 4 channels each */
+static void pa_mix2_ch4_s16ne_neon(pa_mix_info streams[], int16_t *data, unsigned length) {
+    const int16_t *ptr0 = streams[0].ptr;
+    const int16_t *ptr1 = streams[1].ptr;
+
+    int32x4_t sv0, sv1;
+
+    __asm__ __volatile__ (
+        "vld1.s32 %h[sv0], [%[lin0]]         \n\t"
+        "vld1.s32 %h[sv1], [%[lin1]]         \n\t"
+        : [sv0] "=w" (sv0), [sv1] "=w" (sv1)
+        : [lin0] "r" (streams[0].linear), [lin1] "r" (streams[1].linear)
+        : /* clobber list */
+    );
+
+    length /= sizeof(int16_t);
+    for (; length >= 4; length -= 4) {
+        __asm__ __volatile__ (
+            "vld1.s16    d0, [%[ptr0]]!      \n\t"
+            "vld1.s16    d2, [%[ptr1]]!      \n\t"
+            "vshll.s16   q0, d0, #15         \n\t"
+            "vshll.s16   q1, d2, #15         \n\t"
+            "vqdmulh.s32 q0, q0, %q[sv0]     \n\t"
+            "vqdmulh.s32 q1, q1, %q[sv1]     \n\t"
+            "vqadd.s32   q0, q0, q1          \n\t"
+            "vqmovn.s32  d0, q0              \n\t"
+            "vst1.s16    d0, [%[data]]!      \n\t"
+            : [ptr0] "+r" (ptr0), [ptr1] "+r" (ptr1), [data] "+r" (data)
+            : [sv0] "w" (sv0), [sv1] "w" (sv1)
+            : "memory", "cc", "q0", "q1" /* clobber list */
+        );
+    }
+}
+
 static void pa_mix_s16ne_neon(pa_mix_info streams[], unsigned nstreams, unsigned nchannels, void *data, unsigned length) {
-    if (nchannels == 2)
+    if (nstreams == 2 && nchannels == 2)
+        pa_mix2_ch2_s16ne_neon(streams, data, length);
+    else if (nstreams == 2 && nchannels == 4)
+        pa_mix2_ch4_s16ne_neon(streams, data, length);
+    else if (nstreams == 2 && nchannels == 1)
+        pa_mix2_ch1_s16ne_neon(streams, data, length);
+    else if (nchannels == 2)
         pa_mix_ch2_s16ne_neon(streams, nstreams, data, length);
     else
         fallback(streams, nstreams, nchannels, data, length);
diff --git a/src/pulsecore/modargs.c b/src/pulsecore/modargs.c
index a9c4e10..01ba5e4 100644
--- a/src/pulsecore/modargs.c
+++ b/src/pulsecore/modargs.c
@@ -418,9 +418,6 @@ int pa_modargs_get_alternate_sample_rate(pa_modargs *ma, uint32_t *alternate_rat
         !pa_sample_rate_valid(*alternate_rate))
         return -1;
 
-    if (!((rate_local % 4000 == 0) || (rate_local % 11025 == 0)))
-        return -1;
-
     *alternate_rate = rate_local;
 
     return 0;
diff --git a/src/pulsecore/native-common.h b/src/pulsecore/native-common.h
index dad82e0..ca1b430 100644
--- a/src/pulsecore/native-common.h
+++ b/src/pulsecore/native-common.h
@@ -176,11 +176,16 @@ enum {
     /* Supported since protocol v27 (3.0) */
     PA_COMMAND_SET_PORT_LATENCY_OFFSET,
 
+    /* Supported since protocol v30 (6.0) */
+    /* BOTH DIRECTIONS */
+    PA_COMMAND_ENABLE_SRBCHANNEL,
+    PA_COMMAND_DISABLE_SRBCHANNEL,
+
     PA_COMMAND_MAX
 };
 
 #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
diff --git a/src/pulsecore/pdispatch.c b/src/pulsecore/pdispatch.c
index 4033240..53284ee 100644
--- a/src/pulsecore/pdispatch.c
+++ b/src/pulsecore/pdispatch.c
@@ -190,6 +190,13 @@ static const char *command_names[PA_COMMAND_MAX] = {
     [PA_COMMAND_SET_SOURCE_OUTPUT_VOLUME] = "SET_SOURCE_OUTPUT_VOLUME",
     [PA_COMMAND_SET_SOURCE_OUTPUT_MUTE] = "SET_SOURCE_OUTPUT_MUTE",
 
+    /* Supported since protocol v27 (3.0) */
+    [PA_COMMAND_SET_PORT_LATENCY_OFFSET] = "SET_PORT_LATENCY_OFFSET",
+
+    /* Supported since protocol v30 (6.0) */
+    /* BOTH DIRECTIONS */
+    [PA_COMMAND_ENABLE_SRBCHANNEL] = "ENABLE_SRBCHANNEL",
+    [PA_COMMAND_DISABLE_SRBCHANNEL] = "DISABLE_SRBCHANNEL",
 };
 
 #endif
@@ -214,7 +221,7 @@ struct pa_pdispatch {
     PA_LLIST_HEAD(struct reply_info, replies);
     pa_pdispatch_drain_cb_t drain_callback;
     void *drain_userdata;
-    const pa_creds *creds;
+    const pa_cmsg_ancil_data *ancil_data;
     bool use_rtclock;
 };
 
@@ -284,7 +291,7 @@ static void run_action(pa_pdispatch *pd, struct reply_info *r, uint32_t command,
     pa_pdispatch_unref(pd);
 }
 
-int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_creds *creds, void *userdata) {
+int pa_pdispatch_run(pa_pdispatch *pd, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data, void *userdata) {
     uint32_t tag, command;
     pa_tagstruct *ts = NULL;
     int ret = -1;
@@ -318,7 +325,7 @@ int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_creds *creds,
 }
 #endif
 
-    pd->creds = creds;
+    pd->ancil_data = ancil_data;
 
     if (command == PA_COMMAND_ERROR || command == PA_COMMAND_REPLY) {
         struct reply_info *r;
@@ -342,7 +349,7 @@ int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_creds *creds,
     ret = 0;
 
 finish:
-    pd->creds = NULL;
+    pd->ancil_data = NULL;
 
     if (ts)
         pa_tagstruct_free(ts);
@@ -431,9 +438,29 @@ pa_pdispatch* pa_pdispatch_ref(pa_pdispatch *pd) {
     return pd;
 }
 
+#ifdef HAVE_CREDS
+
 const pa_creds * pa_pdispatch_creds(pa_pdispatch *pd) {
     pa_assert(pd);
     pa_assert(PA_REFCNT_VALUE(pd) >= 1);
 
-    return pd->creds;
+    if (pd->ancil_data && pd->ancil_data->creds_valid)
+         return &pd->ancil_data->creds;
+    return NULL;
 }
+
+const int * pa_pdispatch_fds(pa_pdispatch *pd, int *nfd) {
+    pa_assert(pd);
+    pa_assert(PA_REFCNT_VALUE(pd) >= 1);
+    pa_assert(nfd);
+
+    if (pd->ancil_data) {
+         *nfd = pd->ancil_data->nfd;
+         return pd->ancil_data->fds;
+    }
+
+    *nfd = 0;
+    return NULL;
+}
+
+#endif
diff --git a/src/pulsecore/pdispatch.h b/src/pulsecore/pdispatch.h
index 797ddca..df2e2fd 100644
--- a/src/pulsecore/pdispatch.h
+++ b/src/pulsecore/pdispatch.h
@@ -41,7 +41,7 @@ pa_pdispatch* pa_pdispatch_new(pa_mainloop_api *m, bool use_rtclock, const pa_pd
 void pa_pdispatch_unref(pa_pdispatch *pd);
 pa_pdispatch* pa_pdispatch_ref(pa_pdispatch *pd);
 
-int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*p, const pa_creds *creds, void *userdata);
+int pa_pdispatch_run(pa_pdispatch *pd, pa_packet *p, const pa_cmsg_ancil_data *ancil_data, void *userdata);
 
 void pa_pdispatch_register_reply(pa_pdispatch *pd, uint32_t tag, int timeout, pa_pdispatch_cb_t callback, void *userdata, pa_free_cb_t free_cb);
 
@@ -54,4 +54,6 @@ void pa_pdispatch_unregister_reply(pa_pdispatch *pd, void *userdata);
 
 const pa_creds * pa_pdispatch_creds(pa_pdispatch *pd);
 
+const int * pa_pdispatch_fds(pa_pdispatch *pd, int *nfd);
+
 #endif
diff --git a/src/pulsecore/pid.c b/src/pulsecore/pid.c
index e347884..c70b989 100644
--- a/src/pulsecore/pid.c
+++ b/src/pulsecore/pid.c
@@ -174,7 +174,7 @@ static int proc_name_ours(pid_t pid, const char *procname) {
         }
 /*#endif*/
 
-        return !!good;
+        return good;
     }
 #else
 
diff --git a/src/pulsecore/pipe.c b/src/pulsecore/pipe.c
index f873ef6..6ca1626 100644
--- a/src/pulsecore/pipe.c
+++ b/src/pulsecore/pipe.c
@@ -41,7 +41,7 @@ static int set_block(int fd, int blocking) {
 
     int v;
 
-    assert(fd >= 0);
+    pa_assert(fd >= 0);
 
     if ((v = fcntl(fd, F_GETFL)) < 0)
         return -1;
@@ -149,7 +149,7 @@ error:
         if (filedes[0] >= 0)
                 pa_close(filedes[0]);
         if (filedes[1] >= 0)
-                pa_close(filedes[0]);
+                pa_close(filedes[1]);
 
         return -1;
 }
diff --git a/src/pulsecore/poll-win32.c b/src/pulsecore/poll-win32.c
index 4a70171..c927e53 100644
--- a/src/pulsecore/poll-win32.c
+++ b/src/pulsecore/poll-win32.c
@@ -46,6 +46,7 @@ typedef unsigned long nfds_t;
 # include <io.h>
 # include <stdio.h>
 # include <conio.h>
+# include <signal.h>
 # if 0
 # include "msvc-nothrow.h"
 # endif
@@ -350,8 +351,9 @@ int
 pa_poll (struct pollfd *pfd, nfds_t nfd, int timeout)
 {
   struct timeval tv;
-  struct timeval *ptv;
+
 #ifndef WINDOWS_NATIVE
+  struct timeval *ptv;
   fd_set rfds, wfds, efds;
   int maxfd, rc;
   nfds_t i;
@@ -376,17 +378,6 @@ pa_poll (struct pollfd *pfd, nfds_t nfd, int timeout)
     }
 #  endif /* OPEN_MAX -- else, no check is needed */
 # endif /* !_SC_OPEN_MAX */
-#else /* WINDOWS_NATIVE*/
-  static HANDLE hEvent;
-  WSANETWORKEVENTS ev;
-  HANDLE h, handle_array[FD_SETSIZE + 2];
-  DWORD ret, wait_timeout, nhandles;
-  fd_set rfds, wfds, xfds;
-  BOOL poll_again;
-  MSG msg;
-  int rc = 0;
-  nfds_t i;
-#endif
 
   /* EFAULT is not necessary to implement, but let's do it in the
      simplest case. */
@@ -418,7 +409,6 @@ pa_poll (struct pollfd *pfd, nfds_t nfd, int timeout)
       return -1;
     }
 
-#ifndef WINDOWS_NATIVE
   /* create fd sets and determine max fd */
   maxfd = -1;
   FD_ZERO (&rfds);
@@ -475,10 +465,18 @@ pa_poll (struct pollfd *pfd, nfds_t nfd, int timeout)
       }
 
   return rc;
-#else
+#else /* WINDOWS_NATIVE*/
+  HANDLE hEvent;
+  WSANETWORKEVENTS ev;
+  HANDLE h, handle_array[FD_SETSIZE + 2];
+  DWORD ret, wait_timeout, nhandles;
+  fd_set rfds, wfds, xfds;
+  BOOL poll_again;
+  MSG msg;
+  int rc = 0;
+  nfds_t i;
 
-  if (!hEvent)
-    hEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
+  hEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
 
 restart:
   handle_array[0] = hEvent;
@@ -535,19 +533,16 @@ restart:
             handle_array[nhandles++] = h;
           if (pfd[i].revents)
             timeout = 0;
-          else
-            {
-              if (!ptv)
-                ptv = &tv;
-              /* tune down to 0.25s. But don't touch smaller timeouts */
-              if (ptv->tv_usec > 250*1000 || ptv->tv_sec > 0)
-                ptv->tv_usec = 250*1000;
-              ptv->tv_sec = 0;
-            }
         }
     }
 
-  if (select (0, &rfds, &wfds, &xfds, ptv) > 0)
+  /* We poll current status using select(). It cannot be used to check
+     anything but sockets, so we still have to wait in
+     MsgWaitForMultipleObjects(). But that in turn cannot check existing
+     state, so we can't remove this select(). */
+  /* FIXME: MSDN states that we cannot give empty fd_set:s. */
+  tv.tv_sec = tv.tv_usec = 0;
+  if (select (0, &rfds, &wfds, &xfds, &tv) > 0)
     {
       /* Do MsgWaitForMultipleObjects anyway to dispatch messages, but
          no need to call select again.  */
@@ -574,8 +569,13 @@ restart:
           BOOL bRet;
           while ((bRet = PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) != 0)
             {
-              TranslateMessage (&msg);
-              DispatchMessage (&msg);
+              if (msg.message == WM_QUIT)
+                  raise(SIGTERM);
+              else
+                {
+                  TranslateMessage (&msg);
+                  DispatchMessage (&msg);
+                }
             }
         }
       else
@@ -583,7 +583,7 @@ restart:
     }
 
   if (poll_again)
-    select (0, &rfds, &wfds, &xfds, ptv);
+    select (0, &rfds, &wfds, &xfds, &tv);
 
   /* Place a sentinel at the end of the array.  */
   handle_array[nhandles] = NULL;
@@ -639,6 +639,8 @@ restart:
       goto restart;
     }
 
+  CloseHandle(hEvent);
+
   return rc;
 #endif
 }
diff --git a/src/pulsecore/protocol-dbus.c b/src/pulsecore/protocol-dbus.c
index c0d1ec4..cf4b9fc 100644
--- a/src/pulsecore/protocol-dbus.c
+++ b/src/pulsecore/protocol-dbus.c
@@ -993,8 +993,7 @@ void pa_dbus_protocol_add_signal_listener(
 
         /* Replace the old signal paths entry for this signal with a new
          * one. */
-        if ((signal_paths_entry = pa_hashmap_remove(conn_entry->listening_signals, signal_name)))
-            signal_paths_entry_free(signal_paths_entry);
+        pa_hashmap_remove_and_free(conn_entry->listening_signals, signal_name);
         signal_paths_entry = signal_paths_entry_new(signal_name);
 
         for (i = 0; i < n_objects; ++i)
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
index 7c1b7a2..a4e0028 100644
--- a/src/pulsecore/protocol-esound.c
+++ b/src/pulsecore/protocol-esound.c
@@ -351,7 +351,7 @@ static int esd_proto_connect(connection *c, esd_proto_t request, const void *dat
     }
 
     if (!c->authorized) {
-        pa_log("Kicked client with invalid authorization key.");
+        pa_log("Kicked client with invalid authentication key.");
         return -1;
     }
 
@@ -1707,15 +1707,20 @@ int pa_esound_options_parse(pa_esound_options *o, pa_core *c, pa_modargs *ma) {
         pa_auth_cookie_unref(o->auth_cookie);
 
     if (enabled) {
-        const char *cn;
+        char *cn;
 
         /* The new name for this is 'auth-cookie', for compat reasons
          * we check the old name too */
-        if (!(cn = pa_modargs_get_value(ma, "auth-cookie", NULL)))
-            if (!(cn = pa_modargs_get_value(ma, "cookie", NULL)))
-                cn = DEFAULT_COOKIE_FILE;
+        if (!(cn = pa_xstrdup(pa_modargs_get_value(ma, "auth-cookie", NULL)))) {
+            if (!(cn = pa_xstrdup(pa_modargs_get_value(ma, "cookie", NULL)))) {
+                if (pa_append_to_home_dir(DEFAULT_COOKIE_FILE, &cn) < 0)
+                    return -1;
+            }
+        }
 
-        if (!(o->auth_cookie = pa_auth_cookie_get(c, cn, true, ESD_KEY_LEN)))
+        o->auth_cookie = pa_auth_cookie_get(c, cn, true, ESD_KEY_LEN);
+        pa_xfree(cn);
+        if (!o->auth_cookie)
             return -1;
 
     } else
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 41b4b50..c0cd0e0 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -181,6 +181,7 @@ struct pa_native_connection {
     uint32_t rrobin_index;
     pa_subscription *subscription;
     pa_time_event *auth_timeout_event;
+    pa_srbchannel *srbpending;
 };
 
 #define PA_NATIVE_CONNECTION(o) (pa_native_connection_cast(o))
@@ -294,6 +295,7 @@ static void command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag,
 static void command_set_card_profile(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
 static void command_set_sink_or_source_port(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
 static void command_set_port_latency_offset(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
+static void command_enable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
 
 static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
     [PA_COMMAND_ERROR] = NULL,
@@ -397,6 +399,8 @@ static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
 
     [PA_COMMAND_SET_PORT_LATENCY_OFFSET] = command_set_port_latency_offset,
 
+    [PA_COMMAND_ENABLE_SRBCHANNEL] = command_enable_srbchannel,
+
     [PA_COMMAND_EXTENSION] = command_extension
 };
 
@@ -555,8 +559,11 @@ static void fix_record_buffer_attr_pre(record_stream *s) {
     if (s->early_requests) {
 
         /* In early request mode we need to emulate the classic
-         * fragment-based playback model. We do this setting the source
-         * latency to the fragment size. */
+         * fragment-based playback model. Unfortunately we have no
+         * mechanism to tell the source how often we want it to send us
+         * data. The next best thing we can do is to set the source's
+         * total buffer (i.e. its latency) to the fragment size. That
+         * way it will have to send data at least that often. */
 
         source_usec = fragsize_usec;
 
@@ -584,10 +591,12 @@ static void fix_record_buffer_attr_pre(record_stream *s) {
 
     if (s->early_requests) {
 
-        /* Ok, we didn't necessarily get what we were asking for, so
-         * let's tell the user */
+        /* Ok, we didn't necessarily get what we were asking for. We
+         * might still get the proper fragment interval, we just can't
+         * guarantee it. */
 
-        fragsize_usec = s->configured_source_latency;
+        if (fragsize_usec != s->configured_source_latency)
+            pa_log_debug("Could not configure a sufficiently low latency. Early requests might not be satisifed.");
 
     } else if (s->adjust_latency) {
 
@@ -963,8 +972,11 @@ static void fix_playback_buffer_attr(playback_stream *s) {
     if (s->early_requests) {
 
         /* In early request mode we need to emulate the classic
-         * fragment-based playback model. We do this setting the sink
-         * latency to the fragment size. */
+         * fragment-based playback model. Unfortunately we have no
+         * mechanism to tell the sink how often we want to be queried
+         * for data. The next best thing we can do is to set the sink's
+         * total buffer (i.e. its latency) to the fragment size. That
+         * way it will have to query us at least that often. */
 
         sink_usec = minreq_usec;
         pa_log_debug("Early requests mode enabled, configuring sink latency to minreq.");
@@ -1013,10 +1025,12 @@ static void fix_playback_buffer_attr(playback_stream *s) {
 
     if (s->early_requests) {
 
-        /* Ok, we didn't necessarily get what we were asking for, so
-         * let's tell the user */
+        /* Ok, we didn't necessarily get what we were asking for. We
+         * might still get the proper fragment interval, we just can't
+         * guarantee it. */
 
-        minreq_usec = s->configured_sink_latency;
+        if (minreq_usec != s->configured_sink_latency)
+            pa_log_debug("Could not configure a sufficiently low latency. Early requests might not be satisifed.");
 
     } else if (s->adjust_latency) {
 
@@ -1317,6 +1331,9 @@ static void native_connection_unlink(pa_native_connection *c) {
     if (c->options)
         pa_native_options_unref(c->options);
 
+    if (c->srbpending)
+        pa_srbchannel_free(c->srbpending);
+
     while ((r = pa_idxset_first(c->record_streams, NULL)))
         record_stream_unlink(r);
 
@@ -2568,6 +2585,69 @@ static void command_exit(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_ta
     pa_pstream_send_simple_ack(c->pstream, tag); /* nonsense */
 }
 
+static void setup_srbchannel(pa_native_connection *c) {
+    pa_srbchannel_template srbt;
+    pa_srbchannel *srb;
+    pa_memchunk mc;
+    pa_tagstruct *t;
+    int fdlist[2];
+
+    if (!c->options->srbchannel) {
+        pa_log_debug("Disabling srbchannel, reason: Disabled by module parameter");
+        return;
+    }
+
+    if (c->version < 30) {
+        pa_log_debug("Disabling srbchannel, reason: Protocol too old");
+        return;
+    }
+
+    if (!pa_pstream_get_shm(c->pstream)) {
+        pa_log_debug("Disabling srbchannel, reason: No SHM support");
+        return;
+    }
+
+    if (!c->protocol->core->rw_mempool) {
+        pa_log_debug("Disabling srbchannel, reason: No rw memory pool");
+        return;
+    }
+
+    srb = pa_srbchannel_new(c->protocol->core->mainloop, c->protocol->core->rw_mempool);
+    if (!srb) {
+        pa_log_debug("Failed to create srbchannel");
+        return;
+    }
+    pa_log_debug("Enabling srbchannel...");
+    pa_srbchannel_export(srb, &srbt);
+
+    /* Send enable command to client */
+    t = pa_tagstruct_new(NULL, 0);
+    pa_tagstruct_putu32(t, PA_COMMAND_ENABLE_SRBCHANNEL);
+    pa_tagstruct_putu32(t, (size_t) srb); /* tag */
+    fdlist[0] = srbt.readfd;
+    fdlist[1] = srbt.writefd;
+    pa_pstream_send_tagstruct_with_fds(c->pstream, t, 2, fdlist);
+
+    /* Send ringbuffer memblock to client */
+    mc.memblock = srbt.memblock;
+    mc.index = 0;
+    mc.length = pa_memblock_get_length(srbt.memblock);
+    pa_pstream_send_memblock(c->pstream, 0, 0, 0, &mc);
+
+    c->srbpending = srb;
+}
+
+static void command_enable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
+    pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
+
+    if (tag != (uint32_t) (size_t) c->srbpending)
+        protocol_error(c);
+
+    pa_log_debug("Client enabled srbchannel.");
+    pa_pstream_set_srbchannel(c->pstream, c->srbpending);
+    c->srbpending = NULL;
+}
+
 static void command_auth(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
     pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
     const void*cookie;
@@ -2644,7 +2724,7 @@ static void command_auth(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_ta
         }
 
         if (!success) {
-            pa_log_warn("Denied access to client with invalid authorization data.");
+            pa_log_warn("Denied access to client with invalid authentication data.");
             pa_pstream_send_error(c->pstream, tag, PA_ERR_ACCESS);
             return;
         }
@@ -2699,6 +2779,8 @@ static void command_auth(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_ta
 #else
     pa_pstream_send_tagstruct(c->pstream, reply);
 #endif
+
+    setup_srbchannel(c);
 }
 
 static void command_set_client_name(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
@@ -3366,7 +3448,7 @@ static void sink_input_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t,
     pa_tagstruct_puts(t, pa_resample_method_to_string(pa_sink_input_get_resample_method(s)));
     pa_tagstruct_puts(t, s->driver);
     if (c->version >= 11)
-        pa_tagstruct_put_boolean(t, pa_sink_input_get_mute(s));
+        pa_tagstruct_put_boolean(t, s->muted);
     if (c->version >= 13)
         pa_tagstruct_put_proplist(t, s->proplist);
     if (c->version >= 19)
@@ -3413,7 +3495,7 @@ static void source_output_fill_tagstruct(pa_native_connection *c, pa_tagstruct *
         pa_tagstruct_put_boolean(t, (pa_source_output_get_state(s) == PA_SOURCE_OUTPUT_CORKED));
     if (c->version >= 22) {
         pa_tagstruct_put_cvolume(t, &v);
-        pa_tagstruct_put_boolean(t, pa_source_output_get_mute(s));
+        pa_tagstruct_put_boolean(t, s->muted);
         pa_tagstruct_put_boolean(t, has_volume);
         pa_tagstruct_put_boolean(t, s->volume_writable);
         pa_tagstruct_put_format_info(t, s->format);
@@ -4806,14 +4888,14 @@ static void command_set_port_latency_offset(pa_pdispatch *pd, uint32_t command,
 
 /*** pstream callbacks ***/
 
-static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_creds *creds, void *userdata) {
+static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data, void *userdata) {
     pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
 
     pa_assert(p);
     pa_assert(packet);
     pa_native_connection_assert_ref(c);
 
-    if (pa_pdispatch_run(c->pdispatch, packet, creds, c) < 0) {
+    if (pa_pdispatch_run(c->pdispatch, packet, ancil_data, c) < 0) {
         pa_log("invalid packet.");
         native_connection_unlink(c);
     }
@@ -4840,6 +4922,13 @@ 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);
 
+        size_t frame_size = pa_frame_size(&ps->sink_input->sample_spec);
+        if (chunk->index % frame_size != 0 || chunk->length % frame_size != 0) {
+            pa_log_warn("Client sent non-aligned memblock: index %d, length %d, frame size: %d",
+                        (int) chunk->index, (int) chunk->length, (int) frame_size);
+            return;
+        }
+
         pa_atomic_inc(&ps->seek_or_post_in_queue);
         if (chunk->memblock) {
             if (seek != PA_SEEK_RELATIVE || offset != 0)
@@ -5007,6 +5096,7 @@ void pa_native_protocol_connect(pa_native_protocol *p, pa_iochannel *io, pa_nati
     c->protocol = p;
     c->options = pa_native_options_ref(o);
     c->authorized = false;
+    c->srbpending = NULL;
 
     if (o->auth_anonymous) {
         pa_log_info("Client authenticated anonymously.");
@@ -5237,6 +5327,12 @@ int pa_native_options_parse(pa_native_options *o, pa_core *c, pa_modargs *ma) {
     pa_assert(PA_REFCNT_VALUE(o) >= 1);
     pa_assert(ma);
 
+    o->srbchannel = true;
+    if (pa_modargs_get_value_boolean(ma, "srbchannel", &o->srbchannel) < 0) {
+        pa_log("srbchannel= expects a boolean argument.");
+        return -1;
+    }
+
     if (pa_modargs_get_value_boolean(ma, "auth-anonymous", &o->auth_anonymous) < 0) {
         pa_log("auth-anonymous= expects a boolean argument.");
         return -1;
@@ -5293,7 +5389,12 @@ int pa_native_options_parse(pa_native_options *o, pa_core *c, pa_modargs *ma) {
         else {
             o->auth_cookie = pa_auth_cookie_get(c, PA_NATIVE_COOKIE_FILE, false, PA_NATIVE_COOKIE_LENGTH);
             if (!o->auth_cookie) {
-                o->auth_cookie = pa_auth_cookie_get(c, PA_NATIVE_COOKIE_FILE_FALLBACK, false, PA_NATIVE_COOKIE_LENGTH);
+                char *fallback_path;
+
+                if (pa_append_to_home_dir(PA_NATIVE_COOKIE_FILE_FALLBACK, &fallback_path) >= 0) {
+                    o->auth_cookie = pa_auth_cookie_get(c, fallback_path, false, PA_NATIVE_COOKIE_LENGTH);
+                    pa_xfree(fallback_path);
+                }
 
                 if (!o->auth_cookie)
                     o->auth_cookie = pa_auth_cookie_get(c, PA_NATIVE_COOKIE_FILE, true, PA_NATIVE_COOKIE_LENGTH);
diff --git a/src/pulsecore/protocol-native.h b/src/pulsecore/protocol-native.h
index 30b99f9..df30d44 100644
--- a/src/pulsecore/protocol-native.h
+++ b/src/pulsecore/protocol-native.h
@@ -44,6 +44,7 @@ typedef struct pa_native_options {
     pa_module *module;
 
     bool auth_anonymous;
+    bool srbchannel;
     char *auth_group;
     pa_ip_acl *auth_ip_acl;
     pa_auth_cookie *auth_cookie;
diff --git a/src/pulsecore/pstream-util.c b/src/pulsecore/pstream-util.c
index f84f486..9ccd5a4 100644
--- a/src/pulsecore/pstream-util.c
+++ b/src/pulsecore/pstream-util.c
@@ -28,7 +28,7 @@
 
 #include "pstream-util.h"
 
-void pa_pstream_send_tagstruct_with_creds(pa_pstream *p, pa_tagstruct *t, const pa_creds *creds) {
+static void pa_pstream_send_tagstruct_with_ancil_data(pa_pstream *p, pa_tagstruct *t, const pa_cmsg_ancil_data *ancil_data) {
     size_t length;
     uint8_t *data;
     pa_packet *packet;
@@ -38,10 +38,51 @@ void pa_pstream_send_tagstruct_with_creds(pa_pstream *p, pa_tagstruct *t, const
 
     pa_assert_se(data = pa_tagstruct_free_data(t, &length));
     pa_assert_se(packet = pa_packet_new_dynamic(data, length));
-    pa_pstream_send_packet(p, packet, creds);
+    pa_pstream_send_packet(p, packet, ancil_data);
     pa_packet_unref(packet);
 }
 
+#ifdef HAVE_CREDS
+
+void pa_pstream_send_tagstruct_with_creds(pa_pstream *p, pa_tagstruct *t, const pa_creds *creds) {
+    if (creds) {
+        pa_cmsg_ancil_data a;
+
+        a.nfd = 0;
+        a.creds_valid = true;
+        a.creds = *creds;
+        pa_pstream_send_tagstruct_with_ancil_data(p, t, &a);
+    }
+    else
+        pa_pstream_send_tagstruct_with_ancil_data(p, t, NULL);
+}
+
+void pa_pstream_send_tagstruct_with_fds(pa_pstream *p, pa_tagstruct *t, int nfd, const int *fds) {
+    if (nfd > 0) {
+        pa_cmsg_ancil_data a;
+
+        a.nfd = nfd;
+        a.creds_valid = false;
+        pa_assert(nfd <= MAX_ANCIL_DATA_FDS);
+        memcpy(a.fds, fds, sizeof(int) * nfd);
+        pa_pstream_send_tagstruct_with_ancil_data(p, t, &a);
+    }
+    else
+        pa_pstream_send_tagstruct_with_ancil_data(p, t, NULL);
+}
+
+#else
+
+void pa_pstream_send_tagstruct_with_creds(pa_pstream *p, pa_tagstruct *t, const pa_creds *creds) {
+    pa_pstream_send_tagstruct_with_ancil_data(p, t, NULL);
+}
+
+void pa_pstream_send_tagstruct_with_fds(pa_pstream *p, pa_tagstruct *t, int nfd, const int *fds) {
+    pa_assert_not_reached();
+}
+
+#endif
+
 void pa_pstream_send_error(pa_pstream *p, uint32_t tag, uint32_t error) {
     pa_tagstruct *t;
 
diff --git a/src/pulsecore/pstream-util.h b/src/pulsecore/pstream-util.h
index ae0d79c..7ea89ba 100644
--- a/src/pulsecore/pstream-util.h
+++ b/src/pulsecore/pstream-util.h
@@ -29,6 +29,7 @@
 
 /* The tagstruct is freed!*/
 void pa_pstream_send_tagstruct_with_creds(pa_pstream *p, pa_tagstruct *t, const pa_creds *creds);
+void pa_pstream_send_tagstruct_with_fds(pa_pstream *p, pa_tagstruct *t, int nfd, const int *fds);
 
 #define pa_pstream_send_tagstruct(p, t) pa_pstream_send_tagstruct_with_creds((p), (t), NULL)
 
diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c
index 190fc9a..5b15b10 100644
--- a/src/pulsecore/pstream.c
+++ b/src/pulsecore/pstream.c
@@ -45,11 +45,12 @@
 #include "pstream.h"
 
 /* We piggyback information if audio data blocks are stored in SHM on the seek mode */
-#define PA_FLAG_SHMDATA    0x80000000LU
-#define PA_FLAG_SHMRELEASE 0x40000000LU
-#define PA_FLAG_SHMREVOKE  0xC0000000LU
-#define PA_FLAG_SHMMASK    0xFF000000LU
-#define PA_FLAG_SEEKMASK   0x000000FFLU
+#define PA_FLAG_SHMDATA     0x80000000LU
+#define PA_FLAG_SHMRELEASE  0x40000000LU
+#define PA_FLAG_SHMREVOKE   0xC0000000LU
+#define PA_FLAG_SHMMASK     0xFF000000LU
+#define PA_FLAG_SEEKMASK    0x000000FFLU
+#define PA_FLAG_SHMWRITABLE 0x00800000LU
 
 /* The sequence descriptor header consists of 5 32bit integers: */
 enum {
@@ -94,8 +95,8 @@ struct item_info {
     /* packet info */
     pa_packet *packet;
 #ifdef HAVE_CREDS
-    bool with_creds;
-    pa_creds creds;
+    bool with_ancil_data;
+    pa_cmsg_ancil_data ancil_data;
 #endif
 
     /* memblock info */
@@ -108,12 +109,23 @@ struct item_info {
     uint32_t block_id;
 };
 
+struct pstream_read {
+    pa_pstream_descriptor descriptor;
+    pa_memblock *memblock;
+    pa_packet *packet;
+    uint32_t shm_info[PA_PSTREAM_SHM_MAX];
+    void *data;
+    size_t index;
+};
+
 struct pa_pstream {
     PA_REFCNT_DECLARE;
 
     pa_mainloop_api *mainloop;
     pa_defer_event *defer_event;
     pa_iochannel *io;
+    pa_srbchannel *srb, *srbpending;
+    bool is_srbpending;
 
     pa_queue *send_queue;
 
@@ -131,14 +143,7 @@ struct pa_pstream {
         pa_memchunk memchunk;
     } write;
 
-    struct {
-        pa_pstream_descriptor descriptor;
-        pa_memblock *memblock;
-        pa_packet *packet;
-        uint32_t shm_info[PA_PSTREAM_SHM_MAX];
-        void *data;
-        size_t index;
-    } read;
+    struct pstream_read readio, readsrb;
 
     bool use_shm;
     pa_memimport *import;
@@ -165,13 +170,13 @@ struct pa_pstream {
     pa_mempool *mempool;
 
 #ifdef HAVE_CREDS
-    pa_creds read_creds, write_creds;
-    bool read_creds_valid, send_creds_now;
+    pa_cmsg_ancil_data read_ancil_data, write_ancil_data;
+    bool send_ancil_data_now;
 #endif
 };
 
 static int do_write(pa_pstream *p);
-static int do_read(pa_pstream *p);
+static int do_read(pa_pstream *p, struct pstream_read *re);
 
 static void do_pstream_read_write(pa_pstream *p) {
     pa_assert(p);
@@ -181,8 +186,13 @@ static void do_pstream_read_write(pa_pstream *p) {
 
     p->mainloop->defer_enable(p->defer_event, 0);
 
+    if (!p->dead && p->srb) {
+         do_write(p);
+         while (!p->dead && do_read(p, &p->readsrb) == 0);
+    }
+
     if (!p->dead && pa_iochannel_is_readable(p->io)) {
-        if (do_read(p) < 0)
+        if (do_read(p, &p->readio) < 0)
             goto fail;
     } else if (!p->dead && pa_iochannel_is_hungup(p->io))
         goto fail;
@@ -207,6 +217,17 @@ fail:
     pa_pstream_unref(p);
 }
 
+static bool srb_callback(pa_srbchannel *srb, void *userdata) {
+    pa_pstream *p = userdata;
+
+    pa_assert(p);
+    pa_assert(PA_REFCNT_VALUE(p) > 0);
+    pa_assert(p->srb == srb);
+
+    do_pstream_read_write(p);
+    return p->srb != NULL;
+}
+
 static void io_callback(pa_iochannel*io, void *userdata) {
     pa_pstream *p = userdata;
 
@@ -237,11 +258,10 @@ pa_pstream *pa_pstream_new(pa_mainloop_api *m, pa_iochannel *io, pa_mempool *poo
     pa_assert(io);
     pa_assert(pool);
 
-    p = pa_xnew(pa_pstream, 1);
+    p = pa_xnew0(pa_pstream, 1);
     PA_REFCNT_INIT(p);
     p->io = io;
     pa_iochannel_set_callback(io, io_callback, p);
-    p->dead = false;
 
     p->mainloop = m;
     p->defer_event = m->defer_new(m, defer_callback, p);
@@ -249,41 +269,14 @@ pa_pstream *pa_pstream_new(pa_mainloop_api *m, pa_iochannel *io, pa_mempool *poo
 
     p->send_queue = pa_queue_new();
 
-    p->write.current = NULL;
-    p->write.index = 0;
-    pa_memchunk_reset(&p->write.memchunk);
-    p->read.memblock = NULL;
-    p->read.packet = NULL;
-    p->read.index = 0;
-
-    p->receive_packet_callback = NULL;
-    p->receive_packet_callback_userdata = NULL;
-    p->receive_memblock_callback = NULL;
-    p->receive_memblock_callback_userdata = NULL;
-    p->drain_callback = NULL;
-    p->drain_callback_userdata = NULL;
-    p->die_callback = NULL;
-    p->die_callback_userdata = NULL;
-    p->revoke_callback = NULL;
-    p->revoke_callback_userdata = NULL;
-    p->release_callback = NULL;
-    p->release_callback_userdata = NULL;
-
     p->mempool = pool;
 
-    p->use_shm = false;
-    p->export = NULL;
-
     /* We do importing unconditionally */
     p->import = pa_memimport_new(p->mempool, memimport_release_cb, p);
 
     pa_iochannel_socket_set_rcvbuf(io, pa_mempool_block_size_max(p->mempool));
     pa_iochannel_socket_set_sndbuf(io, pa_mempool_block_size_max(p->mempool));
 
-#ifdef HAVE_CREDS
-    p->send_creds_now = false;
-    p->read_creds_valid = false;
-#endif
     return p;
 }
 
@@ -316,16 +309,22 @@ static void pstream_free(pa_pstream *p) {
     if (p->write.memchunk.memblock)
         pa_memblock_unref(p->write.memchunk.memblock);
 
-    if (p->read.memblock)
-        pa_memblock_unref(p->read.memblock);
+    if (p->readsrb.memblock)
+        pa_memblock_unref(p->readsrb.memblock);
+
+    if (p->readsrb.packet)
+        pa_packet_unref(p->readsrb.packet);
 
-    if (p->read.packet)
-        pa_packet_unref(p->read.packet);
+    if (p->readio.memblock)
+        pa_memblock_unref(p->readio.memblock);
+
+    if (p->readio.packet)
+        pa_packet_unref(p->readio.packet);
 
     pa_xfree(p);
 }
 
-void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_creds *creds) {
+void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data) {
     struct item_info *i;
 
     pa_assert(p);
@@ -342,8 +341,13 @@ void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_creds *cre
     i->packet = pa_packet_ref(packet);
 
 #ifdef HAVE_CREDS
-    if ((i->with_creds = !!creds))
-        i->creds = *creds;
+    if ((i->with_ancil_data = !!ancil_data)) {
+        i->ancil_data = *ancil_data;
+        if (ancil_data->creds_valid)
+            pa_assert(ancil_data->nfd == 0);
+        else
+            pa_assert(ancil_data->nfd > 0);
+    }
 #endif
 
     pa_queue_push(p->send_queue, i);
@@ -385,7 +389,7 @@ void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa
         i->offset = offset;
         i->seek_mode = seek_mode;
 #ifdef HAVE_CREDS
-        i->with_creds = false;
+        i->with_ancil_data = false;
 #endif
 
         pa_queue_push(p->send_queue, i);
@@ -412,7 +416,7 @@ void pa_pstream_send_release(pa_pstream *p, uint32_t block_id) {
     item->type = PA_PSTREAM_ITEM_SHMRELEASE;
     item->block_id = block_id;
 #ifdef HAVE_CREDS
-    item->with_creds = false;
+    item->with_ancil_data = false;
 #endif
 
     pa_queue_push(p->send_queue, item);
@@ -449,7 +453,7 @@ void pa_pstream_send_revoke(pa_pstream *p, uint32_t block_id) {
     item->type = PA_PSTREAM_ITEM_SHMREVOKE;
     item->block_id = block_id;
 #ifdef HAVE_CREDS
-    item->with_creds = false;
+    item->with_ancil_data = false;
 #endif
 
     pa_queue_push(p->send_queue, item);
@@ -527,10 +531,15 @@ static void prepare_next_write_item(pa_pstream *p) {
             size_t offset, length;
             uint32_t *shm_info = (uint32_t *) &p->write.minibuf[PA_PSTREAM_DESCRIPTOR_SIZE];
             size_t shm_size = sizeof(uint32_t) * PA_PSTREAM_SHM_MAX;
+            pa_mempool *current_pool = pa_memblock_get_pool(p->write.current->chunk.memblock);
+            pa_memexport *current_export;
 
-            pa_assert(p->export);
+            if (p->mempool == current_pool)
+                pa_assert_se(current_export = p->export);
+            else
+                pa_assert_se(current_export = pa_memexport_new(current_pool, memexport_revoke_cb, p));
 
-            if (pa_memexport_put(p->export,
+            if (pa_memexport_put(current_export,
                                  p->write.current->chunk.memblock,
                                  &block_id,
                                  &shm_id,
@@ -538,6 +547,8 @@ static void prepare_next_write_item(pa_pstream *p) {
                                  &length) >= 0) {
 
                 flags |= PA_FLAG_SHMDATA;
+                if (pa_mempool_is_remote_writable(current_pool))
+                    flags |= PA_FLAG_SHMWRITABLE;
                 send_payload = false;
 
                 shm_info[PA_PSTREAM_SHM_BLOCKID] = htonl(block_id);
@@ -550,24 +561,40 @@ static void prepare_next_write_item(pa_pstream *p) {
             }
 /*             else */
 /*                 pa_log_warn("Failed to export memory block."); */
+
+            if (current_export != p->export)
+                pa_memexport_free(current_export);
         }
 
         if (send_payload) {
             p->write.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH] = htonl((uint32_t) p->write.current->chunk.length);
             p->write.memchunk = p->write.current->chunk;
             pa_memblock_ref(p->write.memchunk.memblock);
-            p->write.data = NULL;
         }
 
         p->write.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS] = htonl(flags);
     }
 
 #ifdef HAVE_CREDS
-    if ((p->send_creds_now = p->write.current->with_creds))
-        p->write_creds = p->write.current->creds;
+    if ((p->send_ancil_data_now = p->write.current->with_ancil_data))
+        p->write_ancil_data = p->write.current->ancil_data;
 #endif
 }
 
+static void check_srbpending(pa_pstream *p) {
+    if (!p->is_srbpending)
+        return;
+
+    if (p->srb)
+        pa_srbchannel_free(p->srb);
+
+    p->srb = p->srbpending;
+    p->is_srbpending = false;
+
+    if (p->srb)
+        pa_srbchannel_set_callback(p->srb, srb_callback, p);
+}
+
 static int do_write(pa_pstream *p) {
     void *d;
     size_t l;
@@ -580,8 +607,11 @@ static int do_write(pa_pstream *p) {
     if (!p->write.current)
         prepare_next_write_item(p);
 
-    if (!p->write.current)
+    if (!p->write.current) {
+        /* The out queue is empty, so switching channels is safe */
+        check_srbpending(p);
         return 0;
+    }
 
     if (p->write.minibuf_validsize > 0) {
         d = p->write.minibuf + p->write.index;
@@ -606,16 +636,21 @@ static int do_write(pa_pstream *p) {
     pa_assert(l > 0);
 
 #ifdef HAVE_CREDS
-    if (p->send_creds_now) {
-
-        if ((r = pa_iochannel_write_with_creds(p->io, d, l, &p->write_creds)) < 0)
-            goto fail;
-
-        p->send_creds_now = false;
+    if (p->send_ancil_data_now) {
+        if (p->write_ancil_data.creds_valid) {
+            pa_assert(p->write_ancil_data.nfd == 0);
+            if ((r = pa_iochannel_write_with_creds(p->io, d, l, &p->write_ancil_data.creds)) < 0)
+                goto fail;
+        }
+        else
+            if ((r = pa_iochannel_write_with_fds(p->io, d, l, p->write_ancil_data.nfd, p->write_ancil_data.fds)) < 0)
+                goto fail;
+        p->send_ancil_data_now = false;
     } else
 #endif
-
-    if ((r = pa_iochannel_write(p->io, d, l)) < 0)
+    if (p->srb)
+        r = pa_srbchannel_write(p->srb, d, l);
+    else if ((r = pa_iochannel_write(p->io, d, l)) < 0)
         goto fail;
 
     if (release_memblock)
@@ -647,7 +682,7 @@ fail:
     return -1;
 }
 
-static int do_read(pa_pstream *p) {
+static int do_read(pa_pstream *p, struct pstream_read *re) {
     void *d;
     size_t l;
     ssize_t r;
@@ -655,31 +690,48 @@ static int do_read(pa_pstream *p) {
     pa_assert(p);
     pa_assert(PA_REFCNT_VALUE(p) > 0);
 
-    if (p->read.index < PA_PSTREAM_DESCRIPTOR_SIZE) {
-        d = (uint8_t*) p->read.descriptor + p->read.index;
-        l = PA_PSTREAM_DESCRIPTOR_SIZE - p->read.index;
+    if (re->index < PA_PSTREAM_DESCRIPTOR_SIZE) {
+        d = (uint8_t*) re->descriptor + re->index;
+        l = PA_PSTREAM_DESCRIPTOR_SIZE - re->index;
     } else {
-        pa_assert(p->read.data || p->read.memblock);
+        pa_assert(re->data || re->memblock);
 
-        if (p->read.data)
-            d = p->read.data;
+        if (re->data)
+            d = re->data;
         else {
-            d = pa_memblock_acquire(p->read.memblock);
-            release_memblock = p->read.memblock;
+            d = pa_memblock_acquire(re->memblock);
+            release_memblock = re->memblock;
         }
 
-        d = (uint8_t*) d + p->read.index - PA_PSTREAM_DESCRIPTOR_SIZE;
-        l = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]) - (p->read.index - PA_PSTREAM_DESCRIPTOR_SIZE);
+        d = (uint8_t*) d + re->index - PA_PSTREAM_DESCRIPTOR_SIZE;
+        l = ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]) - (re->index - PA_PSTREAM_DESCRIPTOR_SIZE);
     }
 
+    if (re == &p->readsrb) {
+        r = pa_srbchannel_read(p->srb, d, l);
+        if (r == 0) {
+            if (release_memblock)
+                pa_memblock_release(release_memblock);
+            return 1;
+        }
+    }
+    else
 #ifdef HAVE_CREDS
     {
-        bool b = 0;
+        pa_cmsg_ancil_data b;
 
-        if ((r = pa_iochannel_read_with_creds(p->io, d, l, &p->read_creds, &b)) <= 0)
+        if ((r = pa_iochannel_read_with_ancil_data(p->io, d, l, &b)) <= 0)
             goto fail;
 
-        p->read_creds_valid = p->read_creds_valid || b;
+        if (b.creds_valid) {
+            p->read_ancil_data.creds_valid = true;
+            p->read_ancil_data.creds = b.creds;
+        }
+        if (b.nfd > 0) {
+            pa_assert(b.nfd <= MAX_ANCIL_DATA_FDS);
+            p->read_ancil_data.nfd = b.nfd;
+            memcpy(p->read_ancil_data.fds, b.fds, sizeof(int) * b.nfd);
+        }
     }
 #else
     if ((r = pa_iochannel_read(p->io, d, l)) <= 0)
@@ -689,13 +741,13 @@ static int do_read(pa_pstream *p) {
     if (release_memblock)
         pa_memblock_release(release_memblock);
 
-    p->read.index += (size_t) r;
+    re->index += (size_t) r;
 
-    if (p->read.index == PA_PSTREAM_DESCRIPTOR_SIZE) {
+    if (re->index == PA_PSTREAM_DESCRIPTOR_SIZE) {
         uint32_t flags, length, channel;
         /* Reading of frame descriptor complete */
 
-        flags = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]);
+        flags = ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]);
 
         if (!p->use_shm && (flags & PA_FLAG_SHMMASK) != 0) {
             pa_log_warn("Received SHM frame on a socket where SHM is disabled.");
@@ -706,10 +758,10 @@ static int do_read(pa_pstream *p) {
 
             /* This is a SHM memblock release frame with no payload */
 
-/*             pa_log("Got release frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */
+/*             pa_log("Got release frame for %u", ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */
 
             pa_assert(p->export);
-            pa_memexport_process_release(p->export, ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI]));
+            pa_memexport_process_release(p->export, ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI]));
 
             goto frame_done;
 
@@ -717,24 +769,24 @@ static int do_read(pa_pstream *p) {
 
             /* This is a SHM memblock revoke frame with no payload */
 
-/*             pa_log("Got revoke frame for %u", ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */
+/*             pa_log("Got revoke frame for %u", ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])); */
 
             pa_assert(p->import);
-            pa_memimport_process_revoke(p->import, ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI]));
+            pa_memimport_process_revoke(p->import, ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI]));
 
             goto frame_done;
         }
 
-        length = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]);
+        length = ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]);
 
         if (length > FRAME_SIZE_MAX_ALLOW || length <= 0) {
             pa_log_warn("Received invalid frame size: %lu", (unsigned long) length);
             return -1;
         }
 
-        pa_assert(!p->read.packet && !p->read.memblock);
+        pa_assert(!re->packet && !re->memblock);
 
-        channel = ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_CHANNEL]);
+        channel = ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_CHANNEL]);
 
         if (channel == (uint32_t) -1) {
 
@@ -744,8 +796,8 @@ static int do_read(pa_pstream *p) {
             }
 
             /* Frame is a packet frame */
-            p->read.packet = pa_packet_new(length);
-            p->read.data = p->read.packet->data;
+            re->packet = pa_packet_new(length);
+            re->data = re->packet->data;
 
         } else {
 
@@ -756,20 +808,20 @@ static int do_read(pa_pstream *p) {
 
             if ((flags & PA_FLAG_SHMMASK) == PA_FLAG_SHMDATA) {
 
-                if (length != sizeof(p->read.shm_info)) {
+                if (length != sizeof(re->shm_info)) {
                     pa_log_warn("Received SHM memblock frame with invalid frame length.");
                     return -1;
                 }
 
                 /* Frame is a memblock frame referencing an SHM memblock */
-                p->read.data = p->read.shm_info;
+                re->data = re->shm_info;
 
             } else if ((flags & PA_FLAG_SHMMASK) == 0) {
 
                 /* Frame is a memblock frame */
 
-                p->read.memblock = pa_memblock_new(p->mempool, length);
-                p->read.data = NULL;
+                re->memblock = pa_memblock_new(p->mempool, length);
+                re->data = NULL;
             } else {
 
                 pa_log_warn("Received memblock frame with invalid flags value.");
@@ -777,74 +829,75 @@ static int do_read(pa_pstream *p) {
             }
         }
 
-    } else if (p->read.index > PA_PSTREAM_DESCRIPTOR_SIZE) {
+    } else if (re->index > PA_PSTREAM_DESCRIPTOR_SIZE) {
         /* Frame payload available */
 
-        if (p->read.memblock && p->receive_memblock_callback) {
+        if (re->memblock && p->receive_memblock_callback) {
 
             /* Is this memblock data? Than pass it to the user */
-            l = (p->read.index - (size_t) r) < PA_PSTREAM_DESCRIPTOR_SIZE ? (size_t) (p->read.index - PA_PSTREAM_DESCRIPTOR_SIZE) : (size_t) r;
+            l = (re->index - (size_t) r) < PA_PSTREAM_DESCRIPTOR_SIZE ? (size_t) (re->index - PA_PSTREAM_DESCRIPTOR_SIZE) : (size_t) r;
 
             if (l > 0) {
                 pa_memchunk chunk;
 
-                chunk.memblock = p->read.memblock;
-                chunk.index = p->read.index - PA_PSTREAM_DESCRIPTOR_SIZE - l;
+                chunk.memblock = re->memblock;
+                chunk.index = re->index - PA_PSTREAM_DESCRIPTOR_SIZE - l;
                 chunk.length = l;
 
                 if (p->receive_memblock_callback) {
                     int64_t offset;
 
                     offset = (int64_t) (
-                            (((uint64_t) ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])) << 32) |
-                            (((uint64_t) ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_LO]))));
+                            (((uint64_t) ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])) << 32) |
+                            (((uint64_t) ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_LO]))));
 
                     p->receive_memblock_callback(
                         p,
-                        ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_CHANNEL]),
+                        ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_CHANNEL]),
                         offset,
-                        ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]) & PA_FLAG_SEEKMASK,
+                        ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]) & PA_FLAG_SEEKMASK,
                         &chunk,
                         p->receive_memblock_callback_userdata);
                 }
 
                 /* Drop seek info for following callbacks */
-                p->read.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS] =
-                    p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI] =
-                    p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_LO] = 0;
+                re->descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS] =
+                    re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI] =
+                    re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_LO] = 0;
             }
         }
 
         /* Frame complete */
-        if (p->read.index >= ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]) + PA_PSTREAM_DESCRIPTOR_SIZE) {
+        if (re->index >= ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]) + PA_PSTREAM_DESCRIPTOR_SIZE) {
 
-            if (p->read.memblock) {
+            if (re->memblock) {
 
                 /* This was a memblock frame. We can unref the memblock now */
-                pa_memblock_unref(p->read.memblock);
+                pa_memblock_unref(re->memblock);
 
-            } else if (p->read.packet) {
+            } else if (re->packet) {
 
                 if (p->receive_packet_callback)
 #ifdef HAVE_CREDS
-                    p->receive_packet_callback(p, p->read.packet, p->read_creds_valid ? &p->read_creds : NULL, p->receive_packet_callback_userdata);
+                    p->receive_packet_callback(p, re->packet, &p->read_ancil_data, p->receive_packet_callback_userdata);
 #else
-                    p->receive_packet_callback(p, p->read.packet, NULL, p->receive_packet_callback_userdata);
+                    p->receive_packet_callback(p, re->packet, NULL, p->receive_packet_callback_userdata);
 #endif
 
-                pa_packet_unref(p->read.packet);
+                pa_packet_unref(re->packet);
             } else {
                 pa_memblock *b;
-
-                pa_assert((ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]) & PA_FLAG_SHMMASK) == PA_FLAG_SHMDATA);
+                uint32_t flags = ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]);
+                pa_assert((flags & PA_FLAG_SHMMASK) == PA_FLAG_SHMDATA);
 
                 pa_assert(p->import);
 
                 if (!(b = pa_memimport_get(p->import,
-                                          ntohl(p->read.shm_info[PA_PSTREAM_SHM_BLOCKID]),
-                                          ntohl(p->read.shm_info[PA_PSTREAM_SHM_SHMID]),
-                                          ntohl(p->read.shm_info[PA_PSTREAM_SHM_INDEX]),
-                                          ntohl(p->read.shm_info[PA_PSTREAM_SHM_LENGTH])))) {
+                                          ntohl(re->shm_info[PA_PSTREAM_SHM_BLOCKID]),
+                                          ntohl(re->shm_info[PA_PSTREAM_SHM_SHMID]),
+                                          ntohl(re->shm_info[PA_PSTREAM_SHM_INDEX]),
+                                          ntohl(re->shm_info[PA_PSTREAM_SHM_LENGTH]),
+                                          !!(flags & PA_FLAG_SHMWRITABLE)))) {
 
                     if (pa_log_ratelimit(PA_LOG_DEBUG))
                         pa_log_debug("Failed to import memory block.");
@@ -856,17 +909,17 @@ static int do_read(pa_pstream *p) {
 
                     chunk.memblock = b;
                     chunk.index = 0;
-                    chunk.length = b ? pa_memblock_get_length(b) : ntohl(p->read.shm_info[PA_PSTREAM_SHM_LENGTH]);
+                    chunk.length = b ? pa_memblock_get_length(b) : ntohl(re->shm_info[PA_PSTREAM_SHM_LENGTH]);
 
                     offset = (int64_t) (
-                            (((uint64_t) ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])) << 32) |
-                            (((uint64_t) ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_LO]))));
+                            (((uint64_t) ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_HI])) << 32) |
+                            (((uint64_t) ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_OFFSET_LO]))));
 
                     p->receive_memblock_callback(
                             p,
-                            ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_CHANNEL]),
+                            ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_CHANNEL]),
                             offset,
-                            ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]) & PA_FLAG_SEEKMASK,
+                            ntohl(re->descriptor[PA_PSTREAM_DESCRIPTOR_FLAGS]) & PA_FLAG_SEEKMASK,
                             &chunk,
                             p->receive_memblock_callback_userdata);
                 }
@@ -882,13 +935,14 @@ static int do_read(pa_pstream *p) {
     return 0;
 
 frame_done:
-    p->read.memblock = NULL;
-    p->read.packet = NULL;
-    p->read.index = 0;
-    p->read.data = NULL;
+    re->memblock = NULL;
+    re->packet = NULL;
+    re->index = 0;
+    re->data = NULL;
 
 #ifdef HAVE_CREDS
-    p->read_creds_valid = false;
+    p->read_ancil_data.creds_valid = false;
+    p->read_ancil_data.nfd = 0;
 #endif
 
     return 0;
@@ -986,6 +1040,9 @@ void pa_pstream_unlink(pa_pstream *p) {
 
     p->dead = true;
 
+    while (p->srb || p->is_srbpending) /* In theory there could be one active and one pending */
+        pa_pstream_set_srbchannel(p, NULL);
+
     if (p->import) {
         pa_memimport_free(p->import);
         p->import = NULL;
@@ -1038,3 +1095,23 @@ bool pa_pstream_get_shm(pa_pstream *p) {
 
     return p->use_shm;
 }
+
+void pa_pstream_set_srbchannel(pa_pstream *p, pa_srbchannel *srb) {
+    pa_assert(p);
+    pa_assert(PA_REFCNT_VALUE(p) > 0 || srb == NULL);
+
+    if (srb == p->srb)
+        return;
+
+    /* We can't handle quick switches between srbchannels. */
+    pa_assert(!p->is_srbpending);
+
+    p->srbpending = srb;
+    p->is_srbpending = true;
+
+    /* Switch immediately, if possible. */
+    if (p->dead)
+        check_srbpending(p);
+    else
+        do_write(p);
+}
diff --git a/src/pulsecore/pstream.h b/src/pulsecore/pstream.h
index deb2bc3..cbea237 100644
--- a/src/pulsecore/pstream.h
+++ b/src/pulsecore/pstream.h
@@ -31,13 +31,14 @@
 #include <pulsecore/packet.h>
 #include <pulsecore/memblock.h>
 #include <pulsecore/iochannel.h>
+#include <pulsecore/srbchannel.h>
 #include <pulsecore/memchunk.h>
 #include <pulsecore/creds.h>
 #include <pulsecore/macro.h>
 
 typedef struct pa_pstream pa_pstream;
 
-typedef void (*pa_pstream_packet_cb_t)(pa_pstream *p, pa_packet *packet, const pa_creds *creds, void *userdata);
+typedef void (*pa_pstream_packet_cb_t)(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data, void *userdata);
 typedef void (*pa_pstream_memblock_cb_t)(pa_pstream *p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata);
 typedef void (*pa_pstream_notify_cb_t)(pa_pstream *p, void *userdata);
 typedef void (*pa_pstream_block_id_cb_t)(pa_pstream *p, uint32_t block_id, void *userdata);
@@ -49,7 +50,7 @@ void pa_pstream_unref(pa_pstream*p);
 
 void pa_pstream_unlink(pa_pstream *p);
 
-void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_creds *creds);
+void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data);
 void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk);
 void pa_pstream_send_release(pa_pstream *p, uint32_t block_id);
 void pa_pstream_send_revoke(pa_pstream *p, uint32_t block_id);
@@ -66,4 +67,8 @@ bool pa_pstream_is_pending(pa_pstream *p);
 void pa_pstream_enable_shm(pa_pstream *p, bool enable);
 bool pa_pstream_get_shm(pa_pstream *p);
 
+/* Enables shared ringbuffer channel. Note that the srbchannel is now owned by the pstream.
+   Setting srb to NULL will free any existing srbchannel. */
+void pa_pstream_set_srbchannel(pa_pstream *p, pa_srbchannel *srb);
+
 #endif
diff --git a/src/pulsecore/remap.c b/src/pulsecore/remap.c
index 8585e34..d9b121e 100644
--- a/src/pulsecore/remap.c
+++ b/src/pulsecore/remap.c
@@ -26,168 +26,428 @@
 
 #include <string.h>
 
+#include <pulse/xmalloc.h>
 #include <pulse/sample.h>
 #include <pulse/volume.h>
 #include <pulsecore/log.h>
 #include <pulsecore/macro.h>
 
+#include "cpu.h"
 #include "remap.h"
 
-static void remap_mono_to_stereo_c(pa_remap_t *m, void *dst, const void *src, unsigned n) {
+static void remap_mono_to_stereo_s16ne_c(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
     unsigned i;
 
-    switch (*m->format) {
-        case PA_SAMPLE_FLOAT32NE:
-        {
-            float *d, *s;
-
-            d = (float *) dst;
-            s = (float *) src;
-
-            for (i = n >> 2; i; i--) {
-                d[0] = d[1] = s[0];
-                d[2] = d[3] = s[1];
-                d[4] = d[5] = s[2];
-                d[6] = d[7] = s[3];
-                s += 4;
-                d += 8;
-            }
-            for (i = n & 3; i; i--) {
-                d[0] = d[1] = s[0];
-                s++;
-                d += 2;
-            }
-            break;
-        }
-        case PA_SAMPLE_S16NE:
-        {
-            int16_t *d, *s;
-
-            d = (int16_t *) dst;
-            s = (int16_t *) src;
-
-            for (i = n >> 2; i; i--) {
-                d[0] = d[1] = s[0];
-                d[2] = d[3] = s[1];
-                d[4] = d[5] = s[2];
-                d[6] = d[7] = s[3];
-                s += 4;
-                d += 8;
-            }
-            for (i = n & 3; i; i--) {
-                d[0] = d[1] = s[0];
-                s++;
-                d += 2;
+    for (i = n >> 2; i; i--) {
+        dst[0] = dst[1] = src[0];
+        dst[2] = dst[3] = src[1];
+        dst[4] = dst[5] = src[2];
+        dst[6] = dst[7] = src[3];
+        src += 4;
+        dst += 8;
+    }
+    for (i = n & 3; i; i--) {
+        dst[0] = dst[1] = src[0];
+        src++;
+        dst += 2;
+    }
+}
+
+static void remap_mono_to_stereo_float32ne_c(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    unsigned i;
+
+    for (i = n >> 2; i; i--) {
+        dst[0] = dst[1] = src[0];
+        dst[2] = dst[3] = src[1];
+        dst[4] = dst[5] = src[2];
+        dst[6] = dst[7] = src[3];
+        src += 4;
+        dst += 8;
+    }
+    for (i = n & 3; i; i--) {
+        dst[0] = dst[1] = src[0];
+        src++;
+        dst += 2;
+    }
+}
+
+static void remap_stereo_to_mono_s16ne_c(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    unsigned i;
+
+    for (i = n >> 2; i > 0; i--) {
+        dst[0] = (src[0] + src[1])/2;
+        dst[1] = (src[2] + src[3])/2;
+        dst[2] = (src[4] + src[5])/2;
+        dst[3] = (src[6] + src[7])/2;
+        src += 8;
+        dst += 4;
+    }
+    for (i = n & 3; i; i--) {
+        dst[0] = (src[0] + src[1])/2;
+        src += 2;
+        dst += 1;
+    }
+}
+
+static void remap_stereo_to_mono_float32ne_c(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    unsigned i;
+
+    for (i = n >> 2; i > 0; i--) {
+        dst[0] = (src[0] + src[1])*0.5f;
+        dst[1] = (src[2] + src[3])*0.5f;
+        dst[2] = (src[4] + src[5])*0.5f;
+        dst[3] = (src[6] + src[7])*0.5f;
+        src += 8;
+        dst += 4;
+    }
+    for (i = n & 3; i; i--) {
+        dst[0] = (src[0] + src[1])*0.5f;
+        src += 2;
+        dst += 1;
+    }
+}
+
+static void remap_mono_to_ch4_s16ne_c(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    unsigned i;
+
+    for (i = n >> 2; i; i--) {
+        dst[0] = dst[1] = dst[2] = dst[3] = src[0];
+        dst[4] = dst[5] = dst[6] = dst[7] = src[1];
+        dst[8] = dst[9] = dst[10] = dst[11] = src[2];
+        dst[12] = dst[13] = dst[14] = dst[15] = src[3];
+        src += 4;
+        dst += 16;
+    }
+    for (i = n & 3; i; i--) {
+        dst[0] = dst[1] = dst[2] = dst[3] = src[0];
+        src++;
+        dst += 4;
+    }
+}
+
+static void remap_mono_to_ch4_float32ne_c(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    unsigned i;
+
+    for (i = n >> 2; i; i--) {
+        dst[0] = dst[1] = dst[2] = dst[3] = src[0];
+        dst[4] = dst[5] = dst[6] = dst[7] = src[1];
+        dst[8] = dst[9] = dst[10] = dst[11] = src[2];
+        dst[12] = dst[13] = dst[14] = dst[15] = src[3];
+        src += 4;
+        dst += 16;
+    }
+    for (i = n & 3; i; i--) {
+        dst[0] = dst[1] = dst[2] = dst[3] = src[0];
+        src++;
+        dst += 4;
+    }
+}
+
+static void remap_ch4_to_mono_s16ne_c(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    unsigned i;
+
+    for (i = n >> 2; i > 0; i--) {
+        dst[0] = (src[0] + src[1] + src[2] + src[3])/4;
+        dst[1] = (src[4] + src[5] + src[6] + src[7])/4;
+        dst[2] = (src[8] + src[9] + src[10] + src[11])/4;
+        dst[3] = (src[12] + src[13] + src[14] + src[15])/4;
+        src += 16;
+        dst += 4;
+    }
+    for (i = n & 3; i; i--) {
+        dst[0] = (src[0] + src[1] + src[2] + src[3])/4;
+        src += 4;
+        dst += 1;
+    }
+}
+
+static void remap_ch4_to_mono_float32ne_c(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    unsigned i;
+
+    for (i = n >> 2; i > 0; i--) {
+        dst[0] = (src[0] + src[1] + src[2] + src[3])*0.25f;
+        dst[1] = (src[4] + src[5] + src[6] + src[7])*0.25f;
+        dst[2] = (src[8] + src[9] + src[10] + src[11])*0.25f;
+        dst[3] = (src[12] + src[13] + src[14] + src[15])*0.25f;
+        src += 16;
+        dst += 4;
+    }
+    for (i = n & 3; i; i--) {
+        dst[0] = (src[0] + src[1] + src[2] + src[3])*0.25f;
+        src += 4;
+        dst += 1;
+    }
+}
+
+static void remap_channels_matrix_s16ne_c(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+
+    unsigned oc, ic, i;
+    unsigned n_ic, n_oc;
+
+    n_ic = m->i_ss.channels;
+    n_oc = m->o_ss.channels;
+
+    memset(dst, 0, n * sizeof(int16_t) * n_oc);
+
+    for (oc = 0; oc < n_oc; oc++) {
+
+        for (ic = 0; ic < n_ic; ic++) {
+            int16_t *d = dst + oc;
+            const int16_t *s = src + ic;
+            int32_t vol = m->map_table_i[oc][ic];
+
+            if (vol <= 0)
+                continue;
+
+            if (vol >= 0x10000) {
+                for (i = n; i > 0; i--, s += n_ic, d += n_oc)
+                    *d += *s;
+            } else {
+                for (i = n; i > 0; i--, s += n_ic, d += n_oc)
+                    *d += (int16_t) (((int32_t)*s * vol) >> 16);
             }
-            break;
         }
-        default:
-            pa_assert_not_reached();
     }
 }
 
-static void remap_channels_matrix_c(pa_remap_t *m, void *dst, const void *src, unsigned n) {
+static void remap_channels_matrix_float32ne_c(pa_remap_t *m, float *dst, const float *src, unsigned n) {
     unsigned oc, ic, i;
     unsigned n_ic, n_oc;
 
-    n_ic = m->i_ss->channels;
-    n_oc = m->o_ss->channels;
+    n_ic = m->i_ss.channels;
+    n_oc = m->o_ss.channels;
+
+    memset(dst, 0, n * sizeof(float) * n_oc);
+
+    for (oc = 0; oc < n_oc; oc++) {
 
-    switch (*m->format) {
-        case PA_SAMPLE_FLOAT32NE:
-        {
-            float *d, *s;
+        for (ic = 0; ic < n_ic; ic++) {
+            float *d = dst + oc;
+            const float *s = src + ic;
+            float vol = m->map_table_f[oc][ic];
 
-            memset(dst, 0, n * sizeof(float) * n_oc);
+            if (vol <= 0.0f)
+                continue;
 
-            for (oc = 0; oc < n_oc; oc++) {
+            if (vol >= 1.0f) {
+                for (i = n; i > 0; i--, s += n_ic, d += n_oc)
+                    *d += *s;
+            } else {
+                for (i = n; i > 0; i--, s += n_ic, d += n_oc)
+                    *d += *s * vol;
+            }
+        }
+    }
+}
 
-                for (ic = 0; ic < n_ic; ic++) {
-                    float vol;
+/* Produce an array containing input channel indices to map to output channels.
+ * If the output channel is empty, the array element is -1. */
+bool pa_setup_remap_arrange(const pa_remap_t *m, int8_t arrange[PA_CHANNELS_MAX]) {
+    unsigned ic, oc;
+    unsigned n_ic, n_oc;
+    unsigned count_output = 0;
 
-                    vol = m->map_table_f[oc][ic];
+    pa_assert(m);
 
-                    if (vol <= 0.0)
-                        continue;
+    n_ic = m->i_ss.channels;
+    n_oc = m->o_ss.channels;
 
-                    d = (float *)dst + oc;
-                    s = (float *)src + ic;
+    for (oc = 0; oc < n_oc; oc++) {
+        arrange[oc] = -1;
+        for (ic = 0; ic < n_ic; ic++) {
+            int32_t vol = m->map_table_i[oc][ic];
 
-                    if (vol >= 1.0) {
-                        for (i = n; i > 0; i--, s += n_ic, d += n_oc)
-                            *d += *s;
-                    } else {
-                        for (i = n; i > 0; i--, s += n_ic, d += n_oc)
-                            *d += *s * vol;
-                    }
-                }
-            }
+            /* input channel is not used */
+            if (vol == 0)
+                continue;
 
-            break;
+            /* if mixing this channel, we cannot just rearrange */
+            if (vol != 0x10000 || arrange[oc] >= 0)
+                return false;
+
+            arrange[oc] = ic;
+            count_output++;
         }
-        case PA_SAMPLE_S16NE:
-        {
-            int16_t *d, *s;
+    }
+
+    return count_output > 0;
+}
+
+static void remap_arrange_mono_s16ne_c(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    const unsigned n_ic = m->i_ss.channels;
+    const int8_t *arrange = m->state;
+
+    src += arrange[0];
+    for (; n > 0; n--) {
+        *dst++ = *src;
+        src += n_ic;
+    }
+}
 
-            memset(dst, 0, n * sizeof(int16_t) * n_oc);
+static void remap_arrange_stereo_s16ne_c(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    const unsigned n_ic = m->i_ss.channels;
+    const int8_t *arrange = m->state;
+    const int8_t ic0 = arrange[0], ic1 = arrange[1];
 
-            for (oc = 0; oc < n_oc; oc++) {
+    for (; n > 0; n--) {
+        *dst++ = (ic0 >= 0) ? *(src + ic0) : 0;
+        *dst++ = (ic1 >= 0) ? *(src + ic1) : 0;
+        src += n_ic;
+    }
+}
 
-                for (ic = 0; ic < n_ic; ic++) {
-                    int32_t vol;
+static void remap_arrange_ch4_s16ne_c(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    const unsigned n_ic = m->i_ss.channels;
+    const int8_t *arrange = m->state;
+    const int8_t ic0 = arrange[0], ic1 = arrange[1],
+        ic2 = arrange[2], ic3 = arrange[3];
+
+    for (; n > 0; n--) {
+        *dst++ = (ic0 >= 0) ? *(src + ic0) : 0;
+        *dst++ = (ic1 >= 0) ? *(src + ic1) : 0;
+        *dst++ = (ic2 >= 0) ? *(src + ic2) : 0;
+        *dst++ = (ic3 >= 0) ? *(src + ic3) : 0;
+        src += n_ic;
+    }
+}
 
-                    vol = m->map_table_i[oc][ic];
+static void remap_arrange_mono_float32ne_c(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    const unsigned n_ic = m->i_ss.channels;
+    const int8_t *arrange = m->state;
 
-                    if (vol <= 0)
-                        continue;
+    src += arrange[0];
+    for (; n > 0; n--) {
+        *dst++ = *src;
+        src += n_ic;
+    }
+}
 
-                    d = (int16_t *)dst + oc;
-                    s = (int16_t *)src + ic;
+static void remap_arrange_stereo_float32ne_c(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    const unsigned n_ic = m->i_ss.channels;
+    const int8_t *arrange = m->state;
+    const int ic0 = arrange[0], ic1 = arrange[1];
 
-                    if (vol >= 0x10000) {
-                        for (i = n; i > 0; i--, s += n_ic, d += n_oc)
-                            *d += *s;
-                    } else {
-                        for (i = n; i > 0; i--, s += n_ic, d += n_oc)
-                            *d += (int16_t) (((int32_t)*s * vol) >> 16);
-                    }
-                }
-            }
-            break;
-        }
-        default:
-            pa_assert_not_reached();
+    for (; n > 0; n--) {
+        *dst++ = (ic0 >= 0) ? *(src + ic0) : 0.0f;
+        *dst++ = (ic1 >= 0) ? *(src + ic1) : 0.0f;
+        src += n_ic;
+    }
+}
+
+static void remap_arrange_ch4_float32ne_c(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    const unsigned n_ic = m->i_ss.channels;
+    const int8_t *arrange = m->state;
+    const int ic0 = arrange[0], ic1 = arrange[1],
+        ic2 = arrange[2], ic3 = arrange[3];
+
+    for (; n > 0; n--) {
+        *dst++ = (ic0 >= 0) ? *(src + ic0) : 0.0f;
+        *dst++ = (ic1 >= 0) ? *(src + ic1) : 0.0f;
+        *dst++ = (ic2 >= 0) ? *(src + ic2) : 0.0f;
+        *dst++ = (ic3 >= 0) ? *(src + ic3) : 0.0f;
+        src += n_ic;
     }
 }
 
+void pa_set_remap_func(pa_remap_t *m, pa_do_remap_func_t func_s16,
+    pa_do_remap_func_t func_float) {
+
+    pa_assert(m);
+
+    if (m->format == PA_SAMPLE_S16NE)
+        m->do_remap = func_s16;
+    else if (m->format == PA_SAMPLE_FLOAT32NE)
+        m->do_remap = func_float;
+    else
+        pa_assert_not_reached();
+}
+
+static bool force_generic_code = false;
+
 /* set the function that will execute the remapping based on the matrices */
 static void init_remap_c(pa_remap_t *m) {
     unsigned n_oc, n_ic;
+    int8_t arrange[PA_CHANNELS_MAX];
 
-    n_oc = m->o_ss->channels;
-    n_ic = m->i_ss->channels;
+    n_oc = m->o_ss.channels;
+    n_ic = m->i_ss.channels;
 
     /* find some common channel remappings, fall back to full matrix operation. */
+    if (force_generic_code) {
+        pa_log_info("Forced to use generic matrix remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_channels_matrix_s16ne_c,
+            (pa_do_remap_func_t) remap_channels_matrix_float32ne_c);
+        return;
+    }
+
     if (n_ic == 1 && n_oc == 2 &&
-            m->map_table_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
-        m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_c;
+            m->map_table_i[0][0] == 0x10000 && m->map_table_i[1][0] == 0x10000) {
+
         pa_log_info("Using mono to stereo remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_mono_to_stereo_s16ne_c,
+            (pa_do_remap_func_t) remap_mono_to_stereo_float32ne_c);
+    } else if (n_ic == 2 && n_oc == 1 &&
+            m->map_table_i[0][0] == 0x8000 && m->map_table_i[0][1] == 0x8000) {
+
+        pa_log_info("Using stereo to mono remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_stereo_to_mono_s16ne_c,
+            (pa_do_remap_func_t) remap_stereo_to_mono_float32ne_c);
+    } else if (n_ic == 1 && n_oc == 4 &&
+            m->map_table_i[0][0] == 0x10000 && m->map_table_i[1][0] == 0x10000 &&
+            m->map_table_i[2][0] == 0x10000 && m->map_table_i[3][0] == 0x10000) {
+
+        pa_log_info("Using mono to 4-channel remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t)remap_mono_to_ch4_s16ne_c,
+            (pa_do_remap_func_t) remap_mono_to_ch4_float32ne_c);
+    } else if (n_ic == 4 && n_oc == 1 &&
+            m->map_table_i[0][0] == 0x4000 && m->map_table_i[0][1] == 0x4000 &&
+            m->map_table_i[0][2] == 0x4000 && m->map_table_i[0][3] == 0x4000) {
+
+        pa_log_info("Using 4-channel to mono remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_ch4_to_mono_s16ne_c,
+            (pa_do_remap_func_t) remap_ch4_to_mono_float32ne_c);
+    } else if (pa_setup_remap_arrange(m, arrange) && n_oc == 1) {
+
+        pa_log_info("Using mono arrange remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_arrange_mono_s16ne_c,
+            (pa_do_remap_func_t) remap_arrange_mono_float32ne_c);
+
+        /* setup state */
+        m->state = pa_xnewdup(int8_t, arrange, PA_CHANNELS_MAX);
+    } else if (pa_setup_remap_arrange(m, arrange) && n_oc == 2) {
+
+        pa_log_info("Using stereo arrange remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_arrange_stereo_s16ne_c,
+            (pa_do_remap_func_t) remap_arrange_stereo_float32ne_c);
+
+        /* setup state */
+        m->state = pa_xnewdup(int8_t, arrange, PA_CHANNELS_MAX);
+    } else if (pa_setup_remap_arrange(m, arrange) && n_oc == 4) {
+
+        pa_log_info("Using 4-channel arrange remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_arrange_ch4_s16ne_c,
+            (pa_do_remap_func_t) remap_arrange_ch4_float32ne_c);
+
+        /* setup state */
+        m->state = pa_xnewdup(int8_t, arrange, PA_CHANNELS_MAX);
     } else {
-        m->do_remap = (pa_do_remap_func_t) remap_channels_matrix_c;
+
         pa_log_info("Using generic matrix remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_channels_matrix_s16ne_c,
+            (pa_do_remap_func_t) remap_channels_matrix_float32ne_c);
     }
 }
 
 /* default C implementation */
-static pa_init_remap_func_t remap_func = init_remap_c;
+static pa_init_remap_func_t init_remap_func = init_remap_c;
 
-void pa_init_remap(pa_remap_t *m) {
-    pa_assert(remap_func);
+void pa_init_remap_func(pa_remap_t *m) {
+    pa_assert(init_remap_func);
 
     m->do_remap = NULL;
 
     /* call the installed remap init function */
-    remap_func(m);
+    init_remap_func(m);
 
     if (m->do_remap == NULL) {
         /* nothing was installed, fallback to C version */
@@ -196,9 +456,13 @@ void pa_init_remap(pa_remap_t *m) {
 }
 
 pa_init_remap_func_t pa_get_init_remap_func(void) {
-    return remap_func;
+    return init_remap_func;
 }
 
 void pa_set_init_remap_func(pa_init_remap_func_t func) {
-    remap_func = func;
+    init_remap_func = func;
+}
+
+void pa_remap_func_init(const pa_cpu_info *cpu_info) {
+    force_generic_code = cpu_info->force_generic_code;
 }
diff --git a/src/pulsecore/remap.h b/src/pulsecore/remap.h
index 32a67cd..66ab7bc 100644
--- a/src/pulsecore/remap.h
+++ b/src/pulsecore/remap.h
@@ -30,14 +30,15 @@ typedef struct pa_remap pa_remap_t;
 typedef void (*pa_do_remap_func_t) (pa_remap_t *m, void *d, const void *s, unsigned n);
 
 struct pa_remap {
-    pa_sample_format_t *format;
-    pa_sample_spec *i_ss, *o_ss;
+    pa_sample_format_t format;
+    pa_sample_spec i_ss, o_ss;
     float map_table_f[PA_CHANNELS_MAX][PA_CHANNELS_MAX];
     int32_t map_table_i[PA_CHANNELS_MAX][PA_CHANNELS_MAX];
     pa_do_remap_func_t do_remap;
+    void *state; /* optional state information for the remap function */
 };
 
-void pa_init_remap (pa_remap_t *m);
+void pa_init_remap_func(pa_remap_t *m);
 
 /* custom installation of init functions */
 typedef void (*pa_init_remap_func_t) (pa_remap_t *m);
@@ -45,4 +46,17 @@ typedef void (*pa_init_remap_func_t) (pa_remap_t *m);
 pa_init_remap_func_t pa_get_init_remap_func(void);
 void pa_set_init_remap_func(pa_init_remap_func_t func);
 
+/* Check if remapping can be performed by just copying some or all input
+ * channels' data to output channels. Returns true and a table of input
+ * channel indices, or false otherwise.
+ *
+ * The table contains an entry for each output channels. Each table entry given
+ * either the input channel index to be copied, or -1 indicating that the
+ * output channel is not used and hence zero.
+ */
+bool pa_setup_remap_arrange(const pa_remap_t *m, int8_t arrange[PA_CHANNELS_MAX]);
+
+void pa_set_remap_func(pa_remap_t *m, pa_do_remap_func_t func_s16,
+    pa_do_remap_func_t func_float);
+
 #endif /* fooremapfoo */
diff --git a/src/pulsecore/remap_mmx.c b/src/pulsecore/remap_mmx.c
index 5b3f0f9..51a6da7 100644
--- a/src/pulsecore/remap_mmx.c
+++ b/src/pulsecore/remap_mmx.c
@@ -102,47 +102,42 @@
                 " emms                          \n\t"
 
 #if defined (__i386__) || defined (__amd64__)
-static void remap_mono_to_stereo_mmx(pa_remap_t *m, void *dst, const void *src, unsigned n) {
+static void remap_mono_to_stereo_s16ne_mmx(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
     pa_reg_x86 temp, temp2;
 
-    switch (*m->format) {
-        case PA_SAMPLE_FLOAT32NE:
-        {
-            __asm__ __volatile__ (
-                MONO_TO_STEREO(dq,3,7) /* do doubles to quads */
-                : "+r" (dst), "+r" (src), "=&r" (temp), "=&r" (temp2)
-                : "r" ((pa_reg_x86)n)
-                : "cc"
-            );
-            break;
-        }
-        case PA_SAMPLE_S16NE:
-        {
-            __asm__ __volatile__ (
-                MONO_TO_STEREO(wd,4,15) /* do words to doubles */
-                : "+r" (dst), "+r" (src), "=&r" (temp), "=&r" (temp2)
-                : "r" ((pa_reg_x86)n)
-                : "cc"
-            );
-            break;
-        }
-        default:
-            pa_assert_not_reached();
-    }
+    __asm__ __volatile__ (
+        MONO_TO_STEREO(wd,4,15) /* do words to doubles */
+        : "+r" (dst), "+r" (src), "=&r" (temp), "=&r" (temp2)
+        : "r" ((pa_reg_x86)n)
+        : "cc"
+    );
+}
+
+static void remap_mono_to_stereo_float32ne_mmx(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    pa_reg_x86 temp, temp2;
+
+    __asm__ __volatile__ (
+        MONO_TO_STEREO(dq,3,7) /* do doubles to quads */
+        : "+r" (dst), "+r" (src), "=&r" (temp), "=&r" (temp2)
+        : "r" ((pa_reg_x86)n)
+        : "cc"
+    );
 }
 
 /* set the function that will execute the remapping based on the matrices */
 static void init_remap_mmx(pa_remap_t *m) {
     unsigned n_oc, n_ic;
 
-    n_oc = m->o_ss->channels;
-    n_ic = m->i_ss->channels;
+    n_oc = m->o_ss.channels;
+    n_ic = m->i_ss.channels;
 
     /* find some common channel remappings, fall back to full matrix operation. */
     if (n_ic == 1 && n_oc == 2 &&
-            m->map_table_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
-        m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_mmx;
+            m->map_table_i[0][0] == 0x10000 && m->map_table_i[1][0] == 0x10000) {
+
         pa_log_info("Using MMX mono to stereo remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_mono_to_stereo_s16ne_mmx,
+            (pa_do_remap_func_t) remap_mono_to_stereo_float32ne_mmx);
     }
 }
 #endif /* defined (__i386__) || defined (__amd64__) */
diff --git a/src/pulsecore/remap_neon.c b/src/pulsecore/remap_neon.c
new file mode 100644
index 0000000..ebacf92
--- /dev/null
+++ b/src/pulsecore/remap_neon.c
@@ -0,0 +1,498 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2013 Peter Meerwald <p.meerwald at bct-electronic.com>
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulse/sample.h>
+#include <pulse/xmalloc.h>
+#include <pulsecore/log.h>
+#include <pulsecore/macro.h>
+
+#include "cpu-arm.h"
+#include "remap.h"
+
+#include <arm_neon.h>
+
+static void remap_mono_to_stereo_float32ne_neon_a8(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    for (; n >= 4; n -= 4) {
+        __asm__ __volatile__ (
+            "vld1.32    {q0}, [%[src]]!         \n\t"
+            "vmov       q1, q0                  \n\t"
+            "vst2.32    {q0,q1}, [%[dst]]!      \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : /* input operands */
+            : "memory", "q0", "q1" /* clobber list */
+        );
+    }
+
+    for (; n > 0; n--) {
+        dst[0] = dst[1] = src[0];
+        src++;
+        dst += 2;
+    }
+}
+
+static void remap_mono_to_stereo_float32ne_generic_arm(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    for (; n >= 2; n -= 2) {
+        __asm__ __volatile__ (
+            "ldm        %[src]!, {r4,r6}        \n\t"
+            "mov        r5, r4                  \n\t"
+            "mov        r7, r6                  \n\t"
+            "stm        %[dst]!, {r4-r7}        \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : /* input operands */
+            : "memory", "r4", "r5", "r6", "r7" /* clobber list */
+        );
+    }
+
+    if (n > 0)
+        dst[0] = dst[1] = src[0];
+}
+
+static void remap_mono_to_stereo_s16ne_neon(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    for (; n >= 8; n -= 8) {
+        __asm__ __volatile__ (
+            "vld1.16    {q0}, [%[src]]!         \n\t"
+            "vmov       q1, q0                  \n\t"
+            "vst2.16    {q0,q1}, [%[dst]]!      \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : /* input operands */
+            : "memory", "q0", "q1" /* clobber list */
+        );
+    }
+
+    for (; n > 0; n--) {
+        dst[0] = dst[1] = src[0];
+        src++;
+        dst += 2;
+    }
+}
+
+static void remap_mono_to_ch4_float32ne_neon(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    for (; n >= 2; n -= 2) {
+        __asm__ __volatile__ (
+            "vld1.32    {d0}, [%[src]]!         \n\t"
+            "vdup.f32   q1, d0[0]               \n\t"
+            "vdup.f32   q2, d0[1]               \n\t"
+            "vst1.32    {q1,q2}, [%[dst]]!      \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : /* input operands */
+            : "memory", "q0", "q1", "q2" /* clobber list */
+        );
+    }
+
+    if (n--)
+        dst[0] = dst[1] = dst[2] = dst[3] = src[0];
+}
+
+static void remap_mono_to_ch4_s16ne_neon(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    for (; n >= 4; n -= 4) {
+        __asm__ __volatile__ (
+            "vld1.16    {d0}, [%[src]]!         \n\t"
+            "vdup.s16   d1, d0[1]               \n\t"
+            "vdup.s16   d2, d0[2]               \n\t"
+            "vdup.s16   d3, d0[3]               \n\t"
+            "vdup.s16   d0, d0[0]               \n\t"
+            "vst1.16    {d0,d1,d2,d3}, [%[dst]]!\n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : /* input operands */
+            : "memory", "d0", "d1", "d2", "d3" /* clobber list */
+        );
+    }
+
+    for (; n > 0; n--) {
+        dst[0] = dst[1] = dst[2] = dst[3] = src[0];
+        src++;
+        dst += 4;
+    }
+}
+
+static void remap_stereo_to_mono_float32ne_neon(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    const float32x4_t halve = vdupq_n_f32(0.5f);
+    for (; n >= 4; n -= 4) {
+        __asm__ __volatile__ (
+            "vld2.32    {q0,q1}, [%[src]]!      \n\t"
+            "vadd.f32   q0, q0, q1              \n\t"
+            "vmul.f32   q0, q0, %q[halve]       \n\t"
+            "vst1.32    {q0}, [%[dst]]!         \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : [halve] "w" (halve) /* input operands */
+            : "memory", "q0", "q1" /* clobber list */
+        );
+    }
+
+    for (; n > 0; n--) {
+        dst[0] = (src[0] + src[1])*0.5f;
+        src += 2;
+        dst++;
+    }
+}
+
+static void remap_stereo_to_mono_s16ne_neon(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    for (; n >= 8; n -= 8) {
+        __asm__ __volatile__ (
+            "vld2.16    {q0,q1}, [%[src]]!      \n\t"
+            "vrhadd.s16 q0, q0, q1              \n\t"
+            "vst1.16    {q0}, [%[dst]]!         \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : /* input operands */
+            : "memory", "q0", "q1" /* clobber list */
+        );
+    }
+
+    for (; n > 0; n--) {
+        dst[0] = (src[0] + src[1])/2;
+        src += 2;
+        dst++;
+    }
+}
+
+static void remap_ch4_to_mono_float32ne_neon(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    const float32x2_t quart = vdup_n_f32(0.25f);
+    for (; n >= 2; n -= 2) {
+        __asm__ __volatile__ (
+            "vld4.32    {d0,d1,d2,d3}, [%[src]]!\n\t"
+            "vadd.f32   d0, d0, d1              \n\t"
+            "vadd.f32   d2, d2, d3              \n\t"
+            "vadd.f32   d0, d0, d2              \n\t"
+            "vmul.f32   d0, d0, %[quart]        \n\t"
+            "vst1.32    {d0}, [%[dst]]!         \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : [quart] "w" (quart) /* input operands */
+            : "memory", "d0", "d1", "d2", "d3" /* clobber list */
+        );
+    }
+
+    if (n > 0)
+        dst[0] = (src[0] + src[1] + src[2] + src[3])*0.25f;
+}
+
+static void remap_ch4_to_mono_s16ne_neon(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    for (; n >= 4; n -= 4) {
+        __asm__ __volatile__ (
+            "vld4.16    {d0,d1,d2,d3}, [%[src]]!\n\t"
+            "vrhadd.s16 d0, d0, d1              \n\t"
+            "vrhadd.s16 d2, d2, d3              \n\t"
+            "vrhadd.s16 d0, d0, d2              \n\t"
+            "vst1.16    {d0}, [%[dst]]!         \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : /* input operands */
+            : "memory", "d0", "d1", "d2", "d3" /* clobber list */
+        );
+    }
+
+    for (; n > 0; n--) {
+        dst[0] = (src[0] + src[1] + src[2] + src[3])/4;
+        src += 4;
+        dst++;
+    }
+}
+
+static void remap_ch4_s16ne_neon(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    int32x4_t *f = m->state;
+    const int32x4_t f0 = f[0], f1 = f[1], f2 = f[2], f3 = f[3];
+
+    for (; n > 0; n--) {
+        __asm__ __volatile__ (
+            "vld1.16    {d0}, [%[src]]!         \n\t"
+            "vmovl.s16  q0, d0                  \n\t"
+            "vdup.s32   q1, d0[0]               \n\t"
+            "vmul.s32   q1, q1, %q[f0]          \n\t"
+            "vdup.s32   q2, d0[1]               \n\t"
+            "vmla.s32   q1, q2, %q[f1]          \n\t"
+            "vdup.s32   q2, d1[0]               \n\t"
+            "vmla.s32   q1, q2, %q[f2]          \n\t"
+            "vdup.s32   q2, d1[1]               \n\t"
+            "vmla.s32   q1, q2, %q[f3]          \n\t"
+            "vqshrn.s32  d2, q1, #16            \n\t"
+            "vst1.32    {d2}, [%[dst]]!         \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src)
+            : [f0] "w" (f0), [f1] "w" (f1), [f2] "w" (f2), [f3] "w" (f3)
+            : "memory", "q0", "q1", "q2"
+        );
+    }
+}
+
+static void remap_ch4_float32ne_neon(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    float32x4_t *f = m->state;
+    const float32x4_t f0 = f[0], f1 = f[1], f2 = f[2], f3 = f[3];
+
+    for (; n > 0; n--) {
+        __asm__ __volatile__ (
+            "vld1.32    {d0,d1}, [%[src]]!      \n\t"
+            "vdup.f32   q1, d0[0]               \n\t"
+            "vmul.f32   q1, q1, %q[f0]          \n\t"
+            "vdup.f32   q2, d0[1]               \n\t"
+            "vmla.f32   q1, q2, %q[f1]          \n\t"
+            "vdup.f32   q2, d1[0]               \n\t"
+            "vmla.f32   q1, q2, %q[f2]          \n\t"
+            "vdup.f32   q2, d1[1]               \n\t"
+            "vmla.f32   q1, q2, %q[f3]          \n\t"
+            "vst1.32    {d2,d3}, [%[dst]]!      \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src)
+            : [f0] "w" (f0), [f1] "w" (f1), [f2] "w" (f2), [f3] "w" (f3)
+            : "memory", "q0", "q1", "q2"
+        );
+    }
+}
+
+static void remap_arrange_stereo_s16ne_neon(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    const uint8x8_t t = ((uint8x8_t *) m->state)[0];
+
+    for (; n >= 2; n -= 2) {
+        __asm__ __volatile__ (
+            "vld1.s16   d0, [%[src]]!           \n\t"
+            "vtbl.8     d0, {d0}, %[t]          \n\t"
+            "vst1.s16   d0, [%[dst]]!           \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : [t] "w" (t) /* input operands */
+            : "memory", "d0" /* clobber list */
+        );
+    }
+
+    if (n > 0) {
+        __asm__ __volatile__ (
+            "vld1.32   d0[0], [%[src]]!         \n\t"
+            "vtbl.8    d0, {d0}, %[t]           \n\t"
+            "vst1.32   d0[0], [%[dst]]!         \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : [t] "w" (t) /* input operands */
+            : "memory", "d0" /* clobber list */
+        );
+    }
+}
+
+static void remap_arrange_ch2_ch4_s16ne_neon(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    const uint8x8_t t = ((uint8x8_t *) m->state)[0];
+
+    for (; n > 0; n--) {
+        __asm__ __volatile__ (
+            "vld1.32    d0[0], [%[src]]!           \n\t"
+            "vtbl.8     d0, {d0}, %[t]          \n\t"
+            "vst1.s16   d0, [%[dst]]!           \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : [t] "w" (t) /* input operands */
+            : "memory", "d0" /* clobber list */
+        );
+    }
+}
+
+static void remap_arrange_ch4_s16ne_neon(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
+    const uint8x8_t t = ((uint8x8_t *) m->state)[0];
+
+    for (; n > 0; n--) {
+        __asm__ __volatile__ (
+            "vld1.s16   d0, [%[src]]!           \n\t"
+            "vtbl.8     d0, {d0}, %[t]          \n\t"
+            "vst1.s16   d0, [%[dst]]!           \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : [t] "w" (t) /* input operands */
+            : "memory", "d0" /* clobber list */
+        );
+    }
+}
+
+static void remap_arrange_stereo_float32ne_neon(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    const uint8x8_t t = ((uint8x8_t *)m->state)[0];
+
+    for (; n > 0; n--) {
+        __asm__ __volatile__ (
+            "vld1.f32   d0, [%[src]]!           \n\t"
+            "vtbl.8     d0, {d0}, %[t]          \n\t"
+            "vst1.s16   {d0}, [%[dst]]!         \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : [t] "w" (t) /* input operands */
+            : "memory", "d0" /* clobber list */
+        );
+    }
+}
+
+static void remap_arrange_ch2_ch4_float32ne_neon(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    const uint8x8_t t0 = ((uint8x8_t *)m->state)[0];
+    const uint8x8_t t1 = ((uint8x8_t *)m->state)[1];
+
+    for (; n > 0; n--) {
+        __asm__ __volatile__ (
+            "vld1.f32   d0, [%[src]]!           \n\t"
+            "vtbl.8     d1, {d0}, %[t0]         \n\t"
+            "vtbl.8     d2, {d0}, %[t1]         \n\t"
+            "vst1.s16   {d1,d2}, [%[dst]]!      \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : [t0] "w" (t0), [t1] "w" (t1) /* input operands */
+            : "memory", "d0", "d1", "d2" /* clobber list */
+        );
+    }
+}
+
+static void remap_arrange_ch4_float32ne_neon(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    const uint8x8_t t0 = ((uint8x8_t *)m->state)[0];
+    const uint8x8_t t1 = ((uint8x8_t *)m->state)[1];
+
+    for (; n > 0; n--) {
+        __asm__ __volatile__ (
+            "vld1.f32   {d0,d1}, [%[src]]!      \n\t"
+            "vtbl.8     d2, {d0,d1}, %[t0]      \n\t"
+            "vtbl.8     d3, {d0,d1}, %[t1]      \n\t"
+            "vst1.s16   {d2,d3}, [%[dst]]!      \n\t"
+            : [dst] "+r" (dst), [src] "+r" (src) /* output operands */
+            : [t0] "w" (t0), [t1] "w" (t1) /* input operands */
+            : "memory", "d0", "d1", "d2", "d3" /* clobber list */
+        );
+    }
+}
+
+static pa_cpu_arm_flag_t arm_flags;
+
+static void init_remap_neon(pa_remap_t *m) {
+    unsigned n_oc, n_ic;
+    int8_t arrange[PA_CHANNELS_MAX];
+
+    n_oc = m->o_ss.channels;
+    n_ic = m->i_ss.channels;
+
+    if (n_ic == 1 && n_oc == 2 &&
+            m->map_table_i[0][0] == 0x10000 && m->map_table_i[1][0] == 0x10000) {
+        if (arm_flags & PA_CPU_ARM_CORTEX_A8) {
+
+            pa_log_info("Using ARM NEON/A8 mono to stereo remapping");
+            pa_set_remap_func(m, (pa_do_remap_func_t) remap_mono_to_stereo_s16ne_neon,
+                (pa_do_remap_func_t) remap_mono_to_stereo_float32ne_neon_a8);
+        }
+        else {
+            pa_log_info("Using ARM NEON mono to stereo remapping");
+            pa_set_remap_func(m, (pa_do_remap_func_t) remap_mono_to_stereo_s16ne_neon,
+                (pa_do_remap_func_t) remap_mono_to_stereo_float32ne_generic_arm);
+        }
+    } else if (n_ic == 1 && n_oc == 4 &&
+            m->map_table_i[0][0] == 0x10000 && m->map_table_i[1][0] == 0x10000 &&
+            m->map_table_i[2][0] == 0x10000 && m->map_table_i[3][0] == 0x10000) {
+
+        pa_log_info("Using ARM NEON mono to 4-channel remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_mono_to_ch4_s16ne_neon,
+            (pa_do_remap_func_t) remap_mono_to_ch4_float32ne_neon);
+    } else if (n_ic == 2 && n_oc == 1 &&
+            m->map_table_i[0][0] == 0x8000 && m->map_table_i[0][1] == 0x8000) {
+
+        pa_log_info("Using ARM NEON stereo to mono remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_stereo_to_mono_s16ne_neon,
+            (pa_do_remap_func_t) remap_stereo_to_mono_float32ne_neon);
+    } else if (n_ic == 4 && n_oc == 1 &&
+            m->map_table_i[0][0] == 0x4000 && m->map_table_i[0][1] == 0x4000 &&
+            m->map_table_i[0][2] == 0x4000 && m->map_table_i[0][3] == 0x4000) {
+
+        pa_log_info("Using ARM NEON 4-channel to mono remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_ch4_to_mono_s16ne_neon,
+            (pa_do_remap_func_t) remap_ch4_to_mono_float32ne_neon);
+    } else if (pa_setup_remap_arrange(m, arrange) &&
+        ((n_ic == 2 && n_oc == 2) ||
+         (n_ic == 2 && n_oc == 4) ||
+         (n_ic == 4 && n_oc == 4))) {
+        unsigned o;
+
+        if (n_ic == 2 && n_oc == 2) {
+            pa_log_info("Using NEON stereo arrange remapping");
+            pa_set_remap_func(m, (pa_do_remap_func_t) remap_arrange_stereo_s16ne_neon,
+                (pa_do_remap_func_t) remap_arrange_stereo_float32ne_neon);
+        } else if (n_ic == 2 && n_oc == 4) {
+            pa_log_info("Using NEON 2-channel to 4-channel arrange remapping");
+            pa_set_remap_func(m, (pa_do_remap_func_t) remap_arrange_ch2_ch4_s16ne_neon,
+                (pa_do_remap_func_t) remap_arrange_ch2_ch4_float32ne_neon);
+        } else if (n_ic == 4 && n_oc == 4) {
+            pa_log_info("Using NEON 4-channel arrange remapping");
+            pa_set_remap_func(m, (pa_do_remap_func_t) remap_arrange_ch4_s16ne_neon,
+                (pa_do_remap_func_t) remap_arrange_ch4_float32ne_neon);
+        }
+
+        /* setup state */
+        switch (m->format) {
+        case PA_SAMPLE_S16NE: {
+            uint8x8_t *t = m->state = pa_xnew0(uint8x8_t, 1);
+            for (o = 0; o < 4; o++) {
+                if (arrange[o % n_oc] >= 0) {
+                    /* convert channel index to vtbl indices */
+                    unsigned frame = o / n_oc;
+                    ((uint8_t *) t)[o * 2 + 0] = (frame * n_oc + arrange[o % n_oc]) * 2 + 0;
+                    ((uint8_t *) t)[o * 2 + 1] = (frame * n_oc + arrange[o % n_oc]) * 2 + 1;
+                } else {
+                    /* use invalid table indices to map to 0 */
+                    ((uint8_t *) t)[o * 2 + 0] = 0xff;
+                    ((uint8_t *) t)[o * 2 + 1] = 0xff;
+                }
+            }
+            break;
+        }
+        case PA_SAMPLE_FLOAT32NE: {
+            uint8x8_t *t = m->state = pa_xnew0(uint8x8_t, 2);
+            for (o = 0; o < n_oc; o++) {
+                if (arrange[o] >= 0) {
+                    /* convert channel index to vtbl indices */
+                    ((uint8_t *) t)[o * 4 + 0] = arrange[o] * 4 + 0;
+                    ((uint8_t *) t)[o * 4 + 1] = arrange[o] * 4 + 1;
+                    ((uint8_t *) t)[o * 4 + 2] = arrange[o] * 4 + 2;
+                    ((uint8_t *) t)[o * 4 + 3] = arrange[o] * 4 + 3;
+                } else {
+                    /* use invalid table indices to map to 0 */
+                    ((uint8_t *) t)[o * 4 + 0] = 0xff;
+                    ((uint8_t *) t)[o * 4 + 1] = 0xff;
+                    ((uint8_t *) t)[o * 4 + 2] = 0xff;
+                    ((uint8_t *) t)[o * 4 + 3] = 0xff;
+                }
+            }
+            break;
+        }
+        default:
+            pa_assert_not_reached();
+        }
+    } else if (n_ic == 4 && n_oc == 4) {
+        unsigned i, o;
+
+        pa_log_info("Using ARM NEON 4-channel remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_ch4_s16ne_neon,
+            (pa_do_remap_func_t) remap_ch4_float32ne_neon);
+
+        /* setup state */
+        switch (m->format) {
+        case PA_SAMPLE_S16NE: {
+            int32x4_t *f = m->state = pa_xnew0(int32x4_t, 4);
+            for (o = 0; o < 4; o++) {
+                for (i = 0; i < 4; i++) {
+                    ((int *) &f[i])[o] = PA_CLAMP_UNLIKELY(m->map_table_i[o][i], 0, 0x10000);
+                }
+            }
+            break;
+        }
+        case PA_SAMPLE_FLOAT32NE: {
+            float32x4_t *f = m->state = pa_xnew0(float32x4_t, 4);
+            for (o = 0; o < 4; o++) {
+                for (i = 0; i < 4; i++) {
+                    ((float *) &f[i])[o] = PA_CLAMP_UNLIKELY(m->map_table_f[o][i], 0.0f, 1.0f);
+                }
+            }
+            break;
+        }
+        default:
+            pa_assert_not_reached();
+        }
+    }
+}
+
+void pa_remap_func_init_neon(pa_cpu_arm_flag_t flags) {
+    pa_log_info("Initialising ARM NEON optimized remappers.");
+    arm_flags = flags;
+    pa_set_init_remap_func((pa_init_remap_func_t) init_remap_neon);
+}
diff --git a/src/pulsecore/remap_sse.c b/src/pulsecore/remap_sse.c
index 8831723..d502ece 100644
--- a/src/pulsecore/remap_sse.c
+++ b/src/pulsecore/remap_sse.c
@@ -101,47 +101,42 @@
                 "4:                             \n\t"
 
 #if defined (__i386__) || defined (__amd64__)
-static void remap_mono_to_stereo_sse2(pa_remap_t *m, void *dst, const void *src, unsigned n) {
+static void remap_mono_to_stereo_s16ne_sse2(pa_remap_t *m, int16_t *dst, const int16_t *src, unsigned n) {
     pa_reg_x86 temp, temp2;
 
-    switch (*m->format) {
-        case PA_SAMPLE_FLOAT32NE:
-        {
-            __asm__ __volatile__ (
-                MONO_TO_STEREO(dq, 4, 15) /* do doubles to quads */
-                : "+r" (dst), "+r" (src), "=&r" (temp), "=&r" (temp2)
-                : "r" ((pa_reg_x86)n)
-                : "cc"
-            );
-            break;
-        }
-        case PA_SAMPLE_S16NE:
-        {
-            __asm__ __volatile__ (
-                MONO_TO_STEREO(wd, 5, 31) /* do words to doubles */
-                : "+r" (dst), "+r" (src), "=&r" (temp), "=&r" (temp2)
-                : "r" ((pa_reg_x86)n)
-                : "cc"
-            );
-            break;
-        }
-        default:
-            pa_assert_not_reached();
-    }
+    __asm__ __volatile__ (
+        MONO_TO_STEREO(wd, 5, 31) /* do words to doubles */
+        : "+r" (dst), "+r" (src), "=&r" (temp), "=&r" (temp2)
+        : "r" ((pa_reg_x86)n)
+        : "cc"
+    );
+}
+
+static void remap_mono_to_stereo_float32ne_sse2(pa_remap_t *m, float *dst, const float *src, unsigned n) {
+    pa_reg_x86 temp, temp2;
+
+    __asm__ __volatile__ (
+        MONO_TO_STEREO(dq, 4, 15) /* do doubles to quads */
+        : "+r" (dst), "+r" (src), "=&r" (temp), "=&r" (temp2)
+        : "r" ((pa_reg_x86)n)
+        : "cc"
+    );
 }
 
 /* set the function that will execute the remapping based on the matrices */
 static void init_remap_sse2(pa_remap_t *m) {
     unsigned n_oc, n_ic;
 
-    n_oc = m->o_ss->channels;
-    n_ic = m->i_ss->channels;
+    n_oc = m->o_ss.channels;
+    n_ic = m->i_ss.channels;
 
     /* find some common channel remappings, fall back to full matrix operation. */
     if (n_ic == 1 && n_oc == 2 &&
-            m->map_table_i[0][0] == PA_VOLUME_NORM && m->map_table_i[1][0] == PA_VOLUME_NORM) {
-        m->do_remap = (pa_do_remap_func_t) remap_mono_to_stereo_sse2;
+            m->map_table_i[0][0] == 0x10000 && m->map_table_i[1][0] == 0x10000) {
+
         pa_log_info("Using SSE2 mono to stereo remapping");
+        pa_set_remap_func(m, (pa_do_remap_func_t) remap_mono_to_stereo_s16ne_sse2,
+            (pa_do_remap_func_t) remap_mono_to_stereo_float32ne_sse2);
     }
 }
 #endif /* defined (__i386__) || defined (__amd64__) */
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index 38389f3..183d05f 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -25,104 +25,33 @@
 
 #include <string.h>
 
-#ifdef HAVE_LIBSAMPLERATE
-#include <samplerate.h>
-#endif
-
-#ifdef HAVE_SPEEX
-#include <speex/speex_resampler.h>
-#endif
-
 #include <pulse/xmalloc.h>
-#include <pulsecore/sconv.h>
 #include <pulsecore/log.h>
 #include <pulsecore/macro.h>
 #include <pulsecore/strbuf.h>
-#include <pulsecore/remap.h>
 #include <pulsecore/core-util.h>
-#include "ffmpeg/avcodec.h"
 
 #include "resampler.h"
 
 /* Number of samples of extra space we allow the resamplers to return */
 #define EXTRA_FRAMES 128
 
-struct pa_resampler {
-    pa_resample_method_t method;
-    pa_resample_flags_t flags;
-
-    pa_sample_spec i_ss, o_ss;
-    pa_channel_map i_cm, o_cm;
-    size_t i_fz, o_fz, w_fz, w_sz;
-    pa_mempool *mempool;
-
-    pa_memchunk to_work_format_buf;
-    pa_memchunk remap_buf;
-    pa_memchunk resample_buf;
-    pa_memchunk from_work_format_buf;
-    size_t to_work_format_buf_size;
-    size_t remap_buf_size;
-    size_t resample_buf_size;
-    size_t from_work_format_buf_size;
-
-    /* points to buffer before resampling stage, remap or to_work */
-    pa_memchunk *leftover_buf;
-    size_t *leftover_buf_size;
-
-    /* have_leftover points to leftover_in_remap or leftover_in_to_work */
-    bool *have_leftover;
-    bool leftover_in_remap;
-    bool leftover_in_to_work;
-
-    pa_sample_format_t work_format;
-    uint8_t work_channels;
-
-    pa_convert_func_t to_work_format_func;
-    pa_convert_func_t from_work_format_func;
-
-    pa_remap_t remap;
-    bool map_required;
-
-    pa_resampler_impl impl;
-};
-
-struct trivial_data { /* data specific to the trivial resampler */
-    unsigned o_counter;
-    unsigned i_counter;
-};
-
-struct peaks_data { /* data specific to the peak finder pseudo resampler */
-    unsigned o_counter;
-    unsigned i_counter;
-
-    float max_f[PA_CHANNELS_MAX];
-    int16_t max_i[PA_CHANNELS_MAX];
-};
-
 struct ffmpeg_data { /* data specific to ffmpeg */
     struct AVResampleContext *state;
 };
 
 static int copy_init(pa_resampler *r);
-static int trivial_init(pa_resampler*r);
-#ifdef HAVE_SPEEX
-static int speex_init(pa_resampler*r);
-#endif
-static int ffmpeg_init(pa_resampler*r);
-static int peaks_init(pa_resampler*r);
-#ifdef HAVE_LIBSAMPLERATE
-static int libsamplerate_init(pa_resampler*r);
-#endif
 
-static void calc_map_table(pa_resampler *r);
+static void setup_remap(const pa_resampler *r, pa_remap_t *m);
+static void free_remap(pa_remap_t *m);
 
-static int (* const init_table[])(pa_resampler*r) = {
+static int (* const init_table[])(pa_resampler *r) = {
 #ifdef HAVE_LIBSAMPLERATE
-    [PA_RESAMPLER_SRC_SINC_BEST_QUALITY]   = libsamplerate_init,
-    [PA_RESAMPLER_SRC_SINC_MEDIUM_QUALITY] = libsamplerate_init,
-    [PA_RESAMPLER_SRC_SINC_FASTEST]        = libsamplerate_init,
-    [PA_RESAMPLER_SRC_ZERO_ORDER_HOLD]     = libsamplerate_init,
-    [PA_RESAMPLER_SRC_LINEAR]              = libsamplerate_init,
+    [PA_RESAMPLER_SRC_SINC_BEST_QUALITY]   = pa_resampler_libsamplerate_init,
+    [PA_RESAMPLER_SRC_SINC_MEDIUM_QUALITY] = pa_resampler_libsamplerate_init,
+    [PA_RESAMPLER_SRC_SINC_FASTEST]        = pa_resampler_libsamplerate_init,
+    [PA_RESAMPLER_SRC_ZERO_ORDER_HOLD]     = pa_resampler_libsamplerate_init,
+    [PA_RESAMPLER_SRC_LINEAR]              = pa_resampler_libsamplerate_init,
 #else
     [PA_RESAMPLER_SRC_SINC_BEST_QUALITY]   = NULL,
     [PA_RESAMPLER_SRC_SINC_MEDIUM_QUALITY] = NULL,
@@ -130,30 +59,30 @@ static int (* const init_table[])(pa_resampler*r) = {
     [PA_RESAMPLER_SRC_ZERO_ORDER_HOLD]     = NULL,
     [PA_RESAMPLER_SRC_LINEAR]              = NULL,
 #endif
-    [PA_RESAMPLER_TRIVIAL]                 = trivial_init,
+    [PA_RESAMPLER_TRIVIAL]                 = pa_resampler_trivial_init,
 #ifdef HAVE_SPEEX
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+0]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+1]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+2]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+3]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+4]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+5]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+6]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+7]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+8]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+9]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FLOAT_BASE+10]     = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+0]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+1]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+2]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+3]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+4]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+5]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+6]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+7]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+8]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+9]      = speex_init,
-    [PA_RESAMPLER_SPEEX_FIXED_BASE+10]     = speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+0]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+1]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+2]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+3]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+4]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+5]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+6]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+7]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+8]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+9]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FLOAT_BASE+10]     = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+0]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+1]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+2]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+3]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+4]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+5]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+6]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+7]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+8]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+9]      = pa_resampler_speex_init,
+    [PA_RESAMPLER_SPEEX_FIXED_BASE+10]     = pa_resampler_speex_init,
 #else
     [PA_RESAMPLER_SPEEX_FLOAT_BASE+0]      = NULL,
     [PA_RESAMPLER_SPEEX_FLOAT_BASE+1]      = NULL,
@@ -178,10 +107,10 @@ static int (* const init_table[])(pa_resampler*r) = {
     [PA_RESAMPLER_SPEEX_FIXED_BASE+9]      = NULL,
     [PA_RESAMPLER_SPEEX_FIXED_BASE+10]     = NULL,
 #endif
-    [PA_RESAMPLER_FFMPEG]                  = ffmpeg_init,
+    [PA_RESAMPLER_FFMPEG]                  = pa_resampler_ffmpeg_init,
     [PA_RESAMPLER_AUTO]                    = NULL,
     [PA_RESAMPLER_COPY]                    = copy_init,
-    [PA_RESAMPLER_PEAKS]                   = peaks_init,
+    [PA_RESAMPLER_PEAKS]                   = pa_resampler_peaks_init,
 };
 
 static pa_resample_method_t choose_auto_resampler(pa_resample_flags_t flags) {
@@ -197,7 +126,7 @@ static pa_resample_method_t choose_auto_resampler(pa_resample_flags_t flags) {
     return method;
 }
 
-static pa_resample_method_t pa_resampler_fix_method(
+static pa_resample_method_t fix_method(
                 pa_resample_flags_t flags,
                 pa_resample_method_t method,
                 const uint32_t rate_a,
@@ -249,6 +178,23 @@ static pa_resample_method_t pa_resampler_fix_method(
     if (method == PA_RESAMPLER_AUTO)
         method = choose_auto_resampler(flags);
 
+#ifdef HAVE_SPEEX
+    /* At this point, method is supported in the sense that it
+     * has an init function and supports the required flags. However,
+     * speex-float implementation in PulseAudio relies on the
+     * assumption that is invalid if speex has been compiled with
+     * --enable-fixed-point. Besides, speex-fixed is more efficient
+     * in this configuration. So use it instead.
+     */
+    if (method >= PA_RESAMPLER_SPEEX_FLOAT_BASE && method <= PA_RESAMPLER_SPEEX_FLOAT_MAX) {
+        if (pa_speex_is_fixed_point()) {
+            pa_log_info("Speex appears to be compiled with --enable-fixed-point. "
+                        "Switching to a fixed-point resampler because it should be faster.");
+            method = method - PA_RESAMPLER_SPEEX_FLOAT_BASE + PA_RESAMPLER_SPEEX_FIXED_BASE;
+        }
+    }
+#endif
+
     return method;
 }
 
@@ -288,7 +234,7 @@ static bool sample_format_more_precise(pa_sample_format_t a, pa_sample_format_t
         case PA_SAMPLE_S32LE:
         case PA_SAMPLE_S32BE:
             if (b == PA_SAMPLE_FLOAT32LE || b == PA_SAMPLE_FLOAT32BE ||
-                b == PA_SAMPLE_S32LE || b == PA_SAMPLE_FLOAT32BE)
+                b == PA_SAMPLE_S32LE || b == PA_SAMPLE_S32BE)
                 return false;
             else
                 return true;
@@ -299,7 +245,7 @@ static bool sample_format_more_precise(pa_sample_format_t a, pa_sample_format_t
     }
 }
 
-static pa_sample_format_t pa_resampler_choose_work_format(
+static pa_sample_format_t choose_work_format(
                     pa_resample_method_t method,
                     pa_sample_format_t a,
                     pa_sample_format_t b,
@@ -367,7 +313,7 @@ pa_resampler* pa_resampler_new(
     pa_assert(method >= 0);
     pa_assert(method < PA_RESAMPLER_MAX);
 
-    method = pa_resampler_fix_method(flags, method, a->rate, b->rate);
+    method = fix_method(flags, method, a->rate, b->rate);
 
     r = pa_xnew0(pa_resampler, 1);
     r->mempool = pool;
@@ -378,11 +324,6 @@ pa_resampler* pa_resampler_new(
     r->i_ss = *a;
     r->o_ss = *b;
 
-    /* set up the remap structure */
-    r->remap.i_ss = &r->i_ss;
-    r->remap.o_ss = &r->o_ss;
-    r->remap.format = &r->work_format;
-
     if (am)
         r->i_cm = *am;
     else if (!pa_channel_map_init_auto(&r->i_cm, r->i_ss.channels, PA_CHANNEL_MAP_DEFAULT))
@@ -396,9 +337,10 @@ pa_resampler* pa_resampler_new(
     r->i_fz = pa_frame_size(a);
     r->o_fz = pa_frame_size(b);
 
-    calc_map_table(r);
+    r->map_required = (r->i_ss.channels != r->o_ss.channels || (!(r->flags & PA_RESAMPLER_NO_REMAP) &&
+        !pa_channel_map_equal(&r->i_cm, &r->o_cm)));
 
-    r->work_format = pa_resampler_choose_work_format(method, a->format, b->format, r->map_required);
+    r->work_format = choose_work_format(method, a->format, b->format, r->map_required);
     r->w_sz = pa_sample_size_of_format(r->work_format);
 
     if (r->i_ss.format != r->work_format) {
@@ -448,6 +390,10 @@ pa_resampler* pa_resampler_new(
                  pa_sample_format_to_string(b->format), pa_sample_format_to_string(r->work_format));
     pa_log_debug("  channels %d -> %d (resampling %d)", a->channels, b->channels, r->work_channels);
 
+    /* set up the remap structure */
+    if (r->map_required)
+        setup_remap(r, &r->remap);
+
     /* initialize implementation */
     if (init_table[method](r) < 0)
         goto fail;
@@ -477,6 +423,8 @@ void pa_resampler_free(pa_resampler *r) {
     if (r->from_work_format_buf.memblock)
         pa_memblock_unref(r->from_work_format_buf.memblock);
 
+    free_remap(&r->remap);
+
     pa_xfree(r);
 }
 
@@ -785,39 +733,33 @@ static int front_rear_side(pa_channel_position_t p) {
     return ON_OTHER;
 }
 
-static void calc_map_table(pa_resampler *r) {
+static void setup_remap(const pa_resampler *r, pa_remap_t *m) {
     unsigned oc, ic;
     unsigned n_oc, n_ic;
     bool ic_connected[PA_CHANNELS_MAX];
-    bool remix;
     pa_strbuf *s;
     char *t;
-    pa_remap_t *m;
 
     pa_assert(r);
-
-    if (!(r->map_required = (r->i_ss.channels != r->o_ss.channels || (!(r->flags & PA_RESAMPLER_NO_REMAP) && !pa_channel_map_equal(&r->i_cm, &r->o_cm)))))
-        return;
-
-    m = &r->remap;
+    pa_assert(m);
 
     n_oc = r->o_ss.channels;
     n_ic = r->i_ss.channels;
 
+    m->format = r->work_format;
+    m->i_ss = r->i_ss;
+    m->o_ss = r->o_ss;
+
     memset(m->map_table_f, 0, sizeof(m->map_table_f));
     memset(m->map_table_i, 0, sizeof(m->map_table_i));
 
     memset(ic_connected, 0, sizeof(ic_connected));
-    remix = (r->flags & (PA_RESAMPLER_NO_REMAP | PA_RESAMPLER_NO_REMIX)) == 0;
 
     if (r->flags & PA_RESAMPLER_NO_REMAP) {
-        pa_assert(!remix);
-
         for (oc = 0; oc < PA_MIN(n_ic, n_oc); oc++)
             m->map_table_f[oc][oc] = 1.0f;
 
     } else if (r->flags & PA_RESAMPLER_NO_REMIX) {
-        pa_assert(!remix);
         for (oc = 0; oc < n_oc; oc++) {
             pa_channel_position_t b = r->o_cm.map[oc];
 
@@ -902,8 +844,6 @@ static void calc_map_table(pa_resampler *r) {
             ic_unconnected_lfe = 0;
         bool ic_unconnected_center_mixed_in = 0;
 
-        pa_assert(remix);
-
         for (ic = 0; ic < n_ic; ic++) {
             if (on_left(r->i_cm.map[ic]))
                 ic_left++;
@@ -1150,7 +1090,13 @@ static void calc_map_table(pa_resampler *r) {
     pa_xfree(t);
 
     /* initialize the remapping function */
-    pa_init_remap(m);
+    pa_init_remap_func(m);
+}
+
+static void free_remap(pa_remap_t *m) {
+    pa_assert(m);
+
+    pa_xfree(m->state);
 }
 
 /* check if buf's memblock is large enough to hold 'len' bytes; create a
@@ -1383,501 +1329,6 @@ void pa_resampler_run(pa_resampler *r, const pa_memchunk *in, pa_memchunk *out)
         pa_memchunk_reset(out);
 }
 
-/*** libsamplerate based implementation ***/
-
-#ifdef HAVE_LIBSAMPLERATE
-static unsigned libsamplerate_resample(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
-    SRC_DATA data;
-    SRC_STATE *state;
-
-    pa_assert(r);
-    pa_assert(input);
-    pa_assert(output);
-    pa_assert(out_n_frames);
-
-    state = r->impl.data;
-    memset(&data, 0, sizeof(data));
-
-    data.data_in = pa_memblock_acquire_chunk(input);
-    data.input_frames = (long int) in_n_frames;
-
-    data.data_out = pa_memblock_acquire_chunk(output);
-    data.output_frames = (long int) *out_n_frames;
-
-    data.src_ratio = (double) r->o_ss.rate / r->i_ss.rate;
-    data.end_of_input = 0;
-
-    pa_assert_se(src_process(state, &data) == 0);
-
-    pa_memblock_release(input->memblock);
-    pa_memblock_release(output->memblock);
-
-    *out_n_frames = (unsigned) data.output_frames_gen;
-
-    return in_n_frames - data.input_frames_used;
-}
-
-static void libsamplerate_update_rates(pa_resampler *r) {
-    SRC_STATE *state;
-    pa_assert(r);
-
-    state = r->impl.data;
-    pa_assert_se(src_set_ratio(state, (double) r->o_ss.rate / r->i_ss.rate) == 0);
-}
-
-static void libsamplerate_reset(pa_resampler *r) {
-    SRC_STATE *state;
-    pa_assert(r);
-
-    state = r->impl.data;
-    pa_assert_se(src_reset(state) == 0);
-}
-
-static void libsamplerate_free(pa_resampler *r) {
-    SRC_STATE *state;
-    pa_assert(r);
-
-    state = r->impl.data;
-    if (state)
-        src_delete(state);
-}
-
-static int libsamplerate_init(pa_resampler *r) {
-    int err;
-    SRC_STATE *state;
-
-    pa_assert(r);
-
-    if (!(state = src_new(r->method, r->work_channels, &err)))
-        return -1;
-
-    r->impl.free = libsamplerate_free;
-    r->impl.update_rates = libsamplerate_update_rates;
-    r->impl.resample = libsamplerate_resample;
-    r->impl.reset = libsamplerate_reset;
-    r->impl.data = state;
-
-    return 0;
-}
-#endif
-
-#ifdef HAVE_SPEEX
-/*** speex based implementation ***/
-
-static unsigned speex_resample_float(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
-    float *in, *out;
-    uint32_t inf = in_n_frames, outf = *out_n_frames;
-    SpeexResamplerState *state;
-
-    pa_assert(r);
-    pa_assert(input);
-    pa_assert(output);
-    pa_assert(out_n_frames);
-
-    state = r->impl.data;
-
-    in = pa_memblock_acquire_chunk(input);
-    out = pa_memblock_acquire_chunk(output);
-
-    pa_assert_se(speex_resampler_process_interleaved_float(state, in, &inf, out, &outf) == 0);
-
-    pa_memblock_release(input->memblock);
-    pa_memblock_release(output->memblock);
-
-    pa_assert(inf == in_n_frames);
-    *out_n_frames = outf;
-
-    return 0;
-}
-
-static unsigned speex_resample_int(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
-    int16_t *in, *out;
-    uint32_t inf = in_n_frames, outf = *out_n_frames;
-    SpeexResamplerState *state;
-
-    pa_assert(r);
-    pa_assert(input);
-    pa_assert(output);
-    pa_assert(out_n_frames);
-
-    state = r->impl.data;
-
-    in = pa_memblock_acquire_chunk(input);
-    out = pa_memblock_acquire_chunk(output);
-
-    pa_assert_se(speex_resampler_process_interleaved_int(state, in, &inf, out, &outf) == 0);
-
-    pa_memblock_release(input->memblock);
-    pa_memblock_release(output->memblock);
-
-    pa_assert(inf == in_n_frames);
-    *out_n_frames = outf;
-
-    return 0;
-}
-
-static void speex_update_rates(pa_resampler *r) {
-    SpeexResamplerState *state;
-    pa_assert(r);
-
-    state = r->impl.data;
-
-    pa_assert_se(speex_resampler_set_rate(state, r->i_ss.rate, r->o_ss.rate) == 0);
-}
-
-static void speex_reset(pa_resampler *r) {
-    SpeexResamplerState *state;
-    pa_assert(r);
-
-    state = r->impl.data;
-
-    pa_assert_se(speex_resampler_reset_mem(state) == 0);
-}
-
-static void speex_free(pa_resampler *r) {
-    SpeexResamplerState *state;
-    pa_assert(r);
-
-    state = r->impl.data;
-    if (!state)
-        return;
-
-    speex_resampler_destroy(state);
-}
-
-static int speex_init(pa_resampler *r) {
-    int q, err;
-    SpeexResamplerState *state;
-
-    pa_assert(r);
-
-    r->impl.free = speex_free;
-    r->impl.update_rates = speex_update_rates;
-    r->impl.reset = speex_reset;
-
-    if (r->method >= PA_RESAMPLER_SPEEX_FIXED_BASE && r->method <= PA_RESAMPLER_SPEEX_FIXED_MAX) {
-
-        q = r->method - PA_RESAMPLER_SPEEX_FIXED_BASE;
-        r->impl.resample = speex_resample_int;
-
-    } else {
-        pa_assert(r->method >= PA_RESAMPLER_SPEEX_FLOAT_BASE && r->method <= PA_RESAMPLER_SPEEX_FLOAT_MAX);
-
-        q = r->method - PA_RESAMPLER_SPEEX_FLOAT_BASE;
-        r->impl.resample = speex_resample_float;
-    }
-
-    pa_log_info("Choosing speex quality setting %i.", q);
-
-    if (!(state = speex_resampler_init(r->work_channels, r->i_ss.rate, r->o_ss.rate, q, &err)))
-        return -1;
-
-    r->impl.data = state;
-
-    return 0;
-}
-#endif
-
-/* Trivial implementation */
-
-static unsigned trivial_resample(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
-    unsigned i_index, o_index;
-    void *src, *dst;
-    struct trivial_data *trivial_data;
-
-    pa_assert(r);
-    pa_assert(input);
-    pa_assert(output);
-    pa_assert(out_n_frames);
-
-    trivial_data = r->impl.data;
-
-    src = pa_memblock_acquire_chunk(input);
-    dst = pa_memblock_acquire_chunk(output);
-
-    for (o_index = 0;; o_index++, trivial_data->o_counter++) {
-        i_index = ((uint64_t) trivial_data->o_counter * r->i_ss.rate) / r->o_ss.rate;
-        i_index = i_index > trivial_data->i_counter ? i_index - trivial_data->i_counter : 0;
-
-        if (i_index >= in_n_frames)
-            break;
-
-        pa_assert_fp(o_index * r->w_fz < pa_memblock_get_length(output->memblock));
-
-        memcpy((uint8_t*) dst + r->w_fz * o_index, (uint8_t*) src + r->w_fz * i_index, (int) r->w_fz);
-    }
-
-    pa_memblock_release(input->memblock);
-    pa_memblock_release(output->memblock);
-
-    *out_n_frames = o_index;
-
-    trivial_data->i_counter += in_n_frames;
-
-    /* Normalize counters */
-    while (trivial_data->i_counter >= r->i_ss.rate) {
-        pa_assert(trivial_data->o_counter >= r->o_ss.rate);
-
-        trivial_data->i_counter -= r->i_ss.rate;
-        trivial_data->o_counter -= r->o_ss.rate;
-    }
-
-    return 0;
-}
-
-static void trivial_update_rates_or_reset(pa_resampler *r) {
-    struct trivial_data *trivial_data;
-    pa_assert(r);
-
-    trivial_data = r->impl.data;
-
-    trivial_data->i_counter = 0;
-    trivial_data->o_counter = 0;
-}
-
-static int trivial_init(pa_resampler*r) {
-    struct trivial_data *trivial_data;
-    pa_assert(r);
-
-    trivial_data = pa_xnew0(struct trivial_data, 1);
-
-    r->impl.resample = trivial_resample;
-    r->impl.update_rates = trivial_update_rates_or_reset;
-    r->impl.reset = trivial_update_rates_or_reset;
-    r->impl.data = trivial_data;
-
-    return 0;
-}
-
-/* Peak finder implementation */
-
-static unsigned peaks_resample(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
-    unsigned c, o_index = 0;
-    unsigned i, i_end = 0;
-    void *src, *dst;
-    struct peaks_data *peaks_data;
-
-    pa_assert(r);
-    pa_assert(input);
-    pa_assert(output);
-    pa_assert(out_n_frames);
-
-    peaks_data = r->impl.data;
-    src = pa_memblock_acquire_chunk(input);
-    dst = pa_memblock_acquire_chunk(output);
-
-    i = ((uint64_t) peaks_data->o_counter * r->i_ss.rate) / r->o_ss.rate;
-    i = i > peaks_data->i_counter ? i - peaks_data->i_counter : 0;
-
-    while (i_end < in_n_frames) {
-        i_end = ((uint64_t) (peaks_data->o_counter + 1) * r->i_ss.rate) / r->o_ss.rate;
-        i_end = i_end > peaks_data->i_counter ? i_end - peaks_data->i_counter : 0;
-
-        pa_assert_fp(o_index * r->w_fz < pa_memblock_get_length(output->memblock));
-
-        /* 1ch float is treated separately, because that is the common case */
-        if (r->work_channels == 1 && r->work_format == PA_SAMPLE_FLOAT32NE) {
-            float *s = (float*) src + i;
-            float *d = (float*) dst + o_index;
-
-            for (; i < i_end && i < in_n_frames; i++) {
-                float n = fabsf(*s++);
-
-                if (n > peaks_data->max_f[0])
-                    peaks_data->max_f[0] = n;
-            }
-
-            if (i == i_end) {
-                *d = peaks_data->max_f[0];
-                peaks_data->max_f[0] = 0;
-                o_index++, peaks_data->o_counter++;
-            }
-        } else if (r->work_format == PA_SAMPLE_S16NE) {
-            int16_t *s = (int16_t*) src + r->work_channels * i;
-            int16_t *d = (int16_t*) dst + r->work_channels * o_index;
-
-            for (; i < i_end && i < in_n_frames; i++)
-                for (c = 0; c < r->work_channels; c++) {
-                    int16_t n = abs(*s++);
-
-                    if (n > peaks_data->max_i[c])
-                        peaks_data->max_i[c] = n;
-                }
-
-            if (i == i_end) {
-                for (c = 0; c < r->work_channels; c++, d++) {
-                    *d = peaks_data->max_i[c];
-                    peaks_data->max_i[c] = 0;
-                }
-                o_index++, peaks_data->o_counter++;
-            }
-        } else {
-            float *s = (float*) src + r->work_channels * i;
-            float *d = (float*) dst + r->work_channels * o_index;
-
-            for (; i < i_end && i < in_n_frames; i++)
-                for (c = 0; c < r->work_channels; c++) {
-                    float n = fabsf(*s++);
-
-                    if (n > peaks_data->max_f[c])
-                        peaks_data->max_f[c] = n;
-                }
-
-            if (i == i_end) {
-                for (c = 0; c < r->work_channels; c++, d++) {
-                    *d = peaks_data->max_f[c];
-                    peaks_data->max_f[c] = 0;
-                }
-                o_index++, peaks_data->o_counter++;
-            }
-        }
-    }
-
-    pa_memblock_release(input->memblock);
-    pa_memblock_release(output->memblock);
-
-    *out_n_frames = o_index;
-
-    peaks_data->i_counter += in_n_frames;
-
-    /* Normalize counters */
-    while (peaks_data->i_counter >= r->i_ss.rate) {
-        pa_assert(peaks_data->o_counter >= r->o_ss.rate);
-
-        peaks_data->i_counter -= r->i_ss.rate;
-        peaks_data->o_counter -= r->o_ss.rate;
-    }
-
-    return 0;
-}
-
-static void peaks_update_rates_or_reset(pa_resampler *r) {
-    struct peaks_data *peaks_data;
-    pa_assert(r);
-
-    peaks_data = r->impl.data;
-
-    peaks_data->i_counter = 0;
-    peaks_data->o_counter = 0;
-}
-
-static int peaks_init(pa_resampler*r) {
-    struct peaks_data *peaks_data;
-    pa_assert(r);
-    pa_assert(r->i_ss.rate >= r->o_ss.rate);
-    pa_assert(r->work_format == PA_SAMPLE_S16NE || r->work_format == PA_SAMPLE_FLOAT32NE);
-
-    peaks_data = pa_xnew0(struct peaks_data, 1);
-
-    r->impl.resample = peaks_resample;
-    r->impl.update_rates = peaks_update_rates_or_reset;
-    r->impl.reset = peaks_update_rates_or_reset;
-    r->impl.data = peaks_data;
-
-    return 0;
-}
-
-/*** ffmpeg based implementation ***/
-
-static unsigned ffmpeg_resample(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
-    unsigned used_frames = 0, c;
-    int previous_consumed_frames = -1;
-    struct ffmpeg_data *ffmpeg_data;
-
-    pa_assert(r);
-    pa_assert(input);
-    pa_assert(output);
-    pa_assert(out_n_frames);
-
-    ffmpeg_data = r->impl.data;
-
-    for (c = 0; c < r->work_channels; c++) {
-        unsigned u;
-        pa_memblock *b, *w;
-        int16_t *p, *t, *k, *q, *s;
-        int consumed_frames;
-
-        /* Allocate a new block */
-        b = pa_memblock_new(r->mempool, in_n_frames * sizeof(int16_t));
-        p = pa_memblock_acquire(b);
-
-        /* Now copy the input data, splitting up channels */
-        t = (int16_t*) pa_memblock_acquire_chunk(input) + c;
-        k = p;
-        for (u = 0; u < in_n_frames; u++) {
-            *k = *t;
-            t += r->work_channels;
-            k ++;
-        }
-        pa_memblock_release(input->memblock);
-
-        /* Allocate buffer for the result */
-        w = pa_memblock_new(r->mempool, *out_n_frames * sizeof(int16_t));
-        q = pa_memblock_acquire(w);
-
-        /* Now, resample */
-        used_frames = (unsigned) av_resample(ffmpeg_data->state,
-                                             q, p,
-                                             &consumed_frames,
-                                             (int) in_n_frames, (int) *out_n_frames,
-                                             c >= (unsigned) (r->work_channels-1));
-
-        pa_memblock_release(b);
-        pa_memblock_unref(b);
-
-        pa_assert(consumed_frames <= (int) in_n_frames);
-        pa_assert(previous_consumed_frames == -1 || consumed_frames == previous_consumed_frames);
-        previous_consumed_frames = consumed_frames;
-
-        /* And place the results in the output buffer */
-        s = (int16_t *) pa_memblock_acquire_chunk(output) + c;
-        for (u = 0; u < used_frames; u++) {
-            *s = *q;
-            q++;
-            s += r->work_channels;
-        }
-        pa_memblock_release(output->memblock);
-        pa_memblock_release(w);
-        pa_memblock_unref(w);
-    }
-
-    *out_n_frames = used_frames;
-
-    return in_n_frames - previous_consumed_frames;
-}
-
-static void ffmpeg_free(pa_resampler *r) {
-    struct ffmpeg_data *ffmpeg_data;
-
-    pa_assert(r);
-
-    ffmpeg_data = r->impl.data;
-    if (ffmpeg_data->state)
-        av_resample_close(ffmpeg_data->state);
-}
-
-static int ffmpeg_init(pa_resampler *r) {
-    struct ffmpeg_data *ffmpeg_data;
-
-    pa_assert(r);
-
-    ffmpeg_data = pa_xnew(struct ffmpeg_data, 1);
-
-    /* We could probably implement different quality levels by
-     * adjusting the filter parameters here. However, ffmpeg
-     * internally only uses these hardcoded values, so let's use them
-     * here for now as well until ffmpeg makes this configurable. */
-
-    if (!(ffmpeg_data->state = av_resample_init((int) r->o_ss.rate, (int) r->i_ss.rate, 16, 10, 0, 0.8)))
-        return -1;
-
-    r->impl.free = ffmpeg_free;
-    r->impl.resample = ffmpeg_resample;
-    r->impl.data = (void *) ffmpeg_data;
-
-    return 0;
-}
-
 /*** copy (noop) implementation ***/
 
 static int copy_init(pa_resampler *r) {
diff --git a/src/pulsecore/resampler.h b/src/pulsecore/resampler.h
index 058a800..5a84cf0 100644
--- a/src/pulsecore/resampler.h
+++ b/src/pulsecore/resampler.h
@@ -26,6 +26,8 @@
 #include <pulse/channelmap.h>
 #include <pulsecore/memblock.h>
 #include <pulsecore/memchunk.h>
+#include <pulsecore/sconv.h>
+#include <pulsecore/remap.h>
 
 typedef struct pa_resampler pa_resampler;
 typedef struct pa_resampler_impl pa_resampler_impl;
@@ -67,6 +69,45 @@ typedef enum pa_resample_flags {
     PA_RESAMPLER_NO_LFE        = 0x0008U
 } pa_resample_flags_t;
 
+struct pa_resampler {
+    pa_resample_method_t method;
+    pa_resample_flags_t flags;
+
+    pa_sample_spec i_ss, o_ss;
+    pa_channel_map i_cm, o_cm;
+    size_t i_fz, o_fz, w_fz, w_sz;
+    pa_mempool *mempool;
+
+    pa_memchunk to_work_format_buf;
+    pa_memchunk remap_buf;
+    pa_memchunk resample_buf;
+    pa_memchunk from_work_format_buf;
+    size_t to_work_format_buf_size;
+    size_t remap_buf_size;
+    size_t resample_buf_size;
+    size_t from_work_format_buf_size;
+
+    /* points to buffer before resampling stage, remap or to_work */
+    pa_memchunk *leftover_buf;
+    size_t *leftover_buf_size;
+
+    /* have_leftover points to leftover_in_remap or leftover_in_to_work */
+    bool *have_leftover;
+    bool leftover_in_remap;
+    bool leftover_in_to_work;
+
+    pa_sample_format_t work_format;
+    uint8_t work_channels;
+
+    pa_convert_func_t to_work_format_func;
+    pa_convert_func_t from_work_format_func;
+
+    pa_remap_t remap;
+    bool map_required;
+
+    pa_resampler_impl impl;
+};
+
 pa_resampler* pa_resampler_new(
         pa_mempool *pool,
         const pa_sample_spec *a,
@@ -116,4 +157,14 @@ const pa_sample_spec* pa_resampler_input_sample_spec(pa_resampler *r);
 const pa_channel_map* pa_resampler_output_channel_map(pa_resampler *r);
 const pa_sample_spec* pa_resampler_output_sample_spec(pa_resampler *r);
 
+/* Implementation specific init functions */
+int pa_resampler_ffmpeg_init(pa_resampler *r);
+int pa_resampler_libsamplerate_init(pa_resampler *r);
+int pa_resampler_peaks_init(pa_resampler *r);
+int pa_resampler_speex_init(pa_resampler *r);
+int pa_resampler_trivial_init(pa_resampler*r);
+
+/* Resampler-specific quirks */
+bool pa_speex_is_fixed_point(void);
+
 #endif
diff --git a/src/pulsecore/resampler/ffmpeg.c b/src/pulsecore/resampler/ffmpeg.c
new file mode 100644
index 0000000..cc1e3e4
--- /dev/null
+++ b/src/pulsecore/resampler/ffmpeg.c
@@ -0,0 +1,132 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2004-2006 Lennart Poettering
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulse/xmalloc.h>
+#include "pulsecore/ffmpeg/avcodec.h"
+
+#include <pulsecore/resampler.h>
+
+struct ffmpeg_data { /* data specific to ffmpeg */
+    struct AVResampleContext *state;
+};
+
+static unsigned ffmpeg_resample(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
+    unsigned used_frames = 0, c;
+    int previous_consumed_frames = -1;
+    struct ffmpeg_data *ffmpeg_data;
+
+    pa_assert(r);
+    pa_assert(input);
+    pa_assert(output);
+    pa_assert(out_n_frames);
+
+    ffmpeg_data = r->impl.data;
+
+    for (c = 0; c < r->work_channels; c++) {
+        unsigned u;
+        pa_memblock *b, *w;
+        int16_t *p, *t, *k, *q, *s;
+        int consumed_frames;
+
+        /* Allocate a new block */
+        b = pa_memblock_new(r->mempool, in_n_frames * sizeof(int16_t));
+        p = pa_memblock_acquire(b);
+
+        /* Now copy the input data, splitting up channels */
+        t = (int16_t*) pa_memblock_acquire_chunk(input) + c;
+        k = p;
+        for (u = 0; u < in_n_frames; u++) {
+            *k = *t;
+            t += r->work_channels;
+            k ++;
+        }
+        pa_memblock_release(input->memblock);
+
+        /* Allocate buffer for the result */
+        w = pa_memblock_new(r->mempool, *out_n_frames * sizeof(int16_t));
+        q = pa_memblock_acquire(w);
+
+        /* Now, resample */
+        used_frames = (unsigned) av_resample(ffmpeg_data->state,
+                                             q, p,
+                                             &consumed_frames,
+                                             (int) in_n_frames, (int) *out_n_frames,
+                                             c >= (unsigned) (r->work_channels-1));
+
+        pa_memblock_release(b);
+        pa_memblock_unref(b);
+
+        pa_assert(consumed_frames <= (int) in_n_frames);
+        pa_assert(previous_consumed_frames == -1 || consumed_frames == previous_consumed_frames);
+        previous_consumed_frames = consumed_frames;
+
+        /* And place the results in the output buffer */
+        s = (int16_t *) pa_memblock_acquire_chunk(output) + c;
+        for (u = 0; u < used_frames; u++) {
+            *s = *q;
+            q++;
+            s += r->work_channels;
+        }
+        pa_memblock_release(output->memblock);
+        pa_memblock_release(w);
+        pa_memblock_unref(w);
+    }
+
+    *out_n_frames = used_frames;
+
+    return in_n_frames - previous_consumed_frames;
+}
+
+static void ffmpeg_free(pa_resampler *r) {
+    struct ffmpeg_data *ffmpeg_data;
+
+    pa_assert(r);
+
+    ffmpeg_data = r->impl.data;
+    if (ffmpeg_data->state)
+        av_resample_close(ffmpeg_data->state);
+}
+
+int pa_resampler_ffmpeg_init(pa_resampler *r) {
+    struct ffmpeg_data *ffmpeg_data;
+
+    pa_assert(r);
+
+    ffmpeg_data = pa_xnew(struct ffmpeg_data, 1);
+
+    /* We could probably implement different quality levels by
+     * adjusting the filter parameters here. However, ffmpeg
+     * internally only uses these hardcoded values, so let's use them
+     * here for now as well until ffmpeg makes this configurable. */
+
+    if (!(ffmpeg_data->state = av_resample_init((int) r->o_ss.rate, (int) r->i_ss.rate, 16, 10, 0, 0.8)))
+        return -1;
+
+    r->impl.free = ffmpeg_free;
+    r->impl.resample = ffmpeg_resample;
+    r->impl.data = (void *) ffmpeg_data;
+
+    return 0;
+}
diff --git a/src/pulsecore/resampler/libsamplerate.c b/src/pulsecore/resampler/libsamplerate.c
new file mode 100644
index 0000000..34a9ba4
--- /dev/null
+++ b/src/pulsecore/resampler/libsamplerate.c
@@ -0,0 +1,102 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2004-2006 Lennart Poettering
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <samplerate.h>
+
+#include <pulsecore/resampler.h>
+
+static unsigned libsamplerate_resample(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
+    SRC_DATA data;
+    SRC_STATE *state;
+
+    pa_assert(r);
+    pa_assert(input);
+    pa_assert(output);
+    pa_assert(out_n_frames);
+
+    state = r->impl.data;
+    memset(&data, 0, sizeof(data));
+
+    data.data_in = pa_memblock_acquire_chunk(input);
+    data.input_frames = (long int) in_n_frames;
+
+    data.data_out = pa_memblock_acquire_chunk(output);
+    data.output_frames = (long int) *out_n_frames;
+
+    data.src_ratio = (double) r->o_ss.rate / r->i_ss.rate;
+    data.end_of_input = 0;
+
+    pa_assert_se(src_process(state, &data) == 0);
+
+    pa_memblock_release(input->memblock);
+    pa_memblock_release(output->memblock);
+
+    *out_n_frames = (unsigned) data.output_frames_gen;
+
+    return in_n_frames - data.input_frames_used;
+}
+
+static void libsamplerate_update_rates(pa_resampler *r) {
+    SRC_STATE *state;
+    pa_assert(r);
+
+    state = r->impl.data;
+    pa_assert_se(src_set_ratio(state, (double) r->o_ss.rate / r->i_ss.rate) == 0);
+}
+
+static void libsamplerate_reset(pa_resampler *r) {
+    SRC_STATE *state;
+    pa_assert(r);
+
+    state = r->impl.data;
+    pa_assert_se(src_reset(state) == 0);
+}
+
+static void libsamplerate_free(pa_resampler *r) {
+    SRC_STATE *state;
+    pa_assert(r);
+
+    state = r->impl.data;
+    if (state)
+        src_delete(state);
+}
+
+int pa_resampler_libsamplerate_init(pa_resampler *r) {
+    int err;
+    SRC_STATE *state;
+
+    pa_assert(r);
+
+    if (!(state = src_new(r->method, r->work_channels, &err)))
+        return -1;
+
+    r->impl.free = libsamplerate_free;
+    r->impl.update_rates = libsamplerate_update_rates;
+    r->impl.resample = libsamplerate_resample;
+    r->impl.reset = libsamplerate_reset;
+    r->impl.data = state;
+
+    return 0;
+}
diff --git a/src/pulsecore/resampler/peaks.c b/src/pulsecore/resampler/peaks.c
new file mode 100644
index 0000000..d0b7cd0
--- /dev/null
+++ b/src/pulsecore/resampler/peaks.c
@@ -0,0 +1,163 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2004-2006 Lennart Poettering
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulse/xmalloc.h>
+#include <math.h>
+
+#include <pulsecore/resampler.h>
+
+struct peaks_data { /* data specific to the peak finder pseudo resampler */
+    unsigned o_counter;
+    unsigned i_counter;
+
+    float max_f[PA_CHANNELS_MAX];
+    int16_t max_i[PA_CHANNELS_MAX];
+};
+
+static unsigned peaks_resample(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
+    unsigned c, o_index = 0;
+    unsigned i, i_end = 0;
+    void *src, *dst;
+    struct peaks_data *peaks_data;
+
+    pa_assert(r);
+    pa_assert(input);
+    pa_assert(output);
+    pa_assert(out_n_frames);
+
+    peaks_data = r->impl.data;
+    src = pa_memblock_acquire_chunk(input);
+    dst = pa_memblock_acquire_chunk(output);
+
+    i = ((uint64_t) peaks_data->o_counter * r->i_ss.rate) / r->o_ss.rate;
+    i = i > peaks_data->i_counter ? i - peaks_data->i_counter : 0;
+
+    while (i_end < in_n_frames) {
+        i_end = ((uint64_t) (peaks_data->o_counter + 1) * r->i_ss.rate) / r->o_ss.rate;
+        i_end = i_end > peaks_data->i_counter ? i_end - peaks_data->i_counter : 0;
+
+        pa_assert_fp(o_index * r->w_fz < pa_memblock_get_length(output->memblock));
+
+        /* 1ch float is treated separately, because that is the common case */
+        if (r->work_channels == 1 && r->work_format == PA_SAMPLE_FLOAT32NE) {
+            float *s = (float*) src + i;
+            float *d = (float*) dst + o_index;
+
+            for (; i < i_end && i < in_n_frames; i++) {
+                float n = fabsf(*s++);
+
+                if (n > peaks_data->max_f[0])
+                    peaks_data->max_f[0] = n;
+            }
+
+            if (i == i_end) {
+                *d = peaks_data->max_f[0];
+                peaks_data->max_f[0] = 0;
+                o_index++, peaks_data->o_counter++;
+            }
+        } else if (r->work_format == PA_SAMPLE_S16NE) {
+            int16_t *s = (int16_t*) src + r->work_channels * i;
+            int16_t *d = (int16_t*) dst + r->work_channels * o_index;
+
+            for (; i < i_end && i < in_n_frames; i++)
+                for (c = 0; c < r->work_channels; c++) {
+                    int16_t n = abs(*s++);
+
+                    if (n > peaks_data->max_i[c])
+                        peaks_data->max_i[c] = n;
+                }
+
+            if (i == i_end) {
+                for (c = 0; c < r->work_channels; c++, d++) {
+                    *d = peaks_data->max_i[c];
+                    peaks_data->max_i[c] = 0;
+                }
+                o_index++, peaks_data->o_counter++;
+            }
+        } else {
+            float *s = (float*) src + r->work_channels * i;
+            float *d = (float*) dst + r->work_channels * o_index;
+
+            for (; i < i_end && i < in_n_frames; i++)
+                for (c = 0; c < r->work_channels; c++) {
+                    float n = fabsf(*s++);
+
+                    if (n > peaks_data->max_f[c])
+                        peaks_data->max_f[c] = n;
+                }
+
+            if (i == i_end) {
+                for (c = 0; c < r->work_channels; c++, d++) {
+                    *d = peaks_data->max_f[c];
+                    peaks_data->max_f[c] = 0;
+                }
+                o_index++, peaks_data->o_counter++;
+            }
+        }
+    }
+
+    pa_memblock_release(input->memblock);
+    pa_memblock_release(output->memblock);
+
+    *out_n_frames = o_index;
+
+    peaks_data->i_counter += in_n_frames;
+
+    /* Normalize counters */
+    while (peaks_data->i_counter >= r->i_ss.rate) {
+        pa_assert(peaks_data->o_counter >= r->o_ss.rate);
+
+        peaks_data->i_counter -= r->i_ss.rate;
+        peaks_data->o_counter -= r->o_ss.rate;
+    }
+
+    return 0;
+}
+
+static void peaks_update_rates_or_reset(pa_resampler *r) {
+    struct peaks_data *peaks_data;
+    pa_assert(r);
+
+    peaks_data = r->impl.data;
+
+    peaks_data->i_counter = 0;
+    peaks_data->o_counter = 0;
+}
+
+int pa_resampler_peaks_init(pa_resampler*r) {
+    struct peaks_data *peaks_data;
+    pa_assert(r);
+    pa_assert(r->i_ss.rate >= r->o_ss.rate);
+    pa_assert(r->work_format == PA_SAMPLE_S16NE || r->work_format == PA_SAMPLE_FLOAT32NE);
+
+    peaks_data = pa_xnew0(struct peaks_data, 1);
+
+    r->impl.resample = peaks_resample;
+    r->impl.update_rates = peaks_update_rates_or_reset;
+    r->impl.reset = peaks_update_rates_or_reset;
+    r->impl.data = peaks_data;
+
+    return 0;
+}
diff --git a/src/pulsecore/resampler/speex.c b/src/pulsecore/resampler/speex.c
new file mode 100644
index 0000000..e989c3a
--- /dev/null
+++ b/src/pulsecore/resampler/speex.c
@@ -0,0 +1,180 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2004-2006 Lennart Poettering
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <speex/speex_resampler.h>
+#include <math.h>
+
+#include <pulsecore/once.h>
+#include <pulsecore/resampler.h>
+
+bool pa_speex_is_fixed_point(void) {
+    static bool result = false;
+    PA_ONCE_BEGIN {
+        float f_out = -1.0f, f_in = 1.0f;
+        spx_uint32_t in_len = 1, out_len = 1;
+        SpeexResamplerState *s;
+
+        pa_assert_se(s = speex_resampler_init(1, 1, 1,
+            SPEEX_RESAMPLER_QUALITY_MIN, NULL));
+
+        /* feed one sample that is too soft for fixed-point speex */
+        pa_assert_se(speex_resampler_process_float(s, 0, &f_in, &in_len,
+            &f_out, &out_len) == RESAMPLER_ERR_SUCCESS);
+
+        /* expecting sample has been processed, one sample output */
+        pa_assert_se(in_len == 1 && out_len == 1);
+
+        /* speex compiled with --enable-fixed-point will output 0.0 due to insufficient precision */
+        if (fabsf(f_out) < 0.00001f)
+            result = true;
+
+        speex_resampler_destroy(s);
+    } PA_ONCE_END;
+    return result;
+}
+
+
+static unsigned speex_resample_float(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
+    float *in, *out;
+    uint32_t inf = in_n_frames, outf = *out_n_frames;
+    SpeexResamplerState *state;
+
+    pa_assert(r);
+    pa_assert(input);
+    pa_assert(output);
+    pa_assert(out_n_frames);
+
+    state = r->impl.data;
+
+    in = pa_memblock_acquire_chunk(input);
+    out = pa_memblock_acquire_chunk(output);
+
+    /* Strictly speaking, speex resampler expects its input
+     * to be normalized to the [-32768.0 .. 32767.0] range.
+     * This matters if speex has been compiled with --enable-fixed-point,
+     * because such speex will round the samples to the nearest
+     * integer. speex with --enable-fixed-point is therefore incompatible
+     * with PulseAudio's floating-point sample range [-1 .. 1]. speex
+     * without --enable-fixed-point works fine with this range.
+     * Care has been taken to call speex_resample_float() only
+     * for speex compiled without --enable-fixed-point.
+     */
+    pa_assert_se(speex_resampler_process_interleaved_float(state, in, &inf, out, &outf) == 0);
+
+    pa_memblock_release(input->memblock);
+    pa_memblock_release(output->memblock);
+
+    pa_assert(inf == in_n_frames);
+    *out_n_frames = outf;
+
+    return 0;
+}
+
+static unsigned speex_resample_int(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
+    int16_t *in, *out;
+    uint32_t inf = in_n_frames, outf = *out_n_frames;
+    SpeexResamplerState *state;
+
+    pa_assert(r);
+    pa_assert(input);
+    pa_assert(output);
+    pa_assert(out_n_frames);
+
+    state = r->impl.data;
+
+    in = pa_memblock_acquire_chunk(input);
+    out = pa_memblock_acquire_chunk(output);
+
+    pa_assert_se(speex_resampler_process_interleaved_int(state, in, &inf, out, &outf) == 0);
+
+    pa_memblock_release(input->memblock);
+    pa_memblock_release(output->memblock);
+
+    pa_assert(inf == in_n_frames);
+    *out_n_frames = outf;
+
+    return 0;
+}
+
+static void speex_update_rates(pa_resampler *r) {
+    SpeexResamplerState *state;
+    pa_assert(r);
+
+    state = r->impl.data;
+
+    pa_assert_se(speex_resampler_set_rate(state, r->i_ss.rate, r->o_ss.rate) == 0);
+}
+
+static void speex_reset(pa_resampler *r) {
+    SpeexResamplerState *state;
+    pa_assert(r);
+
+    state = r->impl.data;
+
+    pa_assert_se(speex_resampler_reset_mem(state) == 0);
+}
+
+static void speex_free(pa_resampler *r) {
+    SpeexResamplerState *state;
+    pa_assert(r);
+
+    state = r->impl.data;
+    if (!state)
+        return;
+
+    speex_resampler_destroy(state);
+}
+
+int pa_resampler_speex_init(pa_resampler *r) {
+    int q, err;
+    SpeexResamplerState *state;
+
+    pa_assert(r);
+
+    r->impl.free = speex_free;
+    r->impl.update_rates = speex_update_rates;
+    r->impl.reset = speex_reset;
+
+    if (r->method >= PA_RESAMPLER_SPEEX_FIXED_BASE && r->method <= PA_RESAMPLER_SPEEX_FIXED_MAX) {
+
+        q = r->method - PA_RESAMPLER_SPEEX_FIXED_BASE;
+        r->impl.resample = speex_resample_int;
+
+    } else {
+        pa_assert(r->method >= PA_RESAMPLER_SPEEX_FLOAT_BASE && r->method <= PA_RESAMPLER_SPEEX_FLOAT_MAX);
+
+        q = r->method - PA_RESAMPLER_SPEEX_FLOAT_BASE;
+        r->impl.resample = speex_resample_float;
+    }
+
+    pa_log_info("Choosing speex quality setting %i.", q);
+
+    if (!(state = speex_resampler_init(r->work_channels, r->i_ss.rate, r->o_ss.rate, q, &err)))
+        return -1;
+
+    r->impl.data = state;
+
+    return 0;
+}
diff --git a/src/pulsecore/resampler/trivial.c b/src/pulsecore/resampler/trivial.c
new file mode 100644
index 0000000..be15295
--- /dev/null
+++ b/src/pulsecore/resampler/trivial.c
@@ -0,0 +1,102 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2004-2006 Lennart Poettering
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pulse/xmalloc.h>
+
+#include <pulsecore/resampler.h>
+
+struct trivial_data { /* data specific to the trivial resampler */
+    unsigned o_counter;
+    unsigned i_counter;
+};
+
+static unsigned trivial_resample(pa_resampler *r, const pa_memchunk *input, unsigned in_n_frames, pa_memchunk *output, unsigned *out_n_frames) {
+    unsigned i_index, o_index;
+    void *src, *dst;
+    struct trivial_data *trivial_data;
+
+    pa_assert(r);
+    pa_assert(input);
+    pa_assert(output);
+    pa_assert(out_n_frames);
+
+    trivial_data = r->impl.data;
+
+    src = pa_memblock_acquire_chunk(input);
+    dst = pa_memblock_acquire_chunk(output);
+
+    for (o_index = 0;; o_index++, trivial_data->o_counter++) {
+        i_index = ((uint64_t) trivial_data->o_counter * r->i_ss.rate) / r->o_ss.rate;
+        i_index = i_index > trivial_data->i_counter ? i_index - trivial_data->i_counter : 0;
+
+        if (i_index >= in_n_frames)
+            break;
+
+        pa_assert_fp(o_index * r->w_fz < pa_memblock_get_length(output->memblock));
+
+        memcpy((uint8_t*) dst + r->w_fz * o_index, (uint8_t*) src + r->w_fz * i_index, (int) r->w_fz);
+    }
+
+    pa_memblock_release(input->memblock);
+    pa_memblock_release(output->memblock);
+
+    *out_n_frames = o_index;
+
+    trivial_data->i_counter += in_n_frames;
+
+    /* Normalize counters */
+    while (trivial_data->i_counter >= r->i_ss.rate) {
+        pa_assert(trivial_data->o_counter >= r->o_ss.rate);
+
+        trivial_data->i_counter -= r->i_ss.rate;
+        trivial_data->o_counter -= r->o_ss.rate;
+    }
+
+    return 0;
+}
+
+static void trivial_update_rates_or_reset(pa_resampler *r) {
+    struct trivial_data *trivial_data;
+    pa_assert(r);
+
+    trivial_data = r->impl.data;
+
+    trivial_data->i_counter = 0;
+    trivial_data->o_counter = 0;
+}
+
+int pa_resampler_trivial_init(pa_resampler *r) {
+    struct trivial_data *trivial_data;
+    pa_assert(r);
+
+    trivial_data = pa_xnew0(struct trivial_data, 1);
+
+    r->impl.resample = trivial_resample;
+    r->impl.update_rates = trivial_update_rates_or_reset;
+    r->impl.reset = trivial_update_rates_or_reset;
+    r->impl.data = trivial_data;
+
+    return 0;
+}
diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c
index 09e5e8a..5f3ca8b 100644
--- a/src/pulsecore/rtpoll.c
+++ b/src/pulsecore/rtpoll.c
@@ -203,7 +203,7 @@ static void reset_all_revents(pa_rtpoll *p) {
     }
 }
 
-int pa_rtpoll_run(pa_rtpoll *p, bool wait_op) {
+int pa_rtpoll_run(pa_rtpoll *p) {
     pa_rtpoll_item *i;
     int r = 0;
     struct timeval timeout;
@@ -285,7 +285,7 @@ int pa_rtpoll_run(pa_rtpoll *p, bool wait_op) {
     pa_zero(timeout);
 
     /* Calculate timeout */
-    if (wait_op && !p->quit && p->timer_enabled) {
+    if (!p->quit && p->timer_enabled) {
         struct timeval now;
         pa_rtclock_get(&now);
 
@@ -298,10 +298,12 @@ int pa_rtpoll_run(pa_rtpoll *p, bool wait_op) {
         pa_usec_t now = pa_rtclock_now();
         p->awake = now - p->timestamp;
         p->timestamp = now;
-        if (!wait_op || p->quit || p->timer_enabled)
+        if (!p->quit && p->timer_enabled)
             pa_log("poll timeout: %d ms ",(int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)));
-        else
+        else if (q->quit)
             pa_log("poll timeout is ZERO");
+        else
+            pa_log("poll timeout is FOREVER");
     }
 #endif
 
@@ -311,10 +313,10 @@ int pa_rtpoll_run(pa_rtpoll *p, bool wait_op) {
         struct timespec ts;
         ts.tv_sec = timeout.tv_sec;
         ts.tv_nsec = timeout.tv_usec * 1000;
-        r = ppoll(p->pollfd, p->n_pollfd_used, (!wait_op || p->quit || p->timer_enabled) ? &ts : NULL, NULL);
+        r = ppoll(p->pollfd, p->n_pollfd_used, (p->quit || p->timer_enabled) ? &ts : NULL, NULL);
     }
 #else
-    r = pa_poll(p->pollfd, p->n_pollfd_used, (!wait_op || p->quit || p->timer_enabled) ? (int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)) : -1);
+    r = pa_poll(p->pollfd, p->n_pollfd_used, (p->quit || p->timer_enabled) ? (int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)) : -1);
 #endif
 
     p->timer_elapsed = r == 0;
diff --git a/src/pulsecore/rtpoll.h b/src/pulsecore/rtpoll.h
index 43ff5e6..c0a4dda 100644
--- a/src/pulsecore/rtpoll.h
+++ b/src/pulsecore/rtpoll.h
@@ -41,7 +41,7 @@
  * 3) It allows arbitrary functions to be run before entering the
  * actual poll() and after it.
  *
- * Only a single interval timer is supported..*/
+ * Only a single interval timer is supported. */
 
 typedef struct pa_rtpoll pa_rtpoll;
 typedef struct pa_rtpoll_item pa_rtpoll_item;
@@ -57,11 +57,10 @@ pa_rtpoll *pa_rtpoll_new(void);
 void pa_rtpoll_free(pa_rtpoll *p);
 
 /* Sleep on the rtpoll until the time event, or any of the fd events
- * is triggered. If "wait" is 0 we don't sleep but only update the
- * struct pollfd. Returns negative on error, positive if the loop
+ * is triggered. Returns negative on error, positive if the loop
  * should continue to run, 0 when the loop should be terminated
  * cleanly. */
-int pa_rtpoll_run(pa_rtpoll *f, bool wait);
+int pa_rtpoll_run(pa_rtpoll *f);
 
 void pa_rtpoll_set_timer_absolute(pa_rtpoll *p, pa_usec_t usec);
 void pa_rtpoll_set_timer_relative(pa_rtpoll *p, pa_usec_t usec);
diff --git a/src/pulsecore/sample-util.c b/src/pulsecore/sample-util.c
index dc5c1fd..539f3b8 100644
--- a/src/pulsecore/sample-util.c
+++ b/src/pulsecore/sample-util.c
@@ -296,9 +296,9 @@ void pa_sample_clamp(pa_sample_format_t format, void *dst, size_t dstr, const vo
         for (; n > 0; n--) {
             float f;
 
-            f = PA_FLOAT32_SWAP(*s);
+            f = PA_READ_FLOAT32RE(s);
             f = PA_CLAMP_UNLIKELY(f, -1.0f, 1.0f);
-            *d = PA_FLOAT32_SWAP(f);
+            PA_WRITE_FLOAT32RE(d, f);
 
             s = (const float*) ((const uint8_t*) s + sstr);
             d = (float*) ((uint8_t*) d + dstr);
diff --git a/src/pulsecore/sconv-s16le.c b/src/pulsecore/sconv-s16le.c
index 45cf972..0c1d16c 100644
--- a/src/pulsecore/sconv-s16le.c
+++ b/src/pulsecore/sconv-s16le.c
@@ -157,8 +157,7 @@ void pa_sconv_s16le_to_float32re(unsigned n, const int16_t *a, float *b) {
     for (; n > 0; n--) {
         int16_t s = *(a++);
         float k = INT16_FROM(s) * (1.0f / (1 << 15));
-        k = PA_FLOAT32_SWAP(k);
-        *(b++) = k;
+        PA_WRITE_FLOAT32RE(b++, k);
     }
 }
 
@@ -169,8 +168,7 @@ void pa_sconv_s32le_to_float32re(unsigned n, const int32_t *a, float *b) {
     for (; n > 0; n--) {
         int32_t s = *(a++);
         float k = INT32_FROM(s) * (1.0f / (1U << 31));
-        k = PA_FLOAT32_SWAP(k);
-        *(b++) = k;
+        PA_WRITE_FLOAT32RE(b++, k);
     }
 }
 
@@ -180,8 +178,7 @@ void pa_sconv_s16le_from_float32re(unsigned n, const float *a, int16_t *b) {
 
     for (; n > 0; n--) {
         int16_t s;
-        float v = *(a++);
-        v = PA_FLOAT32_SWAP(v) * (1 << 15);
+        float v = PA_READ_FLOAT32RE(a++) * (1 << 15);
         s = (int16_t) PA_CLAMP_UNLIKELY(lrintf(v), -0x8000, 0x7FFF);
         *(b++) = INT16_TO(s);
     }
@@ -193,8 +190,7 @@ void pa_sconv_s32le_from_float32re(unsigned n, const float *a, int32_t *b) {
 
     for (; n > 0; n--) {
         int32_t s;
-        float v = *(a++);
-        v = PA_FLOAT32_SWAP(v) * (1U << 31);
+        float v = PA_READ_FLOAT32RE(a++) * (1U << 31);
         s = (int32_t) PA_CLAMP_UNLIKELY(llrintf(v), -0x80000000LL, 0x7FFFFFFFLL);
         *(b++) = INT32_TO(s);
     }
@@ -325,7 +321,7 @@ void pa_sconv_s24le_to_float32re(unsigned n, const uint8_t *a, float *b) {
     for (; n > 0; n--) {
         int32_t s = READ24(a) << 8;
         float k = s * (1.0f / (1U << 31));
-        *b = PA_FLOAT32_SWAP(k);
+        PA_WRITE_FLOAT32RE(b, k);
         a += 3;
         b++;
     }
@@ -337,8 +333,7 @@ void pa_sconv_s24le_from_float32re(unsigned n, const float *a, uint8_t *b) {
 
     for (; n > 0; n--) {
         int32_t s;
-        float v = *a;
-        v = PA_FLOAT32_SWAP(v) * (1U << 31);
+        float v = PA_READ_FLOAT32RE(a) * (1U << 31);
         s = (int32_t) PA_CLAMP_UNLIKELY(llrint(v), -0x80000000LL, 0x7FFFFFFFLL);
         WRITE24(b, ((uint32_t) s) >> 8);
         a++;
@@ -411,7 +406,7 @@ void pa_sconv_s24_32le_to_float32re(unsigned n, const uint32_t *a, float *b) {
     for (; n > 0; n--) {
         int32_t s = (int32_t) (UINT32_FROM(*a) << 8);
         float k = s * (1.0f / (1U << 31));
-        *b = PA_FLOAT32_SWAP(k);
+        PA_WRITE_FLOAT32RE(b, k);
         a++;
         b++;
     }
@@ -437,8 +432,7 @@ void pa_sconv_s24_32le_from_float32re(unsigned n, const float *a, uint32_t *b) {
 
     for (; n > 0; n--) {
         int32_t s;
-        float v = *a;
-        v = PA_FLOAT32_SWAP(v) * (1U << 31);
+        float v = PA_READ_FLOAT32RE(a) * (1U << 31);
         s = (int32_t) PA_CLAMP_UNLIKELY(llrint(v), -0x80000000LL, 0x7FFFFFFFLL);
         *b = UINT32_TO(((uint32_t) s) >> 8);
         a++;
diff --git a/src/pulsecore/sconv_neon.c b/src/pulsecore/sconv_neon.c
index 071ba85..11d94d2 100644
--- a/src/pulsecore/sconv_neon.c
+++ b/src/pulsecore/sconv_neon.c
@@ -18,8 +18,6 @@
 #include <config.h>
 #endif
 
-#include <pulse/rtclock.h>
-
 #include <pulsecore/macro.h>
 #include <pulsecore/endianmacros.h>
 
@@ -60,9 +58,10 @@ static void pa_sconv_s16le_from_f32ne_neon(unsigned n, const float *src, int16_t
 
 static void pa_sconv_s16le_to_f32ne_neon(unsigned n, const int16_t *src, float *dst) {
     unsigned i = n & 3;
+    const float invscale = 1.0f / (1 << 15);
 
     __asm__ __volatile__ (
-        "movs        %[n], %[n], lsr #2     \n\t"
+        "movs       %[n], %[n], lsr #2      \n\t"
         "beq        2f                      \n\t"
 
         "1:                                 \n\t"
@@ -81,7 +80,6 @@ static void pa_sconv_s16le_to_f32ne_neon(unsigned n, const int16_t *src, float *
     );
 
     /* leftovers */
-    const float invscale = 1.0f / (1 << 15);
     while (i--) {
         *dst++ = *src++ * invscale;
     }
@@ -91,4 +89,8 @@ void pa_convert_func_init_neon(pa_cpu_arm_flag_t flags) {
     pa_log_info("Initialising ARM NEON optimized conversions.");
     pa_set_convert_from_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_neon);
     pa_set_convert_to_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_to_f32ne_neon);
+#ifndef WORDS_BIGENDIAN
+    pa_set_convert_from_s16ne_function(PA_SAMPLE_FLOAT32LE, (pa_convert_func_t) pa_sconv_s16le_to_f32ne_neon);
+    pa_set_convert_to_s16ne_function(PA_SAMPLE_FLOAT32LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_neon);
+#endif
 }
diff --git a/src/pulsecore/sconv_sse.c b/src/pulsecore/sconv_sse.c
index 10943ba..9cfb9d9 100644
--- a/src/pulsecore/sconv_sse.c
+++ b/src/pulsecore/sconv_sse.c
@@ -168,10 +168,11 @@ void pa_convert_func_init_sse(pa_cpu_x86_flag_t flags) {
     if (flags & PA_CPU_X86_SSE2) {
         pa_log_info("Initialising SSE2 optimized conversions.");
         pa_set_convert_from_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse2);
-
+        pa_set_convert_to_s16ne_function(PA_SAMPLE_FLOAT32LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse2);
     } else if (flags & PA_CPU_X86_SSE) {
         pa_log_info("Initialising SSE optimized conversions.");
         pa_set_convert_from_float32ne_function(PA_SAMPLE_S16LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse);
+        pa_set_convert_to_s16ne_function(PA_SAMPLE_FLOAT32LE, (pa_convert_func_t) pa_sconv_s16le_from_f32ne_sse);
     }
 
 #endif /* defined (__i386__) || defined (__amd64__) */
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index efaee57..075c8bd 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -290,16 +290,17 @@ void pa_shm_punch(pa_shm *m, size_t offset, size_t size) {
 
 #ifdef HAVE_SHM_OPEN
 
-int pa_shm_attach_ro(pa_shm *m, unsigned id) {
+int pa_shm_attach(pa_shm *m, unsigned id, bool writable) {
     char fn[32];
     int fd = -1;
+    int prot;
     struct stat st;
 
     pa_assert(m);
 
     segment_name(fn, sizeof(fn), m->id = id);
 
-    if ((fd = shm_open(fn, O_RDONLY, 0)) < 0) {
+    if ((fd = shm_open(fn, writable ? O_RDWR : O_RDONLY, 0)) < 0) {
         if (errno != EACCES && errno != ENOENT)
             pa_log("shm_open() failed: %s", pa_cstrerror(errno));
         goto fail;
@@ -319,7 +320,8 @@ int pa_shm_attach_ro(pa_shm *m, unsigned id) {
 
     m->size = (size_t) st.st_size;
 
-    if ((m->ptr = mmap(NULL, PA_PAGE_ALIGN(m->size), PROT_READ, MAP_SHARED, fd, (off_t) 0)) == MAP_FAILED) {
+    prot = writable ? PROT_READ | PROT_WRITE : PROT_READ;
+    if ((m->ptr = mmap(NULL, PA_PAGE_ALIGN(m->size), prot, MAP_SHARED, fd, (off_t) 0)) == MAP_FAILED) {
         pa_log("mmap() failed: %s", pa_cstrerror(errno));
         goto fail;
     }
@@ -340,7 +342,7 @@ fail:
 
 #else /* HAVE_SHM_OPEN */
 
-int pa_shm_attach_ro(pa_shm *m, unsigned id) {
+int pa_shm_attach(pa_shm *m, unsigned id, bool writable) {
     return -1;
 }
 
@@ -375,7 +377,7 @@ int pa_shm_cleanup(void) {
         if (pa_atou(de->d_name + SHM_ID_LEN, &id) < 0)
             continue;
 
-        if (pa_shm_attach_ro(&seg, id) < 0)
+        if (pa_shm_attach(&seg, id, false) < 0)
             continue;
 
         if (seg.size < SHM_MARKER_SIZE) {
diff --git a/src/pulsecore/shm.h b/src/pulsecore/shm.h
index 9d61551..2238239 100644
--- a/src/pulsecore/shm.h
+++ b/src/pulsecore/shm.h
@@ -35,7 +35,7 @@ typedef struct pa_shm {
 } pa_shm;
 
 int pa_shm_create_rw(pa_shm *m, size_t size, bool shared, mode_t mode);
-int pa_shm_attach_ro(pa_shm *m, unsigned id);
+int pa_shm_attach(pa_shm *m, unsigned id, bool writable);
 
 void pa_shm_punch(pa_shm *m, size_t offset, size_t size);
 
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index f85b2c7..8e773ec 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -179,7 +179,7 @@ void pa_sink_input_new_data_set_muted(pa_sink_input_new_data *data, bool mute) {
     pa_assert(data);
 
     data->muted_is_set = true;
-    data->muted = !!mute;
+    data->muted = mute;
 }
 
 bool pa_sink_input_new_data_set_sink(pa_sink_input_new_data *data, pa_sink *s, bool save) {
@@ -644,7 +644,7 @@ static void sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state)
 /* Called from main context */
 void pa_sink_input_unlink(pa_sink_input *i) {
     bool linked;
-    pa_source_output *o, *p = NULL;
+    pa_source_output *o, PA_UNUSED *p = NULL;
 
     pa_assert(i);
     pa_assert_ctl_context();
@@ -1096,7 +1096,7 @@ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sam
                 i->process_rewind(i, amount);
             called = true;
 
-            /* Convert back to to sink domain */
+            /* Convert back to sink domain */
             if (i->thread_info.resampler)
                 amount = pa_resampler_result(i->thread_info.resampler, amount);
 
@@ -1260,7 +1260,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s
         return;
     }
 
-    i->volume = *volume;
+    pa_sink_input_set_volume_direct(i, volume);
     i->save_volume = save;
 
     if (pa_sink_flat_volume_enabled(i->sink)) {
@@ -1273,18 +1273,11 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s
         /* OK, we are in normal volume mode. The volume only affects
          * ourselves */
         set_real_ratio(i, volume);
-        i->reference_ratio = i->volume;
+        pa_sink_input_set_reference_ratio(i, &i->volume);
 
         /* Copy the new soft_volume to the thread_info struct */
         pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_SOFT_VOLUME, NULL, 0, NULL) == 0);
     }
-
-    /* The volume changed, let's tell people so */
-    if (i->volume_changed)
-        i->volume_changed(i);
-
-    /* The virtual volume changed, let's tell people so */
-    pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
 }
 
 void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor) {
@@ -1324,13 +1317,9 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) {
     pa_assert_ctl_context();
     pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
 
-    v = pa_hashmap_remove(i->volume_factor_items, key);
-
-    if (!v)
+    if (pa_hashmap_remove_and_free(i->volume_factor_items, key) < 0)
         return -1;
 
-    volume_factor_entry_free(v);
-
     switch (pa_hashmap_size(i->volume_factor_items)) {
         case 0:
             pa_cvolume_reset(&i->volume_factor, i->sample_spec.channels);
@@ -1410,16 +1399,22 @@ pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool
 
 /* Called from main context */
 void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save) {
+    bool old_mute;
+
     pa_sink_input_assert_ref(i);
     pa_assert_ctl_context();
     pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
 
-    if (!i->muted == !mute) {
-        i->save_muted = i->save_muted || mute;
+    old_mute = i->muted;
+
+    if (mute == old_mute) {
+        i->save_muted |= save;
         return;
     }
 
     i->muted = mute;
+    pa_log_debug("The mute of sink input %u changed from %s to %s.", i->index, pa_yes_no(old_mute), pa_yes_no(mute));
+
     i->save_muted = save;
 
     pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_SOFT_MUTE, NULL, 0, NULL) == 0);
@@ -1429,15 +1424,7 @@ void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save) {
         i->mute_changed(i);
 
     pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
-}
-
-/* Called from main context */
-bool pa_sink_input_get_mute(pa_sink_input *i) {
-    pa_sink_input_assert_ref(i);
-    pa_assert_ctl_context();
-    pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
-
-    return i->muted;
+    pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_MUTE_CHANGED], i);
 }
 
 /* Called from main thread */
@@ -1532,7 +1519,7 @@ bool pa_sink_input_may_move(pa_sink_input *i) {
 }
 
 static bool find_filter_sink_input(pa_sink_input *target, pa_sink *s) {
-    int i = 0;
+    unsigned PA_UNUSED i = 0;
     while (s && s->input_to_master) {
         if (s->input_to_master == target)
             return true;
@@ -1578,7 +1565,7 @@ bool pa_sink_input_may_move_to(pa_sink_input *i, pa_sink *dest) {
 
 /* Called from main context */
 int pa_sink_input_start_move(pa_sink_input *i) {
-    pa_source_output *o, *p = NULL;
+    pa_source_output *o, PA_UNUSED *p = NULL;
     struct volume_factor_entry *v;
     void *state = NULL;
     int r;
@@ -1635,7 +1622,7 @@ int pa_sink_input_start_move(pa_sink_input *i) {
  * then also the origin sink and all streams connected to it need to update
  * their volume - this function does all that by using recursion. */
 static void update_volume_due_to_moving(pa_sink_input *i, pa_sink *dest) {
-    pa_cvolume old_volume;
+    pa_cvolume new_volume;
 
     pa_assert(i);
     pa_assert(dest);
@@ -1684,19 +1671,11 @@ static void update_volume_due_to_moving(pa_sink_input *i, pa_sink *dest) {
              *          always have volume_factor as soft_volume, so no change
              *          should be needed) */
 
-            old_volume = i->volume;
-            pa_cvolume_reset(&i->volume, i->volume.channels);
-            pa_cvolume_reset(&i->reference_ratio, i->reference_ratio.channels);
+            pa_cvolume_reset(&new_volume, i->volume.channels);
+            pa_sink_input_set_volume_direct(i, &new_volume);
+            pa_sink_input_set_reference_ratio(i, &new_volume);
             pa_assert(pa_cvolume_is_norm(&i->real_ratio));
             pa_assert(pa_cvolume_equal(&i->soft_volume, &i->volume_factor));
-
-            /* Notify others about the changed sink input volume. */
-            if (!pa_cvolume_equal(&i->volume, &old_volume)) {
-                if (i->volume_changed)
-                    i->volume_changed(i);
-
-                pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
-            }
         }
 
         /* Additionally, the origin sink volume needs updating:
@@ -1707,33 +1686,27 @@ static void update_volume_due_to_moving(pa_sink_input *i, pa_sink *dest) {
          *         (sinks that use volume sharing should always have
          *          soft_volume of 0 dB) */
 
-        old_volume = i->origin_sink->reference_volume;
-
-        i->origin_sink->reference_volume = root_sink->reference_volume;
-        pa_cvolume_remap(&i->origin_sink->reference_volume, &root_sink->channel_map, &i->origin_sink->channel_map);
+        new_volume = root_sink->reference_volume;
+        pa_cvolume_remap(&new_volume, &root_sink->channel_map, &i->origin_sink->channel_map);
+        pa_sink_set_reference_volume_direct(i->origin_sink, &new_volume);
 
         i->origin_sink->real_volume = root_sink->real_volume;
         pa_cvolume_remap(&i->origin_sink->real_volume, &root_sink->channel_map, &i->origin_sink->channel_map);
 
         pa_assert(pa_cvolume_is_norm(&i->origin_sink->soft_volume));
 
-        /* Notify others about the changed sink volume. If you wonder whether
-         * i->origin_sink->set_volume() should be called somewhere, that's not
-         * the case, because sinks that use volume sharing shouldn't have any
-         * internal volume that set_volume() would update. If you wonder
-         * whether the thread_info variables should be synced, yes, they
-         * should, and it's done by the PA_SINK_MESSAGE_FINISH_MOVE message
-         * handler. */
-        if (!pa_cvolume_equal(&i->origin_sink->reference_volume, &old_volume))
-            pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, i->origin_sink->index);
+        /* If you wonder whether i->origin_sink->set_volume() should be called
+         * somewhere, that's not the case, because sinks that use volume
+         * sharing shouldn't have any internal volume that set_volume() would
+         * update. If you wonder whether the thread_info variables should be
+         * synced, yes, they should, and it's done by the
+         * PA_SINK_MESSAGE_FINISH_MOVE message handler. */
 
         /* Recursively update origin sink inputs. */
         PA_IDXSET_FOREACH(origin_sink_input, i->origin_sink->inputs, idx)
             update_volume_due_to_moving(origin_sink_input, dest);
 
     } else {
-        old_volume = i->volume;
-
         if (pa_sink_flat_volume_enabled(i->sink)) {
             /* Ok, so this is a regular stream, and flat volume is enabled. The
              * volume will have to be updated as follows:
@@ -1745,9 +1718,10 @@ static void update_volume_due_to_moving(pa_sink_input *i, pa_sink *dest) {
              *     i->soft_volume := i->real_ratio * i->volume_factor
              *         (handled later by pa_sink_set_volume) */
 
-            i->volume = i->sink->reference_volume;
-            pa_cvolume_remap(&i->volume, &i->sink->channel_map, &i->channel_map);
-            pa_sw_cvolume_multiply(&i->volume, &i->volume, &i->reference_ratio);
+            new_volume = i->sink->reference_volume;
+            pa_cvolume_remap(&new_volume, &i->sink->channel_map, &i->channel_map);
+            pa_sw_cvolume_multiply(&new_volume, &new_volume, &i->reference_ratio);
+            pa_sink_input_set_volume_direct(i, &new_volume);
 
         } else {
             /* Ok, so this is a regular stream, and flat volume is disabled.
@@ -1758,21 +1732,10 @@ static void update_volume_due_to_moving(pa_sink_input *i, pa_sink *dest) {
              *     i->real_ratio := i->reference_ratio
              *     i->soft_volume := i->real_ratio * i->volume_factor */
 
-            i->volume = i->reference_ratio;
+            pa_sink_input_set_volume_direct(i, &i->reference_ratio);
             i->real_ratio = i->reference_ratio;
             pa_sw_cvolume_multiply(&i->soft_volume, &i->real_ratio, &i->volume_factor);
         }
-
-        /* Notify others about the changed sink input volume. */
-        if (!pa_cvolume_equal(&i->volume, &old_volume)) {
-            /* XXX: In case i->sink has flat volume enabled, then real_ratio
-             * and soft_volume are not updated yet. Let's hope that the
-             * callback implementation doesn't care about those variables... */
-            if (i->volume_changed)
-                i->volume_changed(i);
-
-            pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
-        }
     }
 
     /* If i->sink == dest, then recursion has finished, and we can finally call
@@ -2249,3 +2212,53 @@ int pa_sink_input_update_rate(pa_sink_input *i) {
 
     return 0;
 }
+
+/* Called from the main thread. */
+void pa_sink_input_set_volume_direct(pa_sink_input *i, const pa_cvolume *volume) {
+    pa_cvolume old_volume;
+    char old_volume_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+    char new_volume_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+
+    pa_assert(i);
+    pa_assert(volume);
+
+    old_volume = i->volume;
+
+    if (pa_cvolume_equal(volume, &old_volume))
+        return;
+
+    i->volume = *volume;
+    pa_log_debug("The volume of sink input %u changed from %s to %s.", i->index,
+                 pa_cvolume_snprint_verbose(old_volume_str, sizeof(old_volume_str), &old_volume, &i->channel_map, true),
+                 pa_cvolume_snprint_verbose(new_volume_str, sizeof(new_volume_str), volume, &i->channel_map, true));
+
+    if (i->volume_changed)
+        i->volume_changed(i);
+
+    pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
+    pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_VOLUME_CHANGED], i);
+}
+
+/* Called from the main thread. */
+void pa_sink_input_set_reference_ratio(pa_sink_input *i, const pa_cvolume *ratio) {
+    pa_cvolume old_ratio;
+    char old_ratio_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+    char new_ratio_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+
+    pa_assert(i);
+    pa_assert(ratio);
+
+    old_ratio = i->reference_ratio;
+
+    if (pa_cvolume_equal(ratio, &old_ratio))
+        return;
+
+    i->reference_ratio = *ratio;
+
+    if (!PA_SINK_INPUT_IS_LINKED(i->state))
+        return;
+
+    pa_log_debug("Sink input %u reference ratio changed from %s to %s.", i->index,
+                 pa_cvolume_snprint_verbose(old_ratio_str, sizeof(old_ratio_str), &old_ratio, &i->channel_map, true),
+                 pa_cvolume_snprint_verbose(new_ratio_str, sizeof(new_ratio_str), ratio, &i->channel_map, true));
+}
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index da33717..15f9315 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -375,7 +375,6 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key);
 pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute);
 
 void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save);
-bool pa_sink_input_get_mute(pa_sink_input *i);
 
 void pa_sink_input_update_proplist(pa_sink_input *i, pa_update_mode_t mode, pa_proplist *p);
 
@@ -417,6 +416,19 @@ bool pa_sink_input_process_underrun(pa_sink_input *i);
 
 pa_memchunk* pa_sink_input_get_silence(pa_sink_input *i, pa_memchunk *ret);
 
+/* Called from the main thread, from sink.c only. The normal way to set the
+ * sink input volume is to call pa_sink_input_set_volume(), but the flat volume
+ * logic in sink.c needs also a function that doesn't do all the extra stuff
+ * that pa_sink_input_set_volume() does. This function simply sets i->volume
+ * and fires change notifications. */
+void pa_sink_input_set_volume_direct(pa_sink_input *i, const pa_cvolume *volume);
+
+/* Called from the main thread, from sink.c only. This shouldn't be a public
+ * function, but the flat volume logic in sink.c currently needs a way to
+ * directly set the sink input reference ratio. This function simply sets
+ * i->reference_ratio and logs a message if the value changes. */
+void pa_sink_input_set_reference_ratio(pa_sink_input *i, const pa_cvolume *ratio);
+
 #define pa_sink_input_assert_io_context(s) \
     pa_assert(pa_thread_mq_get() || !PA_SINK_INPUT_IS_LINKED((s)->state))
 
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index f4647b8..8e2b5c8 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -126,7 +126,7 @@ void pa_sink_new_data_set_muted(pa_sink_new_data *data, bool mute) {
     pa_assert(data);
 
     data->muted_is_set = true;
-    data->muted = !!mute;
+    data->muted = mute;
 }
 
 void pa_sink_new_data_set_port(pa_sink_new_data *data, const char *port) {
@@ -231,10 +231,16 @@ pa_sink* pa_sink_new(
     if (data->card)
         pa_proplist_update(data->proplist, PA_UPDATE_MERGE, data->card->proplist);
 
-    pa_device_init_description(data->proplist);
+    pa_device_init_description(data->proplist, data->card);
     pa_device_init_icon(data->proplist, true);
     pa_device_init_intended_roles(data->proplist);
 
+    if (!data->active_port) {
+        pa_device_port *p = pa_device_port_find_best(data->ports);
+        if (p)
+            pa_sink_new_data_set_port(data, p->name);
+    }
+
     if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_SINK_FIXATE], data) < 0) {
         pa_xfree(s);
         pa_namereg_unregister(core, name);
@@ -300,23 +306,10 @@ pa_sink* pa_sink_new(
         if ((s->active_port = pa_hashmap_get(s->ports, data->active_port)))
             s->save_port = data->save_port;
 
-    if (!s->active_port) {
-        void *state;
-        pa_device_port *p;
-
-        PA_HASHMAP_FOREACH(p, s->ports, state) {
-            if (p->available == PA_AVAILABLE_NO)
-                continue;
-
-            if (!s->active_port || p->priority > s->active_port->priority)
-                s->active_port = p;
-        }
-        if (!s->active_port) {
-            PA_HASHMAP_FOREACH(p, s->ports, state)
-                if (!s->active_port || p->priority > s->active_port->priority)
-                    s->active_port = p;
-        }
-    }
+    /* Hopefully the active port has already been assigned in the previous call
+       to pa_device_port_find_best, but better safe than sorry */
+    if (!s->active_port)
+        s->active_port = pa_device_port_find_best(s->ports);
 
     if (s->active_port)
         s->latency_offset = s->active_port->latency_offset;
@@ -515,7 +508,7 @@ void pa_sink_set_write_volume_callback(pa_sink *s, pa_sink_cb_t cb) {
         pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
 }
 
-void pa_sink_set_get_mute_callback(pa_sink *s, pa_sink_cb_t cb) {
+void pa_sink_set_get_mute_callback(pa_sink *s, pa_sink_get_mute_cb_t cb) {
     pa_assert(s);
 
     s->get_mute = cb;
@@ -620,8 +613,10 @@ void pa_sink_put(pa_sink* s) {
      * the sink implementor to set this flag as needed.
      *
      * Note: This flag can also change over the life time of the sink. */
-    if (!(s->flags & PA_SINK_HW_VOLUME_CTRL) && !(s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER))
+    if (!(s->flags & PA_SINK_HW_VOLUME_CTRL) && !(s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER)) {
         pa_sink_enable_decibel_volume(s, true);
+        s->soft_volume = s->reference_volume;
+    }
 
     /* If the sink implementor support DB volumes by itself, we should always
      * try and enable flat volumes too */
@@ -674,7 +669,7 @@ void pa_sink_put(pa_sink* s) {
 /* Called from main context */
 void pa_sink_unlink(pa_sink* s) {
     bool linked;
-    pa_sink_input *i, *j = NULL;
+    pa_sink_input *i, PA_UNUSED *j = NULL;
 
     pa_assert(s);
     pa_assert_ctl_context();
@@ -1394,7 +1389,8 @@ int pa_sink_update_rate(pa_sink *s, uint32_t rate, bool passthrough) {
     uint32_t alternate_rate = s->alternate_sample_rate;
     uint32_t idx;
     pa_sink_input *i;
-    bool use_alternate = false;
+    bool default_rate_is_usable = false;
+    bool alternate_rate_is_usable = false;
 
     if (rate == s->sample_spec.rate)
         return 0;
@@ -1403,7 +1399,7 @@ int pa_sink_update_rate(pa_sink *s, uint32_t rate, bool passthrough) {
         return -1;
 
     if (PA_UNLIKELY(default_rate == alternate_rate && !passthrough)) {
-        pa_log_debug("Default and alternate sample rates are the same.");
+        pa_log_debug("Default and alternate sample rates are the same, so there is no point in switching.");
         return -1;
     }
 
@@ -1423,25 +1419,20 @@ int pa_sink_update_rate(pa_sink *s, uint32_t rate, bool passthrough) {
     if (PA_UNLIKELY(!pa_sample_rate_valid(desired_rate)))
         return -1;
 
-    if (!passthrough) {
-        pa_assert((default_rate % 4000 == 0) || (default_rate % 11025 == 0));
-        pa_assert((alternate_rate % 4000 == 0) || (alternate_rate % 11025 == 0));
-
-        if (default_rate % 11025 == 0) {
-            if ((alternate_rate % 4000 == 0) && (desired_rate % 4000 == 0))
-                use_alternate=true;
-        } else {
-            /* default is 4000 multiple */
-            if ((alternate_rate % 11025 == 0) && (desired_rate % 11025 == 0))
-                use_alternate=true;
-        }
-
-        if (use_alternate)
+    if (!passthrough && default_rate != desired_rate && alternate_rate != desired_rate) {
+        if (default_rate % 11025 == 0 && desired_rate % 11025 == 0)
+            default_rate_is_usable = true;
+        if (default_rate % 4000 == 0 && desired_rate % 4000 == 0)
+            default_rate_is_usable = true;
+        if (alternate_rate && alternate_rate % 11025 == 0 && desired_rate % 11025 == 0)
+            alternate_rate_is_usable = true;
+        if (alternate_rate && alternate_rate % 4000 == 0 && desired_rate % 4000 == 0)
+            alternate_rate_is_usable = true;
+
+        if (alternate_rate_is_usable && !default_rate_is_usable)
             desired_rate = alternate_rate;
         else
             desired_rate = default_rate;
-    } else {
-        desired_rate = rate; /* use stream sampling rate, discard default/alternate settings */
     }
 
     if (desired_rate == s->sample_spec.rate)
@@ -1621,6 +1612,7 @@ void pa_sink_leave_passthrough(pa_sink *s) {
 static void compute_reference_ratio(pa_sink_input *i) {
     unsigned c = 0;
     pa_cvolume remapped;
+    pa_cvolume ratio;
 
     pa_assert(i);
     pa_assert(pa_sink_flat_volume_enabled(i->sink));
@@ -1635,7 +1627,7 @@ static void compute_reference_ratio(pa_sink_input *i) {
     remapped = i->sink->reference_volume;
     pa_cvolume_remap(&remapped, &i->sink->channel_map, &i->channel_map);
 
-    i->reference_ratio.channels = i->sample_spec.channels;
+    ratio = i->reference_ratio;
 
     for (c = 0; c < i->sample_spec.channels; c++) {
 
@@ -1645,14 +1637,16 @@ static void compute_reference_ratio(pa_sink_input *i) {
 
         /* Don't update the reference ratio unless necessary */
         if (pa_sw_volume_multiply(
-                    i->reference_ratio.values[c],
+                    ratio.values[c],
                     remapped.values[c]) == i->volume.values[c])
             continue;
 
-        i->reference_ratio.values[c] = pa_sw_volume_divide(
+        ratio.values[c] = pa_sw_volume_divide(
                 i->volume.values[c],
                 remapped.values[c]);
     }
+
+    pa_sink_input_set_reference_ratio(i, &ratio);
 }
 
 /* Called from main context. Only called for the root sink in volume sharing
@@ -1842,20 +1836,13 @@ static void update_real_volume(pa_sink *s, const pa_cvolume *new_volume, pa_chan
     PA_IDXSET_FOREACH(i, s->inputs, idx) {
         if (i->origin_sink && (i->origin_sink->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER)) {
             if (pa_sink_flat_volume_enabled(s)) {
-                pa_cvolume old_volume = i->volume;
+                pa_cvolume new_input_volume;
 
                 /* Follow the root sink's real volume. */
-                i->volume = *new_volume;
-                pa_cvolume_remap(&i->volume, channel_map, &i->channel_map);
+                new_input_volume = *new_volume;
+                pa_cvolume_remap(&new_input_volume, channel_map, &i->channel_map);
+                pa_sink_input_set_volume_direct(i, &new_input_volume);
                 compute_reference_ratio(i);
-
-                /* The volume changed, let's tell people so */
-                if (!pa_cvolume_equal(&old_volume, &i->volume)) {
-                    if (i->volume_changed)
-                        i->volume_changed(i);
-
-                    pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
-                }
             }
 
             update_real_volume(i->origin_sink, new_volume, channel_map);
@@ -1910,7 +1897,7 @@ static void propagate_reference_volume(pa_sink *s) {
      * sink input volumes accordingly */
 
     PA_IDXSET_FOREACH(i, s->inputs, idx) {
-        pa_cvolume old_volume;
+        pa_cvolume new_volume;
 
         if (i->origin_sink && (i->origin_sink->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER)) {
             propagate_reference_volume(i->origin_sink);
@@ -1921,24 +1908,14 @@ static void propagate_reference_volume(pa_sink *s) {
             continue;
         }
 
-        old_volume = i->volume;
-
         /* This basically calculates:
          *
          * i->volume := s->reference_volume * i->reference_ratio  */
 
-        i->volume = s->reference_volume;
-        pa_cvolume_remap(&i->volume, &s->channel_map, &i->channel_map);
-        pa_sw_cvolume_multiply(&i->volume, &i->volume, &i->reference_ratio);
-
-        /* The volume changed, let's tell people so */
-        if (!pa_cvolume_equal(&old_volume, &i->volume)) {
-
-            if (i->volume_changed)
-                i->volume_changed(i);
-
-            pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
-        }
+        new_volume = s->reference_volume;
+        pa_cvolume_remap(&new_volume, &s->channel_map, &i->channel_map);
+        pa_sw_cvolume_multiply(&new_volume, &new_volume, &i->reference_ratio);
+        pa_sink_input_set_volume_direct(i, &new_volume);
     }
 }
 
@@ -1961,13 +1938,11 @@ static bool update_reference_volume(pa_sink *s, const pa_cvolume *v, const pa_ch
     pa_cvolume_remap(&volume, channel_map, &s->channel_map);
 
     reference_volume_changed = !pa_cvolume_equal(&volume, &s->reference_volume);
-    s->reference_volume = volume;
+    pa_sink_set_reference_volume_direct(s, &volume);
 
     s->save_volume = (!reference_volume_changed && s->save_volume) || save;
 
-    if (reference_volume_changed)
-        pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
-    else if (!(s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER))
+    if (!reference_volume_changed && !(s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER))
         /* If the root sink's volume doesn't change, then there can't be any
          * changes in the other sinks in the sink tree either.
          *
@@ -2056,7 +2031,7 @@ void pa_sink_set_volume(
 
         /* Let's 'push' the reference volume if necessary */
         pa_cvolume_merge(&new_reference_volume, &s->reference_volume, &root_sink->real_volume);
-        /* If the sink and it's root don't have the same number of channels, we need to remap */
+        /* If the sink and its root don't have the same number of channels, we need to remap */
         if (s != root_sink && !pa_channel_map_equal(&s->channel_map, &root_sink->channel_map))
             pa_cvolume_remap(&new_reference_volume, &s->channel_map, &root_sink->channel_map);
         update_reference_volume(root_sink, &new_reference_volume, &root_sink->channel_map, save);
@@ -2135,11 +2110,11 @@ static void propagate_real_volume(pa_sink *s, const pa_cvolume *old_real_volume)
     if (pa_sink_flat_volume_enabled(s)) {
 
         PA_IDXSET_FOREACH(i, s->inputs, idx) {
-            pa_cvolume old_volume = i->volume;
+            pa_cvolume new_volume;
 
             /* 2. Since the sink's reference and real volumes are equal
              * now our ratios should be too. */
-            i->reference_ratio = i->real_ratio;
+            pa_sink_input_set_reference_ratio(i, &i->real_ratio);
 
             /* 3. Recalculate the new stream reference volume based on the
              * reference ratio and the sink's reference volume.
@@ -2149,18 +2124,10 @@ static void propagate_real_volume(pa_sink *s, const pa_cvolume *old_real_volume)
              * i->volume = s->reference_volume * i->reference_ratio
              *
              * This is identical to propagate_reference_volume() */
-            i->volume = s->reference_volume;
-            pa_cvolume_remap(&i->volume, &s->channel_map, &i->channel_map);
-            pa_sw_cvolume_multiply(&i->volume, &i->volume, &i->reference_ratio);
-
-            /* Notify if something changed */
-            if (!pa_cvolume_equal(&old_volume, &i->volume)) {
-
-                if (i->volume_changed)
-                    i->volume_changed(i);
-
-                pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
-            }
+            new_volume = s->reference_volume;
+            pa_cvolume_remap(&new_volume, &s->channel_map, &i->channel_map);
+            pa_sw_cvolume_multiply(&new_volume, &new_volume, &i->reference_ratio);
+            pa_sink_input_set_volume_direct(i, &new_volume);
 
             if (i->origin_sink && (i->origin_sink->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER))
                 propagate_real_volume(i->origin_sink, old_real_volume);
@@ -2230,19 +2197,30 @@ void pa_sink_set_mute(pa_sink *s, bool mute, bool save) {
 
     pa_sink_assert_ref(s);
     pa_assert_ctl_context();
-    pa_assert(PA_SINK_IS_LINKED(s->state));
 
     old_muted = s->muted;
+
+    if (mute == old_muted) {
+        s->save_muted |= save;
+        return;
+    }
+
     s->muted = mute;
-    s->save_muted = (old_muted == s->muted && s->save_muted) || save;
+    s->save_muted = save;
 
-    if (!(s->flags & PA_SINK_DEFERRED_VOLUME) && s->set_mute)
+    if (!(s->flags & PA_SINK_DEFERRED_VOLUME) && s->set_mute) {
+        s->set_mute_in_progress = true;
         s->set_mute(s);
+        s->set_mute_in_progress = false;
+    }
 
-    pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_MUTE, NULL, 0, NULL) == 0);
+    if (!PA_SINK_IS_LINKED(s->state))
+        return;
 
-    if (old_muted != s->muted)
-        pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    pa_log_debug("The mute of sink %s changed from %s to %s.", s->name, pa_yes_no(old_muted), pa_yes_no(mute));
+    pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_MUTE, NULL, 0, NULL) == 0);
+    pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_MUTE_CHANGED], s);
 }
 
 /* Called from main thread */
@@ -2252,21 +2230,15 @@ bool pa_sink_get_mute(pa_sink *s, bool force_refresh) {
     pa_assert_ctl_context();
     pa_assert(PA_SINK_IS_LINKED(s->state));
 
-    if (s->refresh_muted || force_refresh) {
-        bool old_muted = s->muted;
+    if ((s->refresh_muted || force_refresh) && s->get_mute) {
+        bool mute;
 
-        if (!(s->flags & PA_SINK_DEFERRED_VOLUME) && s->get_mute)
-            s->get_mute(s);
-
-        pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_MUTE, NULL, 0, NULL) == 0);
-
-        if (old_muted != s->muted) {
-            s->save_muted = true;
-
-            pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
-
-            /* Make sure the soft mute status stays in sync */
-            pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_SET_MUTE, NULL, 0, NULL) == 0);
+        if (s->flags & PA_SINK_DEFERRED_VOLUME) {
+            if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_MUTE, &mute, 0, NULL) >= 0)
+                pa_sink_mute_changed(s, mute);
+        } else {
+            if (s->get_mute(s, &mute) >= 0)
+                pa_sink_mute_changed(s, mute);
         }
     }
 
@@ -2279,15 +2251,17 @@ void pa_sink_mute_changed(pa_sink *s, bool new_muted) {
     pa_assert_ctl_context();
     pa_assert(PA_SINK_IS_LINKED(s->state));
 
-    /* The sink implementor may call this if the volume changed to make sure everyone is notified */
-
-    if (s->muted == new_muted)
+    if (s->set_mute_in_progress)
         return;
 
-    s->muted = new_muted;
-    s->save_muted = true;
+    /* pa_sink_set_mute() does this same check, so this may appear redundant,
+     * but we must have this here also, because the save parameter of
+     * pa_sink_set_mute() would otherwise have unintended side effects (saving
+     * the mute state when it shouldn't be saved). */
+    if (new_muted == s->muted)
+        return;
 
-    pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    pa_sink_set_mute(s, new_muted, true);
 }
 
 /* Called from main thread */
@@ -2554,9 +2528,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
                 i->thread_info.sync_next = NULL;
             }
 
-            if (pa_hashmap_remove(s->thread_info.inputs, PA_UINT32_TO_PTR(i->index)))
-                pa_sink_input_unref(i);
-
+            pa_hashmap_remove_and_free(s->thread_info.inputs, PA_UINT32_TO_PTR(i->index));
             pa_sink_invalidate_requested_latency(s, true);
             pa_sink_request_rewind(s, (size_t) -1);
 
@@ -2637,8 +2609,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
             i->thread_info.attached = false;
 
             /* Let's remove the sink input ...*/
-            if (pa_hashmap_remove(s->thread_info.inputs, PA_UINT32_TO_PTR(i->index)))
-                pa_sink_input_unref(i);
+            pa_hashmap_remove_and_free(s->thread_info.inputs, PA_UINT32_TO_PTR(i->index));
 
             pa_sink_invalidate_requested_latency(s, true);
 
@@ -2775,7 +2746,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
         case PA_SINK_MESSAGE_GET_MUTE:
 
             if (s->flags & PA_SINK_DEFERRED_VOLUME && s->get_mute)
-                s->get_mute(s);
+                return s->get_mute(s, userdata);
 
             return 0;
 
@@ -3441,16 +3412,21 @@ bool pa_device_init_icon(pa_proplist *p, bool is_sink) {
     return true;
 }
 
-bool pa_device_init_description(pa_proplist *p) {
+bool pa_device_init_description(pa_proplist *p, pa_card *card) {
     const char *s, *d = NULL, *k;
     pa_assert(p);
 
     if (pa_proplist_contains(p, PA_PROP_DEVICE_DESCRIPTION))
         return true;
 
-    if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_FORM_FACTOR)))
-        if (pa_streq(s, "internal"))
-            d = _("Built-in Audio");
+    if (card)
+        if ((s = pa_proplist_gets(card->proplist, PA_PROP_DEVICE_DESCRIPTION)))
+            d = s;
+
+    if (!d)
+        if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_FORM_FACTOR)))
+            if (pa_streq(s, "internal"))
+                d = _("Built-in Audio");
 
     if (!d)
         if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_CLASS)))
@@ -3803,3 +3779,28 @@ done:
 
     return out_formats;
 }
+
+/* Called from the main thread. */
+void pa_sink_set_reference_volume_direct(pa_sink *s, const pa_cvolume *volume) {
+    pa_cvolume old_volume;
+    char old_volume_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+    char new_volume_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+
+    pa_assert(s);
+    pa_assert(volume);
+
+    old_volume = s->reference_volume;
+
+    if (pa_cvolume_equal(volume, &old_volume))
+        return;
+
+    s->reference_volume = *volume;
+    pa_log_debug("The reference volume of sink %s changed from %s to %s.", s->name,
+                 pa_cvolume_snprint_verbose(old_volume_str, sizeof(old_volume_str), &old_volume, &s->channel_map,
+                                            s->flags & PA_SINK_DECIBEL_VOLUME),
+                 pa_cvolume_snprint_verbose(new_volume_str, sizeof(new_volume_str), volume, &s->channel_map,
+                                            s->flags & PA_SINK_DECIBEL_VOLUME));
+
+    pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_VOLUME_CHANGED], s);
+}
diff --git a/src/pulsecore/sink.h b/src/pulsecore/sink.h
index c7cb5f8..d18e0be 100644
--- a/src/pulsecore/sink.h
+++ b/src/pulsecore/sink.h
@@ -58,6 +58,8 @@ static inline bool PA_SINK_IS_LINKED(pa_sink_state_t x) {
 /* A generic definition for void callback functions */
 typedef void(*pa_sink_cb_t)(pa_sink *s);
 
+typedef int (*pa_sink_get_mute_cb_t)(pa_sink *s, bool *mute);
+
 struct pa_sink {
     pa_msgobject parent;
 
@@ -118,6 +120,8 @@ struct pa_sink {
 
     unsigned priority;
 
+    bool set_mute_in_progress;
+
     /* Called when the main loop requests a state change. Called from
      * main loop context. If returns -1 the state change will be
      * inhibited */
@@ -189,14 +193,24 @@ struct pa_sink {
      * set this callback. */
     pa_sink_cb_t write_volume; /* may be NULL */
 
-    /* Called when the mute setting is queried. A PA_SINK_MESSAGE_GET_MUTE
-     * message will also be sent. Called from IO thread if PA_SINK_DEFERRED_VOLUME
-     * flag is set otherwise from main loop context. If refresh_mute is false
-     * neither this function is called nor a message is sent.
+    /* If the sink mute can change "spontaneously" (i.e. initiated by the sink
+     * implementation, not by someone else calling pa_sink_set_mute()), then
+     * the sink implementation can notify about changed mute either by calling
+     * pa_sink_mute_changed() or by calling pa_sink_get_mute() with
+     * force_refresh=true. If the implementation chooses the latter approach,
+     * it should implement the get_mute callback. Otherwise get_mute can be
+     * NULL.
+     *
+     * This is called when pa_sink_get_mute() is called with
+     * force_refresh=true. This is called from the IO thread if the
+     * PA_SINK_DEFERRED_VOLUME flag is set, otherwise this is called from the
+     * main thread. On success, the implementation is expected to return 0 and
+     * set the mute parameter that is passed as a reference. On failure, the
+     * implementation is expected to return -1.
      *
      * You must use the function pa_sink_set_get_mute_callback() to
      * set this callback. */
-    pa_sink_cb_t get_mute; /* may be NULL */
+    pa_sink_get_mute_cb_t get_mute;
 
     /* Called when the mute setting shall be changed. A PA_SINK_MESSAGE_SET_MUTE
      * message will also be sent. Called from IO thread if PA_SINK_DEFERRED_VOLUME
@@ -342,7 +356,7 @@ typedef struct pa_sink_new_data {
     pa_channel_map channel_map;
     uint32_t alternate_sample_rate;
     pa_cvolume volume;
-    bool muted :1;
+    bool muted:1;
 
     bool sample_spec_is_set:1;
     bool channel_map_is_set:1;
@@ -377,7 +391,7 @@ pa_sink* pa_sink_new(
 void pa_sink_set_get_volume_callback(pa_sink *s, pa_sink_cb_t cb);
 void pa_sink_set_set_volume_callback(pa_sink *s, pa_sink_cb_t cb);
 void pa_sink_set_write_volume_callback(pa_sink *s, pa_sink_cb_t cb);
-void pa_sink_set_get_mute_callback(pa_sink *s, pa_sink_cb_t cb);
+void pa_sink_set_get_mute_callback(pa_sink *s, pa_sink_get_mute_cb_t cb);
 void pa_sink_set_set_mute_callback(pa_sink *s, pa_sink_cb_t cb);
 void pa_sink_enable_decibel_volume(pa_sink *s, bool enable);
 
@@ -399,7 +413,7 @@ void pa_sink_mute_changed(pa_sink *s, bool new_muted);
 
 void pa_sink_update_flags(pa_sink *s, pa_sink_flags_t mask, pa_sink_flags_t value);
 
-bool pa_device_init_description(pa_proplist *p);
+bool pa_device_init_description(pa_proplist *p, pa_card *card);
 bool pa_device_init_icon(pa_proplist *p, bool is_sink);
 bool pa_device_init_intended_roles(pa_proplist *p);
 unsigned pa_device_init_priority(pa_proplist *p);
@@ -503,6 +517,13 @@ void pa_sink_invalidate_requested_latency(pa_sink *s, bool dynamic);
 
 pa_usec_t pa_sink_get_latency_within_thread(pa_sink *s);
 
+/* Called from the main thread, from sink-input.c only. The normal way to set
+ * the sink reference volume is to call pa_sink_set_volume(), but the flat
+ * volume logic in sink-input.c needs also a function that doesn't do all the
+ * extra stuff that pa_sink_set_volume() does. This function simply sets
+ * s->reference_volume and fires change notifications. */
+void pa_sink_set_reference_volume_direct(pa_sink *s, const pa_cvolume *volume);
+
 /* Verify that we called in IO context (aka 'thread context), or that
  * the sink is not yet set up, i.e. the thread not set up yet. See
  * pa_assert_io_context() in thread-mq.h for more information. */
diff --git a/src/pulsecore/socket-server.c b/src/pulsecore/socket-server.c
index ef77563..2138cbc 100644
--- a/src/pulsecore/socket-server.c
+++ b/src/pulsecore/socket-server.c
@@ -56,6 +56,10 @@ int deny_severity = LOG_WARNING;
 
 #endif /* HAVE_LIBWRAP */
 
+#ifdef HAVE_SYSTEMD_DAEMON
+#include <systemd/sd-daemon.h>
+#endif
+
 #include <pulse/xmalloc.h>
 #include <pulse/util.h>
 
@@ -74,6 +78,7 @@ struct pa_socket_server {
     PA_REFCNT_DECLARE;
     int fd;
     char *filename;
+    bool activated;
     char *tcpwrap_service;
 
     pa_socket_server_on_connection_cb_t on_connection;
@@ -174,43 +179,63 @@ pa_socket_server* pa_socket_server_ref(pa_socket_server *s) {
 
 pa_socket_server* pa_socket_server_new_unix(pa_mainloop_api *m, const char *filename) {
     int fd = -1;
+    bool activated = false;
     struct sockaddr_un sa;
     pa_socket_server *s;
 
     pa_assert(m);
     pa_assert(filename);
 
-    if ((fd = pa_socket_cloexec(PF_UNIX, SOCK_STREAM, 0)) < 0) {
-        pa_log("socket(): %s", pa_cstrerror(errno));
-        goto fail;
+#ifdef HAVE_SYSTEMD_DAEMON
+    {
+        int n = sd_listen_fds(0);
+        if (n > 0) {
+            for (int i = 0; i < n; ++i) {
+                if (sd_is_socket_unix(SD_LISTEN_FDS_START + i, SOCK_STREAM, 1, filename, 0) > 0) {
+                    fd = SD_LISTEN_FDS_START + i;
+                    activated = true;
+                    pa_log_info("Found socket activation socket for '%s' \\o/", filename);
+                    break;
+                }
+            }
+        }
     }
+#endif
 
-    memset(&sa, 0, sizeof(sa));
-    sa.sun_family = AF_UNIX;
-    pa_strlcpy(sa.sun_path, filename, sizeof(sa.sun_path));
+    if (fd < 0) {
+        if ((fd = pa_socket_cloexec(PF_UNIX, SOCK_STREAM, 0)) < 0) {
+            pa_log("socket(PF_UNIX): %s", pa_cstrerror(errno));
+            goto fail;
+        }
 
-    pa_make_socket_low_delay(fd);
+        memset(&sa, 0, sizeof(sa));
+        sa.sun_family = AF_UNIX;
+        pa_strlcpy(sa.sun_path, filename, sizeof(sa.sun_path));
 
-    if (bind(fd, (struct sockaddr*) &sa, (socklen_t) SUN_LEN(&sa)) < 0) {
-        pa_log("bind(): %s", pa_cstrerror(errno));
-        goto fail;
-    }
+        pa_make_socket_low_delay(fd);
 
-    /* Allow access from all clients. Sockets like this one should
-     * always be put inside a directory with proper access rights,
-     * because not all OS check the access rights on the socket
-     * inodes. */
-    chmod(filename, 0777);
+        if (bind(fd, (struct sockaddr*) &sa, (socklen_t) SUN_LEN(&sa)) < 0) {
+            pa_log("bind(): %s", pa_cstrerror(errno));
+            goto fail;
+        }
 
-    if (listen(fd, 5) < 0) {
-        pa_log("listen(): %s", pa_cstrerror(errno));
-        goto fail;
+        /* Allow access from all clients. Sockets like this one should
+        * always be put inside a directory with proper access rights,
+        * because not all OS check the access rights on the socket
+        * inodes. */
+        chmod(filename, 0777);
+
+        if (listen(fd, 5) < 0) {
+            pa_log("listen(): %s", pa_cstrerror(errno));
+            goto fail;
+        }
     }
 
     pa_assert_se(s = pa_socket_server_new(m, fd));
 
     s->filename = pa_xstrdup(filename);
     s->type = SOCKET_SERVER_UNIX;
+    s->activated = activated;
 
     return s;
 
@@ -260,15 +285,14 @@ pa_socket_server* pa_socket_server_new_ipv4(pa_mainloop_api *m, uint32_t address
         if (errno == EADDRINUSE && fallback) {
             sa.sin_port = 0;
 
-            if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) >= 0)
-                goto good;
+            if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
+                pa_log("bind(): %s", pa_cstrerror(errno));
+                goto fail;
+            }
+        } else {
+            pa_log("bind(): %s", pa_cstrerror(errno));
+            goto fail;
         }
-
-        pa_log("bind(): %s", pa_cstrerror(errno));
-        goto fail;
-
-    good:
-        ;
     }
 
     if (listen(fd, 5) < 0) {
@@ -329,15 +353,14 @@ pa_socket_server* pa_socket_server_new_ipv6(pa_mainloop_api *m, const uint8_t ad
         if (errno == EADDRINUSE && fallback) {
             sa.sin6_port = 0;
 
-            if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) >= 0)
-                goto good;
+            if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) {
+                pa_log("bind(): %s", pa_cstrerror(errno));
+                goto fail;
+            }
+        } else {
+            pa_log("bind(): %s", pa_cstrerror(errno));
+            goto fail;
         }
-
-        pa_log("bind(): %s", pa_cstrerror(errno));
-        goto fail;
-
-    good:
-        ;
     }
 
     if (listen(fd, 5) < 0) {
@@ -423,10 +446,9 @@ pa_socket_server* pa_socket_server_new_ipv6_string(pa_mainloop_api *m, const cha
 static void socket_server_free(pa_socket_server*s) {
     pa_assert(s);
 
-    if (s->filename) {
+    if (!s->activated && s->filename)
         unlink(s->filename);
-        pa_xfree(s->filename);
-    }
+    pa_xfree(s->filename);
 
     pa_close(s->fd);
 
diff --git a/src/pulsecore/socket-util.c b/src/pulsecore/socket-util.c
index e1c0b55..ccb9442 100644
--- a/src/pulsecore/socket-util.c
+++ b/src/pulsecore/socket-util.c
@@ -52,6 +52,9 @@
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
 #endif
+#ifdef HAVE_SYSTEMD_DAEMON
+#include <systemd/sd-daemon.h>
+#endif
 
 #include <pulsecore/core-error.h>
 #include <pulsecore/core-util.h>
@@ -255,6 +258,21 @@ int pa_unix_socket_remove_stale(const char *fn) {
 
     pa_assert(fn);
 
+#ifdef HAVE_SYSTEMD_DAEMON
+    {
+        int n = sd_listen_fds(0);
+        if (n > 0) {
+            for (int i = 0; i < n; ++i) {
+                if (sd_is_socket_unix(SD_LISTEN_FDS_START + i, SOCK_STREAM, 1, fn, 0) > 0) {
+                    /* This is a socket activated socket, therefore do not consider
+                    * it stale. */
+                    return 0;
+                }
+            }
+        }
+    }
+#endif
+
     if ((r = pa_unix_socket_is_stale(fn)) < 0)
         return errno != ENOENT ? -1 : 0;
 
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 4e4b7e9..65b2d80 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -122,7 +122,7 @@ void pa_source_output_new_data_set_muted(pa_source_output_new_data *data, bool m
     pa_assert(data);
 
     data->muted_is_set = true;
-    data->muted = !!mute;
+    data->muted = mute;
 }
 
 bool pa_source_output_new_data_set_source(pa_source_output_new_data *data, pa_source *s, bool save) {
@@ -972,7 +972,7 @@ void pa_source_output_set_volume(pa_source_output *o, const pa_cvolume *volume,
         return;
     }
 
-    o->volume = *volume;
+    pa_source_output_set_volume_direct(o, volume);
     o->save_volume = save;
 
     if (pa_source_flat_volume_enabled(o->source)) {
@@ -1057,16 +1057,22 @@ pa_cvolume *pa_source_output_get_volume(pa_source_output *o, pa_cvolume *volume,
 
 /* Called from main context */
 void pa_source_output_set_mute(pa_source_output *o, bool mute, bool save) {
+    bool old_mute;
+
     pa_source_output_assert_ref(o);
     pa_assert_ctl_context();
     pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->state));
 
-    if (!o->muted == !mute) {
-        o->save_muted = o->save_muted || mute;
+    old_mute = o->muted;
+
+    if (mute == old_mute) {
+        o->save_muted |= save;
         return;
     }
 
     o->muted = mute;
+    pa_log_debug("The mute of source output %u changed from %s to %s.", o->index, pa_yes_no(old_mute), pa_yes_no(mute));
+
     o->save_muted = save;
 
     pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o), PA_SOURCE_OUTPUT_MESSAGE_SET_SOFT_MUTE, NULL, 0, NULL) == 0);
@@ -1076,15 +1082,7 @@ void pa_source_output_set_mute(pa_source_output *o, bool mute, bool save) {
         o->mute_changed(o);
 
     pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
-}
-
-/* Called from main context */
-bool pa_source_output_get_mute(pa_source_output *o) {
-    pa_source_output_assert_ref(o);
-    pa_assert_ctl_context();
-    pa_assert(PA_SOURCE_OUTPUT_IS_LINKED(o->state));
-
-    return o->muted;
+    pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_MUTE_CHANGED], o);
 }
 
 /* Called from main thread */
@@ -1177,7 +1175,7 @@ bool pa_source_output_may_move(pa_source_output *o) {
 }
 
 static bool find_filter_source_output(pa_source_output *target, pa_source *s) {
-    int i = 0;
+    unsigned PA_UNUSED i = 0;
     while (s && s->output_from_master) {
         if (s->output_from_master == target)
             return true;
@@ -1262,7 +1260,7 @@ int pa_source_output_start_move(pa_source_output *o) {
  * then also the origin source and all streams connected to it need to update
  * their volume - this function does all that by using recursion. */
 static void update_volume_due_to_moving(pa_source_output *o, pa_source *dest) {
-    pa_cvolume old_volume;
+    pa_cvolume new_volume;
 
     pa_assert(o);
     pa_assert(dest);
@@ -1313,19 +1311,11 @@ static void update_volume_due_to_moving(pa_source_output *o, pa_source *dest) {
              *          always have volume_factor as soft_volume, so no change
              *          should be needed) */
 
-            old_volume = o->volume;
-            pa_cvolume_reset(&o->volume, o->volume.channels);
-            pa_cvolume_reset(&o->reference_ratio, o->reference_ratio.channels);
+            pa_cvolume_reset(&new_volume, o->volume.channels);
+            pa_source_output_set_volume_direct(o, &new_volume);
+            pa_source_output_set_reference_ratio(o, &new_volume);
             pa_assert(pa_cvolume_is_norm(&o->real_ratio));
             pa_assert(pa_cvolume_equal(&o->soft_volume, &o->volume_factor));
-
-            /* Notify others about the changed source output volume. */
-            if (!pa_cvolume_equal(&o->volume, &old_volume)) {
-                if (o->volume_changed)
-                    o->volume_changed(o);
-
-                pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
-            }
         }
 
         /* Additionally, the origin source volume needs updating:
@@ -1336,33 +1326,27 @@ static void update_volume_due_to_moving(pa_source_output *o, pa_source *dest) {
          *         (sources that use volume sharing should always have
          *          soft_volume of 0 dB) */
 
-        old_volume = o->destination_source->reference_volume;
-
-        o->destination_source->reference_volume = root_source->reference_volume;
-        pa_cvolume_remap(&o->destination_source->reference_volume, &root_source->channel_map, &o->destination_source->channel_map);
+        new_volume = root_source->reference_volume;
+        pa_cvolume_remap(&new_volume, &root_source->channel_map, &o->destination_source->channel_map);
+        pa_source_set_reference_volume_direct(o->destination_source, &new_volume);
 
         o->destination_source->real_volume = root_source->real_volume;
         pa_cvolume_remap(&o->destination_source->real_volume, &root_source->channel_map, &o->destination_source->channel_map);
 
         pa_assert(pa_cvolume_is_norm(&o->destination_source->soft_volume));
 
-        /* Notify others about the changed source volume. If you wonder whether
-         * o->destination_source->set_volume() should be called somewhere, that's not
-         * the case, because sources that use volume sharing shouldn't have any
-         * internal volume that set_volume() would update. If you wonder
-         * whether the thread_info variables should be synced, yes, they
-         * should, and it's done by the PA_SOURCE_MESSAGE_FINISH_MOVE message
-         * handler. */
-        if (!pa_cvolume_equal(&o->destination_source->reference_volume, &old_volume))
-            pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, o->destination_source->index);
+        /* If you wonder whether o->destination_source->set_volume() should be
+         * called somewhere, that's not the case, because sources that use
+         * volume sharing shouldn't have any internal volume that set_volume()
+         * would update. If you wonder whether the thread_info variables should
+         * be synced, yes, they should, and it's done by the
+         * PA_SOURCE_MESSAGE_FINISH_MOVE message handler. */
 
         /* Recursively update origin source outputs. */
         PA_IDXSET_FOREACH(destination_source_output, o->destination_source->outputs, idx)
             update_volume_due_to_moving(destination_source_output, dest);
 
     } else {
-        old_volume = o->volume;
-
         if (pa_source_flat_volume_enabled(o->source)) {
             /* Ok, so this is a regular stream, and flat volume is enabled. The
              * volume will have to be updated as follows:
@@ -1374,9 +1358,10 @@ static void update_volume_due_to_moving(pa_source_output *o, pa_source *dest) {
              *     o->soft_volume := o->real_ratio * o->volume_factor
              *         (handled later by pa_source_set_volume) */
 
-            o->volume = o->source->reference_volume;
-            pa_cvolume_remap(&o->volume, &o->source->channel_map, &o->channel_map);
-            pa_sw_cvolume_multiply(&o->volume, &o->volume, &o->reference_ratio);
+            new_volume = o->source->reference_volume;
+            pa_cvolume_remap(&new_volume, &o->source->channel_map, &o->channel_map);
+            pa_sw_cvolume_multiply(&new_volume, &new_volume, &o->reference_ratio);
+            pa_source_output_set_volume_direct(o, &new_volume);
 
         } else {
             /* Ok, so this is a regular stream, and flat volume is disabled.
@@ -1387,21 +1372,10 @@ static void update_volume_due_to_moving(pa_source_output *o, pa_source *dest) {
              *     o->real_ratio := o->reference_ratio
              *     o->soft_volume := o->real_ratio * o->volume_factor */
 
-            o->volume = o->reference_ratio;
+            pa_source_output_set_volume_direct(o, &o->reference_ratio);
             o->real_ratio = o->reference_ratio;
             pa_sw_cvolume_multiply(&o->soft_volume, &o->real_ratio, &o->volume_factor);
         }
-
-        /* Notify others about the changed source output volume. */
-        if (!pa_cvolume_equal(&o->volume, &old_volume)) {
-            /* XXX: In case o->source has flat volume enabled, then real_ratio
-             * and soft_volume are not updated yet. Let's hope that the
-             * callback implementation doesn't care about those variables... */
-            if (o->volume_changed)
-                o->volume_changed(o);
-
-            pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
-        }
     }
 
     /* If o->source == dest, then recursion has finished, and we can finally call
@@ -1695,3 +1669,53 @@ int pa_source_output_update_rate(pa_source_output *o) {
 
     return 0;
 }
+
+/* Called from the main thread. */
+void pa_source_output_set_volume_direct(pa_source_output *o, const pa_cvolume *volume) {
+    pa_cvolume old_volume;
+    char old_volume_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+    char new_volume_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+
+    pa_assert(o);
+    pa_assert(volume);
+
+    old_volume = o->volume;
+
+    if (pa_cvolume_equal(volume, &old_volume))
+        return;
+
+    o->volume = *volume;
+    pa_log_debug("The volume of source output %u changed from %s to %s.", o->index,
+                 pa_cvolume_snprint_verbose(old_volume_str, sizeof(old_volume_str), &old_volume, &o->channel_map, true),
+                 pa_cvolume_snprint_verbose(new_volume_str, sizeof(new_volume_str), volume, &o->channel_map, true));
+
+    if (o->volume_changed)
+        o->volume_changed(o);
+
+    pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
+    pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_VOLUME_CHANGED], o);
+}
+
+/* Called from the main thread. */
+void pa_source_output_set_reference_ratio(pa_source_output *o, const pa_cvolume *ratio) {
+    pa_cvolume old_ratio;
+    char old_ratio_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+    char new_ratio_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+
+    pa_assert(o);
+    pa_assert(ratio);
+
+    old_ratio = o->reference_ratio;
+
+    if (pa_cvolume_equal(ratio, &old_ratio))
+        return;
+
+    o->reference_ratio = *ratio;
+
+    if (!PA_SOURCE_OUTPUT_IS_LINKED(o->state))
+        return;
+
+    pa_log_debug("Source output %u reference ratio changed from %s to %s.", o->index,
+                 pa_cvolume_snprint_verbose(old_ratio_str, sizeof(old_ratio_str), &old_ratio, &o->channel_map, true),
+                 pa_cvolume_snprint_verbose(new_ratio_str, sizeof(new_ratio_str), ratio, &o->channel_map, true));
+}
diff --git a/src/pulsecore/source-output.h b/src/pulsecore/source-output.h
index 102fb8b..3ed950b 100644
--- a/src/pulsecore/source-output.h
+++ b/src/pulsecore/source-output.h
@@ -318,7 +318,6 @@ void pa_source_output_set_volume(pa_source_output *o, const pa_cvolume *volume,
 pa_cvolume *pa_source_output_get_volume(pa_source_output *o, pa_cvolume *volume, bool absolute);
 
 void pa_source_output_set_mute(pa_source_output *o, bool mute, bool save);
-bool pa_source_output_get_mute(pa_source_output *o);
 
 void pa_source_output_update_proplist(pa_source_output *o, pa_update_mode_t mode, pa_proplist *p);
 
@@ -353,6 +352,19 @@ int pa_source_output_process_msg(pa_msgobject *mo, int code, void *userdata, int
 
 pa_usec_t pa_source_output_set_requested_latency_within_thread(pa_source_output *o, pa_usec_t usec);
 
+/* Called from the main thread, from source.c only. The normal way to set the
+ * source output volume is to call pa_source_output_set_volume(), but the flat
+ * volume logic in source.c needs also a function that doesn't do all the extra
+ * stuff that pa_source_output_set_volume() does. This function simply sets
+ * o->volume and fires change notifications. */
+void pa_source_output_set_volume_direct(pa_source_output *o, const pa_cvolume *volume);
+
+/* Called from the main thread, from source.c only. This shouldn't be a public
+ * function, but the flat volume logic in source.c currently needs a way to
+ * directly set the source output reference ratio. This function simply sets
+ * o->reference_ratio and logs a message if the value changes. */
+void pa_source_output_set_reference_ratio(pa_source_output *o, const pa_cvolume *ratio);
+
 #define pa_source_output_assert_io_context(s) \
     pa_assert(pa_thread_mq_get() || !PA_SOURCE_OUTPUT_IS_LINKED((s)->state))
 
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index af4c6ec..ab3a0d2 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -117,7 +117,7 @@ void pa_source_new_data_set_muted(pa_source_new_data *data, bool mute) {
     pa_assert(data);
 
     data->muted_is_set = true;
-    data->muted = !!mute;
+    data->muted = mute;
 }
 
 void pa_source_new_data_set_port(pa_source_new_data *data, const char *port) {
@@ -218,10 +218,16 @@ pa_source* pa_source_new(
     if (data->card)
         pa_proplist_update(data->proplist, PA_UPDATE_MERGE, data->card->proplist);
 
-    pa_device_init_description(data->proplist);
+    pa_device_init_description(data->proplist, data->card);
     pa_device_init_icon(data->proplist, false);
     pa_device_init_intended_roles(data->proplist);
 
+    if (!data->active_port) {
+        pa_device_port *p = pa_device_port_find_best(data->ports);
+        if (p)
+            pa_source_new_data_set_port(data, p->name);
+    }
+
     if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_SOURCE_FIXATE], data) < 0) {
         pa_xfree(s);
         pa_namereg_unregister(core, name);
@@ -288,24 +294,10 @@ pa_source* pa_source_new(
         if ((s->active_port = pa_hashmap_get(s->ports, data->active_port)))
             s->save_port = data->save_port;
 
-    if (!s->active_port) {
-        void *state;
-        pa_device_port *p;
-
-        PA_HASHMAP_FOREACH(p, s->ports, state) {
-            if (p->available == PA_AVAILABLE_NO)
-                continue;
-
-            if (!s->active_port || p->priority > s->active_port->priority)
-                s->active_port = p;
-        }
-
-        if (!s->active_port) {
-            PA_HASHMAP_FOREACH(p, s->ports, state)
-                if (!s->active_port || p->priority > s->active_port->priority)
-                    s->active_port = p;
-        }
-    }
+    /* Hopefully the active port has already been assigned in the previous call
+       to pa_device_port_find_best, but better safe than sorry */
+    if (!s->active_port)
+        s->active_port = pa_device_port_find_best(s->ports);
 
     if (s->active_port)
         s->latency_offset = s->active_port->latency_offset;
@@ -467,7 +459,7 @@ void pa_source_set_write_volume_callback(pa_source *s, pa_source_cb_t cb) {
         pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
 }
 
-void pa_source_set_get_mute_callback(pa_source *s, pa_source_cb_t cb) {
+void pa_source_set_get_mute_callback(pa_source *s, pa_source_get_mute_cb_t cb) {
     pa_assert(s);
 
     s->get_mute = cb;
@@ -572,8 +564,10 @@ void pa_source_put(pa_source *s) {
      * the source implementor to set this flag as needed.
      *
      * Note: This flag can also change over the life time of the source. */
-    if (!(s->flags & PA_SOURCE_HW_VOLUME_CTRL) && !(s->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER))
+    if (!(s->flags & PA_SOURCE_HW_VOLUME_CTRL) && !(s->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER)) {
         pa_source_enable_decibel_volume(s, true);
+        s->soft_volume = s->reference_volume;
+    }
 
     /* If the source implementor support DB volumes by itself, we should always
      * try and enable flat volumes too */
@@ -618,7 +612,7 @@ void pa_source_put(pa_source *s) {
 /* Called from main context */
 void pa_source_unlink(pa_source *s) {
     bool linked;
-    pa_source_output *o, *j = NULL;
+    pa_source_output *o, PA_UNUSED *j = NULL;
 
     pa_assert(s);
     pa_assert_ctl_context();
@@ -983,7 +977,8 @@ int pa_source_update_rate(pa_source *s, uint32_t rate, bool passthrough) {
     uint32_t desired_rate = rate;
     uint32_t default_rate = s->default_sample_rate;
     uint32_t alternate_rate = s->alternate_sample_rate;
-    bool use_alternate = false;
+    bool default_rate_is_usable = false;
+    bool alternate_rate_is_usable = false;
 
     if (rate == s->sample_spec.rate)
         return 0;
@@ -992,7 +987,7 @@ int pa_source_update_rate(pa_source *s, uint32_t rate, bool passthrough) {
         return -1;
 
     if (PA_UNLIKELY(default_rate == alternate_rate && !passthrough)) {
-        pa_log_debug("Default and alternate sample rates are the same.");
+        pa_log_debug("Default and alternate sample rates are the same, so there is no point in switching.");
         return -1;
     }
 
@@ -1012,25 +1007,20 @@ int pa_source_update_rate(pa_source *s, uint32_t rate, bool passthrough) {
     if (PA_UNLIKELY(!pa_sample_rate_valid(desired_rate)))
         return -1;
 
-    if (!passthrough) {
-        pa_assert((default_rate % 4000 == 0) || (default_rate % 11025 == 0));
-        pa_assert((alternate_rate % 4000 == 0) || (alternate_rate % 11025 == 0));
-
-        if (default_rate % 11025 == 0) {
-            if ((alternate_rate % 4000 == 0) && (desired_rate % 4000 == 0))
-                use_alternate=true;
-        } else {
-            /* default is 4000 multiple */
-            if ((alternate_rate % 11025 == 0) && (desired_rate % 11025 == 0))
-                use_alternate=true;
-        }
-
-        if (use_alternate)
+    if (!passthrough && default_rate != desired_rate && alternate_rate != desired_rate) {
+        if (default_rate % 11025 == 0 && desired_rate % 11025 == 0)
+            default_rate_is_usable = true;
+        if (default_rate % 4000 == 0 && desired_rate % 4000 == 0)
+            default_rate_is_usable = true;
+        if (alternate_rate && alternate_rate % 11025 == 0 && desired_rate % 11025 == 0)
+            alternate_rate_is_usable = true;
+        if (alternate_rate && alternate_rate % 4000 == 0 && desired_rate % 4000 == 0)
+            alternate_rate_is_usable = true;
+
+        if (alternate_rate_is_usable && !default_rate_is_usable)
             desired_rate = alternate_rate;
         else
             desired_rate = default_rate;
-    } else {
-        desired_rate = rate; /* use stream sampling rate, discard default/alternate settings */
     }
 
     if (desired_rate == s->sample_spec.rate)
@@ -1216,6 +1206,7 @@ void pa_source_leave_passthrough(pa_source *s) {
 static void compute_reference_ratio(pa_source_output *o) {
     unsigned c = 0;
     pa_cvolume remapped;
+    pa_cvolume ratio;
 
     pa_assert(o);
     pa_assert(pa_source_flat_volume_enabled(o->source));
@@ -1230,7 +1221,7 @@ static void compute_reference_ratio(pa_source_output *o) {
     remapped = o->source->reference_volume;
     pa_cvolume_remap(&remapped, &o->source->channel_map, &o->channel_map);
 
-    o->reference_ratio.channels = o->sample_spec.channels;
+    ratio = o->reference_ratio;
 
     for (c = 0; c < o->sample_spec.channels; c++) {
 
@@ -1240,14 +1231,16 @@ static void compute_reference_ratio(pa_source_output *o) {
 
         /* Don't update the reference ratio unless necessary */
         if (pa_sw_volume_multiply(
-                    o->reference_ratio.values[c],
+                    ratio.values[c],
                     remapped.values[c]) == o->volume.values[c])
             continue;
 
-        o->reference_ratio.values[c] = pa_sw_volume_divide(
+        ratio.values[c] = pa_sw_volume_divide(
                 o->volume.values[c],
                 remapped.values[c]);
     }
+
+    pa_source_output_set_reference_ratio(o, &ratio);
 }
 
 /* Called from main context. Only called for the root source in volume sharing
@@ -1437,20 +1430,13 @@ static void update_real_volume(pa_source *s, const pa_cvolume *new_volume, pa_ch
     PA_IDXSET_FOREACH(o, s->outputs, idx) {
         if (o->destination_source && (o->destination_source->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER)) {
             if (pa_source_flat_volume_enabled(s)) {
-                pa_cvolume old_volume = o->volume;
+                pa_cvolume new_output_volume;
 
                 /* Follow the root source's real volume. */
-                o->volume = *new_volume;
-                pa_cvolume_remap(&o->volume, channel_map, &o->channel_map);
+                new_output_volume = *new_volume;
+                pa_cvolume_remap(&new_output_volume, channel_map, &o->channel_map);
+                pa_source_output_set_volume_direct(o, &new_output_volume);
                 compute_reference_ratio(o);
-
-                /* The volume changed, let's tell people so */
-                if (!pa_cvolume_equal(&old_volume, &o->volume)) {
-                    if (o->volume_changed)
-                        o->volume_changed(o);
-
-                    pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
-                }
             }
 
             update_real_volume(o->destination_source, new_volume, channel_map);
@@ -1505,7 +1491,7 @@ static void propagate_reference_volume(pa_source *s) {
      * source output volumes accordingly */
 
     PA_IDXSET_FOREACH(o, s->outputs, idx) {
-        pa_cvolume old_volume;
+        pa_cvolume new_volume;
 
         if (o->destination_source && (o->destination_source->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER)) {
             propagate_reference_volume(o->destination_source);
@@ -1516,24 +1502,14 @@ static void propagate_reference_volume(pa_source *s) {
             continue;
         }
 
-        old_volume = o->volume;
-
         /* This basically calculates:
          *
          * o->volume := o->reference_volume * o->reference_ratio  */
 
-        o->volume = s->reference_volume;
-        pa_cvolume_remap(&o->volume, &s->channel_map, &o->channel_map);
-        pa_sw_cvolume_multiply(&o->volume, &o->volume, &o->reference_ratio);
-
-        /* The volume changed, let's tell people so */
-        if (!pa_cvolume_equal(&old_volume, &o->volume)) {
-
-            if (o->volume_changed)
-                o->volume_changed(o);
-
-            pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
-        }
+        new_volume = s->reference_volume;
+        pa_cvolume_remap(&new_volume, &s->channel_map, &o->channel_map);
+        pa_sw_cvolume_multiply(&new_volume, &new_volume, &o->reference_ratio);
+        pa_source_output_set_volume_direct(o, &new_volume);
     }
 }
 
@@ -1556,13 +1532,11 @@ static bool update_reference_volume(pa_source *s, const pa_cvolume *v, const pa_
     pa_cvolume_remap(&volume, channel_map, &s->channel_map);
 
     reference_volume_changed = !pa_cvolume_equal(&volume, &s->reference_volume);
-    s->reference_volume = volume;
+    pa_source_set_reference_volume_direct(s, &volume);
 
     s->save_volume = (!reference_volume_changed && s->save_volume) || save;
 
-    if (reference_volume_changed)
-        pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
-    else if (!(s->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER))
+    if (!reference_volume_changed && !(s->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER))
         /* If the root source's volume doesn't change, then there can't be any
          * changes in the other source in the source tree either.
          *
@@ -1651,7 +1625,7 @@ void pa_source_set_volume(
 
         /* Let's 'push' the reference volume if necessary */
         pa_cvolume_merge(&new_reference_volume, &s->reference_volume, &root_source->real_volume);
-        /* If the source and it's root don't have the same number of channels, we need to remap */
+        /* If the source and its root don't have the same number of channels, we need to remap */
         if (s != root_source && !pa_channel_map_equal(&s->channel_map, &root_source->channel_map))
             pa_cvolume_remap(&new_reference_volume, &s->channel_map, &root_source->channel_map);
         update_reference_volume(root_source, &new_reference_volume, &root_source->channel_map, save);
@@ -1728,13 +1702,12 @@ static void propagate_real_volume(pa_source *s, const pa_cvolume *old_real_volum
     }
 
     if (pa_source_flat_volume_enabled(s)) {
-
         PA_IDXSET_FOREACH(o, s->outputs, idx) {
-            pa_cvolume old_volume = o->volume;
+            pa_cvolume new_volume;
 
             /* 2. Since the source's reference and real volumes are equal
              * now our ratios should be too. */
-            o->reference_ratio = o->real_ratio;
+            pa_source_output_set_reference_ratio(o, &o->real_ratio);
 
             /* 3. Recalculate the new stream reference volume based on the
              * reference ratio and the sink's reference volume.
@@ -1744,18 +1717,10 @@ static void propagate_real_volume(pa_source *s, const pa_cvolume *old_real_volum
              * o->volume = s->reference_volume * o->reference_ratio
              *
              * This is identical to propagate_reference_volume() */
-            o->volume = s->reference_volume;
-            pa_cvolume_remap(&o->volume, &s->channel_map, &o->channel_map);
-            pa_sw_cvolume_multiply(&o->volume, &o->volume, &o->reference_ratio);
-
-            /* Notify if something changed */
-            if (!pa_cvolume_equal(&old_volume, &o->volume)) {
-
-                if (o->volume_changed)
-                    o->volume_changed(o);
-
-                pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, o->index);
-            }
+            new_volume = s->reference_volume;
+            pa_cvolume_remap(&new_volume, &s->channel_map, &o->channel_map);
+            pa_sw_cvolume_multiply(&new_volume, &new_volume, &o->reference_ratio);
+            pa_source_output_set_volume_direct(o, &new_volume);
 
             if (o->destination_source && (o->destination_source->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER))
                 propagate_real_volume(o->destination_source, old_real_volume);
@@ -1825,19 +1790,30 @@ void pa_source_set_mute(pa_source *s, bool mute, bool save) {
 
     pa_source_assert_ref(s);
     pa_assert_ctl_context();
-    pa_assert(PA_SOURCE_IS_LINKED(s->state));
 
     old_muted = s->muted;
+
+    if (mute == old_muted) {
+        s->save_muted |= save;
+        return;
+    }
+
     s->muted = mute;
-    s->save_muted = (old_muted == s->muted && s->save_muted) || save;
+    s->save_muted = save;
 
-    if (!(s->flags & PA_SOURCE_DEFERRED_VOLUME) && s->set_mute)
+    if (!(s->flags & PA_SOURCE_DEFERRED_VOLUME) && s->set_mute) {
+        s->set_mute_in_progress = true;
         s->set_mute(s);
+        s->set_mute_in_progress = false;
+    }
 
-    pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_MUTE, NULL, 0, NULL) == 0);
+    if (!PA_SOURCE_IS_LINKED(s->state))
+        return;
 
-    if (old_muted != s->muted)
-        pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    pa_log_debug("The mute of source %s changed from %s to %s.", s->name, pa_yes_no(old_muted), pa_yes_no(mute));
+    pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_MUTE, NULL, 0, NULL) == 0);
+    pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_MUTE_CHANGED], s);
 }
 
 /* Called from main thread */
@@ -1847,21 +1823,15 @@ bool pa_source_get_mute(pa_source *s, bool force_refresh) {
     pa_assert_ctl_context();
     pa_assert(PA_SOURCE_IS_LINKED(s->state));
 
-    if (s->refresh_muted || force_refresh) {
-        bool old_muted = s->muted;
-
-        if (!(s->flags & PA_SOURCE_DEFERRED_VOLUME) && s->get_mute)
-            s->get_mute(s);
-
-        pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_MUTE, NULL, 0, NULL) == 0);
-
-        if (old_muted != s->muted) {
-            s->save_muted = true;
-
-            pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    if ((s->refresh_muted || force_refresh) && s->get_mute) {
+        bool mute;
 
-            /* Make sure the soft mute status stays in sync */
-            pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_SET_MUTE, NULL, 0, NULL) == 0);
+        if (s->flags & PA_SOURCE_DEFERRED_VOLUME) {
+            if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_MUTE, &mute, 0, NULL) >= 0)
+                pa_source_mute_changed(s, mute);
+        } else {
+            if (s->get_mute(s, &mute) >= 0)
+                pa_source_mute_changed(s, mute);
         }
     }
 
@@ -1874,15 +1844,17 @@ void pa_source_mute_changed(pa_source *s, bool new_muted) {
     pa_assert_ctl_context();
     pa_assert(PA_SOURCE_IS_LINKED(s->state));
 
-    /* The source implementor may call this if the mute state changed to make sure everyone is notified */
-
-    if (s->muted == new_muted)
+    if (s->set_mute_in_progress)
         return;
 
-    s->muted = new_muted;
-    s->save_muted = true;
+    /* pa_source_set_mute() does this same check, so this may appear redundant,
+     * but we must have this here also, because the save parameter of
+     * pa_source_set_mute() would otherwise have unintended side effects
+     * (saving the mute state when it shouldn't be saved). */
+    if (new_muted == s->muted)
+        return;
 
-    pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    pa_source_set_mute(s, new_muted, true);
 }
 
 /* Called from main thread */
@@ -2078,9 +2050,7 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_
                 o->thread_info.direct_on_input = NULL;
             }
 
-            if (pa_hashmap_remove(s->thread_info.outputs, PA_UINT32_TO_PTR(o->index)))
-                pa_source_output_unref(o);
-
+            pa_hashmap_remove_and_free(s->thread_info.outputs, PA_UINT32_TO_PTR(o->index));
             pa_source_invalidate_requested_latency(s, true);
 
             /* In flat volume mode we need to update the volume as
@@ -2146,7 +2116,7 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_
         case PA_SOURCE_MESSAGE_GET_MUTE:
 
             if (s->flags & PA_SOURCE_DEFERRED_VOLUME && s->get_mute)
-                s->get_mute(s);
+                return s->get_mute(s, userdata);
 
             return 0;
 
@@ -2878,3 +2848,28 @@ done:
 
     return out_formats;
 }
+
+/* Called from the main thread. */
+void pa_source_set_reference_volume_direct(pa_source *s, const pa_cvolume *volume) {
+    pa_cvolume old_volume;
+    char old_volume_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+    char new_volume_str[PA_CVOLUME_SNPRINT_VERBOSE_MAX];
+
+    pa_assert(s);
+    pa_assert(volume);
+
+    old_volume = s->reference_volume;
+
+    if (pa_cvolume_equal(volume, &old_volume))
+        return;
+
+    s->reference_volume = *volume;
+    pa_log_debug("The reference volume of source %s changed from %s to %s.", s->name,
+                 pa_cvolume_snprint_verbose(old_volume_str, sizeof(old_volume_str), &old_volume, &s->channel_map,
+                                            s->flags & PA_SOURCE_DECIBEL_VOLUME),
+                 pa_cvolume_snprint_verbose(new_volume_str, sizeof(new_volume_str), volume, &s->channel_map,
+                                            s->flags & PA_SOURCE_DECIBEL_VOLUME));
+
+    pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
+    pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SOURCE_VOLUME_CHANGED], s);
+}
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h
index 5c74a51..1c9ecec 100644
--- a/src/pulsecore/source.h
+++ b/src/pulsecore/source.h
@@ -58,6 +58,8 @@ static inline bool PA_SOURCE_IS_LINKED(pa_source_state_t x) {
 /* A generic definition for void callback functions */
 typedef void(*pa_source_cb_t)(pa_source *s);
 
+typedef int (*pa_source_get_mute_cb_t)(pa_source *s, bool *mute);
+
 struct pa_source {
     pa_msgobject parent;
 
@@ -118,6 +120,8 @@ struct pa_source {
 
     unsigned priority;
 
+    bool set_mute_in_progress;
+
     /* Called when the main loop requests a state change. Called from
      * main loop context. If returns -1 the state change will be
      * inhibited */
@@ -156,14 +160,24 @@ struct pa_source {
      * set this callback. */
     pa_source_cb_t write_volume; /* may be NULL */
 
-    /* Called when the mute setting is queried. Called from main loop
-     * context. If this is NULL a PA_SOURCE_MESSAGE_GET_MUTE message
-     * will be sent to the IO thread instead. If refresh_mute is
-     * false neither this function is called nor a message is sent.
+    /* If the source mute can change "spontaneously" (i.e. initiated by the
+     * source implementation, not by someone else calling
+     * pa_source_set_mute()), then the source implementation can notify about
+     * changed mute either by calling pa_source_mute_changed() or by calling
+     * pa_source_get_mute() with force_refresh=true. If the implementation
+     * chooses the latter approach, it should implement the get_mute callback.
+     * Otherwise get_mute can be NULL.
+     *
+     * This is called when pa_source_get_mute() is called with
+     * force_refresh=true. This is called from the IO thread if the
+     * PA_SINK_DEFERRED_VOLUME flag is set, otherwise this is called from the
+     * main thread. On success, the implementation is expected to return 0 and
+     * set the mute parameter that is passed as a reference. On failure, the
+     * implementation is expected to return -1.
      *
      * You must use the function pa_source_set_get_mute_callback() to
      * set this callback. */
-    pa_source_cb_t get_mute; /* may be NULL */
+    pa_source_get_mute_cb_t get_mute;
 
     /* Called when the mute setting shall be changed. Called from main
      * loop context. If this is NULL a PA_SOURCE_MESSAGE_SET_MUTE
@@ -314,7 +328,7 @@ pa_source* pa_source_new(
 void pa_source_set_get_volume_callback(pa_source *s, pa_source_cb_t cb);
 void pa_source_set_set_volume_callback(pa_source *s, pa_source_cb_t cb);
 void pa_source_set_write_volume_callback(pa_source *s, pa_source_cb_t cb);
-void pa_source_set_get_mute_callback(pa_source *s, pa_source_cb_t cb);
+void pa_source_set_get_mute_callback(pa_source *s, pa_source_get_mute_cb_t cb);
 void pa_source_set_set_mute_callback(pa_source *s, pa_source_cb_t cb);
 void pa_source_enable_decibel_volume(pa_source *s, bool enable);
 
@@ -426,6 +440,13 @@ bool pa_source_volume_change_apply(pa_source *s, pa_usec_t *usec_to_next);
 void pa_source_invalidate_requested_latency(pa_source *s, bool dynamic);
 pa_usec_t pa_source_get_latency_within_thread(pa_source *s);
 
+/* Called from the main thread, from source-output.c only. The normal way to
+ * set the source reference volume is to call pa_source_set_volume(), but the
+ * flat volume logic in source-output.c needs also a function that doesn't do
+ * all the extra stuff that pa_source_set_volume() does. This function simply
+ * sets s->reference_volume and fires change notifications. */
+void pa_source_set_reference_volume_direct(pa_source *s, const pa_cvolume *volume);
+
 #define pa_source_assert_io_context(s) \
     pa_assert(pa_thread_mq_get() || !PA_SOURCE_IS_LINKED((s)->state))
 
diff --git a/src/pulsecore/srbchannel.c b/src/pulsecore/srbchannel.c
new file mode 100644
index 0000000..a0f916e
--- /dev/null
+++ b/src/pulsecore/srbchannel.c
@@ -0,0 +1,378 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2014 David Henningsson, Canonical Ltd.
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation; either version 2.1 of the
+  License, or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "srbchannel.h"
+
+#include <pulsecore/atomic.h>
+#include <pulse/xmalloc.h>
+
+/* #define DEBUG_SRBCHANNEL */
+
+/* This ringbuffer might be useful in other contexts too, but
+ * right now it's only used inside the srbchannel, so let's keep it here
+ * for the time being. */
+typedef struct pa_ringbuffer pa_ringbuffer;
+
+struct pa_ringbuffer {
+    pa_atomic_t *count; /* amount of data in the buffer */
+    int capacity;
+    uint8_t *memory;
+    int readindex, writeindex;
+};
+
+static void *pa_ringbuffer_peek(pa_ringbuffer *r, int *count) {
+    int c = pa_atomic_load(r->count);
+
+    if (r->readindex + c > r->capacity)
+        *count = r->capacity - r->readindex;
+    else
+        *count = c;
+
+    return r->memory + r->readindex;
+}
+
+/* Returns true only if the buffer was completely full before the drop. */
+static bool pa_ringbuffer_drop(pa_ringbuffer *r, int count) {
+    bool b = pa_atomic_sub(r->count, count) >= r->capacity;
+
+    r->readindex += count;
+    r->readindex %= r->capacity;
+
+    return b;
+}
+
+static void *pa_ringbuffer_begin_write(pa_ringbuffer *r, int *count) {
+    int c = pa_atomic_load(r->count);
+
+    *count = PA_MIN(r->capacity - r->writeindex, r->capacity - c);
+
+    return r->memory + r->writeindex;
+}
+
+static void pa_ringbuffer_end_write(pa_ringbuffer *r, int count) {
+    pa_atomic_add(r->count, count);
+    r->writeindex += count;
+    r->writeindex %= r->capacity;
+}
+
+struct pa_srbchannel {
+    pa_ringbuffer rb_read, rb_write;
+    pa_fdsem *sem_read, *sem_write;
+    pa_memblock *memblock;
+
+    void *cb_userdata;
+    pa_srbchannel_cb_t callback;
+
+    pa_io_event *read_event;
+    pa_defer_event *defer_event;
+    pa_mainloop_api *mainloop;
+};
+
+/* We always listen to sem_read, and always signal on sem_write.
+ *
+ * This means we signal the same semaphore for two scenarios:
+ * 1) We have written something to our send buffer, and want the other
+ *    side to read it
+ * 2) We have read something from our receive buffer that was previously
+ *    completely full, and want the other side to continue writing
+*/
+
+size_t pa_srbchannel_write(pa_srbchannel *sr, const void *data, size_t l) {
+    size_t written = 0;
+
+    while (l > 0) {
+        int towrite;
+        void *ptr = pa_ringbuffer_begin_write(&sr->rb_write, &towrite);
+
+        if ((size_t) towrite > l)
+            towrite = l;
+
+        if (towrite == 0) {
+#ifdef DEBUG_SRBCHANNEL
+            pa_log("srbchannel output buffer full");
+#endif
+            break;
+        }
+
+        memcpy(ptr, data, towrite);
+        pa_ringbuffer_end_write(&sr->rb_write, towrite);
+        written += towrite;
+        data = (uint8_t*) data + towrite;
+        l -= towrite;
+    }
+#ifdef DEBUG_SRBCHANNEL
+    pa_log("Wrote %d bytes to srbchannel, signalling fdsem", (int) written);
+#endif
+
+    pa_fdsem_post(sr->sem_write);
+    return written;
+}
+
+size_t pa_srbchannel_read(pa_srbchannel *sr, void *data, size_t l) {
+    size_t isread = 0;
+
+    while (l > 0) {
+        int toread;
+        void *ptr = pa_ringbuffer_peek(&sr->rb_read, &toread);
+
+        if ((size_t) toread > l)
+            toread = l;
+
+        if (toread == 0)
+            break;
+
+        memcpy(data, ptr, toread);
+
+        if (pa_ringbuffer_drop(&sr->rb_read, toread)) {
+#ifdef DEBUG_SRBCHANNEL
+            pa_log("Read from full output buffer, signalling fdsem");
+#endif
+            pa_fdsem_post(sr->sem_write);
+        }
+
+        isread += toread;
+        data = (uint8_t*) data + toread;
+        l -= toread;
+    }
+
+#ifdef DEBUG_SRBCHANNEL
+    pa_log("Read %d bytes from srbchannel", (int) isread);
+#endif
+
+    return isread;
+}
+
+/* This is the memory layout of the ringbuffer shm block. It is followed by
+   read and write ringbuffer memory. */
+struct srbheader {
+    pa_atomic_t read_count;
+    pa_atomic_t write_count;
+
+    pa_fdsem_data read_semdata;
+    pa_fdsem_data write_semdata;
+
+    int capacity;
+    int readbuf_offset;
+    int writebuf_offset;
+
+    /* TODO: Maybe a marker here to make sure we talk to a server with equally sized struct */
+};
+
+static void srbchannel_rwloop(pa_srbchannel* sr) {
+    do {
+#ifdef DEBUG_SRBCHANNEL
+        int q;
+        pa_ringbuffer_peek(&sr->rb_read, &q);
+        pa_log("In rw loop from srbchannel, before callback, count = %d", q);
+#endif
+
+        if (sr->callback) {
+            if (!sr->callback(sr, sr->cb_userdata)) {
+#ifdef DEBUG_SRBCHANNEL
+                pa_log("Aborting read loop from srbchannel");
+#endif
+                return;
+            }
+        }
+
+#ifdef DEBUG_SRBCHANNEL
+        pa_ringbuffer_peek(&sr->rb_read, &q);
+        pa_log("In rw loop from srbchannel, after callback, count = %d", q);
+#endif
+
+    } while (pa_fdsem_before_poll(sr->sem_read) < 0);
+}
+
+static void semread_cb(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event_flags_t events, void *userdata) {
+    pa_srbchannel* sr = userdata;
+
+    pa_fdsem_after_poll(sr->sem_read);
+    srbchannel_rwloop(sr);
+}
+
+static void defer_cb(pa_mainloop_api *m, pa_defer_event *e, void *userdata) {
+    pa_srbchannel* sr = userdata;
+
+#ifdef DEBUG_SRBCHANNEL
+    pa_log("Calling rw loop from deferred event");
+#endif
+
+    m->defer_enable(e, 0);
+    srbchannel_rwloop(sr);
+}
+
+pa_srbchannel* pa_srbchannel_new(pa_mainloop_api *m, pa_mempool *p) {
+    int capacity;
+    int readfd;
+    struct srbheader *srh;
+
+    pa_srbchannel* sr = pa_xmalloc0(sizeof(pa_srbchannel));
+    sr->mainloop = m;
+    sr->memblock = pa_memblock_new_pool(p, -1);
+    srh = pa_memblock_acquire(sr->memblock);
+    pa_zero(*srh);
+
+    sr->rb_read.memory = (uint8_t*) srh + PA_ALIGN(sizeof(*srh));
+    srh->readbuf_offset = sr->rb_read.memory - (uint8_t*) srh;
+
+    capacity = (pa_memblock_get_length(sr->memblock) - srh->readbuf_offset) / 2;
+
+    sr->rb_write.memory = PA_ALIGN_PTR(sr->rb_read.memory + capacity);
+    srh->writebuf_offset = sr->rb_write.memory - (uint8_t*) srh;
+
+    capacity = PA_MIN(capacity, srh->writebuf_offset - srh->readbuf_offset);
+
+    pa_log_debug("SHM block is %d bytes, ringbuffer capacity is 2 * %d bytes",
+        (int) pa_memblock_get_length(sr->memblock), capacity);
+
+    srh->capacity = sr->rb_read.capacity = sr->rb_write.capacity = capacity;
+
+    sr->rb_read.count = &srh->read_count;
+    sr->rb_write.count = &srh->write_count;
+
+    sr->sem_read = pa_fdsem_new_shm(&srh->read_semdata);
+    if (!sr->sem_read)
+        goto fail;
+
+    sr->sem_write = pa_fdsem_new_shm(&srh->write_semdata);
+    if (!sr->sem_write)
+        goto fail;
+
+    readfd = pa_fdsem_get(sr->sem_read);
+
+#ifdef DEBUG_SRBCHANNEL
+    pa_log("Enabling io event on fd %d", readfd);
+#endif
+
+    sr->read_event = m->io_new(m, readfd, PA_IO_EVENT_INPUT, semread_cb, sr);
+    m->io_enable(sr->read_event, PA_IO_EVENT_INPUT);
+
+    return sr;
+
+fail:
+    pa_srbchannel_free(sr);
+
+    return NULL;
+}
+
+static void pa_srbchannel_swap(pa_srbchannel *sr) {
+    pa_srbchannel temp = *sr;
+
+    sr->sem_read = temp.sem_write;
+    sr->sem_write = temp.sem_read;
+    sr->rb_read = temp.rb_write;
+    sr->rb_write = temp.rb_read;
+}
+
+pa_srbchannel* pa_srbchannel_new_from_template(pa_mainloop_api *m, pa_srbchannel_template *t)
+{
+    int temp;
+    struct srbheader *srh;
+    pa_srbchannel* sr = pa_xmalloc0(sizeof(pa_srbchannel));
+
+    sr->mainloop = m;
+    sr->memblock = t->memblock;
+    pa_memblock_ref(sr->memblock);
+    srh = pa_memblock_acquire(sr->memblock);
+
+    sr->rb_read.capacity = sr->rb_write.capacity = srh->capacity;
+    sr->rb_read.count = &srh->read_count;
+    sr->rb_write.count = &srh->write_count;
+
+    sr->rb_read.memory = (uint8_t*) srh + srh->readbuf_offset;
+    sr->rb_write.memory = (uint8_t*) srh + srh->writebuf_offset;
+
+    sr->sem_read = pa_fdsem_open_shm(&srh->read_semdata, t->readfd);
+    if (!sr->sem_read)
+        goto fail;
+
+    sr->sem_write = pa_fdsem_open_shm(&srh->write_semdata, t->writefd);
+    if (!sr->sem_write)
+        goto fail;
+
+    pa_srbchannel_swap(sr);
+    temp = t->readfd; t->readfd = t->writefd; t->writefd = temp;
+
+#ifdef DEBUG_SRBCHANNEL
+    pa_log("Enabling io event on fd %d", t->readfd);
+#endif
+
+    sr->read_event = m->io_new(m, t->readfd, PA_IO_EVENT_INPUT, semread_cb, sr);
+    m->io_enable(sr->read_event, PA_IO_EVENT_INPUT);
+
+    return sr;
+
+fail:
+    pa_srbchannel_free(sr);
+
+    return NULL;
+}
+
+void pa_srbchannel_export(pa_srbchannel *sr, pa_srbchannel_template *t) {
+    t->memblock = sr->memblock;
+    t->readfd = pa_fdsem_get(sr->sem_read);
+    t->writefd = pa_fdsem_get(sr->sem_write);
+}
+
+void pa_srbchannel_set_callback(pa_srbchannel *sr, pa_srbchannel_cb_t callback, void *userdata) {
+    if (sr->callback)
+        pa_fdsem_after_poll(sr->sem_read);
+
+    sr->callback = callback;
+    sr->cb_userdata = userdata;
+
+    if (sr->callback) {
+        /* If there are events to be read already in the ringbuffer, we will not get any IO event for that,
+           because that's how pa_fdsem works. Therefore check the ringbuffer in a defer event instead. */
+        if (!sr->defer_event)
+            sr->defer_event = sr->mainloop->defer_new(sr->mainloop, defer_cb, sr);
+        sr->mainloop->defer_enable(sr->defer_event, 1);
+    }
+}
+
+void pa_srbchannel_free(pa_srbchannel *sr)
+{
+#ifdef DEBUG_SRBCHANNEL
+    pa_log("Freeing srbchannel");
+#endif
+    pa_assert(sr);
+
+    if (sr->defer_event)
+        sr->mainloop->defer_free(sr->defer_event);
+    if (sr->read_event)
+        sr->mainloop->io_free(sr->read_event);
+
+    if (sr->sem_read)
+        pa_fdsem_free(sr->sem_read);
+    if (sr->sem_write)
+        pa_fdsem_free(sr->sem_write);
+
+    if (sr->memblock) {
+        pa_memblock_release(sr->memblock);
+        pa_memblock_unref(sr->memblock);
+    }
+
+    pa_xfree(sr);
+}
diff --git a/src/pulsecore/srbchannel.h b/src/pulsecore/srbchannel.h
new file mode 100644
index 0000000..c96877e
--- /dev/null
+++ b/src/pulsecore/srbchannel.h
@@ -0,0 +1,59 @@
+#ifndef foopulsesrbchannelhfoo
+#define foopulsesrbchannelhfoo
+
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2014 David Henningsson, Canonical Ltd.
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation; either version 2.1 of the
+  License, or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#include <pulse/mainloop-api.h>
+#include <pulsecore/fdsem.h>
+#include <pulsecore/memblock.h>
+
+/* An shm ringbuffer that is used for low overhead server-client communication.
+ * Signaling is done through eventfd semaphores (pa_fdsem). */
+
+typedef struct pa_srbchannel pa_srbchannel;
+
+typedef struct pa_srbchannel_template {
+    int readfd, writefd;
+    pa_memblock *memblock;
+} pa_srbchannel_template;
+
+pa_srbchannel* pa_srbchannel_new(pa_mainloop_api *m, pa_mempool *p);
+/* Note: this creates a srbchannel with swapped read and write. */
+pa_srbchannel* pa_srbchannel_new_from_template(pa_mainloop_api *m, pa_srbchannel_template *t);
+
+void pa_srbchannel_free(pa_srbchannel *sr);
+
+void pa_srbchannel_export(pa_srbchannel *sr, pa_srbchannel_template *t);
+
+size_t pa_srbchannel_write(pa_srbchannel *sr, const void *data, size_t l);
+size_t pa_srbchannel_read(pa_srbchannel *sr, void *data, size_t l);
+
+/* Set the callback function that is called whenever data becomes available for reading.
+ * It can also be called if the output buffer was full and can now be written to.
+ *
+ * Return false to abort all processing (e g if the srbchannel has been freed during the callback).
+ * Otherwise return true.
+*/
+typedef bool (*pa_srbchannel_cb_t)(pa_srbchannel *sr, void *userdata);
+void pa_srbchannel_set_callback(pa_srbchannel *sr, pa_srbchannel_cb_t callback, void *userdata);
+
+#endif
diff --git a/src/pulsecore/start-child.c b/src/pulsecore/start-child.c
index 7f55d4e..8318b9b 100644
--- a/src/pulsecore/start-child.c
+++ b/src/pulsecore/start-child.c
@@ -92,7 +92,7 @@ int pa_start_child_for_read(const char *name, const char *argv1, pid_t *pid) {
 
         /* Make sure our children are not influenced by the
          * LD_BIND_NOW we set for ourselves. */
-        unsetenv("LD_BIND_NOW");
+        pa_unset_env("LD_BIND_NOW");
 
 #ifdef PR_SET_PDEATHSIG
         /* On Linux we can use PR_SET_PDEATHSIG to have the helper
diff --git a/src/pulsecore/svolume_c.c b/src/pulsecore/svolume_c.c
index eb04973..2e2db12 100644
--- a/src/pulsecore/svolume_c.c
+++ b/src/pulsecore/svolume_c.c
@@ -117,7 +117,7 @@ static void pa_volume_float32ne_c(float *samples, const float *volumes, unsigned
     }
 }
 
-static void pa_volume_float32re_c(float *samples, float *volumes, unsigned channels, unsigned length) {
+static void pa_volume_float32re_c(float *samples, const float *volumes, unsigned channels, unsigned length) {
     unsigned channel;
 
     length /= sizeof(float);
@@ -125,9 +125,9 @@ static void pa_volume_float32re_c(float *samples, float *volumes, unsigned chann
     for (channel = 0; length; length--) {
         float t;
 
-        t = PA_FLOAT32_SWAP(*samples);
+        t = PA_READ_FLOAT32RE(samples);
         t *= volumes[channel];
-        *samples++ = PA_FLOAT32_SWAP(t);
+        PA_WRITE_FLOAT32RE(samples++, t);
 
         if (PA_UNLIKELY(++channel >= channels))
             channel = 0;
diff --git a/src/tests/alsa-time-test.c b/src/tests/alsa-time-test.c
index 3c82fdc..b4eedab 100644
--- a/src/tests/alsa-time-test.c
+++ b/src/tests/alsa-time-test.c
@@ -10,6 +10,9 @@
 
 #include <alsa/asoundlib.h>
 
+#define SAMPLE_RATE 44100
+#define CHANNELS 2
+
 static uint64_t timespec_us(const struct timespec *ts) {
     return
         ts->tv_sec * 1000000LLU +
@@ -23,16 +26,18 @@ int main(int argc, char *argv[]) {
     snd_pcm_sw_params_t *swparams;
     snd_pcm_status_t *status;
     snd_pcm_t *pcm;
-    unsigned rate = 44100;
+    unsigned rate = SAMPLE_RATE;
     unsigned periods = 2;
-    snd_pcm_uframes_t boundary, buffer_size = 44100/10; /* 100s */
+    snd_pcm_uframes_t boundary, buffer_size = SAMPLE_RATE/10; /* 100s */
     int dir = 1;
+    int fillrate;
     struct timespec start, last_timestamp = { 0, 0 };
     uint64_t start_us, last_us = 0;
     snd_pcm_sframes_t last_avail = 0, last_delay = 0;
     struct pollfd *pollfds;
     int n_pollfd;
     int64_t sample_count = 0;
+    uint16_t *samples;
     struct sched_param sp;
 
     r = -1;
@@ -52,8 +57,12 @@ int main(int argc, char *argv[]) {
 
     start_us = timespec_us(&start);
 
-    dev = argc > 1 ? argv[1] : "front:AudioPCI";
+    dev = argc > 1 ? argv[1] : "front:0";
     cap = argc > 2 ? atoi(argv[2]) : 0;
+    fillrate = argc > 3 ? atoi(argv[3]) : 1;
+
+    samples = calloc(fillrate, CHANNELS*sizeof(uint16_t));
+    assert(samples);
 
     if (cap == 0)
       r = snd_pcm_open(&pcm, dev, SND_PCM_STREAM_PLAYBACK, 0);
@@ -76,7 +85,7 @@ int main(int argc, char *argv[]) {
     r = snd_pcm_hw_params_set_rate_near(pcm, hwparams, &rate, NULL);
     assert(r == 0);
 
-    r = snd_pcm_hw_params_set_channels(pcm, hwparams, 2);
+    r = snd_pcm_hw_params_set_channels(pcm, hwparams, CHANNELS);
     assert(r == 0);
 
     r = snd_pcm_hw_params_set_periods_integer(pcm, hwparams);
@@ -108,7 +117,7 @@ int main(int argc, char *argv[]) {
 
     r = snd_pcm_hw_params_get_buffer_size(hwparams, &buffer_size);
     assert(r == 0);
-    r = snd_pcm_sw_params_set_start_threshold(pcm, swparams, buffer_size);
+    r = snd_pcm_sw_params_set_start_threshold(pcm, swparams, buffer_size - (buffer_size % fillrate));
     assert(r == 0);
 
     r = snd_pcm_sw_params_get_boundary(swparams, &boundary);
@@ -185,19 +194,17 @@ int main(int argc, char *argv[]) {
 
         assert(!revents || avail > 0);
 
-        if ((!cap && avail) || (cap && (unsigned)avail >= buffer_size)) {
+        if ((!cap && (avail >= fillrate)) || (cap && (unsigned)avail >= buffer_size)) {
             snd_pcm_sframes_t sframes;
-            static const uint16_t psamples[2] = { 0, 0 };
-            uint16_t csamples[2];
 
             if (cap == 0)
-              sframes = snd_pcm_writei(pcm, psamples, 1);
+              sframes = snd_pcm_writei(pcm, samples, fillrate);
             else
-              sframes = snd_pcm_readi(pcm, csamples, 1);
-            assert(sframes == 1);
+              sframes = snd_pcm_readi(pcm, samples, fillrate);
+            assert(sframes == fillrate);
 
-            handled = 1;
-            sample_count++;
+            handled = fillrate;
+            sample_count += fillrate;
         }
 
         if (!handled &&
@@ -212,9 +219,9 @@ int main(int argc, char *argv[]) {
         timestamp_us = timespec_us(&timestamp);
 
         if (cap == 0)
-            pos = (unsigned long long) ((sample_count - handled - delay) * 1000000LU / 44100);
+            pos = (unsigned long long) ((sample_count - handled - delay) * 1000000LU / SAMPLE_RATE);
         else
-            pos = (unsigned long long) ((sample_count - handled + delay) * 1000000LU / 44100);
+            pos = (unsigned long long) ((sample_count - handled + delay) * 1000000LU / SAMPLE_RATE);
 
         if (count++ % 50 == 0)
             printf("Elapsed\tCPU\tALSA\tPos\tSamples\tavail\tdelay\trevents\thandled\tstate\n");
diff --git a/src/tests/connect-stress.c b/src/tests/connect-stress.c
index 0cf072d..48d015b 100644
--- a/src/tests/connect-stress.c
+++ b/src/tests/connect-stress.c
@@ -42,7 +42,13 @@
  * which makes a non-error abort less likely (although still easily possible of
  * playing >=3 streams outside of the test - including internal loopback, rtp,
  * combine, remap streams etc.) */
-#define NSTREAMS ((PA_MAX_INPUTS_PER_SINK/2) - 1)
+/* #define NSTREAMS ((PA_MAX_INPUTS_PER_SINK/2) - 1) */
+
+/* This test broke when PA_MAX_INPUTS_PER_SINK was increased from 32 to 256.
+ * Because we currently don't have time to figure out why, let's just set
+ * NSTREAMS to 20 in the meantime.
+ */
+#define NSTREAMS 20
 #define NTESTS 1000
 #define SAMPLE_HZ 44100
 
diff --git a/src/tests/cpu-mix-test.c b/src/tests/cpu-mix-test.c
new file mode 100644
index 0000000..181a767
--- /dev/null
+++ b/src/tests/cpu-mix-test.c
@@ -0,0 +1,226 @@
+/***
+  This file is part of PulseAudio.
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <check.h>
+
+#include <pulsecore/cpu.h>
+#include <pulsecore/cpu-arm.h>
+#include <pulsecore/random.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/mix.h>
+
+#include "runtime-test-util.h"
+
+#define SAMPLES 1028
+#define TIMES 1000
+#define TIMES2 100
+
+static void acquire_mix_streams(pa_mix_info streams[], unsigned nstreams) {
+    unsigned i;
+
+    for (i = 0; i < nstreams; i++)
+        streams[i].ptr = pa_memblock_acquire_chunk(&streams[i].chunk);
+}
+
+static void release_mix_streams(pa_mix_info streams[], unsigned nstreams) {
+    unsigned i;
+
+    for (i = 0; i < nstreams; i++)
+        pa_memblock_release(streams[i].chunk.memblock);
+}
+
+static void run_mix_test(
+        pa_do_mix_func_t func,
+        pa_do_mix_func_t orig_func,
+        int align,
+        int channels,
+        bool correct,
+        bool perf) {
+
+    PA_DECLARE_ALIGNED(8, int16_t, in0[SAMPLES * 4]) = { 0 };
+    PA_DECLARE_ALIGNED(8, int16_t, in1[SAMPLES * 4]) = { 0 };
+    PA_DECLARE_ALIGNED(8, int16_t, out[SAMPLES * 4]) = { 0 };
+    PA_DECLARE_ALIGNED(8, int16_t, out_ref[SAMPLES * 4]) = { 0 };
+    int16_t *samples0, *samples1;
+    int16_t *samples, *samples_ref;
+    int nsamples;
+    pa_mempool *pool;
+    pa_memchunk c0, c1;
+    pa_mix_info m[2];
+    int i;
+
+    pa_assert(channels == 1 || channels == 2 || channels == 4);
+
+    /* Force sample alignment as requested */
+    samples0 = in0 + (8 - align);
+    samples1 = in1 + (8 - align);
+    samples = out + (8 - align);
+    samples_ref = out_ref + (8 - align);
+    nsamples = channels * (SAMPLES - (8 - align));
+
+    fail_unless((pool = pa_mempool_new(false, 0)) != NULL, NULL);
+
+    pa_random(samples0, nsamples * sizeof(int16_t));
+    c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), false);
+    c0.length = pa_memblock_get_length(c0.memblock);
+    c0.index = 0;
+
+    pa_random(samples1, nsamples * sizeof(int16_t));
+    c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), false);
+    c1.length = pa_memblock_get_length(c1.memblock);
+    c1.index = 0;
+
+    m[0].chunk = c0;
+    m[0].volume.channels = channels;
+    for (i = 0; i < channels; i++) {
+        m[0].volume.values[i] = PA_VOLUME_NORM;
+        m[0].linear[i].i = 0x5555;
+    }
+
+    m[1].chunk = c1;
+    m[1].volume.channels = channels;
+    for (i = 0; i < channels; i++) {
+        m[1].volume.values[i] = PA_VOLUME_NORM;
+        m[1].linear[i].i = 0x6789;
+    }
+
+    if (correct) {
+        acquire_mix_streams(m, 2);
+        orig_func(m, 2, channels, samples_ref, nsamples * sizeof(int16_t));
+        release_mix_streams(m, 2);
+
+        acquire_mix_streams(m, 2);
+        func(m, 2, channels, samples, nsamples * sizeof(int16_t));
+        release_mix_streams(m, 2);
+
+        for (i = 0; i < nsamples; i++) {
+            if (samples[i] != samples_ref[i]) {
+                pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels);
+                pa_log_debug("%d: %hd != %04hd (%hd + %hd)\n",
+                    i,
+                    samples[i], samples_ref[i],
+                    samples0[i], samples1[i]);
+                fail();
+            }
+        }
+    }
+
+    if (perf) {
+        pa_log_debug("Testing %d-channel mixing performance with %d sample alignment", channels, align);
+
+        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
+            acquire_mix_streams(m, 2);
+            func(m, 2, channels, samples, nsamples * sizeof(int16_t));
+            release_mix_streams(m, 2);
+        } PA_RUNTIME_TEST_RUN_STOP
+
+        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
+            acquire_mix_streams(m, 2);
+            orig_func(m, 2, channels, samples_ref, nsamples * sizeof(int16_t));
+            release_mix_streams(m, 2);
+        } PA_RUNTIME_TEST_RUN_STOP
+    }
+
+    pa_memblock_unref(c0.memblock);
+    pa_memblock_unref(c1.memblock);
+
+    pa_mempool_free(pool);
+}
+
+START_TEST (mix_special_test) {
+    pa_cpu_info cpu_info = { PA_CPU_UNDEFINED, {}, false };
+    pa_do_mix_func_t orig_func, special_func;
+
+    cpu_info.force_generic_code = true;
+    pa_mix_func_init(&cpu_info);
+    orig_func = pa_get_mix_func(PA_SAMPLE_S16NE);
+
+    cpu_info.force_generic_code = false;
+    pa_mix_func_init(&cpu_info);
+    special_func = pa_get_mix_func(PA_SAMPLE_S16NE);
+
+    pa_log_debug("Checking special mix (s16, stereo)");
+    run_mix_test(special_func, orig_func, 7, 2, true, true);
+
+    pa_log_debug("Checking special mix (s16, 4-channel)");
+    run_mix_test(special_func, orig_func, 7, 4, true, true);
+
+    pa_log_debug("Checking special mix (s16, mono)");
+    run_mix_test(special_func, orig_func, 7, 1, true, true);
+}
+END_TEST
+
+#if defined (__arm__) && defined (__linux__) && defined (HAVE_NEON)
+START_TEST (mix_neon_test) {
+    pa_do_mix_func_t orig_func, neon_func;
+    pa_cpu_arm_flag_t flags = 0;
+
+    pa_cpu_get_arm_flags(&flags);
+
+    if (!(flags & PA_CPU_ARM_NEON)) {
+        pa_log_info("NEON not supported. Skipping");
+        return;
+    }
+
+    orig_func = pa_get_mix_func(PA_SAMPLE_S16NE);
+    pa_mix_func_init_neon(flags);
+    neon_func = pa_get_mix_func(PA_SAMPLE_S16NE);
+
+    pa_log_debug("Checking NEON mix (s16, stereo)");
+    run_mix_test(neon_func, orig_func, 7, 2, true, true);
+
+    pa_log_debug("Checking NEON mix (s16, 4-channel)");
+    run_mix_test(neon_func, orig_func, 7, 4, true, true);
+
+    pa_log_debug("Checking NEON mix (s16, mono)");
+    run_mix_test(neon_func, orig_func, 7, 1, true, true);
+}
+END_TEST
+#endif /* defined (__arm__) && defined (__linux__) && defined (HAVE_NEON) */
+
+int main(int argc, char *argv[]) {
+    int failed = 0;
+    Suite *s;
+    TCase *tc;
+    SRunner *sr;
+
+    if (!getenv("MAKE_CHECK"))
+        pa_log_set_level(PA_LOG_DEBUG);
+
+    s = suite_create("CPU");
+
+    tc = tcase_create("mix");
+    tcase_add_test(tc, mix_special_test);
+#if defined (__arm__) && defined (__linux__) && defined (HAVE_NEON)
+    tcase_add_test(tc, mix_neon_test);
+#endif
+    tcase_set_timeout(tc, 120);
+    suite_add_tcase(s, tc);
+
+    sr = srunner_create(s);
+    srunner_run_all(sr, CK_NORMAL);
+    failed = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/tests/cpu-remap-test.c b/src/tests/cpu-remap-test.c
new file mode 100644
index 0000000..4ee5e00
--- /dev/null
+++ b/src/tests/cpu-remap-test.c
@@ -0,0 +1,436 @@
+/***
+  This file is part of PulseAudio.
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <check.h>
+
+#include <pulsecore/cpu-x86.h>
+#include <pulsecore/cpu.h>
+#include <pulsecore/random.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/remap.h>
+
+#include "runtime-test-util.h"
+
+#define SAMPLES 1027
+#define TIMES 1000
+#define TIMES2 100
+
+static void run_remap_test_float(
+        pa_remap_t *remap_func,
+        pa_remap_t *remap_orig,
+        int align,
+        bool correct,
+        bool perf) {
+
+    PA_DECLARE_ALIGNED(8, float, out_buf_ref[SAMPLES*8]) = { 0.0f, };
+    PA_DECLARE_ALIGNED(8, float, out_buf[SAMPLES*8]) = { 0.0f, };
+    PA_DECLARE_ALIGNED(8, float, in_buf[SAMPLES*8]);
+    float *out, *out_ref;
+    float *in;
+    unsigned n_ic = remap_func->i_ss.channels;
+    unsigned n_oc = remap_func->o_ss.channels;
+    unsigned i, nsamples;
+
+    pa_assert(n_ic >= 1 && n_ic <= 8);
+    pa_assert(n_oc >= 1 && n_oc <= 8);
+
+    /* Force sample alignment as requested */
+    out = out_buf + (8 - align);
+    out_ref = out_buf_ref + (8 - align);
+    in = in_buf + (8 - align);
+    nsamples = SAMPLES - (8 - align);
+
+    for (i = 0; i < nsamples * n_ic; i++)
+        in[i] = 2.1f * (rand()/(float) RAND_MAX - 0.5f);
+
+    if (correct) {
+        remap_orig->do_remap(remap_orig, out_ref, in, nsamples);
+        remap_func->do_remap(remap_func, out, in, nsamples);
+
+        for (i = 0; i < nsamples * n_oc; i++) {
+            if (fabsf(out[i] - out_ref[i]) > 0.0001f) {
+                pa_log_debug("Correctness test failed: align=%d", align);
+                pa_log_debug("%d: %.24f != %.24f\n", i,
+                    out[i], out_ref[i]);
+                fail();
+            }
+        }
+    }
+
+    if (perf) {
+        pa_log_debug("Testing remap performance with %d sample alignment", align);
+
+        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
+            remap_func->do_remap(remap_func, out, in, nsamples);
+        } PA_RUNTIME_TEST_RUN_STOP
+
+        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
+            remap_orig->do_remap(remap_orig, out_ref, in, nsamples);
+        } PA_RUNTIME_TEST_RUN_STOP
+    }
+}
+
+static void run_remap_test_s16(
+        pa_remap_t *remap_func,
+        pa_remap_t *remap_orig,
+        int align,
+        bool correct,
+        bool perf) {
+
+    PA_DECLARE_ALIGNED(8, int16_t, out_buf_ref[SAMPLES*8]) = { 0 };
+    PA_DECLARE_ALIGNED(8, int16_t, out_buf[SAMPLES*8]) = { 0 };
+    PA_DECLARE_ALIGNED(8, int16_t, in_buf[SAMPLES*8]);
+    int16_t *out, *out_ref;
+    int16_t *in;
+    unsigned n_ic = remap_func->i_ss.channels;
+    unsigned n_oc = remap_func->o_ss.channels;
+    unsigned i, nsamples;
+
+    pa_assert(n_ic >= 1 && n_ic <= 8);
+    pa_assert(n_oc >= 1 && n_oc <= 8);
+
+    /* Force sample alignment as requested */
+    out = out_buf + (8 - align);
+    out_ref = out_buf_ref + (8 - align);
+    in = in_buf + (8 - align);
+    nsamples = SAMPLES - (8 - align);
+
+    pa_random(in, nsamples * n_ic * sizeof(int16_t));
+
+    if (correct) {
+        remap_orig->do_remap(remap_orig, out_ref, in, nsamples);
+        remap_func->do_remap(remap_func, out, in, nsamples);
+
+        for (i = 0; i < nsamples * n_oc; i++) {
+            if (abs(out[i] - out_ref[i]) > 3) {
+                pa_log_debug("Correctness test failed: align=%d", align);
+                pa_log_debug("%d: %d != %d\n", i, out[i], out_ref[i]);
+                fail();
+            }
+        }
+    }
+
+    if (perf) {
+        pa_log_debug("Testing remap performance with %d sample alignment", align);
+
+        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
+            remap_func->do_remap(remap_func, out, in, nsamples);
+        } PA_RUNTIME_TEST_RUN_STOP
+
+        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
+            remap_orig->do_remap(remap_orig, out_ref, in, nsamples);
+        } PA_RUNTIME_TEST_RUN_STOP
+    }
+}
+
+static void setup_remap_channels(
+    pa_remap_t *m,
+    pa_sample_format_t f,
+    unsigned in_channels,
+    unsigned out_channels,
+    bool rearrange) {
+
+    unsigned i, o;
+
+    m->format = f;
+    m->i_ss.channels = in_channels;
+    m->o_ss.channels = out_channels;
+
+    if (rearrange) {
+        for (o = 0; o < out_channels; o++) {
+            for (i = 0; i < in_channels; i++) {
+                m->map_table_f[o][i] = (o == i) ? 1.0f : 0.0f;
+                m->map_table_i[o][i] = (o == i) ? 0x10000 : 0;
+            }
+        }
+    } else {
+        for (o = 0; o < out_channels; o++) {
+            for (i = 0; i < in_channels; i++) {
+                m->map_table_f[o][i] = 1.0f / in_channels;
+                m->map_table_i[o][i] = 0x10000 / in_channels;
+            }
+        }
+    }
+}
+
+static void remap_test_channels(
+    pa_remap_t *remap_func, pa_remap_t *remap_orig) {
+
+    if (!remap_orig->do_remap) {
+        pa_log_warn("No reference remapping function, abort test");
+        return;
+    }
+
+    if (!remap_func->do_remap || remap_func->do_remap == remap_orig->do_remap) {
+        pa_log_warn("No remapping function, abort test");
+        return;
+    }
+
+    pa_assert(remap_func->format == remap_orig->format);
+
+    switch (remap_func->format) {
+    case PA_SAMPLE_FLOAT32NE:
+        run_remap_test_float(remap_func, remap_orig, 0, true, false);
+        run_remap_test_float(remap_func, remap_orig, 1, true, false);
+        run_remap_test_float(remap_func, remap_orig, 2, true, false);
+        run_remap_test_float(remap_func, remap_orig, 3, true, true);
+        break;
+    case PA_SAMPLE_S16NE:
+        run_remap_test_s16(remap_func, remap_orig, 0, true, false);
+        run_remap_test_s16(remap_func, remap_orig, 1, true, false);
+        run_remap_test_s16(remap_func, remap_orig, 2, true, false);
+        run_remap_test_s16(remap_func, remap_orig, 3, true, true);
+        break;
+    default:
+        pa_assert_not_reached();
+    }
+}
+
+static void remap_init_test_channels(
+        pa_init_remap_func_t init_func,
+        pa_init_remap_func_t orig_init_func,
+        pa_sample_format_t f,
+        unsigned in_channels,
+        unsigned out_channels,
+        bool rearrange) {
+
+    pa_remap_t remap_orig, remap_func;
+
+    setup_remap_channels(&remap_orig, f, in_channels, out_channels, rearrange);
+    orig_init_func(&remap_orig);
+
+    setup_remap_channels(&remap_func, f, in_channels, out_channels, rearrange);
+    init_func(&remap_func);
+
+    remap_test_channels(&remap_func, &remap_orig);
+}
+
+static void remap_init2_test_channels(
+        pa_sample_format_t f,
+        unsigned in_channels,
+        unsigned out_channels,
+        bool rearrange) {
+
+    pa_cpu_info cpu_info = { PA_CPU_UNDEFINED, {}, false };
+    pa_remap_t remap_orig, remap_func;
+
+    cpu_info.force_generic_code = true;
+    pa_remap_func_init(&cpu_info);
+    setup_remap_channels(&remap_orig, f, in_channels, out_channels, rearrange);
+    pa_init_remap_func(&remap_orig);
+
+    cpu_info.force_generic_code = false;
+    pa_remap_func_init(&cpu_info);
+    setup_remap_channels(&remap_func, f, in_channels, out_channels, rearrange);
+    pa_init_remap_func(&remap_func);
+
+    remap_test_channels(&remap_func, &remap_orig);
+}
+
+START_TEST (remap_special_test) {
+    pa_log_debug("Checking special remap (float, mono->stereo)");
+    remap_init2_test_channels(PA_SAMPLE_FLOAT32NE, 1, 2, false);
+    pa_log_debug("Checking special remap (float, mono->4-channel)");
+    remap_init2_test_channels(PA_SAMPLE_FLOAT32NE, 1, 4, false);
+
+    pa_log_debug("Checking special remap (s16, mono->stereo)");
+    remap_init2_test_channels(PA_SAMPLE_S16NE, 1, 2, false);
+    pa_log_debug("Checking special remap (s16, mono->4-channel)");
+    remap_init2_test_channels(PA_SAMPLE_S16NE, 1, 4, false);
+
+    pa_log_debug("Checking special remap (float, stereo->mono)");
+    remap_init2_test_channels(PA_SAMPLE_FLOAT32NE, 2, 1, false);
+    pa_log_debug("Checking special remap (float, 4-channel->mono)");
+    remap_init2_test_channels(PA_SAMPLE_FLOAT32NE, 4, 1, false);
+
+    pa_log_debug("Checking special remap (s16, stereo->mono)");
+    remap_init2_test_channels(PA_SAMPLE_S16NE, 2, 1, false);
+    pa_log_debug("Checking special remap (s16, 4-channel->mono)");
+    remap_init2_test_channels(PA_SAMPLE_S16NE, 4, 1, false);
+}
+END_TEST
+
+START_TEST (rearrange_special_test) {
+    pa_log_debug("Checking special remap (s16, stereo rearrange)");
+    remap_init2_test_channels(PA_SAMPLE_S16NE, 2, 2, true);
+    pa_log_debug("Checking special remap (float, stereo rearrange)");
+    remap_init2_test_channels(PA_SAMPLE_FLOAT32NE, 2, 2, true);
+
+    pa_log_debug("Checking special remap (s16, 4-channel rearrange)");
+    remap_init2_test_channels(PA_SAMPLE_S16NE, 4, 4, true);
+    pa_log_debug("Checking special remap (float, 4-channel rearrange)");
+    remap_init2_test_channels(PA_SAMPLE_FLOAT32NE, 4, 4, true);
+}
+END_TEST
+
+#if defined (__i386__) || defined (__amd64__)
+START_TEST (remap_mmx_test) {
+    pa_cpu_x86_flag_t flags = 0;
+    pa_init_remap_func_t init_func, orig_init_func;
+
+    pa_cpu_get_x86_flags(&flags);
+    if (!(flags & PA_CPU_X86_MMX)) {
+        pa_log_info("MMX not supported. Skipping");
+        return;
+    }
+
+    pa_log_debug("Checking MMX remap (float, mono->stereo)");
+    orig_init_func = pa_get_init_remap_func();
+    pa_remap_func_init_mmx(flags);
+    init_func = pa_get_init_remap_func();
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_FLOAT32NE, 1, 2, false);
+
+    pa_log_debug("Checking MMX remap (s16, mono->stereo)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_S16NE, 1, 2, false);
+}
+END_TEST
+
+START_TEST (remap_sse2_test) {
+    pa_cpu_x86_flag_t flags = 0;
+    pa_init_remap_func_t init_func, orig_init_func;
+
+    pa_cpu_get_x86_flags(&flags);
+    if (!(flags & PA_CPU_X86_SSE2)) {
+        pa_log_info("SSE2 not supported. Skipping");
+        return;
+    }
+
+    pa_log_debug("Checking SSE2 remap (float, mono->stereo)");
+    orig_init_func = pa_get_init_remap_func();
+    pa_remap_func_init_sse(flags);
+    init_func = pa_get_init_remap_func();
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_FLOAT32NE, 1, 2, false);
+
+    pa_log_debug("Checking SSE2 remap (s16, mono->stereo)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_S16NE, 1, 2, false);
+}
+END_TEST
+#endif /* defined (__i386__) || defined (__amd64__) */
+
+#if defined (__arm__) && defined (__linux__) && defined (HAVE_NEON)
+START_TEST (remap_neon_test) {
+    pa_cpu_arm_flag_t flags = 0;
+    pa_init_remap_func_t init_func, orig_init_func;
+
+    pa_cpu_get_arm_flags(&flags);
+    if (!(flags & PA_CPU_ARM_NEON)) {
+        pa_log_info("NEON not supported. Skipping");
+        return;
+    }
+
+    orig_init_func = pa_get_init_remap_func();
+    pa_remap_func_init_neon(flags);
+    init_func = pa_get_init_remap_func();
+
+    pa_log_debug("Checking NEON remap (float, mono->stereo)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_FLOAT32NE, 1, 2, false);
+    pa_log_debug("Checking NEON remap (float, mono->4-channel)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_FLOAT32NE, 1, 4, false);
+
+    pa_log_debug("Checking NEON remap (s16, mono->stereo)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_S16NE, 1, 2, false);
+    pa_log_debug("Checking NEON remap (s16, mono->4-channel)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_S16NE, 1, 4, false);
+
+    pa_log_debug("Checking NEON remap (float, stereo->mono)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_FLOAT32NE, 2, 1, false);
+    pa_log_debug("Checking NEON remap (float, 4-channel->mono)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_FLOAT32NE, 4, 1, false);
+
+    pa_log_debug("Checking NEON remap (s16, stereo->mono)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_S16NE, 2, 1, false);
+    pa_log_debug("Checking NEON remap (s16, 4-channel->mono)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_S16NE, 4, 1, false);
+
+    pa_log_debug("Checking NEON remap (float, 4-channel->4-channel)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_FLOAT32NE, 4, 4, false);
+    pa_log_debug("Checking NEON remap (s16, 4-channel->4-channel)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_S16NE, 4, 4, false);
+}
+END_TEST
+
+START_TEST (rearrange_neon_test) {
+    pa_cpu_arm_flag_t flags = 0;
+    pa_init_remap_func_t init_func, orig_init_func;
+
+    pa_cpu_get_arm_flags(&flags);
+    if (!(flags & PA_CPU_ARM_NEON)) {
+        pa_log_info("NEON not supported. Skipping");
+        return;
+    }
+
+    orig_init_func = pa_get_init_remap_func();
+    pa_remap_func_init_neon(flags);
+    init_func = pa_get_init_remap_func();
+
+    pa_log_debug("Checking NEON remap (float, stereo rearrange)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_FLOAT32NE, 2, 2, true);
+    pa_log_debug("Checking NEON remap (s16, stereo rearrange)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_S16NE, 2, 2, true);
+
+    pa_log_debug("Checking NEON remap (float, 4-channel rearrange)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_FLOAT32NE, 4, 4, true);
+    pa_log_debug("Checking NEON remap (s16, 4-channel rearrange)");
+    remap_init_test_channels(init_func, orig_init_func, PA_SAMPLE_S16NE, 4, 4, true);
+}
+END_TEST
+#endif
+
+int main(int argc, char *argv[]) {
+    int failed = 0;
+    Suite *s;
+    TCase *tc;
+    SRunner *sr;
+
+    if (!getenv("MAKE_CHECK"))
+        pa_log_set_level(PA_LOG_DEBUG);
+
+    s = suite_create("CPU");
+
+    tc = tcase_create("remap");
+    tcase_add_test(tc, remap_special_test);
+#if defined (__i386__) || defined (__amd64__)
+    tcase_add_test(tc, remap_mmx_test);
+    tcase_add_test(tc, remap_sse2_test);
+#endif
+#if defined (__arm__) && defined (__linux__) && defined (HAVE_NEON)
+    tcase_add_test(tc, remap_neon_test);
+#endif
+    tcase_set_timeout(tc, 120);
+    suite_add_tcase(s, tc);
+
+    tc = tcase_create("rearrange");
+    tcase_add_test(tc, rearrange_special_test);
+#if defined (__arm__) && defined (__linux__) && defined (HAVE_NEON)
+    tcase_add_test(tc, rearrange_neon_test);
+#endif
+    tcase_set_timeout(tc, 120);
+    suite_add_tcase(s, tc);
+
+    sr = srunner_create(s);
+    srunner_run_all(sr, CK_NORMAL);
+    failed = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/tests/cpu-sconv-test.c b/src/tests/cpu-sconv-test.c
new file mode 100644
index 0000000..428ebe0
--- /dev/null
+++ b/src/tests/cpu-sconv-test.c
@@ -0,0 +1,265 @@
+/***
+  This file is part of PulseAudio.
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <check.h>
+
+#include <pulsecore/cpu-arm.h>
+#include <pulsecore/cpu-x86.h>
+#include <pulsecore/random.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/sconv.h>
+
+#include "runtime-test-util.h"
+
+#define SAMPLES 1028
+#define TIMES 1000
+#define TIMES2 100
+
+static void run_conv_test_float_to_s16(
+        pa_convert_func_t func,
+        pa_convert_func_t orig_func,
+        int align,
+        bool correct,
+        bool perf) {
+
+    PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES]) = { 0 };
+    PA_DECLARE_ALIGNED(8, int16_t, s_ref[SAMPLES]) = { 0 };
+    PA_DECLARE_ALIGNED(8, float, f[SAMPLES]);
+    int16_t *samples, *samples_ref;
+    float *floats;
+    int i, nsamples;
+
+    /* Force sample alignment as requested */
+    samples = s + (8 - align);
+    samples_ref = s_ref + (8 - align);
+    floats = f + (8 - align);
+    nsamples = SAMPLES - (8 - align);
+
+    for (i = 0; i < nsamples; i++) {
+        floats[i] = 2.1f * (rand()/(float) RAND_MAX - 0.5f);
+    }
+
+    if (correct) {
+        orig_func(nsamples, floats, samples_ref);
+        func(nsamples, floats, samples);
+
+        for (i = 0; i < nsamples; i++) {
+            if (abs(samples[i] - samples_ref[i]) > 1) {
+                pa_log_debug("Correctness test failed: align=%d", align);
+                pa_log_debug("%d: %04hx != %04hx (%.24f)\n", i, samples[i], samples_ref[i], floats[i]);
+                fail();
+            }
+        }
+    }
+
+    if (perf) {
+        pa_log_debug("Testing sconv performance with %d sample alignment", align);
+
+        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
+            func(nsamples, floats, samples);
+        } PA_RUNTIME_TEST_RUN_STOP
+
+        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
+            orig_func(nsamples, floats, samples_ref);
+        } PA_RUNTIME_TEST_RUN_STOP
+    }
+}
+
+/* This test is currently only run under NEON */
+#if defined (__arm__) && defined (__linux__) && defined (HAVE_NEON)
+static void run_conv_test_s16_to_float(
+        pa_convert_func_t func,
+        pa_convert_func_t orig_func,
+        int align,
+        bool correct,
+        bool perf) {
+
+    PA_DECLARE_ALIGNED(8, float, f[SAMPLES]) = { 0.0f };
+    PA_DECLARE_ALIGNED(8, float, f_ref[SAMPLES]) = { 0.0f };
+    PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES]);
+    float *floats, *floats_ref;
+    int16_t *samples;
+    int i, nsamples;
+
+    /* Force sample alignment as requested */
+    floats = f + (8 - align);
+    floats_ref = f_ref + (8 - align);
+    samples = s + (8 - align);
+    nsamples = SAMPLES - (8 - align);
+
+    pa_random(samples, nsamples * sizeof(int16_t));
+
+    if (correct) {
+        orig_func(nsamples, samples, floats_ref);
+        func(nsamples, samples, floats);
+
+        for (i = 0; i < nsamples; i++) {
+            if (fabsf(floats[i] - floats_ref[i]) > 0.0001f) {
+                pa_log_debug("Correctness test failed: align=%d", align);
+                pa_log_debug("%d: %.24f != %.24f (%d)\n", i, floats[i], floats_ref[i], samples[i]);
+                fail();
+            }
+        }
+    }
+
+    if (perf) {
+        pa_log_debug("Testing sconv performance with %d sample alignment", align);
+
+        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
+            func(nsamples, samples, floats);
+        } PA_RUNTIME_TEST_RUN_STOP
+
+        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
+            orig_func(nsamples, samples, floats_ref);
+        } PA_RUNTIME_TEST_RUN_STOP
+    }
+}
+#endif /* defined (__arm__) && defined (__linux__) && defined (HAVE_NEON) */
+
+#if defined (__i386__) || defined (__amd64__)
+START_TEST (sconv_sse2_test) {
+    pa_cpu_x86_flag_t flags = 0;
+    pa_convert_func_t orig_func, sse2_func;
+
+    pa_cpu_get_x86_flags(&flags);
+
+    if (!(flags & PA_CPU_X86_SSE2)) {
+        pa_log_info("SSE2 not supported. Skipping");
+        return;
+    }
+
+    orig_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
+    pa_convert_func_init_sse(PA_CPU_X86_SSE2);
+    sse2_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
+
+    pa_log_debug("Checking SSE2 sconv (float -> s16)");
+    run_conv_test_float_to_s16(sse2_func, orig_func, 0, true, false);
+    run_conv_test_float_to_s16(sse2_func, orig_func, 1, true, false);
+    run_conv_test_float_to_s16(sse2_func, orig_func, 2, true, false);
+    run_conv_test_float_to_s16(sse2_func, orig_func, 3, true, false);
+    run_conv_test_float_to_s16(sse2_func, orig_func, 4, true, false);
+    run_conv_test_float_to_s16(sse2_func, orig_func, 5, true, false);
+    run_conv_test_float_to_s16(sse2_func, orig_func, 6, true, false);
+    run_conv_test_float_to_s16(sse2_func, orig_func, 7, true, true);
+}
+END_TEST
+
+START_TEST (sconv_sse_test) {
+    pa_cpu_x86_flag_t flags = 0;
+    pa_convert_func_t orig_func, sse_func;
+
+    pa_cpu_get_x86_flags(&flags);
+
+    if (!(flags & PA_CPU_X86_SSE)) {
+        pa_log_info("SSE not supported. Skipping");
+        return;
+    }
+
+    orig_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
+    pa_convert_func_init_sse(PA_CPU_X86_SSE);
+    sse_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
+
+    pa_log_debug("Checking SSE sconv (float -> s16)");
+    run_conv_test_float_to_s16(sse_func, orig_func, 0, true, false);
+    run_conv_test_float_to_s16(sse_func, orig_func, 1, true, false);
+    run_conv_test_float_to_s16(sse_func, orig_func, 2, true, false);
+    run_conv_test_float_to_s16(sse_func, orig_func, 3, true, false);
+    run_conv_test_float_to_s16(sse_func, orig_func, 4, true, false);
+    run_conv_test_float_to_s16(sse_func, orig_func, 5, true, false);
+    run_conv_test_float_to_s16(sse_func, orig_func, 6, true, false);
+    run_conv_test_float_to_s16(sse_func, orig_func, 7, true, true);
+}
+END_TEST
+#endif /* defined (__i386__) || defined (__amd64__) */
+
+#if defined (__arm__) && defined (__linux__) && defined (HAVE_NEON)
+START_TEST (sconv_neon_test) {
+    pa_cpu_arm_flag_t flags = 0;
+    pa_convert_func_t orig_from_func, neon_from_func;
+    pa_convert_func_t orig_to_func, neon_to_func;
+
+    pa_cpu_get_arm_flags(&flags);
+
+    if (!(flags & PA_CPU_ARM_NEON)) {
+        pa_log_info("NEON not supported. Skipping");
+        return;
+    }
+
+    orig_from_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
+    orig_to_func = pa_get_convert_to_float32ne_function(PA_SAMPLE_S16LE);
+    pa_convert_func_init_neon(flags);
+    neon_from_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
+    neon_to_func = pa_get_convert_to_float32ne_function(PA_SAMPLE_S16LE);
+
+    pa_log_debug("Checking NEON sconv (float -> s16)");
+    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 0, true, false);
+    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 1, true, false);
+    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 2, true, false);
+    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 3, true, false);
+    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 4, true, false);
+    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 5, true, false);
+    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 6, true, false);
+    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 7, true, true);
+
+    pa_log_debug("Checking NEON sconv (s16 -> float)");
+    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 0, true, false);
+    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 1, true, false);
+    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 2, true, false);
+    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 3, true, false);
+    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 4, true, false);
+    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 5, true, false);
+    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 6, true, false);
+    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 7, true, true);
+}
+END_TEST
+#endif /* defined (__arm__) && defined (__linux__) && defined (HAVE_NEON) */
+
+int main(int argc, char *argv[]) {
+    int failed = 0;
+    Suite *s;
+    TCase *tc;
+    SRunner *sr;
+
+    if (!getenv("MAKE_CHECK"))
+        pa_log_set_level(PA_LOG_DEBUG);
+
+    s = suite_create("CPU");
+
+    tc = tcase_create("sconv");
+#if defined (__i386__) || defined (__amd64__)
+    tcase_add_test(tc, sconv_sse2_test);
+    tcase_add_test(tc, sconv_sse_test);
+#endif
+#if defined (__arm__) && defined (__linux__) && defined (HAVE_NEON)
+    tcase_add_test(tc, sconv_neon_test);
+#endif
+    tcase_set_timeout(tc, 120);
+    suite_add_tcase(s, tc);
+
+    sr = srunner_create(s);
+    srunner_run_all(sr, CK_NORMAL);
+    failed = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/tests/cpu-test.c b/src/tests/cpu-test.c
deleted file mode 100644
index c57a375..0000000
--- a/src/tests/cpu-test.c
+++ /dev/null
@@ -1,887 +0,0 @@
-/***
-  This file is part of PulseAudio.
-
-  PulseAudio is free software; you can redistribute it and/or modify
-  it under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2.1 of the License,
-  or (at your option) any later version.
-
-  PulseAudio is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with PulseAudio; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-  USA.
-***/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <check.h>
-#include <unistd.h>
-#include <math.h>
-
-#include <pulse/rtclock.h>
-#include <pulsecore/cpu-x86.h>
-#include <pulsecore/cpu-orc.h>
-#include <pulsecore/random.h>
-#include <pulsecore/macro.h>
-#include <pulsecore/endianmacros.h>
-#include <pulsecore/sconv.h>
-#include <pulsecore/remap.h>
-#include <pulsecore/sample-util.h>
-#include <pulsecore/mix.h>
-
-#include "runtime-test-util.h"
-
-/* Common defines for svolume tests */
-#define SAMPLES 1028
-#define TIMES 1000
-#define TIMES2 100
-#define PADDING 16
-
-static void run_volume_test(
-        pa_do_volume_func_t func,
-        pa_do_volume_func_t orig_func,
-        int align,
-        int channels,
-        bool correct,
-        bool perf) {
-
-    PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES]) = { 0 };
-    PA_DECLARE_ALIGNED(8, int16_t, s_ref[SAMPLES]) = { 0 };
-    PA_DECLARE_ALIGNED(8, int16_t, s_orig[SAMPLES]) = { 0 };
-    int32_t volumes[channels + PADDING];
-    int16_t *samples, *samples_ref, *samples_orig;
-    int i, padding, nsamples, size;
-
-    /* Force sample alignment as requested */
-    samples = s + (8 - align);
-    samples_ref = s_ref + (8 - align);
-    samples_orig = s_orig + (8 - align);
-    nsamples = SAMPLES - (8 - align);
-    if (nsamples % channels)
-        nsamples -= nsamples % channels;
-    size = nsamples * sizeof(int16_t);
-
-    pa_random(samples, size);
-    memcpy(samples_ref, samples, size);
-    memcpy(samples_orig, samples, size);
-
-    for (i = 0; i < channels; i++)
-        volumes[i] = PA_CLAMP_VOLUME((pa_volume_t)(rand() >> 15));
-    for (padding = 0; padding < PADDING; padding++, i++)
-        volumes[i] = volumes[padding];
-
-    if (correct) {
-        orig_func(samples_ref, volumes, channels, size);
-        func(samples, volumes, channels, size);
-
-        for (i = 0; i < nsamples; i++) {
-            if (samples[i] != samples_ref[i]) {
-                pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels);
-                pa_log_debug("%d: %04hx != %04hx (%04hx * %08x)\n", i, samples[i], samples_ref[i],
-                        samples_orig[i], volumes[i % channels]);
-                fail();
-            }
-        }
-    }
-
-    if (perf) {
-        pa_log_debug("Testing svolume %dch performance with %d sample alignment", channels, align);
-
-        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
-            memcpy(samples, samples_orig, size);
-            func(samples, volumes, channels, size);
-        } PA_RUNTIME_TEST_RUN_STOP
-
-        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
-            memcpy(samples_ref, samples_orig, size);
-            orig_func(samples_ref, volumes, channels, size);
-        } PA_RUNTIME_TEST_RUN_STOP
-
-        fail_unless(memcmp(samples_ref, samples, size) == 0);
-    }
-}
-
-#if defined (__i386__) || defined (__amd64__)
-START_TEST (svolume_mmx_test) {
-    pa_do_volume_func_t orig_func, mmx_func;
-    pa_cpu_x86_flag_t flags = 0;
-    int i, j;
-
-    pa_cpu_get_x86_flags(&flags);
-
-    if (!((flags & PA_CPU_X86_MMX) && (flags & PA_CPU_X86_CMOV))) {
-        pa_log_info("MMX/CMOV not supported. Skipping");
-        return;
-    }
-
-    orig_func = pa_get_volume_func(PA_SAMPLE_S16NE);
-    pa_volume_func_init_mmx(flags);
-    mmx_func = pa_get_volume_func(PA_SAMPLE_S16NE);
-
-    pa_log_debug("Checking MMX svolume");
-    for (i = 1; i <= 3; i++) {
-        for (j = 0; j < 7; j++)
-            run_volume_test(mmx_func, orig_func, j, i, true, false);
-    }
-    run_volume_test(mmx_func, orig_func, 7, 1, true, true);
-    run_volume_test(mmx_func, orig_func, 7, 2, true, true);
-    run_volume_test(mmx_func, orig_func, 7, 3, true, true);
-}
-END_TEST
-
-START_TEST (svolume_sse_test) {
-    pa_do_volume_func_t orig_func, sse_func;
-    pa_cpu_x86_flag_t flags = 0;
-    int i, j;
-
-    pa_cpu_get_x86_flags(&flags);
-
-    if (!(flags & PA_CPU_X86_SSE2)) {
-        pa_log_info("SSE2 not supported. Skipping");
-        return;
-    }
-
-    orig_func = pa_get_volume_func(PA_SAMPLE_S16NE);
-    pa_volume_func_init_sse(flags);
-    sse_func = pa_get_volume_func(PA_SAMPLE_S16NE);
-
-    pa_log_debug("Checking SSE2 svolume");
-    for (i = 1; i <= 3; i++) {
-        for (j = 0; j < 7; j++)
-            run_volume_test(sse_func, orig_func, j, i, true, false);
-    }
-    run_volume_test(sse_func, orig_func, 7, 1, true, true);
-    run_volume_test(sse_func, orig_func, 7, 2, true, true);
-    run_volume_test(sse_func, orig_func, 7, 3, true, true);
-}
-END_TEST
-#endif /* defined (__i386__) || defined (__amd64__) */
-
-#if defined (__arm__) && defined (__linux__)
-START_TEST (svolume_arm_test) {
-    pa_do_volume_func_t orig_func, arm_func;
-    pa_cpu_arm_flag_t flags = 0;
-    int i, j;
-
-    pa_cpu_get_arm_flags(&flags);
-
-    if (!(flags & PA_CPU_ARM_V6)) {
-        pa_log_info("ARMv6 instructions not supported. Skipping");
-        return;
-    }
-
-    orig_func = pa_get_volume_func(PA_SAMPLE_S16NE);
-    pa_volume_func_init_arm(flags);
-    arm_func = pa_get_volume_func(PA_SAMPLE_S16NE);
-
-    pa_log_debug("Checking ARM svolume");
-    for (i = 1; i <= 3; i++) {
-        for (j = 0; j < 7; j++)
-            run_volume_test(arm_func, orig_func, j, i, true, false);
-    }
-    run_volume_test(arm_func, orig_func, 7, 1, true, true);
-    run_volume_test(arm_func, orig_func, 7, 2, true, true);
-    run_volume_test(arm_func, orig_func, 7, 3, true, true);
-}
-END_TEST
-#endif /* defined (__arm__) && defined (__linux__) */
-
-START_TEST (svolume_orc_test) {
-    pa_do_volume_func_t orig_func, orc_func;
-    pa_cpu_info cpu_info;
-    int i, j;
-
-#if defined (__i386__) || defined (__amd64__)
-    pa_zero(cpu_info);
-    cpu_info.cpu_type = PA_CPU_X86;
-    pa_cpu_get_x86_flags(&cpu_info.flags.x86);
-#endif
-
-    orig_func = pa_get_volume_func(PA_SAMPLE_S16NE);
-
-    if (!pa_cpu_init_orc(cpu_info)) {
-        pa_log_info("Orc not supported. Skipping");
-        return;
-    }
-
-    orc_func = pa_get_volume_func(PA_SAMPLE_S16NE);
-
-    pa_log_debug("Checking Orc svolume");
-    for (i = 1; i <= 2; i++) {
-        for (j = 0; j < 7; j++)
-            run_volume_test(orc_func, orig_func, j, i, true, false);
-    }
-    run_volume_test(orc_func, orig_func, 7, 1, true, true);
-    run_volume_test(orc_func, orig_func, 7, 2, true, true);
-}
-END_TEST
-
-#undef SAMPLES
-#undef TIMES
-#undef TIMES2
-#undef PADDING
-/* End svolume tests */
-
-/* Start conversion tests */
-#define SAMPLES 1028
-#define TIMES 1000
-#define TIMES2 100
-
-static void run_conv_test_float_to_s16(
-        pa_convert_func_t func,
-        pa_convert_func_t orig_func,
-        int align,
-        bool correct,
-        bool perf) {
-
-    PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES]) = { 0 };
-    PA_DECLARE_ALIGNED(8, int16_t, s_ref[SAMPLES]) = { 0 };
-    PA_DECLARE_ALIGNED(8, float, f[SAMPLES]);
-    int16_t *samples, *samples_ref;
-    float *floats;
-    int i, nsamples;
-
-    /* Force sample alignment as requested */
-    samples = s + (8 - align);
-    samples_ref = s_ref + (8 - align);
-    floats = f + (8 - align);
-    nsamples = SAMPLES - (8 - align);
-
-    for (i = 0; i < nsamples; i++) {
-        floats[i] = 2.1f * (rand()/(float) RAND_MAX - 0.5f);
-    }
-
-    if (correct) {
-        orig_func(nsamples, floats, samples_ref);
-        func(nsamples, floats, samples);
-
-        for (i = 0; i < nsamples; i++) {
-            if (abs(samples[i] - samples_ref[i]) > 1) {
-                pa_log_debug("Correctness test failed: align=%d", align);
-                pa_log_debug("%d: %04hx != %04hx (%.24f)\n", i, samples[i], samples_ref[i], floats[i]);
-                fail();
-            }
-        }
-    }
-
-    if (perf) {
-        pa_log_debug("Testing sconv performance with %d sample alignment", align);
-
-        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
-            func(nsamples, floats, samples);
-        } PA_RUNTIME_TEST_RUN_STOP
-
-        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
-            orig_func(nsamples, floats, samples_ref);
-        } PA_RUNTIME_TEST_RUN_STOP
-    }
-}
-
-/* This test is currently only run under NEON */
-#if defined (__arm__) && defined (__linux__)
-#ifdef HAVE_NEON
-static void run_conv_test_s16_to_float(
-        pa_convert_func_t func,
-        pa_convert_func_t orig_func,
-        int align,
-        bool correct,
-        bool perf) {
-
-    PA_DECLARE_ALIGNED(8, float, f[SAMPLES]) = { 0 };
-    PA_DECLARE_ALIGNED(8, float, f_ref[SAMPLES]) = { 0 };
-    PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES]);
-    float *floats, *floats_ref;
-    int16_t *samples;
-    int i, nsamples;
-
-    /* Force sample alignment as requested */
-    floats = f + (8 - align);
-    floats_ref = f_ref + (8 - align);
-    samples = s + (8 - align);
-    nsamples = SAMPLES - (8 - align);
-
-    pa_random(samples, nsamples * sizeof(int16_t));
-
-    if (correct) {
-        orig_func(nsamples, samples, floats_ref);
-        func(nsamples, samples, floats);
-
-        for (i = 0; i < nsamples; i++) {
-            if (fabsf(floats[i] - floats_ref[i]) > 0.0001) {
-                pa_log_debug("Correctness test failed: align=%d", align);
-                pa_log_debug("%d: %.24f != %.24f (%d)\n", i, floats[i], floats_ref[i], samples[i]);
-                fail();
-            }
-        }
-    }
-
-    if (perf) {
-        pa_log_debug("Testing sconv performance with %d sample alignment", align);
-
-        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
-            func(nsamples, samples, floats);
-        } PA_RUNTIME_TEST_RUN_STOP
-
-        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
-            orig_func(nsamples, samples, floats_ref);
-        } PA_RUNTIME_TEST_RUN_STOP
-    }
-}
-#endif /* HAVE_NEON */
-#endif /* defined (__arm__) && defined (__linux__) */
-
-#if defined (__i386__) || defined (__amd64__)
-START_TEST (sconv_sse2_test) {
-    pa_cpu_x86_flag_t flags = 0;
-    pa_convert_func_t orig_func, sse2_func;
-
-    pa_cpu_get_x86_flags(&flags);
-
-    if (!(flags & PA_CPU_X86_SSE2)) {
-        pa_log_info("SSE2 not supported. Skipping");
-        return;
-    }
-
-    orig_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
-    pa_convert_func_init_sse(PA_CPU_X86_SSE2);
-    sse2_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
-
-    pa_log_debug("Checking SSE2 sconv (float -> s16)");
-    run_conv_test_float_to_s16(sse2_func, orig_func, 0, true, false);
-    run_conv_test_float_to_s16(sse2_func, orig_func, 1, true, false);
-    run_conv_test_float_to_s16(sse2_func, orig_func, 2, true, false);
-    run_conv_test_float_to_s16(sse2_func, orig_func, 3, true, false);
-    run_conv_test_float_to_s16(sse2_func, orig_func, 4, true, false);
-    run_conv_test_float_to_s16(sse2_func, orig_func, 5, true, false);
-    run_conv_test_float_to_s16(sse2_func, orig_func, 6, true, false);
-    run_conv_test_float_to_s16(sse2_func, orig_func, 7, true, true);
-}
-END_TEST
-
-START_TEST (sconv_sse_test) {
-    pa_cpu_x86_flag_t flags = 0;
-    pa_convert_func_t orig_func, sse_func;
-
-    pa_cpu_get_x86_flags(&flags);
-
-    if (!(flags & PA_CPU_X86_SSE)) {
-        pa_log_info("SSE not supported. Skipping");
-        return;
-    }
-
-    orig_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
-    pa_convert_func_init_sse(PA_CPU_X86_SSE);
-    sse_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
-
-    pa_log_debug("Checking SSE sconv (float -> s16)");
-    run_conv_test_float_to_s16(sse_func, orig_func, 0, true, false);
-    run_conv_test_float_to_s16(sse_func, orig_func, 1, true, false);
-    run_conv_test_float_to_s16(sse_func, orig_func, 2, true, false);
-    run_conv_test_float_to_s16(sse_func, orig_func, 3, true, false);
-    run_conv_test_float_to_s16(sse_func, orig_func, 4, true, false);
-    run_conv_test_float_to_s16(sse_func, orig_func, 5, true, false);
-    run_conv_test_float_to_s16(sse_func, orig_func, 6, true, false);
-    run_conv_test_float_to_s16(sse_func, orig_func, 7, true, true);
-}
-END_TEST
-#endif /* defined (__i386__) || defined (__amd64__) */
-
-#if defined (__arm__) && defined (__linux__)
-#ifdef HAVE_NEON
-START_TEST (sconv_neon_test) {
-    pa_cpu_arm_flag_t flags = 0;
-    pa_convert_func_t orig_from_func, neon_from_func;
-    pa_convert_func_t orig_to_func, neon_to_func;
-
-    pa_cpu_get_arm_flags(&flags);
-
-    if (!(flags & PA_CPU_ARM_NEON)) {
-        pa_log_info("NEON not supported. Skipping");
-        return;
-    }
-
-    orig_from_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
-    orig_to_func = pa_get_convert_to_float32ne_function(PA_SAMPLE_S16LE);
-    pa_convert_func_init_neon(flags);
-    neon_from_func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
-    neon_to_func = pa_get_convert_to_float32ne_function(PA_SAMPLE_S16LE);
-
-    pa_log_debug("Checking NEON sconv (float -> s16)");
-    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 0, true, false);
-    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 1, true, false);
-    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 2, true, false);
-    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 3, true, false);
-    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 4, true, false);
-    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 5, true, false);
-    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 6, true, false);
-    run_conv_test_float_to_s16(neon_from_func, orig_from_func, 7, true, true);
-
-    pa_log_debug("Checking NEON sconv (s16 -> float)");
-    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 0, true, false);
-    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 1, true, false);
-    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 2, true, false);
-    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 3, true, false);
-    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 4, true, false);
-    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 5, true, false);
-    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 6, true, false);
-    run_conv_test_s16_to_float(neon_to_func, orig_to_func, 7, true, true);
-}
-END_TEST
-#endif /* HAVE_NEON */
-#endif /* defined (__arm__) && defined (__linux__) */
-
-#undef SAMPLES
-#undef TIMES
-/* End conversion tests */
-
-/* Start remap tests */
-#define SAMPLES 1028
-#define TIMES 1000
-#define TIMES2 100
-
-static void run_remap_test_mono_stereo_float(
-        pa_remap_t *remap,
-        pa_do_remap_func_t func,
-        pa_do_remap_func_t orig_func,
-        int align,
-        bool correct,
-        bool perf) {
-
-    PA_DECLARE_ALIGNED(8, float, s_ref[SAMPLES*2]) = { 0 };
-    PA_DECLARE_ALIGNED(8, float, s[SAMPLES*2]) = { 0 };
-    PA_DECLARE_ALIGNED(8, float, m[SAMPLES]);
-    float *stereo, *stereo_ref;
-    float *mono;
-    int i, nsamples;
-
-    /* Force sample alignment as requested */
-    stereo = s + (8 - align);
-    stereo_ref = s_ref + (8 - align);
-    mono = m + (8 - align);
-    nsamples = SAMPLES - (8 - align);
-
-    for (i = 0; i < nsamples; i++)
-        mono[i] = 2.1f * (rand()/(float) RAND_MAX - 0.5f);
-
-    if (correct) {
-        orig_func(remap, stereo_ref, mono, nsamples);
-        func(remap, stereo, mono, nsamples);
-
-        for (i = 0; i < nsamples * 2; i++) {
-            if (fabsf(stereo[i] - stereo_ref[i]) > 0.0001) {
-                pa_log_debug("Correctness test failed: align=%d", align);
-                pa_log_debug("%d: %.24f != %.24f (%.24f)\n", i, stereo[i], stereo_ref[i], mono[i]);
-                fail();
-            }
-        }
-    }
-
-    if (perf) {
-        pa_log_debug("Testing remap performance with %d sample alignment", align);
-
-        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
-            func(remap, stereo, mono, nsamples);
-        } PA_RUNTIME_TEST_RUN_STOP
-
-        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
-            orig_func(remap, stereo_ref, mono, nsamples);
-        } PA_RUNTIME_TEST_RUN_STOP
-    }
-}
-
-static void run_remap_test_mono_stereo_s16(
-        pa_remap_t *remap,
-        pa_do_remap_func_t func,
-        pa_do_remap_func_t orig_func,
-        int align,
-        bool correct,
-        bool perf) {
-
-    PA_DECLARE_ALIGNED(8, int16_t, s_ref[SAMPLES*2]) = { 0 };
-    PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES*2]) = { 0 };
-    PA_DECLARE_ALIGNED(8, int16_t, m[SAMPLES]);
-    int16_t *stereo, *stereo_ref;
-    int16_t *mono;
-    int i, nsamples;
-
-    /* Force sample alignment as requested */
-    stereo = s + (8 - align);
-    stereo_ref = s_ref + (8 - align);
-    mono = m + (8 - align);
-    nsamples = SAMPLES - (8 - align);
-
-    pa_random(mono, nsamples * sizeof(int16_t));
-
-    if (correct) {
-        orig_func(remap, stereo_ref, mono, nsamples);
-        func(remap, stereo, mono, nsamples);
-
-        for (i = 0; i < nsamples * 2; i++) {
-            if (abs(stereo[i] - stereo_ref[i]) > 1) {
-                pa_log_debug("Correctness test failed: align=%d", align);
-                pa_log_debug("%d: %d != %d (%d)\n", i, stereo[i], stereo_ref[i], mono[i]);
-                fail();
-            }
-        }
-    }
-
-    if (perf) {
-        pa_log_debug("Testing remap performance with %d sample alignment", align);
-
-        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
-            func(remap, stereo, mono, nsamples);
-        } PA_RUNTIME_TEST_RUN_STOP
-
-        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
-            orig_func(remap, stereo_ref, mono, nsamples);
-        } PA_RUNTIME_TEST_RUN_STOP
-    }
-}
-
-static void remap_test_mono_stereo_float(
-        pa_init_remap_func_t init_func,
-        pa_init_remap_func_t orig_init_func) {
-
-    pa_sample_format_t sf;
-    pa_remap_t remap;
-    pa_sample_spec iss, oss;
-    pa_do_remap_func_t orig_func, func;
-
-    iss.format = oss.format = sf = PA_SAMPLE_FLOAT32NE;
-    iss.channels = 1;
-    oss.channels = 2;
-    remap.format = &sf;
-    remap.i_ss = &iss;
-    remap.o_ss = &oss;
-    remap.map_table_f[0][0] = 1.0;
-    remap.map_table_f[1][0] = 1.0;
-    remap.map_table_i[0][0] = 0x10000;
-    remap.map_table_i[1][0] = 0x10000;
-    orig_init_func(&remap);
-    orig_func = remap.do_remap;
-    if (!orig_func) {
-        pa_log_warn("No reference remapping function, abort test");
-        return;
-    }
-
-    init_func(&remap);
-    func = remap.do_remap;
-    if (!func || func == orig_func) {
-        pa_log_warn("No remapping function, abort test");
-        return;
-    }
-
-    run_remap_test_mono_stereo_float(&remap, func, orig_func, 0, true, false);
-    run_remap_test_mono_stereo_float(&remap, func, orig_func, 1, true, false);
-    run_remap_test_mono_stereo_float(&remap, func, orig_func, 2, true, false);
-    run_remap_test_mono_stereo_float(&remap, func, orig_func, 3, true, true);
-}
-
-static void remap_test_mono_stereo_s16(
-        pa_init_remap_func_t init_func,
-        pa_init_remap_func_t orig_init_func) {
-
-    pa_sample_format_t sf;
-    pa_remap_t remap;
-    pa_sample_spec iss, oss;
-    pa_do_remap_func_t orig_func, func;
-
-    iss.format = oss.format = sf = PA_SAMPLE_S16NE;
-    iss.channels = 1;
-    oss.channels = 2;
-    remap.format = &sf;
-    remap.i_ss = &iss;
-    remap.o_ss = &oss;
-    remap.map_table_f[0][0] = 1.0;
-    remap.map_table_f[1][0] = 1.0;
-    remap.map_table_i[0][0] = 0x10000;
-    remap.map_table_i[1][0] = 0x10000;
-    orig_init_func(&remap);
-    orig_func = remap.do_remap;
-    if (!orig_func) {
-        pa_log_warn("No reference remapping function, abort test");
-        return;
-    }
-
-    init_func(&remap);
-    func = remap.do_remap;
-    if (!func || func == orig_func) {
-        pa_log_warn("No remapping function, abort test");
-        return;
-    }
-
-    run_remap_test_mono_stereo_s16(&remap, func, orig_func, 0, true, false);
-    run_remap_test_mono_stereo_s16(&remap, func, orig_func, 1, true, false);
-    run_remap_test_mono_stereo_s16(&remap, func, orig_func, 2, true, false);
-    run_remap_test_mono_stereo_s16(&remap, func, orig_func, 3, true, true);
-}
-
-#if defined (__i386__) || defined (__amd64__)
-START_TEST (remap_mmx_test) {
-    pa_cpu_x86_flag_t flags = 0;
-    pa_init_remap_func_t init_func, orig_init_func;
-
-    pa_cpu_get_x86_flags(&flags);
-    if (!(flags & PA_CPU_X86_MMX)) {
-        pa_log_info("MMX not supported. Skipping");
-        return;
-    }
-
-    pa_log_debug("Checking MMX remap (float, mono->stereo)");
-    orig_init_func = pa_get_init_remap_func();
-    pa_remap_func_init_mmx(flags);
-    init_func = pa_get_init_remap_func();
-    remap_test_mono_stereo_float(init_func, orig_init_func);
-
-    pa_log_debug("Checking MMX remap (s16, mono->stereo)");
-    remap_test_mono_stereo_s16(init_func, orig_init_func);
-}
-END_TEST
-
-START_TEST (remap_sse2_test) {
-    pa_cpu_x86_flag_t flags = 0;
-    pa_init_remap_func_t init_func, orig_init_func;
-
-    pa_cpu_get_x86_flags(&flags);
-    if (!(flags & PA_CPU_X86_SSE2)) {
-        pa_log_info("SSE2 not supported. Skipping");
-        return;
-    }
-
-    pa_log_debug("Checking SSE2 remap (float, mono->stereo)");
-    orig_init_func = pa_get_init_remap_func();
-    pa_remap_func_init_sse(flags);
-    init_func = pa_get_init_remap_func();
-    remap_test_mono_stereo_float(init_func, orig_init_func);
-
-    pa_log_debug("Checking SSE2 remap (s16, mono->stereo)");
-    remap_test_mono_stereo_s16(init_func, orig_init_func);
-}
-END_TEST
-#endif /* defined (__i386__) || defined (__amd64__) */
-
-#undef SAMPLES
-#undef TIMES
-#undef TIMES2
-/* End remap tests */
-
-/* Start mix tests */
-
-/* Only ARM NEON has mix tests, so disable the related functions for other
- * architectures for now to avoid compiler warnings about unused functions. */
-#if defined (__arm__) && defined (__linux__)
-#ifdef HAVE_NEON
-
-#define SAMPLES 1028
-#define TIMES 1000
-#define TIMES2 100
-
-static void acquire_mix_streams(pa_mix_info streams[], unsigned nstreams) {
-    unsigned i;
-
-    for (i = 0; i < nstreams; i++)
-        streams[i].ptr = pa_memblock_acquire_chunk(&streams[i].chunk);
-}
-
-static void release_mix_streams(pa_mix_info streams[], unsigned nstreams) {
-    unsigned i;
-
-    for (i = 0; i < nstreams; i++)
-        pa_memblock_release(streams[i].chunk.memblock);
-}
-
-static void run_mix_test(
-        pa_do_mix_func_t func,
-        pa_do_mix_func_t orig_func,
-        int align,
-        int channels,
-        bool correct,
-        bool perf) {
-
-    PA_DECLARE_ALIGNED(8, int16_t, in0[SAMPLES * 4]) = { 0 };
-    PA_DECLARE_ALIGNED(8, int16_t, in1[SAMPLES * 4]) = { 0 };
-    PA_DECLARE_ALIGNED(8, int16_t, out[SAMPLES * 4]) = { 0 };
-    PA_DECLARE_ALIGNED(8, int16_t, out_ref[SAMPLES * 4]) = { 0 };
-    int16_t *samples0, *samples1;
-    int16_t *samples, *samples_ref;
-    int nsamples;
-    pa_mempool *pool;
-    pa_memchunk c0, c1;
-    pa_mix_info m[2];
-    int i;
-
-    pa_assert(channels == 1 || channels == 2 || channels == 4);
-
-    /* Force sample alignment as requested */
-    samples0 = in0 + (8 - align);
-    samples1 = in1 + (8 - align);
-    samples = out + (8 - align);
-    samples_ref = out_ref + (8 - align);
-    nsamples = channels * (SAMPLES - (8 - align));
-
-    fail_unless((pool = pa_mempool_new(false, 0)) != NULL, NULL);
-
-    pa_random(samples0, nsamples * sizeof(int16_t));
-    c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), false);
-    c0.length = pa_memblock_get_length(c0.memblock);
-    c0.index = 0;
-
-    pa_random(samples1, nsamples * sizeof(int16_t));
-    c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), false);
-    c1.length = pa_memblock_get_length(c1.memblock);
-    c1.index = 0;
-
-    m[0].chunk = c0;
-    m[0].volume.channels = channels;
-    for (i = 0; i < channels; i++) {
-        m[0].volume.values[i] = PA_VOLUME_NORM;
-        m[0].linear[i].i = 0x5555;
-    }
-
-    m[1].chunk = c1;
-    m[1].volume.channels = channels;
-    for (i = 0; i < channels; i++) {
-        m[1].volume.values[i] = PA_VOLUME_NORM;
-        m[1].linear[i].i = 0x6789;
-    }
-
-    if (correct) {
-        acquire_mix_streams(m, 2);
-        orig_func(m, 2, channels, samples_ref, nsamples * sizeof(int16_t));
-        release_mix_streams(m, 2);
-
-        acquire_mix_streams(m, 2);
-        func(m, 2, channels, samples, nsamples * sizeof(int16_t));
-        release_mix_streams(m, 2);
-
-        for (i = 0; i < nsamples; i++) {
-            if (samples[i] != samples_ref[i]) {
-                pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels);
-                pa_log_debug("%d: %hd != %04hd (%hd + %hd)\n",
-                    i,
-                    samples[i], samples_ref[i],
-                    samples0[i], samples1[i]);
-                fail();
-            }
-        }
-    }
-
-    if (perf) {
-        pa_log_debug("Testing %d-channel mixing performance with %d sample alignment", channels, align);
-
-        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
-            acquire_mix_streams(m, 2);
-            func(m, 2, channels, samples, nsamples * sizeof(int16_t));
-            release_mix_streams(m, 2);
-        } PA_RUNTIME_TEST_RUN_STOP
-
-        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
-            acquire_mix_streams(m, 2);
-            orig_func(m, 2, channels, samples_ref, nsamples * sizeof(int16_t));
-            release_mix_streams(m, 2);
-        } PA_RUNTIME_TEST_RUN_STOP
-    }
-
-    pa_memblock_unref(c0.memblock);
-    pa_memblock_unref(c1.memblock);
-
-    pa_mempool_free(pool);
-}
-#endif /* HAVE_NEON */
-#endif /* defined (__arm__) && defined (__linux__) */
-
-#if defined (__arm__) && defined (__linux__)
-#ifdef HAVE_NEON
-START_TEST (mix_neon_test) {
-    pa_do_mix_func_t orig_func, neon_func;
-    pa_cpu_arm_flag_t flags = 0;
-
-    pa_cpu_get_arm_flags(&flags);
-
-    if (!(flags & PA_CPU_ARM_NEON)) {
-        pa_log_info("NEON not supported. Skipping");
-        return;
-    }
-
-    orig_func = pa_get_mix_func(PA_SAMPLE_S16NE);
-    pa_mix_func_init_neon(flags);
-    neon_func = pa_get_mix_func(PA_SAMPLE_S16NE);
-
-    pa_log_debug("Checking NEON mix");
-    run_mix_test(neon_func, orig_func, 7, 2, true, true);
-}
-END_TEST
-#endif /* HAVE_NEON */
-#endif /* defined (__arm__) && defined (__linux__) */
-/* End mix tests */
-
-int main(int argc, char *argv[]) {
-    int failed = 0;
-    Suite *s;
-    TCase *tc;
-    SRunner *sr;
-
-    if (!getenv("MAKE_CHECK"))
-        pa_log_set_level(PA_LOG_DEBUG);
-
-    s = suite_create("CPU");
-
-    /* Volume tests */
-    tc = tcase_create("svolume");
-#if defined (__i386__) || defined (__amd64__)
-    tcase_add_test(tc, svolume_mmx_test);
-    tcase_add_test(tc, svolume_sse_test);
-#endif
-#if defined (__arm__) && defined (__linux__)
-    tcase_add_test(tc, svolume_arm_test);
-#endif
-    tcase_add_test(tc, svolume_orc_test);
-    tcase_set_timeout(tc, 120);
-    suite_add_tcase(s, tc);
-
-    /* Conversion tests */
-    tc = tcase_create("sconv");
-#if defined (__i386__) || defined (__amd64__)
-    tcase_add_test(tc, sconv_sse2_test);
-    tcase_add_test(tc, sconv_sse_test);
-#endif
-#if defined (__arm__) && defined (__linux__)
-#if HAVE_NEON
-    tcase_add_test(tc, sconv_neon_test);
-#endif
-#endif
-    tcase_set_timeout(tc, 120);
-    suite_add_tcase(s, tc);
-
-    /* Remap tests */
-    tc = tcase_create("remap");
-#if defined (__i386__) || defined (__amd64__)
-    tcase_add_test(tc, remap_mmx_test);
-    tcase_add_test(tc, remap_sse2_test);
-#endif
-    tcase_set_timeout(tc, 120);
-    suite_add_tcase(s, tc);
-    /* Mix tests */
-    tc = tcase_create("mix");
-#if defined (__arm__) && defined (__linux__)
-#if HAVE_NEON
-    tcase_add_test(tc, mix_neon_test);
-#endif
-#endif
-    tcase_set_timeout(tc, 120);
-    suite_add_tcase(s, tc);
-
-    sr = srunner_create(s);
-    srunner_run_all(sr, CK_NORMAL);
-    failed = srunner_ntests_failed(sr);
-    srunner_free(sr);
-
-    return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/src/tests/cpu-volume-test.c b/src/tests/cpu-volume-test.c
new file mode 100644
index 0000000..659136e
--- /dev/null
+++ b/src/tests/cpu-volume-test.c
@@ -0,0 +1,249 @@
+/***
+  This file is part of PulseAudio.
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <check.h>
+
+#include <pulsecore/cpu-arm.h>
+#include <pulsecore/cpu-x86.h>
+#include <pulsecore/cpu-orc.h>
+#include <pulsecore/random.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/sample-util.h>
+
+#include "runtime-test-util.h"
+
+/* Common defines for svolume tests */
+#define SAMPLES 1028
+#define TIMES 1000
+#define TIMES2 100
+#define PADDING 16
+
+static void run_volume_test(
+        pa_do_volume_func_t func,
+        pa_do_volume_func_t orig_func,
+        int align,
+        int channels,
+        bool correct,
+        bool perf) {
+
+    PA_DECLARE_ALIGNED(8, int16_t, s[SAMPLES]) = { 0 };
+    PA_DECLARE_ALIGNED(8, int16_t, s_ref[SAMPLES]) = { 0 };
+    PA_DECLARE_ALIGNED(8, int16_t, s_orig[SAMPLES]) = { 0 };
+    int32_t volumes[channels + PADDING];
+    int16_t *samples, *samples_ref, *samples_orig;
+    int i, padding, nsamples, size;
+
+    /* Force sample alignment as requested */
+    samples = s + (8 - align);
+    samples_ref = s_ref + (8 - align);
+    samples_orig = s_orig + (8 - align);
+    nsamples = SAMPLES - (8 - align);
+    if (nsamples % channels)
+        nsamples -= nsamples % channels;
+    size = nsamples * sizeof(int16_t);
+
+    pa_random(samples, size);
+    memcpy(samples_ref, samples, size);
+    memcpy(samples_orig, samples, size);
+
+    for (i = 0; i < channels; i++)
+        volumes[i] = PA_CLAMP_VOLUME((pa_volume_t)(rand() >> 15));
+    for (padding = 0; padding < PADDING; padding++, i++)
+        volumes[i] = volumes[padding];
+
+    if (correct) {
+        orig_func(samples_ref, volumes, channels, size);
+        func(samples, volumes, channels, size);
+
+        for (i = 0; i < nsamples; i++) {
+            if (samples[i] != samples_ref[i]) {
+                pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels);
+                pa_log_debug("%d: %04hx != %04hx (%04hx * %08x)\n", i, samples[i], samples_ref[i],
+                        samples_orig[i], volumes[i % channels]);
+                fail();
+            }
+        }
+    }
+
+    if (perf) {
+        pa_log_debug("Testing svolume %dch performance with %d sample alignment", channels, align);
+
+        PA_RUNTIME_TEST_RUN_START("func", TIMES, TIMES2) {
+            memcpy(samples, samples_orig, size);
+            func(samples, volumes, channels, size);
+        } PA_RUNTIME_TEST_RUN_STOP
+
+        PA_RUNTIME_TEST_RUN_START("orig", TIMES, TIMES2) {
+            memcpy(samples_ref, samples_orig, size);
+            orig_func(samples_ref, volumes, channels, size);
+        } PA_RUNTIME_TEST_RUN_STOP
+
+        fail_unless(memcmp(samples_ref, samples, size) == 0);
+    }
+}
+
+#if defined (__i386__) || defined (__amd64__)
+START_TEST (svolume_mmx_test) {
+    pa_do_volume_func_t orig_func, mmx_func;
+    pa_cpu_x86_flag_t flags = 0;
+    int i, j;
+
+    pa_cpu_get_x86_flags(&flags);
+
+    if (!((flags & PA_CPU_X86_MMX) && (flags & PA_CPU_X86_CMOV))) {
+        pa_log_info("MMX/CMOV not supported. Skipping");
+        return;
+    }
+
+    orig_func = pa_get_volume_func(PA_SAMPLE_S16NE);
+    pa_volume_func_init_mmx(flags);
+    mmx_func = pa_get_volume_func(PA_SAMPLE_S16NE);
+
+    pa_log_debug("Checking MMX svolume");
+    for (i = 1; i <= 3; i++) {
+        for (j = 0; j < 7; j++)
+            run_volume_test(mmx_func, orig_func, j, i, true, false);
+    }
+    run_volume_test(mmx_func, orig_func, 7, 1, true, true);
+    run_volume_test(mmx_func, orig_func, 7, 2, true, true);
+    run_volume_test(mmx_func, orig_func, 7, 3, true, true);
+}
+END_TEST
+
+START_TEST (svolume_sse_test) {
+    pa_do_volume_func_t orig_func, sse_func;
+    pa_cpu_x86_flag_t flags = 0;
+    int i, j;
+
+    pa_cpu_get_x86_flags(&flags);
+
+    if (!(flags & PA_CPU_X86_SSE2)) {
+        pa_log_info("SSE2 not supported. Skipping");
+        return;
+    }
+
+    orig_func = pa_get_volume_func(PA_SAMPLE_S16NE);
+    pa_volume_func_init_sse(flags);
+    sse_func = pa_get_volume_func(PA_SAMPLE_S16NE);
+
+    pa_log_debug("Checking SSE2 svolume");
+    for (i = 1; i <= 3; i++) {
+        for (j = 0; j < 7; j++)
+            run_volume_test(sse_func, orig_func, j, i, true, false);
+    }
+    run_volume_test(sse_func, orig_func, 7, 1, true, true);
+    run_volume_test(sse_func, orig_func, 7, 2, true, true);
+    run_volume_test(sse_func, orig_func, 7, 3, true, true);
+}
+END_TEST
+#endif /* defined (__i386__) || defined (__amd64__) */
+
+#if defined (__arm__) && defined (__linux__)
+START_TEST (svolume_arm_test) {
+    pa_do_volume_func_t orig_func, arm_func;
+    pa_cpu_arm_flag_t flags = 0;
+    int i, j;
+
+    pa_cpu_get_arm_flags(&flags);
+
+    if (!(flags & PA_CPU_ARM_V6)) {
+        pa_log_info("ARMv6 instructions not supported. Skipping");
+        return;
+    }
+
+    orig_func = pa_get_volume_func(PA_SAMPLE_S16NE);
+    pa_volume_func_init_arm(flags);
+    arm_func = pa_get_volume_func(PA_SAMPLE_S16NE);
+
+    pa_log_debug("Checking ARM svolume");
+    for (i = 1; i <= 3; i++) {
+        for (j = 0; j < 7; j++)
+            run_volume_test(arm_func, orig_func, j, i, true, false);
+    }
+    run_volume_test(arm_func, orig_func, 7, 1, true, true);
+    run_volume_test(arm_func, orig_func, 7, 2, true, true);
+    run_volume_test(arm_func, orig_func, 7, 3, true, true);
+}
+END_TEST
+#endif /* defined (__arm__) && defined (__linux__) */
+
+START_TEST (svolume_orc_test) {
+    pa_do_volume_func_t orig_func, orc_func;
+    pa_cpu_info cpu_info;
+    int i, j;
+
+#if defined (__i386__) || defined (__amd64__)
+    pa_zero(cpu_info);
+    cpu_info.cpu_type = PA_CPU_X86;
+    pa_cpu_get_x86_flags(&cpu_info.flags.x86);
+#endif
+
+    orig_func = pa_get_volume_func(PA_SAMPLE_S16NE);
+
+    if (!pa_cpu_init_orc(cpu_info)) {
+        pa_log_info("Orc not supported. Skipping");
+        return;
+    }
+
+    orc_func = pa_get_volume_func(PA_SAMPLE_S16NE);
+
+    pa_log_debug("Checking Orc svolume");
+    for (i = 1; i <= 2; i++) {
+        for (j = 0; j < 7; j++)
+            run_volume_test(orc_func, orig_func, j, i, true, false);
+    }
+    run_volume_test(orc_func, orig_func, 7, 1, true, true);
+    run_volume_test(orc_func, orig_func, 7, 2, true, true);
+}
+END_TEST
+
+int main(int argc, char *argv[]) {
+    int failed = 0;
+    Suite *s;
+    TCase *tc;
+    SRunner *sr;
+
+    if (!getenv("MAKE_CHECK"))
+        pa_log_set_level(PA_LOG_DEBUG);
+
+    s = suite_create("CPU");
+
+    tc = tcase_create("svolume");
+#if defined (__i386__) || defined (__amd64__)
+    tcase_add_test(tc, svolume_mmx_test);
+    tcase_add_test(tc, svolume_sse_test);
+#endif
+#if defined (__arm__) && defined (__linux__)
+    tcase_add_test(tc, svolume_arm_test);
+#endif
+    tcase_add_test(tc, svolume_orc_test);
+    tcase_set_timeout(tc, 120);
+    suite_add_tcase(s, tc);
+
+    sr = srunner_create(s);
+    srunner_run_all(sr, CK_NORMAL);
+    failed = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/tests/flist-test.c b/src/tests/flist-test.c
index 6915204..d8c227a 100644
--- a/src/tests/flist-test.c
+++ b/src/tests/flist-test.c
@@ -88,7 +88,7 @@ int main(int argc, char* argv[]) {
 
     for (i = 0; i < THREADS_MAX; i++) {
         threads[i] = pa_thread_new("test", thread_func, pa_sprintf_malloc("Thread #%i", i+1));
-        assert(threads[i]);
+        pa_assert(threads[i]);
     }
 
     pa_msleep(60000);
diff --git a/src/tests/format-test.c b/src/tests/format-test.c
index 5e7d587..e9e9622 100644
--- a/src/tests/format-test.c
+++ b/src/tests/format-test.c
@@ -36,7 +36,7 @@
 
 START_TEST (format_test) {
     pa_format_info *f1 = NULL, *f2 = NULL;
-    int rates1[] = { 32000, 44100, 48000 }, i, temp_int1 = -1, temp_int2 = -1, *temp_int_array;
+    int rates1[] = { 32000, 44100, 48000 }, i, temp_int1 = -1, PA_UNUSED temp_int2 = -1, *temp_int_array;
     const char *strings[] = { "thing1", "thing2", "thing3" };
     char *temp_str, **temp_str_array;
 
diff --git a/src/tests/lo-test-util.c b/src/tests/lo-test-util.c
index 01eb295..84e8af3 100644
--- a/src/tests/lo-test-util.c
+++ b/src/tests/lo-test-util.c
@@ -72,7 +72,7 @@ static int cal_state = CALIBRATION_ONE;
 
 static void calibrate_write_cb(pa_stream *s, size_t nbytes, void *userdata) {
     pa_lo_test_context *ctx = (pa_lo_test_context *) userdata;
-    int i, r, nsamp = nbytes / ctx->fs;
+    int i, nsamp = nbytes / ctx->fs;
     float tmp[nsamp][2];
     static int count = 0;
 
@@ -80,8 +80,7 @@ static void calibrate_write_cb(pa_stream *s, size_t nbytes, void *userdata) {
     for (i = 0; i < nsamp; i++)
         tmp[i][0] = tmp[i][1] = cal_state == CALIBRATION_ONE ? sinf(count++ * TONE_HZ * 2 * M_PI / ctx->sample_spec.rate) : 0.0f;
 
-    r = pa_stream_write(s, &tmp, nbytes, nop_free_cb, 0, PA_SEEK_RELATIVE);
-    pa_assert(r == 0);
+    pa_assert_se(pa_stream_write(s, &tmp, nbytes, nop_free_cb, 0, PA_SEEK_RELATIVE) == 0);
 
     if (cal_state == CALIBRATION_DONE)
         pa_stream_set_write_callback(s, ctx->write_cb, ctx);
@@ -94,12 +93,11 @@ static void calibrate_read_cb(pa_stream *s, size_t nbytes, void *userdata) {
 
     pa_cvolume vol;
     pa_operation *o;
-    int r, nsamp;
+    int nsamp;
     float *in;
     size_t l;
 
-    r = pa_stream_peek(s, (const void **)&in, &l);
-    pa_assert(r == 0);
+    pa_assert_se(pa_stream_peek(s, (const void **)&in, &l) == 0);
 
     nsamp = l / ctx->fs;
 
diff --git a/src/tests/mcalign-test.c b/src/tests/mcalign-test.c
index bd192b5..455e18c 100644
--- a/src/tests/mcalign-test.c
+++ b/src/tests/mcalign-test.c
@@ -21,7 +21,6 @@
 #include <config.h>
 #endif
 
-#include <assert.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <errno.h>
@@ -56,7 +55,7 @@ int main(int argc, char *argv[]) {
             c.index = c.length = 0;
         }
 
-        assert(c.index < pa_memblock_get_length(c.memblock));
+        pa_assert(c.index < pa_memblock_get_length(c.memblock));
 
         l = pa_memblock_get_length(c.memblock) - c.index;
 
@@ -74,7 +73,7 @@ int main(int argc, char *argv[]) {
 
         c.length = (size_t) r;
         pa_mcalign_push(a, &c);
-        fprintf(stderr, "Read %ld bytes\n", (long)r);
+        fprintf(stderr, "Read %zd bytes\n", r);
 
         c.index += (size_t) r;
 
diff --git a/src/tests/memblock-test.c b/src/tests/memblock-test.c
index d46da6c..9581daa 100644
--- a/src/tests/memblock-test.c
+++ b/src/tests/memblock-test.c
@@ -130,7 +130,7 @@ START_TEST (memblock_test) {
 
         pa_log("A: Memory block exported as %u", id);
 
-        mb_b = pa_memimport_get(import_b, id, shm_id, offset, size);
+        mb_b = pa_memimport_get(import_b, id, shm_id, offset, size, false);
         fail_unless(mb_b != NULL);
         r = pa_memexport_put(export_b, mb_b, &id, &shm_id, &offset, &size);
         fail_unless(r >= 0);
@@ -139,7 +139,7 @@ START_TEST (memblock_test) {
 
         pa_log("B: Memory block exported as %u", id);
 
-        mb_c = pa_memimport_get(import_c, id, shm_id, offset, size);
+        mb_c = pa_memimport_get(import_c, id, shm_id, offset, size, false);
         fail_unless(mb_c != NULL);
         x = pa_memblock_acquire(mb_c);
         pa_log_debug("1 data=%s", x);
diff --git a/src/tests/mix-special-test.c b/src/tests/mix-special-test.c
deleted file mode 100644
index 08ac812..0000000
--- a/src/tests/mix-special-test.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/***
-  This file is part of PulseAudio.
-
-  PulseAudio is free software; you can redistribute it and/or modify
-  it under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2.1 of the License,
-  or (at your option) any later version.
-
-  PulseAudio is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with PulseAudio; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-  USA.
-***/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <check.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <math.h>
-
-#include <pulse/rtclock.h>
-#include <pulsecore/random.h>
-#include <pulsecore/macro.h>
-#include <pulsecore/mix.h>
-#include <pulsecore/sample-util.h>
-
-#include "runtime-test-util.h"
-
-static void acquire_mix_streams(pa_mix_info streams[], unsigned nstreams) {
-    unsigned i;
-
-    for (i = 0; i < nstreams; i++)
-        streams[i].ptr = pa_memblock_acquire_chunk(&streams[i].chunk);
-}
-
-static void release_mix_streams(pa_mix_info streams[], unsigned nstreams) {
-    unsigned i;
-
-    for (i = 0; i < nstreams; i++)
-        pa_memblock_release(streams[i].chunk.memblock);
-}
-
-/* special case: mix 2 s16ne streams, 1 channel each */
-static void pa_mix2_ch1_s16ne(pa_mix_info streams[], int16_t *data, unsigned length) {
-    const int16_t *ptr0 = streams[0].ptr;
-    const int16_t *ptr1 = streams[1].ptr;
-
-    const int32_t cv0 = streams[0].linear[0].i;
-    const int32_t cv1 = streams[1].linear[0].i;
-
-    length /= sizeof(int16_t);
-
-    for (; length > 0; length--) {
-        int32_t sum;
-
-        sum = pa_mult_s16_volume(*ptr0++, cv0);
-        sum += pa_mult_s16_volume(*ptr1++, cv1);
-
-        sum = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
-        *data++ = sum;
-    }
-}
-
-/* special case: mix 2 s16ne streams, 2 channels each */
-static void pa_mix2_ch2_s16ne(pa_mix_info streams[], int16_t *data, unsigned length) {
-    const int16_t *ptr0 = streams[0].ptr;
-    const int16_t *ptr1 = streams[1].ptr;
-
-    length /= sizeof(int16_t) * 2;
-
-    for (; length > 0; length--) {
-        int32_t sum;
-
-        sum = pa_mult_s16_volume(*ptr0++, streams[0].linear[0].i);
-        sum += pa_mult_s16_volume(*ptr1++, streams[1].linear[0].i);
-
-        sum = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
-        *data++ = sum;
-
-        sum = pa_mult_s16_volume(*ptr0++, streams[0].linear[1].i);
-        sum += pa_mult_s16_volume(*ptr1++, streams[1].linear[1].i);
-
-        sum = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
-        *data++ = sum;
-    }
-}
-
-/* special case: mix 2 s16ne streams */
-static void pa_mix2_s16ne(pa_mix_info streams[], unsigned channels, int16_t *data, unsigned length) {
-    const int16_t *ptr0 = streams[0].ptr;
-    const int16_t *ptr1 = streams[1].ptr;
-    unsigned channel = 0;
-
-    length /= sizeof(int16_t);
-
-    for (; length > 0; length--) {
-        int32_t sum;
-
-        sum = pa_mult_s16_volume(*ptr0++, streams[0].linear[channel].i);
-        sum += pa_mult_s16_volume(*ptr1++, streams[1].linear[channel].i);
-
-        sum = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
-        *data++ = sum;
-
-        if (PA_UNLIKELY(++channel >= channels))
-            channel = 0;
-    }
-}
-
-/* special case: mix s16ne streams, 2 channels each */
-static void pa_mix_ch2_s16ne(pa_mix_info streams[], unsigned nstreams, int16_t *data, unsigned length) {
-
-    length /= sizeof(int16_t) * 2;
-
-    for (; length > 0; length--) {
-        int32_t sum0 = 0, sum1 = 0;
-        unsigned i;
-
-        for (i = 0; i < nstreams; i++) {
-            pa_mix_info *m = streams + i;
-            int32_t cv0 = m->linear[0].i;
-            int32_t cv1 = m->linear[1].i;
-
-            sum0 += pa_mult_s16_volume(*((int16_t*) m->ptr), cv0);
-            m->ptr = (uint8_t*) m->ptr + sizeof(int16_t);
-
-            sum1 += pa_mult_s16_volume(*((int16_t*) m->ptr), cv1);
-            m->ptr = (uint8_t*) m->ptr + sizeof(int16_t);
-        }
-
-        *data++ = PA_CLAMP_UNLIKELY(sum0, -0x8000, 0x7FFF);
-        *data++ = PA_CLAMP_UNLIKELY(sum1, -0x8000, 0x7FFF);
-    }
-}
-
-static void pa_mix_generic_s16ne(pa_mix_info streams[], unsigned nstreams, unsigned channels, int16_t *data, unsigned length) {
-    unsigned channel = 0;
-
-    length /= sizeof(int16_t);
-
-    for (; length > 0; length--) {
-        int32_t sum = 0;
-        unsigned i;
-
-        for (i = 0; i < nstreams; i++) {
-            pa_mix_info *m = streams + i;
-            int32_t cv = m->linear[channel].i;
-
-            if (PA_LIKELY(cv > 0))
-                sum += pa_mult_s16_volume(*((int16_t*) m->ptr), cv);
-            m->ptr = (uint8_t*) m->ptr + sizeof(int16_t);
-        }
-
-        sum = PA_CLAMP_UNLIKELY(sum, -0x8000, 0x7FFF);
-        *data++ = sum;
-
-        if (PA_UNLIKELY(++channel >= channels))
-            channel = 0;
-    }
-}
-
-#define SAMPLES 1028
-#define TIMES 1000
-#define TIMES2 100
-
-START_TEST (mix_special_1ch_test) {
-    int16_t samples0[SAMPLES];
-    int16_t samples1[SAMPLES];
-    int16_t out[SAMPLES];
-    int16_t out_ref[SAMPLES];
-    pa_mempool *pool;
-    pa_memchunk c0, c1;
-    pa_mix_info m[2];
-    unsigned nsamples = SAMPLES;
-
-    fail_unless((pool = pa_mempool_new(false, 0)) != NULL, NULL);
-
-    pa_random(samples0, nsamples * sizeof(int16_t));
-    c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), false);
-    c0.length = pa_memblock_get_length(c0.memblock);
-    c0.index = 0;
-
-    pa_random(samples1, nsamples * sizeof(int16_t));
-    c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), false);
-    c1.length = pa_memblock_get_length(c1.memblock);
-    c1.index = 0;
-
-    m[0].chunk = c0;
-    m[0].volume.channels = 1;
-    m[0].volume.values[0] = PA_VOLUME_NORM;
-    m[0].linear[0].i = 0x5555;
-
-    m[1].chunk = c1;
-    m[1].volume.channels = 1;
-    m[1].volume.values[0] = PA_VOLUME_NORM;
-    m[1].linear[0].i = 0x6789;
-
-    PA_RUNTIME_TEST_RUN_START("mix s16 generic 1 channel", TIMES, TIMES2) {
-        acquire_mix_streams(m, 2);
-        pa_mix_generic_s16ne(m, 2, 1, out_ref, nsamples * sizeof(int16_t));
-        release_mix_streams(m, 2);
-    } PA_RUNTIME_TEST_RUN_STOP
-
-    PA_RUNTIME_TEST_RUN_START("mix s16 2 streams 1 channel", TIMES, TIMES2) {
-        acquire_mix_streams(m, 2);
-        pa_mix2_ch1_s16ne(m, out, nsamples * sizeof(int16_t));
-        release_mix_streams(m, 2);
-    } PA_RUNTIME_TEST_RUN_STOP
-
-    fail_unless(memcmp(out, out_ref, nsamples * sizeof(int16_t)) == 0);
-
-    pa_memblock_unref(c0.memblock);
-    pa_memblock_unref(c1.memblock);
-
-    pa_mempool_free(pool);
-}
-END_TEST
-
-START_TEST (mix_special_2ch_test) {
-    int16_t samples0[SAMPLES*2];
-    int16_t samples1[SAMPLES*2];
-    int16_t out[SAMPLES*2];
-    int16_t out_ref[SAMPLES*2];
-    int i;
-    pa_mempool *pool;
-    pa_memchunk c0, c1;
-    pa_mix_info m[2];
-    unsigned nsamples = SAMPLES * 2;
-
-    fail_unless((pool = pa_mempool_new(false, 0)) != NULL, NULL);
-
-    pa_random(samples0, nsamples * sizeof(int16_t));
-    c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), false);
-    c0.length = pa_memblock_get_length(c0.memblock);
-    c0.index = 0;
-
-    pa_random(samples1, nsamples * sizeof(int16_t));
-    c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), false);
-    c1.length = pa_memblock_get_length(c1.memblock);
-    c1.index = 0;
-
-    m[0].chunk = c0;
-    m[0].volume.channels = 2;
-    for (i = 0; i < m[0].volume.channels; i++) {
-        m[0].volume.values[i] = PA_VOLUME_NORM;
-        m[0].linear[i].i = 0x5555;
-    }
-
-    m[1].chunk = c1;
-    m[1].volume.channels = 2;
-    for (i = 0; i < m[1].volume.channels; i++) {
-        m[1].volume.values[i] = PA_VOLUME_NORM;
-        m[1].linear[i].i = 0x6789;
-    }
-
-    PA_RUNTIME_TEST_RUN_START("mix s16 generic 2 channels", TIMES, TIMES2) {
-        acquire_mix_streams(m, 2);
-        pa_mix_generic_s16ne(m, 2, 2, out_ref, nsamples * sizeof(int16_t));
-        release_mix_streams(m, 2);
-    } PA_RUNTIME_TEST_RUN_STOP
-
-    PA_RUNTIME_TEST_RUN_START("mix s16 2 channels", TIMES, TIMES2) {
-        acquire_mix_streams(m, 2);
-        pa_mix_ch2_s16ne(m, 2, out, nsamples * sizeof(int16_t));
-        release_mix_streams(m, 2);
-    } PA_RUNTIME_TEST_RUN_STOP
-
-    fail_unless(memcmp(out, out_ref, nsamples * sizeof(int16_t)) == 0);
-
-    PA_RUNTIME_TEST_RUN_START("mix s16 2 streams", TIMES, TIMES2) {
-        acquire_mix_streams(m, 2);
-        pa_mix2_s16ne(m, 2, out, nsamples * sizeof(int16_t));
-        release_mix_streams(m, 2);
-    } PA_RUNTIME_TEST_RUN_STOP
-
-    fail_unless(memcmp(out, out_ref, nsamples * sizeof(int16_t)) == 0);
-
-    PA_RUNTIME_TEST_RUN_START("mix s16 2 streams 2 channels", TIMES, TIMES2) {
-        acquire_mix_streams(m, 2);
-        pa_mix2_ch2_s16ne(m, out, nsamples * sizeof(int16_t));
-        release_mix_streams(m, 2);
-    } PA_RUNTIME_TEST_RUN_STOP
-
-    fail_unless(memcmp(out, out_ref, nsamples * sizeof(int16_t)) == 0);
-
-    pa_memblock_unref(c0.memblock);
-    pa_memblock_unref(c1.memblock);
-
-    pa_mempool_free(pool);
-}
-END_TEST
-
-int main(int argc, char *argv[]) {
-    int failed = 0;
-    Suite *s;
-    TCase *tc;
-    SRunner *sr;
-
-    if (!getenv("MAKE_CHECK"))
-        pa_log_set_level(PA_LOG_DEBUG);
-
-    s = suite_create("Mix-special");
-    tc = tcase_create("mix-special 1ch");
-    tcase_add_test(tc, mix_special_1ch_test);
-    tcase_set_timeout(tc, 120);
-    suite_add_tcase(s, tc);
-    tc = tcase_create("mix-special 2ch");
-    tcase_add_test(tc, mix_special_2ch_test);
-    tcase_set_timeout(tc, 120);
-    suite_add_tcase(s, tc);
-
-    sr = srunner_create(s);
-    srunner_run_all(sr, CK_NORMAL);
-    failed = srunner_ntests_failed(sr);
-    srunner_free(sr);
-
-    return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c
index ae65209..e95607d 100644
--- a/src/tests/mix-test.c
+++ b/src/tests/mix-test.c
@@ -56,79 +56,37 @@ static const uint8_t ulaw_result[3][10] = {
 { 0x00, 0xff, 0xff, 0x80, 0x91, 0x31, 0x00, 0xe9, 0x12, 0x13 },
 };
 
-/* PA_SAMPLE_S16LE */
-static const uint16_t s16le_result[3][10] = {
+static const uint16_t s16ne_result[3][10] = {
 { 0x0000, 0xffff, 0x7fff, 0x8000, 0x9fff, 0x3fff, 0x0001, 0xf000, 0x0020, 0x0021 },
 { 0x0000, 0xffff, 0x7332, 0x8ccd, 0xa998, 0x3998, 0x0000, 0xf199, 0x001c, 0x001d },
 { 0x0000, 0xfffe, 0x7fff, 0x8000, 0x8000, 0x7997, 0x0001, 0xe199, 0x003c, 0x003e },
 };
 
-/* PA_SAMPLE_S16BE */
-static const uint16_t s16be_result[3][10] = {
-{ 0x0000, 0xffff, 0x7fff, 0x8000, 0x9fff, 0x3fff, 0x0001, 0xf000, 0x0020, 0x0021 },
-{ 0x0000, 0xffff, 0x8bff, 0x7300, 0xa8ff, 0x52ff, 0xe600, 0xd700, 0xcc1c, 0xb31d },
-{ 0x0000, 0xfeff, 0x0aff, 0xf300, 0x47ff, 0x91fe, 0xe601, 0xc701, 0xcc3c, 0xb33e },
-};
-
-/* PA_SAMPLE_FLOAT32LE */
-static const float float32le_result[3][10] = {
-{ 0.000000, -1.000000, 1.000000, 4711.000000, 0.222000, 0.330000, -0.300000, 99.000000, -0.555000, -0.123000 },
-{ 0.000000, -0.899987, 0.899987, 4239.837402, 0.199797, 0.296996, -0.269996, 89.098679, -0.499493, -0.110698 },
-{ 0.000000, -1.899987, 1.899987, 8950.837891, 0.421797, 0.626996, -0.569996, 188.098679, -1.054493, -0.233698 },
-};
-
-/* PA_SAMPLE_FLOAT32BE */
-static const float float32be_result[3][10] = {
+static const float float32ne_result[3][10] = {
 { 0.000000, -1.000000, 1.000000, 4711.000000, 0.222000, 0.330000, -0.300000, 99.000000, -0.555000, -0.123000 },
 { 0.000000, -0.899987, 0.899987, 4239.837402, 0.199797, 0.296996, -0.269996, 89.098679, -0.499493, -0.110698 },
 { 0.000000, -1.899987, 1.899987, 8950.837891, 0.421797, 0.626996, -0.569996, 188.098679, -1.054493, -0.233698 },
 };
 
-/* PA_SAMPLE_S32LE */
-static const uint32_t s32le_result[3][10] = {
+static const uint32_t s32ne_result[3][10] = {
 { 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a },
 { 0x00000000, 0xffff199b, 0x7332199c, 0x8ccd0003, 0xa998d99e, 0x3998999f, 0x0000e66c, 0xf199a007, 0x001cccc8, 0x001db32e },
 { 0x00000001, 0xfffe199d, 0x7fffffff, 0x80000000, 0x80000000, 0x799799a5, 0x0001e673, 0xe199a00f, 0x003cccd1, 0x003eb338 },
 };
 
-/* PA_SAMPLE_S32BE */
-static const uint32_t s32be_result[3][10] = {
-{ 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a },
-{ 0x0066e600, 0x65b2cd01, 0xf117b402, 0x73989903, 0x0ee48004, 0xb8496705, 0xe6ca4c06, 0xd7303307, 0xccb21908, 0xb3190009 },
-{ 0x0066e601, 0x64b2ce03, 0x7017b505, 0xf3989907, 0xade38109, 0xf748680b, 0xe6cb4c0d, 0xc731330f, 0xccd21911, 0xb33a0013 },
-};
-
-/* PA_SAMPLE_S24LE */
-static const uint8_t s24le_result[3][30] = {
-{ 0x00, 0x00, 0x01, 0xff, 0xff, 0x02, 0x7f, 0xff, 0x03, 0x80, 0x00, 0x04, 0x9f, 0xff, 0x05, 0x3f, 0xff, 0x06, 0x01, 0x00, 0x07, 0xf0, 0x00, 0x08, 0x20, 0x00, 0x09, 0x21, 0x00, 0x0a },
-{ 0x66, 0xe6, 0x00, 0x31, 0xb3, 0x02, 0x23, 0x99, 0x03, 0x0b, 0x9a, 0x03, 0x0c, 0x66, 0x05, 0x1c, 0x4c, 0x06, 0xca, 0x4c, 0x06, 0x07, 0x34, 0x07, 0xb2, 0x19, 0x08, 0x19, 0x00, 0x09 },
-{ 0x66, 0xe6, 0x01, 0x30, 0xb3, 0x05, 0xa2, 0x98, 0x07, 0x8b, 0x9a, 0x07, 0xab, 0x65, 0x0b, 0x5b, 0x4b, 0x0d, 0xcb, 0x4c, 0x0d, 0xf7, 0x34, 0x0f, 0xd2, 0x19, 0x11, 0x3a, 0x00, 0x13 },
-};
-
-/* PA_SAMPLE_S24BE */
+/* attention: result is in BE, not NE! */
 static const uint8_t s24be_result[3][30] = {
-{ 0x00, 0x00, 0x01, 0xff, 0xff, 0x02, 0x7f, 0xff, 0x03, 0x80, 0x00, 0x04, 0x9f, 0xff, 0x05, 0x3f, 0xff, 0x06, 0x01, 0x00, 0x07,
-    0xf0, 0x00, 0x08, 0x20, 0x00, 0x09, 0x21, 0x00, 0x0a },
-{ 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x73, 0x32, 0x1c, 0x8c, 0xcd, 0x03, 0xa9, 0x98, 0xde, 0x39, 0x98, 0x9f, 0x00, 0xe6, 0x6c,
-    0xf1, 0x99, 0xa7, 0x1c, 0xcc, 0xc8, 0x1d, 0xb3, 0x2e },
-{ 0x00, 0x00, 0x01, 0xff, 0xfe, 0x1d, 0x7f, 0xff, 0xff, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x79, 0x97, 0xa5, 0x01, 0xe6, 0x73,
-    0xe1, 0x99, 0xaf, 0x3c, 0xcc, 0xd1, 0x3e, 0xb3, 0x38 },
+{ 0x00, 0x00, 0x01, 0xff, 0xff, 0x02, 0x7f, 0xff, 0x03, 0x80, 0x00, 0x04, 0x9f, 0xff, 0x05, 0x3f, 0xff, 0x06, 0x01, 0x00, 0x07, 0xf0, 0x00, 0x08, 0x20, 0x00, 0x09, 0x21, 0x00, 0x0a },
+{ 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x73, 0x32, 0x1c, 0x8c, 0xcd, 0x03, 0xa9, 0x98, 0xde, 0x39, 0x98, 0x9f, 0x00, 0xe6, 0x6c, 0xf1, 0x99, 0xa7, 0x1c, 0xcc, 0xc8, 0x1d, 0xb3, 0x2e },
+{ 0x00, 0x00, 0x01, 0xff, 0xfe, 0x1d, 0x7f, 0xff, 0xff, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x79, 0x97, 0xa5, 0x01, 0xe6, 0x73, 0xe1, 0x99, 0xaf, 0x3c, 0xcc, 0xd1, 0x3e, 0xb3, 0x38 },
 };
 
-/* PA_SAMPLE_S24_32LE */
-static const uint32_t s24_32le_result[3][10] = {
+static const uint32_t s24_32ne_result[3][10] = {
 { 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a },
 { 0x00000000, 0x00ff199b, 0x00ff199c, 0x00000003, 0x00ff199e, 0x00ff199f, 0x0000e66c, 0x00000007, 0x001cccc8, 0x001db32e },
 { 0x00000001, 0x00fe199d, 0x00fe199f, 0x00000007, 0x00fe19a3, 0x00fe19a5, 0x0001e673, 0x0000000f, 0x003cccd1, 0x003eb338 },
 };
 
-/* PA_SAMPLE_S24_32BE */
-static const uint32_t s24_32be_result[3][10] = {
-{ 0x00000001, 0xffff0002, 0x7fff0003, 0x80000004, 0x9fff0005, 0x3fff0006, 0x00010007, 0xf0000008, 0x00200009, 0x0021000a },
-{ 0x00000000, 0x65e60000, 0xf1e50000, 0x73000000, 0x0ee60000, 0xb8e50000, 0xe6000000, 0xd7000000, 0xcc1c0000, 0xb31d0000 },
-{ 0x00000000, 0xe5010200, 0x00036400, 0x0470e500, 0xf3000000, 0xe5010500, 0x0006ad00, 0x07f7e400, 0xe6010000, 0x00000800 },
-};
-
 static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, int iter) {
     void *d;
     unsigned i;
@@ -172,127 +130,70 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
             break;
         }
 
-        case PA_SAMPLE_S16LE: {
-            const uint16_t *v = s16le_result[iter];
-            uint16_t *u = d;
-
-            for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                fail_unless(*u == *v, NULL);
-                ++u;
-                ++v;
-            }
-            break;
-        }
-
-        case PA_SAMPLE_S16BE: {
-            const uint16_t *v = s16be_result[iter];
+        case PA_SAMPLE_S16NE:
+        case PA_SAMPLE_S16RE: {
+            const uint16_t *v = s16ne_result[iter];
             uint16_t *u = d;
 
             for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                fail_unless(*u == *v, NULL);
+                uint16_t uu = PA_MAYBE_UINT16_SWAP(ss->format != PA_SAMPLE_S16NE, *u);
+                fail_unless(uu == *v, NULL);
                 ++u;
                 ++v;
             }
             break;
         }
 
-        case PA_SAMPLE_FLOAT32LE: {
-            const float *v = float32le_result[iter];
-            float *u = d;
-
-            for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u);
-                fail_unless(fabs(uu - *v) <= 1e-6, NULL);
-                ++u;
-                ++v;
-            }
-            break;
-        }
-
-        case PA_SAMPLE_FLOAT32BE: {
-            const float *v = float32be_result[iter];
+        case PA_SAMPLE_FLOAT32NE:
+        case PA_SAMPLE_FLOAT32RE: {
+            const float *v = float32ne_result[iter];
             float *u = d;
 
             for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u);
-                fail_unless(fabs(uu - *v) <= 1e-6, NULL);
-                ++u;
-                ++v;
-            }
-            break;
-        }
-
-        case PA_SAMPLE_S32LE: {
-            const uint32_t *v = s32le_result[iter];
-            uint32_t *u = d;
-
-            for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                fail_unless(*u == *v, NULL);
-                ++u;
-                ++v;
-            }
-            break;
-        }
-
-        case PA_SAMPLE_S32BE: {
-            const uint32_t *v = s32be_result[iter];
-            uint32_t *u = d;
-
-            for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                fail_unless(*u == *v, NULL);
+                float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_READ_FLOAT32RE(u);
+                fail_unless(fabsf(uu - *v) <= 1e-6f, NULL);
                 ++u;
                 ++v;
             }
             break;
         }
 
-        case PA_SAMPLE_S24_32LE: {
-            const uint32_t *v = s24_32le_result[iter];
+        case PA_SAMPLE_S32NE:
+        case PA_SAMPLE_S32RE: {
+            const uint32_t *v = s32ne_result[iter];
             uint32_t *u = d;
 
             for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                fail_unless(*u == *v, NULL);
+                uint32_t uu = PA_MAYBE_UINT32_SWAP(ss->format != PA_SAMPLE_S32NE, *u);
+                fail_unless(uu == *v, NULL);
                 ++u;
                 ++v;
             }
             break;
         }
 
-        case PA_SAMPLE_S24_32BE: {
-            const uint32_t *v = s24_32be_result[iter];
+        case PA_SAMPLE_S24_32NE:
+        case PA_SAMPLE_S24_32RE: {
+            const uint32_t *v = s24_32ne_result[iter];
             uint32_t *u = d;
 
             for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                fail_unless(*u == *v, NULL);
+                uint32_t uu = PA_MAYBE_UINT32_SWAP(ss->format != PA_SAMPLE_S24_32NE, *u);
+                fail_unless(uu == *v, NULL);
                 ++u;
                 ++v;
             }
             break;
         }
 
-        case PA_SAMPLE_S24LE: {
-            const uint8_t *v = s24le_result[iter];
-            uint8_t *u = d;
-
-            for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                fail_unless(*u == *v, NULL);
-                fail_unless(*(u+1) == *(v+1), NULL);
-                fail_unless(*(u+2) == *(v+2), NULL);
-
-                u += 3;
-                v += 3;
-            }
-            break;
-        }
-
-        case PA_SAMPLE_S24BE: {
+        case PA_SAMPLE_S24NE:
+        case PA_SAMPLE_S24RE: {
             const uint8_t *v = s24be_result[iter];
             uint8_t *u = d;
 
             for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                fail_unless(*u == *v, NULL);
-                fail_unless(*(u+1) == *(v+1), NULL);
-                fail_unless(*(u+2) == *(v+2), NULL);
+                uint32_t uu = ss->format == PA_SAMPLE_S24LE ? PA_READ24LE(u) : PA_READ24BE(u);
+                fail_unless(uu == PA_READ24BE(v), NULL);
 
                 u += 3;
                 v += 3;
@@ -320,23 +221,18 @@ static pa_memblock* generate_block(pa_mempool *pool, const pa_sample_spec *ss) {
         case PA_SAMPLE_U8:
         case PA_SAMPLE_ULAW:
         case PA_SAMPLE_ALAW: {
-            static const uint8_t u8_samples[] = {
-                0x00, 0xFF, 0x7F, 0x80, 0x9f,
-                0x3f, 0x01, 0xF0, 0x20, 0x21
-            };
-
-            memcpy(d, u8_samples, sizeof(u8_samples));
+            memcpy(d, u8_result[0], sizeof(u8_result[0]));
             break;
         }
 
         case PA_SAMPLE_S16NE:
         case PA_SAMPLE_S16RE: {
-            static const uint16_t u16_samples[] = {
-                0x0000, 0xFFFF, 0x7FFF, 0x8000, 0x9fff,
-                0x3fff, 0x0001, 0xF000, 0x0020, 0x0021
-            };
-
-            memcpy(d, u16_samples, sizeof(u16_samples));
+            if (ss->format == PA_SAMPLE_S16RE) {
+                uint16_t *u = d;
+                for (i = 0; i < 10; i++)
+                    u[i] = PA_UINT16_SWAP(s16ne_result[0][i]);
+            } else
+                memcpy(d, s16ne_result[0], sizeof(s16ne_result[0]));
             break;
         }
 
@@ -344,48 +240,33 @@ static pa_memblock* generate_block(pa_mempool *pool, const pa_sample_spec *ss) {
         case PA_SAMPLE_S24_32RE:
         case PA_SAMPLE_S32NE:
         case PA_SAMPLE_S32RE: {
-            static const uint32_t u32_samples[] = {
-                0x00000001, 0xFFFF0002, 0x7FFF0003, 0x80000004, 0x9fff0005,
-                0x3fff0006, 0x00010007, 0xF0000008, 0x00200009, 0x0021000A
-            };
-
-            memcpy(d, u32_samples, sizeof(u32_samples));
+            if (ss->format == PA_SAMPLE_S24_32RE || ss->format == PA_SAMPLE_S32RE) {
+                uint32_t *u = d;
+                for (i = 0; i < 10; i++)
+                    u[i] = PA_UINT32_SWAP(s32ne_result[0][i]);
+            } else
+                memcpy(d, s32ne_result[0], sizeof(s32ne_result[0]));
             break;
         }
 
         case PA_SAMPLE_S24NE:
-        case PA_SAMPLE_S24RE: {
-            /* Need to be on a byte array because they are not aligned */
-            static const uint8_t u24_samples[] = {
-                0x00, 0x00, 0x01,
-                0xFF, 0xFF, 0x02,
-                0x7F, 0xFF, 0x03,
-                0x80, 0x00, 0x04,
-                0x9f, 0xff, 0x05,
-                0x3f, 0xff, 0x06,
-                0x01, 0x00, 0x07,
-                0xF0, 0x00, 0x08,
-                0x20, 0x00, 0x09,
-                0x21, 0x00, 0x0A
-            };
-
-            memcpy(d, u24_samples, sizeof(u24_samples));
+        case PA_SAMPLE_S24RE:
+            if (ss->format == PA_SAMPLE_S24LE) {
+                uint8_t *u = d;
+                for (i = 0; i < 30; i += 3)
+                    PA_WRITE24LE(&u[i], PA_READ24BE(&s24be_result[0][i]));
+            } else
+                memcpy(d, s24be_result[0], sizeof(s24be_result[0]));
             break;
-        }
 
         case PA_SAMPLE_FLOAT32NE:
         case PA_SAMPLE_FLOAT32RE: {
-            float *u = d;
-            static const float float_samples[] = {
-                0.0f, -1.0f, 1.0f, 4711.0f, 0.222f,
-                0.33f, -.3f, 99.0f, -0.555f, -.123f
-            };
-
             if (ss->format == PA_SAMPLE_FLOAT32RE) {
+                float *u = d;
                 for (i = 0; i < 10; i++)
-                    u[i] = PA_FLOAT32_SWAP(float_samples[i]);
+                    PA_WRITE_FLOAT32RE(&u[i], float32ne_result[0][i]);
             } else
-              memcpy(d, float_samples, sizeof(float_samples));
+                memcpy(d, float32ne_result[0], sizeof(float32ne_result[0]));
 
             break;
         }
@@ -427,8 +308,6 @@ START_TEST (mix_test) {
         i.length = pa_memblock_get_length(i.memblock);
         i.index = 0;
 
-        compare_block(&a, &i, 0);
-
         /* Make a copy */
         j = i;
         pa_memblock_ref(j.memblock);
diff --git a/src/tests/resampler-test.c b/src/tests/resampler-test.c
index 566b69f..f547770 100644
--- a/src/tests/resampler-test.c
+++ b/src/tests/resampler-test.c
@@ -98,7 +98,7 @@ static void dump_block(const char *label, const pa_sample_spec *ss, const pa_mem
             float *u = d;
 
             for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
-                printf("%4.3g ", ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_FLOAT32_SWAP(*u));
+                printf("%4.3g ", ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_READ_FLOAT32RE(u));
                 u++;
             }
 
@@ -222,7 +222,7 @@ static pa_memblock* generate_block(pa_mempool *pool, const pa_sample_spec *ss) {
 
             if (ss->format == PA_SAMPLE_FLOAT32RE)
                 for (i = 0; i < 10; i++)
-                    u[i] = PA_FLOAT32_SWAP(u[i]);
+                    PA_WRITE_FLOAT32RE(&u[i], u[i]);
 
             break;
         }
@@ -415,8 +415,8 @@ int main(int argc, char *argv[]) {
         pa_memchunk i, j;
         pa_usec_t ts;
 
-        pa_log_debug(_("Compilation CFLAGS: %s"), PA_CFLAGS);
-        pa_log_debug(_("=== %d seconds: %d Hz %d ch (%s) -> %d Hz %d ch (%s)"), seconds,
+        pa_log_debug("Compilation CFLAGS: %s", PA_CFLAGS);
+        pa_log_debug("=== %d seconds: %d Hz %d ch (%s) -> %d Hz %d ch (%s)", seconds,
                    a.rate, a.channels, pa_sample_format_to_string(a.format),
                    b.rate, b.channels, pa_sample_format_to_string(b.format));
 
diff --git a/src/tests/rtpoll-test.c b/src/tests/rtpoll-test.c
index 2ac34f0..2cf8125 100644
--- a/src/tests/rtpoll-test.c
+++ b/src/tests/rtpoll-test.c
@@ -62,7 +62,7 @@ START_TEST (rtpoll_test) {
 
     pa_rtpoll_set_timer_relative(p, 10000000); /* 10 s */
 
-    pa_rtpoll_run(p, 1);
+    pa_rtpoll_run(p);
 
     pa_rtpoll_item_free(i);
 
@@ -74,7 +74,7 @@ START_TEST (rtpoll_test) {
     pollfd->fd = 0;
     pollfd->events = POLLIN;
 
-    pa_rtpoll_run(p, 1);
+    pa_rtpoll_run(p);
 
     pa_rtpoll_item_free(i);
 
diff --git a/src/tests/sigbus-test.c b/src/tests/sigbus-test.c
index c48df8a..6acac04 100644
--- a/src/tests/sigbus-test.c
+++ b/src/tests/sigbus-test.c
@@ -54,6 +54,7 @@ START_TEST (sigbus_test) {
     /* Verify memory map */
     pa_log("Let's see if this worked: %s", (char*) p);
     pa_log("And memtrap says it is good: %s", pa_yes_no(pa_memtrap_is_good(m)));
+    fail_unless(pa_memtrap_is_good(m) == true);
 
     /* Invalidate mapping */
     fail_unless(ftruncate(fd, 0) >= 0);
@@ -64,6 +65,7 @@ START_TEST (sigbus_test) {
     /* Verify memory map */
     pa_log("Let's see if this worked: %s", (char*) p);
     pa_log("And memtrap says it is good: %s", pa_yes_no(pa_memtrap_is_good(m)));
+    fail_unless(pa_memtrap_is_good(m) == false);
 
     pa_memtrap_remove(m);
     munmap(p, PA_PAGE_SIZE);
diff --git a/src/tests/srbchannel-test.c b/src/tests/srbchannel-test.c
new file mode 100644
index 0000000..ce5930b
--- /dev/null
+++ b/src/tests/srbchannel-test.c
@@ -0,0 +1,138 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2014 David Henningsson, Canonical Ltd.
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <unistd.h>
+#include <check.h>
+
+#include <pulse/mainloop.h>
+#include <pulsecore/packet.h>
+#include <pulsecore/pstream.h>
+#include <pulsecore/iochannel.h>
+#include <pulsecore/memblock.h>
+
+static unsigned packets_received;
+static unsigned packets_checksum;
+static size_t packets_length;
+
+static void packet_received(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data, void *userdata) {
+    unsigned i;
+    fail_unless(packets_length == packet->length);
+    packets_received++;
+    for (i = 0; i < packet->length; i++)
+        packets_checksum += packet->data[i];
+}
+
+static void packet_test(unsigned npackets, size_t plength, pa_mainloop *ml, pa_pstream *p1, pa_pstream *p2) {
+    pa_packet *packet = pa_packet_new(plength);
+    unsigned i;
+    unsigned psum = 0, totalsum = 0;
+    pa_log_info("Sending %d packets of length %zd", npackets, plength);
+    packets_received = 0;
+    packets_checksum = 0;
+    packets_length = plength;
+    pa_pstream_set_receive_packet_callback(p2, packet_received, NULL);
+
+    for (i = 0; i < plength; i++) {
+        packet->data[i] = i;
+        psum += packet->data[i];
+    }
+
+    for (i = 0; i < npackets; i++) {
+        pa_pstream_send_packet(p1, packet, NULL);
+        totalsum += psum;
+        pa_mainloop_iterate(ml, 0, NULL);
+    }
+
+    while (packets_received < npackets)
+        pa_mainloop_iterate(ml, 1, NULL);
+
+    fail_unless(packets_checksum == totalsum);
+    pa_log_debug("Correct checksum received (%d)", packets_checksum);
+    pa_packet_unref(packet);
+}
+
+START_TEST (srbchannel_test) {
+
+    int pipefd[4];
+
+    pa_mainloop *ml = pa_mainloop_new();
+    pa_mempool *mp = pa_mempool_new(true, 0);
+    pa_iochannel *io1, *io2;
+    pa_pstream *p1, *p2;
+    pa_srbchannel *sr1, *sr2;
+    pa_srbchannel_template srt;
+
+    fail_unless(pipe(pipefd) == 0);
+    fail_unless(pipe(&pipefd[2]) == 0);
+    io1 = pa_iochannel_new(pa_mainloop_get_api(ml), pipefd[2], pipefd[1]);
+    io2 = pa_iochannel_new(pa_mainloop_get_api(ml), pipefd[0], pipefd[3]);
+    p1 = pa_pstream_new(pa_mainloop_get_api(ml), io1, mp);
+    p2 = pa_pstream_new(pa_mainloop_get_api(ml), io2, mp);
+
+    pa_log_debug("Pipes: fd %d -> %d, %d -> %d", pipefd[1], pipefd[0], pipefd[3], pipefd[2]);
+
+    packet_test(250, 5, ml, p1, p2);
+    packet_test(10, 1234567, ml, p1, p2);
+
+    pa_log_debug("And now the same thing with srbchannel...");
+
+    sr1 = pa_srbchannel_new(pa_mainloop_get_api(ml), mp);
+    pa_srbchannel_export(sr1, &srt);
+    pa_pstream_set_srbchannel(p1, sr1);
+    sr2 = pa_srbchannel_new_from_template(pa_mainloop_get_api(ml), &srt);
+    pa_pstream_set_srbchannel(p2, sr2);
+
+    packet_test(250, 5, ml, p1, p2);
+    packet_test(10, 1234567, ml, p1, p2);
+
+    pa_pstream_unref(p1);
+    pa_pstream_unref(p2);
+    pa_mempool_free(mp);
+    pa_mainloop_free(ml);
+}
+END_TEST
+
+
+int main(int argc, char *argv[]) {
+    int failed = 0;
+    Suite *s;
+    TCase *tc;
+    SRunner *sr;
+
+    if (!getenv("MAKE_CHECK"))
+        pa_log_set_level(PA_LOG_DEBUG);
+
+    s = suite_create("srbchannel");
+    tc = tcase_create("srbchannel");
+    tcase_add_test(tc, srbchannel_test);
+    suite_add_tcase(s, tc);
+
+    sr = srunner_create(s);
+    srunner_run_all(sr, CK_NORMAL);
+    failed = srunner_ntests_failed(sr);
+    srunner_free(sr);
+
+    return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index e1abc31..e60dfca 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -356,10 +356,10 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
                         pa_sample_spec_snprint(sst, sizeof(sst), pa_stream_get_sample_spec(s)),
                         pa_channel_map_snprint(cmt, sizeof(cmt), pa_stream_get_channel_map(s)));
 
-                pa_log(_("Connected to device %s (%u, %ssuspended)."),
+                pa_log(_("Connected to device %s (index: %u, suspended: %s)."),
                         pa_stream_get_device_name(s),
                         pa_stream_get_device_index(s),
-                        pa_stream_is_suspended(s) ? "" : "not ");
+                        pa_yes_no(pa_stream_is_suspended(s)));
             }
 
             break;
@@ -687,12 +687,12 @@ static void help(const char *argv0) {
              "      --channels=CHANNELS               The number of channels, 1 for mono, 2 for stereo\n"
              "                                        (defaults to 2)\n"
              "      --channel-map=CHANNELMAP          Channel map to use instead of the default\n"
-             "      --fix-format                      Take the sample format from the sink the stream is\n"
+             "      --fix-format                      Take the sample format from the sink/source the stream is\n"
              "                                        being connected to.\n"
-             "      --fix-rate                        Take the sampling rate from the sink the stream is\n"
+             "      --fix-rate                        Take the sampling rate from the sink/source the stream is\n"
              "                                        being connected to.\n"
              "      --fix-channels                    Take the number of channels and the channel map\n"
-             "                                        from the sink the stream is being connected to.\n"
+             "                                        from the sink/source the stream is being connected to.\n"
              "      --no-remix                        Don't upmix or downmix channels.\n"
              "      --no-remap                        Map channels by index instead of name.\n"
              "      --latency=BYTES                   Request the specified latency in bytes.\n"
@@ -701,7 +701,7 @@ static void help(const char *argv0) {
              "      --process-time-msec=MSEC          Request the specified process time per request in msec.\n"
              "      --property=PROPERTY=VALUE         Set the specified property to the specified value.\n"
              "      --raw                             Record/play raw PCM data.\n"
-             "      --passthrough                     passthrough data \n"
+             "      --passthrough                     Passthrough data.\n"
              "      --file-format[=FFORMAT]           Record/play formatted PCM data.\n"
              "      --list-file-formats               List available file formats.\n"
              "      --monitor-stream=INDEX            Record from the sink input with index INDEX.\n")
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 40e6689..f6555b9 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -69,7 +69,7 @@ static bool short_list_format = false;
 static uint32_t module_index;
 static int32_t latency_offset;
 static bool suspend;
-static pa_volume_t volume;
+static pa_cvolume volume;
 static enum volume_flags {
     VOL_UINT     = 0,
     VOL_PERCENT  = 1,
@@ -93,7 +93,12 @@ static pa_stream *sample_stream = NULL;
 static pa_sample_spec sample_spec;
 static pa_channel_map channel_map;
 static size_t sample_length = 0;
-static int actions = 1;
+
+/* This variable tracks the number of ongoing asynchronous operations. When a
+ * new operation begins, this is incremented simply with actions++, and when
+ * an operation finishes, this is decremented with the complete_action()
+ * function, which shuts down the program if actions reaches zero. */
+static int actions = 0;
 
 static bool nl = false;
 
@@ -832,18 +837,21 @@ static void index_callback(pa_context *c, uint32_t idx, void *userdata) {
 }
 
 static void volume_relative_adjust(pa_cvolume *cv) {
-    pa_assert((volume_flags & VOL_RELATIVE) == VOL_RELATIVE);
+    pa_assert(volume_flags & VOL_RELATIVE);
 
     /* Relative volume change is additive in case of UINT or PERCENT
      * and multiplicative for LINEAR or DECIBEL */
     if ((volume_flags & 0x0F) == VOL_UINT || (volume_flags & 0x0F) == VOL_PERCENT) {
-        pa_volume_t v = pa_cvolume_avg(cv);
-        v = v + volume < PA_VOLUME_NORM ? PA_VOLUME_MUTED : v + volume - PA_VOLUME_NORM;
-        pa_cvolume_set(cv, 1, v);
-    }
-    if ((volume_flags & 0x0F) == VOL_LINEAR || (volume_flags & 0x0F) == VOL_DECIBEL) {
-        pa_sw_cvolume_multiply_scalar(cv, cv, volume);
+        unsigned i;
+        for (i = 0; i < cv->channels; i++) {
+            if (cv->values[i] + volume.values[i] < PA_VOLUME_NORM)
+                cv->values[i] = PA_VOLUME_MUTED;
+            else
+                cv->values[i] = cv->values[i] + volume.values[i] - PA_VOLUME_NORM;
+        }
     }
+    if ((volume_flags & 0x0F) == VOL_LINEAR || (volume_flags & 0x0F) == VOL_DECIBEL)
+        pa_sw_cvolume_multiply(cv, cv, &volume);
 }
 
 static void unload_module_by_name_callback(pa_context *c, const pa_module_info *i, int is_last, void *userdata) {
@@ -871,6 +879,22 @@ static void unload_module_by_name_callback(pa_context *c, const pa_module_info *
     }
 }
 
+static void fill_volume(pa_cvolume *cv, unsigned supported) {
+    if (volume.channels == 1) {
+        pa_cvolume_set(&volume, supported, volume.values[0]);
+    } else if (volume.channels != supported) {
+        pa_log(_("Failed to set volume: You tried to set volumes for %d channels, whereas channel/s supported = %d\n"),
+            volume.channels, supported);
+        quit(1);
+        return;
+    }
+
+    if (volume_flags & VOL_RELATIVE)
+        volume_relative_adjust(cv);
+    else
+        *cv = volume;
+}
+
 static void get_sink_volume_callback(pa_context *c, const pa_sink_info *i, int is_last, void *userdata) {
     pa_cvolume cv;
 
@@ -886,7 +910,8 @@ static void get_sink_volume_callback(pa_context *c, const pa_sink_info *i, int i
     pa_assert(i);
 
     cv = i->volume;
-    volume_relative_adjust(&cv);
+    fill_volume(&cv, i->channel_map.channels);
+
     pa_operation_unref(pa_context_set_sink_volume_by_name(c, sink_name, &cv, simple_callback, NULL));
 }
 
@@ -905,7 +930,8 @@ static void get_source_volume_callback(pa_context *c, const pa_source_info *i, i
     pa_assert(i);
 
     cv = i->volume;
-    volume_relative_adjust(&cv);
+    fill_volume(&cv, i->channel_map.channels);
+
     pa_operation_unref(pa_context_set_source_volume_by_name(c, source_name, &cv, simple_callback, NULL));
 }
 
@@ -924,7 +950,8 @@ static void get_sink_input_volume_callback(pa_context *c, const pa_sink_input_in
     pa_assert(i);
 
     cv = i->volume;
-    volume_relative_adjust(&cv);
+    fill_volume(&cv, i->channel_map.channels);
+
     pa_operation_unref(pa_context_set_sink_input_volume(c, sink_input_idx, &cv, simple_callback, NULL));
 }
 
@@ -943,7 +970,8 @@ static void get_source_output_volume_callback(pa_context *c, const pa_source_out
     pa_assert(o);
 
     cv = o->volume;
-    volume_relative_adjust(&cv);
+    fill_volume(&cv, o->channel_map.channels);
+
     pa_operation_unref(pa_context_set_source_output_volume(c, source_output_idx, &cv, simple_callback, NULL));
 }
 
@@ -1015,6 +1043,7 @@ static void set_sink_formats(pa_context *c, uint32_t sink, const char *str) {
     char *format = NULL;
     const char *state = NULL;
     int i = 0;
+    pa_operation *o = NULL;
 
     while ((format = pa_split(str, ";", &state))) {
         pa_format_info *f = pa_format_info_from_string(pa_strip(format));
@@ -1028,7 +1057,11 @@ static void set_sink_formats(pa_context *c, uint32_t sink, const char *str) {
         pa_xfree(format);
     }
 
-    pa_operation_unref(pa_ext_device_restore_save_formats(c, PA_DEVICE_TYPE_SINK, sink, i, f_arr, simple_callback, NULL));
+    o = pa_ext_device_restore_save_formats(c, PA_DEVICE_TYPE_SINK, sink, i, f_arr, simple_callback, NULL);
+    if (o) {
+        pa_operation_unref(o);
+        actions++;
+    }
 
 done:
     if (format)
@@ -1137,7 +1170,7 @@ static const char *subscription_event_facility_to_string(pa_subscription_event_t
         return _("server");
 
     case PA_SUBSCRIPTION_EVENT_CARD:
-        return _("server");
+        return _("card");
     }
 
     return _("unknown");
@@ -1154,7 +1187,10 @@ static void context_subscribe_callback(pa_context *c, pa_subscription_event_type
 }
 
 static void context_state_callback(pa_context *c, void *userdata) {
+    pa_operation *o = NULL;
+
     pa_assert(c);
+
     switch (pa_context_get_state(c)) {
         case PA_CONTEXT_CONNECTING:
         case PA_CONTEXT_AUTHORIZING:
@@ -1164,21 +1200,19 @@ static void context_state_callback(pa_context *c, void *userdata) {
         case PA_CONTEXT_READY:
             switch (action) {
                 case STAT:
-                    pa_operation_unref(pa_context_stat(c, stat_callback, NULL));
-                    if (short_list_format)
-                        break;
-                    actions++;
+                    o = pa_context_stat(c, stat_callback, NULL);
+                    break;
 
                 case INFO:
-                    pa_operation_unref(pa_context_get_server_info(c, get_server_info_callback, NULL));
+                    o = pa_context_get_server_info(c, get_server_info_callback, NULL);
                     break;
 
                 case PLAY_SAMPLE:
-                    pa_operation_unref(pa_context_play_sample(c, sample_name, sink_name, PA_VOLUME_NORM, simple_callback, NULL));
+                    o = pa_context_play_sample(c, sample_name, sink_name, PA_VOLUME_NORM, simple_callback, NULL);
                     break;
 
                 case REMOVE_SAMPLE:
-                    pa_operation_unref(pa_context_remove_sample(c, sample_name, simple_callback, NULL));
+                    o = pa_context_remove_sample(c, sample_name, simple_callback, NULL);
                     break;
 
                 case UPLOAD_SAMPLE:
@@ -1188,164 +1222,180 @@ static void context_state_callback(pa_context *c, void *userdata) {
                     pa_stream_set_state_callback(sample_stream, stream_state_callback, NULL);
                     pa_stream_set_write_callback(sample_stream, stream_write_callback, NULL);
                     pa_stream_connect_upload(sample_stream, sample_length);
+                    actions++;
                     break;
 
                 case EXIT:
-                    pa_operation_unref(pa_context_exit_daemon(c, simple_callback, NULL));
+                    o = pa_context_exit_daemon(c, simple_callback, NULL);
                     break;
 
                 case LIST:
                     if (list_type) {
                         if (pa_streq(list_type, "modules"))
-                            pa_operation_unref(pa_context_get_module_info_list(c, get_module_info_callback, NULL));
+                            o = pa_context_get_module_info_list(c, get_module_info_callback, NULL);
                         else if (pa_streq(list_type, "sinks"))
-                            pa_operation_unref(pa_context_get_sink_info_list(c, get_sink_info_callback, NULL));
+                            o = pa_context_get_sink_info_list(c, get_sink_info_callback, NULL);
                         else if (pa_streq(list_type, "sources"))
-                            pa_operation_unref(pa_context_get_source_info_list(c, get_source_info_callback, NULL));
+                            o = pa_context_get_source_info_list(c, get_source_info_callback, NULL);
                         else if (pa_streq(list_type, "sink-inputs"))
-                            pa_operation_unref(pa_context_get_sink_input_info_list(c, get_sink_input_info_callback, NULL));
+                            o = pa_context_get_sink_input_info_list(c, get_sink_input_info_callback, NULL);
                         else if (pa_streq(list_type, "source-outputs"))
-                            pa_operation_unref(pa_context_get_source_output_info_list(c, get_source_output_info_callback, NULL));
+                            o = pa_context_get_source_output_info_list(c, get_source_output_info_callback, NULL);
                         else if (pa_streq(list_type, "clients"))
-                            pa_operation_unref(pa_context_get_client_info_list(c, get_client_info_callback, NULL));
+                            o = pa_context_get_client_info_list(c, get_client_info_callback, NULL);
                         else if (pa_streq(list_type, "samples"))
-                            pa_operation_unref(pa_context_get_sample_info_list(c, get_sample_info_callback, NULL));
+                            o = pa_context_get_sample_info_list(c, get_sample_info_callback, NULL);
                         else if (pa_streq(list_type, "cards"))
-                            pa_operation_unref(pa_context_get_card_info_list(c, get_card_info_callback, NULL));
+                            o = pa_context_get_card_info_list(c, get_card_info_callback, NULL);
                         else
                             pa_assert_not_reached();
                     } else {
-                        actions = 8;
-                        pa_operation_unref(pa_context_get_module_info_list(c, get_module_info_callback, NULL));
-                        pa_operation_unref(pa_context_get_sink_info_list(c, get_sink_info_callback, NULL));
-                        pa_operation_unref(pa_context_get_source_info_list(c, get_source_info_callback, NULL));
-                        pa_operation_unref(pa_context_get_sink_input_info_list(c, get_sink_input_info_callback, NULL));
-                        pa_operation_unref(pa_context_get_source_output_info_list(c, get_source_output_info_callback, NULL));
-                        pa_operation_unref(pa_context_get_client_info_list(c, get_client_info_callback, NULL));
-                        pa_operation_unref(pa_context_get_sample_info_list(c, get_sample_info_callback, NULL));
-                        pa_operation_unref(pa_context_get_card_info_list(c, get_card_info_callback, NULL));
+                        o = pa_context_get_module_info_list(c, get_module_info_callback, NULL);
+                        if (o) {
+                            pa_operation_unref(o);
+                            actions++;
+                        }
+
+                        o = pa_context_get_sink_info_list(c, get_sink_info_callback, NULL);
+                        if (o) {
+                            pa_operation_unref(o);
+                            actions++;
+                        }
+
+                        o = pa_context_get_source_info_list(c, get_source_info_callback, NULL);
+                        if (o) {
+                            pa_operation_unref(o);
+                            actions++;
+                        }
+                        o = pa_context_get_sink_input_info_list(c, get_sink_input_info_callback, NULL);
+                        if (o) {
+                            pa_operation_unref(o);
+                            actions++;
+                        }
+
+                        o = pa_context_get_source_output_info_list(c, get_source_output_info_callback, NULL);
+                        if (o) {
+                            pa_operation_unref(o);
+                            actions++;
+                        }
+
+                        o = pa_context_get_client_info_list(c, get_client_info_callback, NULL);
+                        if (o) {
+                            pa_operation_unref(o);
+                            actions++;
+                        }
+
+                        o = pa_context_get_sample_info_list(c, get_sample_info_callback, NULL);
+                        if (o) {
+                            pa_operation_unref(o);
+                            actions++;
+                        }
+
+                        o = pa_context_get_card_info_list(c, get_card_info_callback, NULL);
+                        if (o) {
+                            pa_operation_unref(o);
+                            actions++;
+                        }
+
+                        o = NULL;
                     }
                     break;
 
                 case MOVE_SINK_INPUT:
-                    pa_operation_unref(pa_context_move_sink_input_by_name(c, sink_input_idx, sink_name, simple_callback, NULL));
+                    o = pa_context_move_sink_input_by_name(c, sink_input_idx, sink_name, simple_callback, NULL);
                     break;
 
                 case MOVE_SOURCE_OUTPUT:
-                    pa_operation_unref(pa_context_move_source_output_by_name(c, source_output_idx, source_name, simple_callback, NULL));
+                    o = pa_context_move_source_output_by_name(c, source_output_idx, source_name, simple_callback, NULL);
                     break;
 
                 case LOAD_MODULE:
-                    pa_operation_unref(pa_context_load_module(c, module_name, module_args, index_callback, NULL));
+                    o = pa_context_load_module(c, module_name, module_args, index_callback, NULL);
                     break;
 
                 case UNLOAD_MODULE:
                     if (module_name)
-                        pa_operation_unref(pa_context_get_module_info_list(c, unload_module_by_name_callback, NULL));
+                        o = pa_context_get_module_info_list(c, unload_module_by_name_callback, NULL);
                     else
-                        pa_operation_unref(pa_context_unload_module(c, module_index, simple_callback, NULL));
+                        o = pa_context_unload_module(c, module_index, simple_callback, NULL);
                     break;
 
                 case SUSPEND_SINK:
                     if (sink_name)
-                        pa_operation_unref(pa_context_suspend_sink_by_name(c, sink_name, suspend, simple_callback, NULL));
+                        o = pa_context_suspend_sink_by_name(c, sink_name, suspend, simple_callback, NULL);
                     else
-                        pa_operation_unref(pa_context_suspend_sink_by_index(c, PA_INVALID_INDEX, suspend, simple_callback, NULL));
+                        o = pa_context_suspend_sink_by_index(c, PA_INVALID_INDEX, suspend, simple_callback, NULL);
                     break;
 
                 case SUSPEND_SOURCE:
                     if (source_name)
-                        pa_operation_unref(pa_context_suspend_source_by_name(c, source_name, suspend, simple_callback, NULL));
+                        o = pa_context_suspend_source_by_name(c, source_name, suspend, simple_callback, NULL);
                     else
-                        pa_operation_unref(pa_context_suspend_source_by_index(c, PA_INVALID_INDEX, suspend, simple_callback, NULL));
+                        o = pa_context_suspend_source_by_index(c, PA_INVALID_INDEX, suspend, simple_callback, NULL);
                     break;
 
                 case SET_CARD_PROFILE:
-                    pa_operation_unref(pa_context_set_card_profile_by_name(c, card_name, profile_name, simple_callback, NULL));
+                    o = pa_context_set_card_profile_by_name(c, card_name, profile_name, simple_callback, NULL);
                     break;
 
                 case SET_SINK_PORT:
-                    pa_operation_unref(pa_context_set_sink_port_by_name(c, sink_name, port_name, simple_callback, NULL));
+                    o = pa_context_set_sink_port_by_name(c, sink_name, port_name, simple_callback, NULL);
                     break;
 
                 case SET_DEFAULT_SINK:
-                    pa_operation_unref(pa_context_set_default_sink(c, sink_name, simple_callback, NULL));
+                    o = pa_context_set_default_sink(c, sink_name, simple_callback, NULL);
                     break;
 
                 case SET_SOURCE_PORT:
-                    pa_operation_unref(pa_context_set_source_port_by_name(c, source_name, port_name, simple_callback, NULL));
+                    o = pa_context_set_source_port_by_name(c, source_name, port_name, simple_callback, NULL);
                     break;
 
                 case SET_DEFAULT_SOURCE:
-                    pa_operation_unref(pa_context_set_default_source(c, source_name, simple_callback, NULL));
+                    o = pa_context_set_default_source(c, source_name, simple_callback, NULL);
                     break;
 
                 case SET_SINK_MUTE:
                     if (mute == TOGGLE_MUTE)
-                        pa_operation_unref(pa_context_get_sink_info_by_name(c, sink_name, sink_toggle_mute_callback, NULL));
+                        o = pa_context_get_sink_info_by_name(c, sink_name, sink_toggle_mute_callback, NULL);
                     else
-                        pa_operation_unref(pa_context_set_sink_mute_by_name(c, sink_name, mute, simple_callback, NULL));
+                        o = pa_context_set_sink_mute_by_name(c, sink_name, mute, simple_callback, NULL);
                     break;
 
                 case SET_SOURCE_MUTE:
                     if (mute == TOGGLE_MUTE)
-                        pa_operation_unref(pa_context_get_source_info_by_name(c, source_name, source_toggle_mute_callback, NULL));
+                        o = pa_context_get_source_info_by_name(c, source_name, source_toggle_mute_callback, NULL);
                     else
-                        pa_operation_unref(pa_context_set_source_mute_by_name(c, source_name, mute, simple_callback, NULL));
+                        o = pa_context_set_source_mute_by_name(c, source_name, mute, simple_callback, NULL);
                     break;
 
                 case SET_SINK_INPUT_MUTE:
                     if (mute == TOGGLE_MUTE)
-                        pa_operation_unref(pa_context_get_sink_input_info(c, sink_input_idx, sink_input_toggle_mute_callback, NULL));
+                        o = pa_context_get_sink_input_info(c, sink_input_idx, sink_input_toggle_mute_callback, NULL);
                     else
-                        pa_operation_unref(pa_context_set_sink_input_mute(c, sink_input_idx, mute, simple_callback, NULL));
+                        o = pa_context_set_sink_input_mute(c, sink_input_idx, mute, simple_callback, NULL);
                     break;
 
                 case SET_SOURCE_OUTPUT_MUTE:
                     if (mute == TOGGLE_MUTE)
-                        pa_operation_unref(pa_context_get_source_output_info(c, source_output_idx, source_output_toggle_mute_callback, NULL));
+                        o = pa_context_get_source_output_info(c, source_output_idx, source_output_toggle_mute_callback, NULL);
                     else
-                        pa_operation_unref(pa_context_set_source_output_mute(c, source_output_idx, mute, simple_callback, NULL));
+                        o = pa_context_set_source_output_mute(c, source_output_idx, mute, simple_callback, NULL);
                     break;
 
                 case SET_SINK_VOLUME:
-                    if ((volume_flags & VOL_RELATIVE) == VOL_RELATIVE) {
-                        pa_operation_unref(pa_context_get_sink_info_by_name(c, sink_name, get_sink_volume_callback, NULL));
-                    } else {
-                        pa_cvolume v;
-                        pa_cvolume_set(&v, 1, volume);
-                        pa_operation_unref(pa_context_set_sink_volume_by_name(c, sink_name, &v, simple_callback, NULL));
-                    }
+                    o = pa_context_get_sink_info_by_name(c, sink_name, get_sink_volume_callback, NULL);
                     break;
 
                 case SET_SOURCE_VOLUME:
-                    if ((volume_flags & VOL_RELATIVE) == VOL_RELATIVE) {
-                        pa_operation_unref(pa_context_get_source_info_by_name(c, source_name, get_source_volume_callback, NULL));
-                    } else {
-                        pa_cvolume v;
-                        pa_cvolume_set(&v, 1, volume);
-                        pa_operation_unref(pa_context_set_source_volume_by_name(c, source_name, &v, simple_callback, NULL));
-                    }
+                    o = pa_context_get_source_info_by_name(c, source_name, get_source_volume_callback, NULL);
                     break;
 
                 case SET_SINK_INPUT_VOLUME:
-                    if ((volume_flags & VOL_RELATIVE) == VOL_RELATIVE) {
-                        pa_operation_unref(pa_context_get_sink_input_info(c, sink_input_idx, get_sink_input_volume_callback, NULL));
-                    } else {
-                        pa_cvolume v;
-                        pa_cvolume_set(&v, 1, volume);
-                        pa_operation_unref(pa_context_set_sink_input_volume(c, sink_input_idx, &v, simple_callback, NULL));
-                    }
+                    o = pa_context_get_sink_input_info(c, sink_input_idx, get_sink_input_volume_callback, NULL);
                     break;
 
                 case SET_SOURCE_OUTPUT_VOLUME:
-                    if ((volume_flags & VOL_RELATIVE) == VOL_RELATIVE) {
-                        pa_operation_unref(pa_context_get_source_output_info(c, source_output_idx, get_source_output_volume_callback, NULL));
-                    } else {
-                        pa_cvolume v;
-                        pa_cvolume_set(&v, 1, volume);
-                        pa_operation_unref(pa_context_set_source_output_volume(c, source_output_idx, &v, simple_callback, NULL));
-                    }
+                    o = pa_context_get_source_output_info(c, source_output_idx, get_source_output_volume_callback, NULL);
                     break;
 
                 case SET_SINK_FORMATS:
@@ -1353,30 +1403,40 @@ static void context_state_callback(pa_context *c, void *userdata) {
                     break;
 
                 case SET_PORT_LATENCY_OFFSET:
-                    pa_operation_unref(pa_context_set_port_latency_offset(c, card_name, port_name, latency_offset, simple_callback, NULL));
+                    o = pa_context_set_port_latency_offset(c, card_name, port_name, latency_offset, simple_callback, NULL);
                     break;
 
                 case SUBSCRIBE:
                     pa_context_set_subscribe_callback(c, context_subscribe_callback, NULL);
 
-                    pa_operation_unref(pa_context_subscribe(
-                                              c,
-                                              PA_SUBSCRIPTION_MASK_SINK|
-                                              PA_SUBSCRIPTION_MASK_SOURCE|
-                                              PA_SUBSCRIPTION_MASK_SINK_INPUT|
-                                              PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT|
-                                              PA_SUBSCRIPTION_MASK_MODULE|
-                                              PA_SUBSCRIPTION_MASK_CLIENT|
-                                              PA_SUBSCRIPTION_MASK_SAMPLE_CACHE|
-                                              PA_SUBSCRIPTION_MASK_SERVER|
-                                              PA_SUBSCRIPTION_MASK_CARD,
-                                              NULL,
-                                              NULL));
+                    o = pa_context_subscribe(c,
+                                             PA_SUBSCRIPTION_MASK_SINK|
+                                             PA_SUBSCRIPTION_MASK_SOURCE|
+                                             PA_SUBSCRIPTION_MASK_SINK_INPUT|
+                                             PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT|
+                                             PA_SUBSCRIPTION_MASK_MODULE|
+                                             PA_SUBSCRIPTION_MASK_CLIENT|
+                                             PA_SUBSCRIPTION_MASK_SAMPLE_CACHE|
+                                             PA_SUBSCRIPTION_MASK_SERVER|
+                                             PA_SUBSCRIPTION_MASK_CARD,
+                                             NULL,
+                                             NULL);
                     break;
 
                 default:
                     pa_assert_not_reached();
             }
+
+            if (o) {
+                pa_operation_unref(o);
+                actions++;
+            }
+
+            if (actions == 0) {
+                pa_log("Operation failed: %s", pa_strerror(pa_context_errno(c)));
+                quit(1);
+            }
+
             break;
 
         case PA_CONTEXT_TERMINATED:
@@ -1425,7 +1485,7 @@ static int parse_volume(const char *vol_spec, pa_volume_t *vol, enum volume_flag
 
     pa_xfree(vs);
 
-    if ((*vol_flags & VOL_RELATIVE) == VOL_RELATIVE) {
+    if (*vol_flags & VOL_RELATIVE) {
         if ((*vol_flags & 0x0F) == VOL_UINT)
             v += (double) PA_VOLUME_NORM;
         if ((*vol_flags & 0x0F) == VOL_PERCENT)
@@ -1450,6 +1510,31 @@ static int parse_volume(const char *vol_spec, pa_volume_t *vol, enum volume_flag
     return 0;
 }
 
+static int parse_volumes(char *args[], unsigned n) {
+    unsigned i;
+
+    if (n >= PA_CHANNELS_MAX) {
+        pa_log(_("Invalid number of volume specifications.\n"));
+        return -1;
+    }
+
+    volume.channels = n;
+    for (i = 0; i < volume.channels; i++) {
+        enum volume_flags flags;
+
+        if (parse_volume(args[i], &volume.values[i], &flags) < 0)
+            return -1;
+
+        if (i > 0 && flags != volume_flags) {
+            pa_log(_("Inconsistent volume specification.\n"));
+            return -1;
+        } else
+            volume_flags = flags;
+    }
+
+    return 0;
+}
+
 static enum mute_flags parse_mute(const char *mute_text) {
     int b;
 
@@ -1471,7 +1556,7 @@ static enum mute_flags parse_mute(const char *mute_text) {
 
 static void help(const char *argv0) {
 
-    printf("%s %s %s\n",    argv0, _("[options]"), "stat [short]");
+    printf("%s %s %s\n",    argv0, _("[options]"), "stat");
     printf("%s %s %s\n",    argv0, _("[options]"), "info");
     printf("%s %s %s %s\n", argv0, _("[options]"), "list [short]", _("[TYPE]"));
     printf("%s %s %s\n",    argv0, _("[options]"), "exit");
@@ -1485,8 +1570,8 @@ static void help(const char *argv0) {
     printf("%s %s %s %s\n", argv0, _("[options]"), "set-card-profile ", _("CARD PROFILE"));
     printf("%s %s %s %s\n", argv0, _("[options]"), "set-default-(sink|source)", _("NAME"));
     printf("%s %s %s %s\n", argv0, _("[options]"), "set-(sink|source)-port", _("NAME|#N PORT"));
-    printf("%s %s %s %s\n", argv0, _("[options]"), "set-(sink|source)-volume", _("NAME|#N VOLUME"));
-    printf("%s %s %s %s\n", argv0, _("[options]"), "set-(sink-input|source-output)-volume", _("#N VOLUME"));
+    printf("%s %s %s %s\n", argv0, _("[options]"), "set-(sink|source)-volume", _("NAME|#N VOLUME [VOLUME ...]"));
+    printf("%s %s %s %s\n", argv0, _("[options]"), "set-(sink-input|source-output)-volume", _("#N VOLUME [VOLUME ...]"));
     printf("%s %s %s %s\n", argv0, _("[options]"), "set-(sink|source)-mute", _("NAME|#N 1|0|toggle"));
     printf("%s %s %s %s\n", argv0, _("[options]"), "set-(sink-input|source-output)-mute", _("#N 1|0|toggle"));
     printf("%s %s %s %s\n", argv0, _("[options]"), "set-sink-formats", _("#N FORMATS"));
@@ -1528,7 +1613,7 @@ int main(int argc, char *argv[]) {
 
     proplist = pa_proplist_new();
 
-    while ((c = getopt_long(argc, argv, "s:n:h", long_options, NULL)) != -1) {
+    while ((c = getopt_long(argc, argv, "+s:n:h", long_options, NULL)) != -1) {
         switch (c) {
             case 'h' :
                 help(bn);
@@ -1573,9 +1658,6 @@ int main(int argc, char *argv[]) {
     if (optind < argc) {
         if (pa_streq(argv[optind], "stat")) {
             action = STAT;
-            short_list_format = false;
-            if (optind+1 < argc && pa_streq(argv[optind+1], "short"))
-                short_list_format = true;
 
         } else if (pa_streq(argv[optind], "info"))
             action = INFO;
@@ -1808,33 +1890,33 @@ int main(int argc, char *argv[]) {
         } else if (pa_streq(argv[optind], "set-sink-volume")) {
             action = SET_SINK_VOLUME;
 
-            if (argc != optind+3) {
+            if (argc < optind+3) {
                 pa_log(_("You have to specify a sink name/index and a volume"));
                 goto quit;
             }
 
             sink_name = pa_xstrdup(argv[optind+1]);
 
-            if (parse_volume(argv[optind+2], &volume, &volume_flags) < 0)
+            if (parse_volumes(argv+optind+2, argc-3) < 0)
                 goto quit;
 
         } else if (pa_streq(argv[optind], "set-source-volume")) {
             action = SET_SOURCE_VOLUME;
 
-            if (argc != optind+3) {
+            if (argc < optind+3) {
                 pa_log(_("You have to specify a source name/index and a volume"));
                 goto quit;
             }
 
             source_name = pa_xstrdup(argv[optind+1]);
 
-            if (parse_volume(argv[optind+2], &volume, &volume_flags) < 0)
+            if (parse_volumes(argv+optind+2, argc-3) < 0)
                 goto quit;
 
         } else if (pa_streq(argv[optind], "set-sink-input-volume")) {
             action = SET_SINK_INPUT_VOLUME;
 
-            if (argc != optind+3) {
+            if (argc < optind+3) {
                 pa_log(_("You have to specify a sink input index and a volume"));
                 goto quit;
             }
@@ -1844,13 +1926,13 @@ int main(int argc, char *argv[]) {
                 goto quit;
             }
 
-            if (parse_volume(argv[optind+2], &volume, &volume_flags) < 0)
+            if (parse_volumes(argv+optind+2, argc-3) < 0)
                 goto quit;
 
         } else if (pa_streq(argv[optind], "set-source-output-volume")) {
             action = SET_SOURCE_OUTPUT_VOLUME;
 
-            if (argc != optind+3) {
+            if (argc < optind+3) {
                 pa_log(_("You have to specify a source output index and a volume"));
                 goto quit;
             }
@@ -1860,7 +1942,7 @@ int main(int argc, char *argv[]) {
                 goto quit;
             }
 
-            if (parse_volume(argv[optind+2], &volume, &volume_flags) < 0)
+            if (parse_volumes(argv+optind+2, argc-3) < 0)
                 goto quit;
 
         } else if (pa_streq(argv[optind], "set-sink-mute")) {
diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c
index abb2312..86336d0 100644
--- a/src/utils/pax11publish.c
+++ b/src/utils/pax11publish.c
@@ -152,15 +152,7 @@ int main(int argc, char *argv[]) {
             char hx[PA_NATIVE_COOKIE_LENGTH*2+1];
             assert(conf);
 
-            if (pa_client_conf_load(conf, NULL) < 0) {
-                fprintf(stderr, _("Failed to load client configuration file.\n"));
-                goto finish;
-            }
-
-            if (pa_client_conf_env(conf) < 0) {
-                fprintf(stderr, _("Failed to read environment configuration data.\n"));
-                goto finish;
-            }
+            pa_client_conf_load(conf, false, true);
 
             pa_x11_del_prop(xcb, screen, "PULSE_SERVER");
             pa_x11_del_prop(xcb, screen, "PULSE_SINK");
@@ -194,7 +186,7 @@ int main(int argc, char *argv[]) {
 
             pa_client_conf_free(conf);
 
-            if (pa_authkey_load_auto(cookie_file, true, cookie, sizeof(cookie)) < 0) {
+            if (pa_authkey_load(cookie_file, true, cookie, sizeof(cookie)) < 0) {
                 fprintf(stderr, _("Failed to load cookie data\n"));
                 goto finish;
             }
diff --git a/vala/libpulse-simple.deps b/vala/libpulse-simple.deps
new file mode 100644
index 0000000..f90ee89
--- /dev/null
+++ b/vala/libpulse-simple.deps
@@ -0,0 +1 @@
+libpulse-simple
diff --git a/vala/libpulse-simple.vapi b/vala/libpulse-simple.vapi
new file mode 100644
index 0000000..11b6e0f
--- /dev/null
+++ b/vala/libpulse-simple.vapi
@@ -0,0 +1,36 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2012 Alexander Kurtz <kurtz.alex at googlemail.com>
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
+***/
+
+namespace PulseAudio {
+        [Compact]
+        [CCode (cheader_filename="pulse/simple.h", cname="pa_simple", cprefix="pa_simple_")]
+        class Simple {
+                public Simple(string? server = null, string? name = null, Stream.Direction dir = Stream.Direction.PLAYBACK,
+                              string? dev = null, string stream_name = "",
+                              SampleSpec ss = SampleSpec(){ format = SampleFormat.S16NE, rate = 44100, channels = 2 },
+                              ChannelMap? map = null, Stream.BufferAttr? attr = null, out int error = null);
+                public int write(void* data, size_t bytes, out int error = null);
+                public int drain(out int error = null);
+                public int read(void* data, size_t bytes, out int error = null);
+                public usec get_latency(out int error = null);
+                public int flush(out int error = null);
+        }
+}
diff --git a/vala/libpulse.vapi b/vala/libpulse.vapi
index eb8dfa1..ea66c41 100644
--- a/vala/libpulse.vapi
+++ b/vala/libpulse.vapi
@@ -1376,6 +1376,9 @@ namespace PulseAudio {
                 public string driver;
                 public int mute;
                 public Proplist proplist;
+                public int corked;
+                public int has_volume;
+                public int volume_writable;
         }
 
         [CCode (cname="pa_source_output_info", has_type_id=false)]
@@ -1392,6 +1395,11 @@ namespace PulseAudio {
                 public string resample_method;
                 public string driver;
                 public Proplist proplist;
+                public int corked;
+                public CVolume volume;
+                public int mute;
+                public int has_volume;
+                public int volume_writable;
         }
 
         [CCode (cname="pa_stat_info", has_type_id=false)]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-pulseaudio/pulseaudio.git



More information about the pkg-pulseaudio-devel mailing list