build-sys: Link utf8-test to libpulsecommon.

Fixes this:
/usr/bin/ld: utf8_test-utf8-test.o: undefined reference to symbol 'pa_log_set_level'
/usr/bin/ld: note: 'pa_log_set_level' is defined in DSO /home/takaskin/dev/pulseaudio/src/.libs/libpulsecommon-2.98.so so try adding it to the linker command line
/home/takaskin/dev/pulseaudio/src/.libs/libpulsecommon-2.98.so: could not read symbols: Invalid operation
resampler: Fix volume on downmix to mono

Patch credit: kwanghui

When downmixing to mono, we should average the signal instead of
summing it to avoid clipping.

BugLink: http://pulseaudio.org/ticket/934
BugLink: https://bugs.launchpad.net/bugs/416190

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
loopback: Fix crash when moving loopback while changing bluetooth card profile
bluetooth: Remove library for IPC to BlueZ

This library is not used anymore after the definitive transition to
Media API.
bluetooth: MP3 passthrough over A2DP

Second version of patch to enable MP3 passthrough over A2DP, with
the decoding taking place on the headset to reduce power consumption.
This was only possible if PulseAudio was bypassed before with the
a2dpsink element in gstreamer.

This is a simpler version of an earlier patch. The MP3 parsing is
now supposed to happen in the application, and the BT sink
expects an IEC61937 format: 8byte header, mp3 frame and zero-padding
to reach 4608 bytes. This format is a pseudo-PCM stream, which
is compatible with the existing way of handling latency/timing.

this patch can be tested with following command:

gst-launch filesrc location=file.mp3 ! mp3parse ! mpegiec958 ! filesink location=file-be.iec
dd if=if file-be.iec of=file-le.iec conv=swab
paplay --raw --passthrough -v --format="s16le" --rate=44100 --device=bluez_sink.00_11_22_33_44_55 file-le.iec

or more simply
gst-launch filesrc location=file.mp3 ! mp3parse ! mpegiec958 ! pulsesink device=bluez_sink.00_11_22_33_44_55

patches for mpegiec958 and pulsesink will be posted separately.

TODO for later patches:
- add type for MP3/AC3
- expose sink capability to apps so that the pipeline can be reconfigured
- handle dynamic routing
- set sink sample rate to the rate of the stream
bluetooth: Use new API for exposing A2DP MPEG sinks

This replaces a separate A2DP passthrough profile with dynamically
reconfiguring the A2DP stream for MPEG streams if required. The sink
get_formats() function allows the core to introspect whether the
attached headset supports this or not.
bluetooth: Register MP3 endpoint for bluetooth
bluetooth: Handle SelectConfiguration for MP3 endpoint
bluetooth: module-bluetooth-device changes
bluetooth: Initialize codec value
bluetooth: configure device based on selected transport
bluetooth: Register MP3 sink endpoint for bluetooth
bluetooth: declare source support for IEC61937
bluetooth: Build and push IEC frame if codec is MPEG
bluetooth: Build and push fragmented MPEG frames
bluetooth: utility to trigger a2dp reconfigure
bluetooth: parse MediaTransport.Codecs property
bluetooth: switch between SBC and MPEG
loopback: limit rate of a debug trace
loopback: Fix assertion triggered if move fails

To reproduce select a card with a source and a sink.
For example card 0 has sink 0, source 0 and source 1 is the monitor.
Load the loopback module:
$ pacmd load-module module-loopback source=0 sink=0

Make sure the loopback works, then enter the following command:
$ pacmd set-card-profile 0 off

The assertion is triggered, the patch should fix it.