once: Fix race causing pa_once to sometimes run twice

There was a race in the existing code that could cause the pa_once code
to be run twice, see:
http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-April/013354.html

Therefore the existing implementation was rewritten to instead look like
the reference implementation here:
http://www.hpl.hp.com/research/linux/atomic_ops/example.php4

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
cli: Add set-log-target command for pacmd
daemon: use pa_streq instead of plain strcmp

Just noticed that in daemon-conf.c, it uses plain strcmp(),
while in PulseAudio, it should be better to use pa_streq().
pipe: whitespace and log output cleanup
pipe: check return value of mkfifo()
udev: Don't use deprecated udev_get_*_path() functions

[These symbols were removed in libudev.so.1.0.0. Replace them with
hardcoded strings. -- heftig]

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
bluetooth: Release transport when the pa_rtpoll_run loop finishes.

Based on a patch by Marko Ollonen.
modules: Use PA_IDXSET_FOREACH wherever applicable.

Signed-off-by: Harsh Prateek Bora <harsh.bora@linaro.org>
pulsecore: Use PA_IDXSET_FOREACH wherever applicable.

Signed-off-by: Harsh Prateek Bora <harsh.bora@linaro.org>
alsa-sink: add missing header 'signal.h'

Compilation with -DDEBUG_TIMING fails due to a missing header:

modules/alsa/alsa-sink.c: In function 'check_left_to_play':
modules/alsa/alsa-sink.c:453:9: warning: implicit declaration of function 'raise' [-Wimplicit-function-declaration]
modules/alsa/alsa-sink.c:453:9: error: 'SIGTRAP' undeclared (first use in this function)

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
alsa-source: add missing header 'signal.h'

Compilation with -DDEBUG_TIMING fails due to a missing header:

modules/alsa/alsa-source.c: In function 'check_left_to_record':
modules/alsa/alsa-source.c:426:9: warning: implicit declaration of function 'raise' [-Wimplicit-function-declaration]
modules/alsa/alsa-source.c:426:9: error: 'SIGTRAP' undeclared (first use in this function)

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
pactl: Add unloading modules by name.

pactl should allow unloading modules by name.

If there are multiple modules with the same name all
of them will be unloaded.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=48289
pacmd: Add unloading modules by name.

pacmd should allow unloading modules by name.
The command_unload() function was expanded to handle names while
unloading modules.

If there are multiple modules with the same name all
of them will be unloaded.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=48289
x11: fix the wrong parameter sequence in pax11publish
device-port: Create the profiles hashmap at initialization.

I doesn't make sense to require all callers of
pa_device_port_new() to create the hashmap themselves. There
are and there will be no cases where a port without any
profiles would be desired.
bluetooth: Add ports to the bluetooth sink/source

The bluetooth device should have ports so we can attach a latency to
the ports.

Every profile (a2dp, hsp...) has his own set of ports depending on the
number of sinks and sources it provides.
device-port: Remove an out-of-date comment.
modules: Use pa_streq instead of strcmp.
pulsecore: Use pa_streq instead of strcmp.
tests: use pa_streq instead of strcmp