aaudio: Fix getFramesWritten() for callback mode.
Plus other small fixes for CTS and cleanup
Bug: 37910599
Test: test_aaudio.cpp
Change-Id: I65a23daf99e9de857d3ce9fd12e9f11c614e298e
Signed-off-by: Phil Burk <philburk@google.com>
diff --git a/services/oboeservice/AAudioServiceStreamMMAP.cpp b/services/oboeservice/AAudioServiceStreamMMAP.cpp
index b2e7fc9..5e4a9b1 100644
--- a/services/oboeservice/AAudioServiceStreamMMAP.cpp
+++ b/services/oboeservice/AAudioServiceStreamMMAP.cpp
@@ -125,6 +125,9 @@
MmapStreamInterface::stream_direction_t streamDirection = (direction == AAUDIO_DIRECTION_OUTPUT)
? MmapStreamInterface::DIRECTION_OUTPUT : MmapStreamInterface::DIRECTION_INPUT;
+ ALOGD("AAudioServiceStreamMMAP::open() request devId = %d, sRate = %d",
+ deviceId, config.sample_rate);
+
// Open HAL stream.
status_t status = MmapStreamInterface::openMmapStream(streamDirection,
&attributes,
@@ -166,6 +169,9 @@
mAudioFormat = AAudioConvert_androidToAAudioDataFormat(config.format);
mSampleRate = config.sample_rate;
+ ALOGD("AAudioServiceStreamMMAP::open() got devId = %d, sRate = %d",
+ deviceId, config.sample_rate);
+
// Fill in AAudioStreamConfiguration
configurationOutput.setSampleRate(mSampleRate);
configurationOutput.setSamplesPerFrame(mSamplesPerFrame);