audio policy: audio source automatic re-connection

When an audio source is started, if either the sink or the source
becomes unavailable, the audio source is stopped.
It implies that the client must listen to patch/ports to become
aware that the source has been stopped.

In order to prevent this, it is possible to allow automatic re-connection
of audio source as APM already keeps track of AudioSource.

In case of unavailability, source is only disconnected, not stopped to prevent
from removing from tracking list.

Test: adb shell /data/nativetest64/AudioPolicyEmulatorTests/AudioPolicyEmulatorTests --gtest_filter=*AudioSourceBridgingTest*

Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: I414195a85a06c9212420e3b51bf2863f3e08c755
2 files changed