AAudioService: integrated with audioserver
Call the MmapStreamInterface from AudioFlinger instead of the FakeHAL.
Fix sending timestamps from the thread.
Add shared mode in service.
Bug: 35260844
Bug: 33398120
Test: CTS test_aaudio.cpp
Change-Id: I44c7e4ecae4ce205611b6b73a72e0ae8a5b243e5
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 7f6b40d78b1976c78d1300e8a51fda36eeb50c5d)
diff --git a/media/libaaudio/include/aaudio/AAudioDefinitions.h b/media/libaaudio/include/aaudio/AAudioDefinitions.h
index fbd284c..57e3dbd 100644
--- a/media/libaaudio/include/aaudio/AAudioDefinitions.h
+++ b/media/libaaudio/include/aaudio/AAudioDefinitions.h
@@ -39,7 +39,7 @@
* and would accept whatever it was given.
*/
#define AAUDIO_UNSPECIFIED 0
-#define AAUDIO_DEVICE_UNSPECIFIED ((int32_t) -1)
+#define AAUDIO_DEVICE_UNSPECIFIED 0
enum {
AAUDIO_DIRECTION_OUTPUT,
@@ -82,9 +82,10 @@
AAUDIO_ERROR_NULL,
AAUDIO_ERROR_TIMEOUT,
AAUDIO_ERROR_WOULD_BLOCK,
- AAUDIO_ERROR_INVALID_ORDER,
+ AAUDIO_ERROR_INVALID_FORMAT,
AAUDIO_ERROR_OUT_OF_RANGE,
- AAUDIO_ERROR_NO_SERVICE
+ AAUDIO_ERROR_NO_SERVICE,
+ AAUDIO_ERROR_INVALID_RATE
};
typedef int32_t aaudio_result_t;
@@ -103,9 +104,11 @@
AAUDIO_STREAM_STATE_STOPPED,
AAUDIO_STREAM_STATE_CLOSING,
AAUDIO_STREAM_STATE_CLOSED,
+ AAUDIO_STREAM_STATE_DISCONNECTED
};
typedef int32_t aaudio_stream_state_t;
+
enum {
/**
* This will be the only stream using a particular source or sink.