audio: Use auto-generated MicrophoneInfoFw class

Replace use of manually written MicrophoneInfo class
with MicrophoneInfoFw which is generated automatically
from the AIDL definition.

Rename MicrophoneInfoData AIDL to MicrophoneInfoFw for
consistency with other framework-side AIDL types.
MicrophoneInfoFw is defined using stable shared data
types.

Bug: 263964254
Test: atest audio_aidl_conversion_tests
Change-Id: I93e4fe08fc294350c9b06f2959f84b24f31f6881
Merged-In: I93e4fe08fc294350c9b06f2959f84b24f31f6881
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 58f99e8..077a01a 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -2352,15 +2352,9 @@
 }
 
 binder::Status AudioFlinger::RecordHandle::getActiveMicrophones(
-        std::vector<media::MicrophoneInfoData>* activeMicrophones) {
+        std::vector<media::MicrophoneInfoFw>* activeMicrophones) {
     ALOGV("%s()", __func__);
-    std::vector<media::MicrophoneInfo> mics;
-    status_t status = mRecordTrack->getActiveMicrophones(&mics);
-    activeMicrophones->resize(mics.size());
-    for (size_t i = 0; status == OK && i < mics.size(); ++i) {
-       status = mics[i].writeToParcelable(&activeMicrophones->at(i));
-    }
-    return binderStatusFromStatusT(status);
+    return binderStatusFromStatusT(mRecordTrack->getActiveMicrophones(activeMicrophones));
 }
 
 binder::Status AudioFlinger::RecordHandle::setPreferredMicrophoneDirection(
@@ -2680,7 +2674,7 @@
 }
 
 status_t AudioFlinger::RecordThread::RecordTrack::getActiveMicrophones(
-        std::vector<media::MicrophoneInfo>* activeMicrophones)
+        std::vector<media::MicrophoneInfoFw>* activeMicrophones)
 {
     sp<ThreadBase> thread = mThread.promote();
     if (thread != 0) {