i18n: Update the Slovak translation
switch-on-connect: Initialize userdata contents to zero

This fixes userdata.only_from_unavailable being uninitialized in case
the user doesn't give the value in modargs.
module-stream-restore: use entry_write when filling up the database

It seems at some point the code migrated to use the entry_write calls,
but fill_db is still using the old syntax, causing the entry to be
invalid.

The crash happens when clean_up_db gets called, which then calls
entry_read, causing the crash.

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
tunnel-sink-new: Limit the maximum latency to 200 ms

The default maximum latency is 10 seconds, which is not good,
especially since the tunnel sink doesn't support rewinding. Due to the
lack of rewinding, e.g. volume changes take a long time with large
latencies.
connect-stress-test: Fix number of streams per sink to "20"

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.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
util: Try finding out application name using dladdr if available

This fixes getting the binary name in the Hurd, or any other port using
the GNU C library, but only in the case where the library is directly
linked to. Opening with dlopen will not work.

Change in v3: reorder header includes and definitions
Change in v2: use a weak reference to main, so that we
don't crash when main cannot be found.
pulse: Initalise pa_threaded_mainloop with zeroes
vala: adding missing fields for sink_input/source_output info struct

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
bluetooth: Move stuff to pa_bluetooth_transport_put/unlink()

This should not have any effect on behaviour. The goal is to align
with the pattern that I think we should follow:

Object initialization:
 - put() is the place to create references from other objects to the
   newly created object. In this case, adding the transport to
   discovery->transports was moved from new() to put, and adding the
   transport to device->transports was moved from set_state() to
   put().

Object destruction:
 - unlink() undoes put() and removes all references from other objects
   to the object being unlinked. In this case setting the
   device->transports pointer to NULL was moved from set_state() to
   unlink(), and setting the discovery->transports pointer to NULL was
   moved from free() to unlink().
 - free() undoes new(), but also calls unlink() so that object owners
   don't need to remember to call unlink() before free().
tunnel-sink-new: Fix requested latency check

This fixes a bug in latency configuration. The wrong type in the cast
caused UINT64_MAX being not treated as special, so the configured
latency was set to UINT64_MAX usecs, which of course is absurdly huge
latency.
memblockq: Do not allow non-frame indices in the memblock queue

Since we don't allow lengths that are not frame aligned,
it does not make sense to allow indices that are not frame aligned
either.
Also, allowing such a thing to be added causes the daemon to crash
later instead (see https://bugs.freedesktop.org/show_bug.cgi?id=77595 ).

Also drop _se from assert (there is no side effect).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
stream: Fail on client submitting non-frame-aligned memblocks

If somebody tries to push a non-frame-aligned memblock onto the
memblockq, then we should fail the write. Otherwise the daemon will
crash, see https://bugs.freedesktop.org/show_bug.cgi?id=77595

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
protocol-native: Fail if trying to push unaligned memblock into queue

We will just ignore the memblock if this happens. We already have
a check for this in the client library, so this one is just for
security reasons.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
configure: Remove "WIBBLE" test

Apparently "WIBBLE" is just a test, and maybe the test was "How
long does it take until somebody notices a strange row in configure.ac
and tries to remove it", if so, the test result is "a little over
three years". :-)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
pstream-util: Fix build on freebsd

The previous fix was not entirely complete.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
shell-completion: zsh: Mark a variable as local

Variables are global by default, and we certainly don't want
_pactl_commands to be a global variable.
shell-completion: zsh: Rework pactl completion

So far the command name has been figured out by looking one or two
items back in the $words array, but I needed a way to figure out the
command given an arbitrary number of parameters. I was implementing
a command for removing devices from the device-manager database, and
the command would take a list of devices. Since the number of devices
that need to be completed can be arbitrarily large, the previous "look
one or two words back" approach didn't work.

This new approach is more verbose, but I think it's also easier to
follow. There's some duplication that would be easy to avoid by
merging some of the commands, but I decided to not do that, to make
it more obvious what the code does.
module-card/device-restore: Do not legacy load an empty entry

There is no use in trying to load data in legacy format, if we
already know that there is no data at all.
Also clarify in the debug message whether there is invalid data
or no data at all.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
alsa-mixer: Merge analog-output-desktop-speaker with analog-output-speaker(-always)

According to David[1], it's unlikely that there are any sound cards
that would have separate "speaker" and "desktop speaker" paths, so
let's remove the unnecessary distinction.

[1] http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/20915/focus=21193
build-sys: Alias bash-completion for all PulseAudio commands

Bash-completion 1.90 introduced support for on-demand loading
of completions. Install the completion file as 'pulseaudio' to match
the main command, and create symlinks as aliases for other supported
commands in order to support the new system.