Add selectPresentation API to IAudioTrack
The Java AudioTrack interface has a setPresentation API. This
calls the setParameters API in IAudioTrack. However, this does
not eventuate into a call into the android.hardware.audio@4.0
IStreamOut selectPresentation API.
Add selectPresentation API to IAudioTrack and call down to the
android.hardware.audio@4.0 IStreamOut selectPresentation API.
Translate into calls to setParameters API for legacy HAL
interfaces.
Bug: 63901775
Test: compile
Change-Id: Id634a107f3f93ab18dc80d2bd0af67bda35e859f
diff --git a/media/libaudiohal/impl/StreamHalHidl.h b/media/libaudiohal/impl/StreamHalHidl.h
index 95ec7f1..74101d7 100644
--- a/media/libaudiohal/impl/StreamHalHidl.h
+++ b/media/libaudiohal/impl/StreamHalHidl.h
@@ -131,6 +131,9 @@
// Use this method in situations where audio mixing is done in the hardware.
virtual status_t setVolume(float left, float right);
+ // Selects the audio presentation (if available).
+ virtual status_t selectPresentation(int presentationId, int programId);
+
// Write audio buffer to driver.
virtual status_t write(const void *buffer, size_t bytes, size_t *written);