audio policy: audio sessions on input descriptors
In preparation for concurrent capture, add support for multiple
audio sessions per input stream.
Each session keeps its own properties, open and active reference
counting.
No functional change for now: still one session per input and one active
input at a time.
Bug: 18815985.
Bug: 22702906.
Change-Id: I915a65989a7fd0d3cbe2fcf5a0aee2ea0df5f4f5
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.h b/services/audiopolicy/managerdefault/AudioPolicyManager.h
index bb71090..38cf67b 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.h
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.h
@@ -610,6 +610,18 @@
audio_channel_mask_t channelMask,
audio_output_flags_t flags,
const audio_offload_info_t *offloadInfo);
+ // internal method to return the input handle for the given device and format
+ audio_io_handle_t getInputForDevice(audio_devices_t device,
+ String8 address,
+ audio_session_t session,
+ uid_t uid,
+ audio_source_t inputSource,
+ uint32_t samplingRate,
+ audio_format_t format,
+ audio_channel_mask_t channelMask,
+ audio_input_flags_t flags,
+ AudioMix *policyMix);
+
// internal function to derive a stream type value from audio attributes
audio_stream_type_t streamTypefromAttributesInt(const audio_attributes_t *attr);
// event is one of STARTING_OUTPUT, STARTING_BEACON, STOPPING_OUTPUT, STOPPING_BEACON