audio policy: add support for external audio sources
Add support for activity on external audio sources.
An external source reflects activity on an input audio device
that must be controlled (both routing and volume) by the
audio policy manager.
First, the input device must be connected with setDeviceConnectionState().
Then, the source activity is indicated with startAudioSource() and
stopAudioSource() APIs.
startAudioSource() indicates the source device with an audio port configuration
and the use case by the audio attributes.
Once a source is active, its routing and volume are controlled by the policy manager
as it would for a software source (AudioTrack).
Change-Id: If5805d58a4356b2f681f1aabf54375f62b55b98a
diff --git a/services/audiopolicy/AudioPolicyInterface.h b/services/audiopolicy/AudioPolicyInterface.h
index c1e7bc0..7cf44dc 100644
--- a/services/audiopolicy/AudioPolicyInterface.h
+++ b/services/audiopolicy/AudioPolicyInterface.h
@@ -225,7 +225,8 @@
virtual status_t startAudioSource(const struct audio_port_config *source,
const audio_attributes_t *attributes,
- audio_io_handle_t *handle) = 0;
+ audio_io_handle_t *handle,
+ uid_t uid) = 0;
virtual status_t stopAudioSource(audio_io_handle_t handle) = 0;
};