aaudio: show format as text
Some other minor log cleanup.
Test: adb logcat | grep -i audio
Test: then open an MMAP stream with OboeTester.
Test: adb shell dumpsys media.aaudio
Change-Id: I082ffe34fb0dbf4263321a80498e8766b9213ab9
diff --git a/services/oboeservice/AAudioServiceEndpointMMAP.cpp b/services/oboeservice/AAudioServiceEndpointMMAP.cpp
index a266d5b..2a53ef3 100644
--- a/services/oboeservice/AAudioServiceEndpointMMAP.cpp
+++ b/services/oboeservice/AAudioServiceEndpointMMAP.cpp
@@ -183,7 +183,9 @@
? AAUDIO_SESSION_ID_NONE
: (aaudio_session_id_t) sessionId;
setSessionId(actualSessionId);
- ALOGD("%s() deviceId = %d, sessionId = %d", __func__, getDeviceId(), getSessionId());
+
+ ALOGD("%s(format = 0x%X) deviceId = %d, sessionId = %d",
+ __func__, audioFormat, getDeviceId(), getSessionId());
// Create MMAP/NOIRQ buffer.
if (createMmapBuffer(&mAudioDataFileDescriptor) != AAUDIO_OK) {
@@ -206,12 +208,13 @@
mTimestampGracePeriodMs = ((int64_t) kTimestampGraceBurstCount * mFramesPerBurst
* AAUDIO_MILLIS_PER_SECOND) / getSampleRate();
- ALOGD("%s() actual rate = %d, channels = %d channelMask = %#x, deviceId = %d, capacity = %d\n",
+ ALOGD("%s() got rate = %d, channels = %d channelMask = %#x, deviceId = %d, capacity = %d\n",
__func__, getSampleRate(), getSamplesPerFrame(), getChannelMask(),
deviceId, getBufferCapacity());
- ALOGD("%s() format = 0x%08x, frame size = %d, burst size = %d",
- __func__, getFormat(), calculateBytesPerFrame(), mFramesPerBurst);
+ ALOGD("%s() got format = 0x%X = %s, frame size = %d, burst size = %d",
+ __func__, getFormat(), audio_format_to_string(getFormat()),
+ calculateBytesPerFrame(), mFramesPerBurst);
return result;