Add HAL interface to replace aaudio system property.
Using the HAL interface instead of reading system property is a better
option when moving to AIDL HAL. The replaced property includes:
- aaudio.mixer_bursts
- aaudio.hw_burst_min_usec
Test: atest AAudioTests
Bug: 193275465
Change-Id: I9c9a04296e56ff083babcfa089fcdddc6b89ed94
diff --git a/media/libaaudio/src/client/AudioStreamInternal.cpp b/media/libaaudio/src/client/AudioStreamInternal.cpp
index 8284be5..efd6598 100644
--- a/media/libaaudio/src/client/AudioStreamInternal.cpp
+++ b/media/libaaudio/src/client/AudioStreamInternal.cpp
@@ -27,6 +27,7 @@
#include <aaudio/AAudio.h>
#include <cutils/properties.h>
+#include <media/AudioSystem.h>
#include <media/MediaMetricsItem.h>
#include <utils/Trace.h>
@@ -95,7 +96,7 @@
return result;
}
- const int32_t burstMinMicros = AAudioProperty_getHardwareBurstMinMicros();
+ const int32_t burstMinMicros = android::AudioSystem::getAAudioHardwareBurstMinUsec();
int32_t burstMicros = 0;
const audio_format_t requestedFormat = getFormat();