audio policy: pass session ID to capture activity methods
Indicate the audio session ID when calling getInput(),
startInput(), stopInput(), releaseInput().
Bug: 12378680.
Change-Id: I763793752f93e2f4e1445a5ab217c895af011038
diff --git a/services/audiopolicy/AudioPolicyManager.h b/services/audiopolicy/AudioPolicyManager.h
index cb4b056..ec94144 100644
--- a/services/audiopolicy/AudioPolicyManager.h
+++ b/services/audiopolicy/AudioPolicyManager.h
@@ -107,15 +107,18 @@
uint32_t samplingRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- audio_in_acoustics_t acoustics,
+ audio_session_t session,
audio_input_flags_t flags);
// indicates to the audio policy manager that the input starts being used.
- virtual status_t startInput(audio_io_handle_t input);
+ virtual status_t startInput(audio_io_handle_t input,
+ audio_session_t session);
// indicates to the audio policy manager that the input stops being used.
- virtual status_t stopInput(audio_io_handle_t input);
- virtual void releaseInput(audio_io_handle_t input);
+ virtual status_t stopInput(audio_io_handle_t input,
+ audio_session_t session);
+ virtual void releaseInput(audio_io_handle_t input,
+ audio_session_t session);
virtual void closeAllInputs();
virtual void initStreamVolume(audio_stream_type_t stream,
int indexMin,
@@ -485,6 +488,7 @@
uint32_t mOpenRefCount;
audio_source_t mInputSource; // input source selected by application (mediarecorder.h)
const sp<IOProfile> mProfile; // I/O profile this output derives from
+ SortedVector<audio_session_t> mSessions; // audio sessions attached to this input
virtual void toAudioPortConfig(struct audio_port_config *dstConfig,
const struct audio_port_config *srcConfig = NULL) const;