Add unique audio port IDs to AudioTrack and AudioRecord
This will allow to track activity at the track level instead of
at audio session level as only possible with current implementation.
AudioTracks and AudioRecords will receive a unique audio port ID the
first time they register to audio policy with
getOutputForAttr()/getInputForAttr() and keep this ID for their
lifetime.
This CL is the first partial change and just updates the
audio policy and audio flinger APIs used at track creation time.
Test: basic regression test of audio playback and capture use cases
Change-Id: I8d612e67738e120494f61e3f7c60bfd0b2c6a329
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index d261ea5..4eafc38 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -591,7 +591,8 @@
audio_output_flags_t *flags,
pid_t tid,
uid_t uid,
- status_t *status /*non-NULL*/);
+ status_t *status /*non-NULL*/,
+ audio_port_handle_t portId);
AudioStreamOut* getOutput() const;
AudioStreamOut* clearOutput();
@@ -1363,7 +1364,8 @@
uid_t uid,
audio_input_flags_t *flags,
pid_t tid,
- status_t *status /*non-NULL*/);
+ status_t *status /*non-NULL*/,
+ audio_port_handle_t portId);
status_t start(RecordTrack* recordTrack,
AudioSystem::sync_event_t event,