AAudio: Add AAudioStream_getHardware* functions

Add new methods to AAudioStream that allow for queries on the hardware
aspects of streams.

These will allow developers understand the hardware limitations of their
Android devices after they create AAudio streams.

Bug: 245412674
Test: atest AAudioTests
Change-Id: I104a738df89ab22aba9e0658b43402ddf053b887
diff --git a/services/oboeservice/AAudioServiceStreamBase.cpp b/services/oboeservice/AAudioServiceStreamBase.cpp
index 9f48f80..17e64ee 100644
--- a/services/oboeservice/AAudioServiceStreamBase.cpp
+++ b/services/oboeservice/AAudioServiceStreamBase.cpp
@@ -84,7 +84,8 @@
 
 std::string AAudioServiceStreamBase::dumpHeader() {
     return std::string(
-            "    T   Handle   UId   Port Run State Format Burst Chan Mask     Capacity");
+            "    T   Handle   UId   Port Run State Format Burst Chan Mask     Capacity"
+            " HwFormat HwChan HwRate");
 }
 
 std::string AAudioServiceStreamBase::dump() const {
@@ -101,6 +102,9 @@
     result << std::setw(5) << getSamplesPerFrame();
     result << std::setw(8) << std::hex << getChannelMask() << std::dec;
     result << std::setw(9) << getBufferCapacity();
+    result << std::setw(9) << getHardwareFormat();
+    result << std::setw(7) << getHardwareSamplesPerFrame();
+    result << std::setw(7) << getHardwareSampleRate();
 
     return result.str();
 }