aaudio: convert I16 input to float

This allows an app that requests a LOW_LATENCY FLOAT INPUT stream
to get a FAST track when using Legacy mode.
This is needed because Legacy AudioRecord does not allow FAST for FLOAT
streams.

Bug: 38268031
Test: adb shell input_monitor -m1 -pl -f2
Test: adb shell input_monitor_callback -m1 -pl -f2
Test: On Pixel phones you should get actual performanceMode=12
Change-Id: Ia5879ff4904f50bbb5009a3fc058800e53770710
diff --git a/media/libaaudio/src/client/AudioStreamInternal.cpp b/media/libaaudio/src/client/AudioStreamInternal.cpp
index 2a3e668..ff138aa 100644
--- a/media/libaaudio/src/client/AudioStreamInternal.cpp
+++ b/media/libaaudio/src/client/AudioStreamInternal.cpp
@@ -156,7 +156,7 @@
     setInputPreset(configurationOutput.getInputPreset());
 
     // Save device format so we can do format conversion and volume scaling together.
-    mDeviceFormat = configurationOutput.getFormat();
+    setDeviceFormat(configurationOutput.getFormat());
 
     result = mServiceInterface.getStreamDescription(mServiceStreamHandle, mEndPointParcelable);
     if (result != AAUDIO_OK) {
diff --git a/media/libaaudio/src/client/AudioStreamInternal.h b/media/libaaudio/src/client/AudioStreamInternal.h
index 0e0724b..0425cd5 100644
--- a/media/libaaudio/src/client/AudioStreamInternal.h
+++ b/media/libaaudio/src/client/AudioStreamInternal.h
@@ -138,8 +138,6 @@
     // Calculate timeout for an operation involving framesPerOperation.
     int64_t calculateReasonableTimeout(int32_t framesPerOperation);
 
-    aaudio_format_t getDeviceFormat() const { return mDeviceFormat; }
-
     int32_t getDeviceChannelCount() const { return mDeviceChannelCount; }
 
     /**
@@ -195,9 +193,6 @@
 
     int64_t                  mServiceLatencyNanos = 0;
 
-    // Sometimes the hardware is operating with a different format or channel count from the app.
-    // Then we require conversion in AAudio.
-    aaudio_format_t          mDeviceFormat = AAUDIO_FORMAT_UNSPECIFIED;
     int32_t                  mDeviceChannelCount = 0;
 };