audio HAL: implement mmap stream functions
Bug: 33398120
Test: make marlin-eng with ENABLE_TREBLE true
Change-Id: I10df5440b9946398a73a7ee309eca860eae0bfcd
diff --git a/include/media/audiohal/StreamHalInterface.h b/include/media/audiohal/StreamHalInterface.h
index 0772d8f..5296829 100644
--- a/include/media/audiohal/StreamHalInterface.h
+++ b/include/media/audiohal/StreamHalInterface.h
@@ -62,6 +62,19 @@
virtual status_t dump(int fd) = 0;
+ // Start a stream operating in mmap mode.
+ virtual status_t start() = 0;
+
+ // Stop a stream operating in mmap mode.
+ virtual status_t stop() = 0;
+
+ // Retrieve information on the data buffer in mmap mode.
+ virtual status_t createMmapBuffer(int32_t minSizeFrames,
+ struct audio_mmap_buffer_info *info) = 0;
+
+ // Get current read/write position in the mmap buffer
+ virtual status_t getMmapPosition(struct audio_mmap_position *position) = 0;
+
protected:
// Subclasses can not be constructed directly by clients.
StreamHalInterface() {}