Issue 2071329: audio track is shorter than video track for video capture on sholes

Add API to retrieve number of frames dropped by audio input kernel driver.

Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index 7bbd0b2..bce3371 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -199,6 +199,7 @@
     mUpdatePeriod = 0;
     mInputSource = (uint8_t)inputSource;
     mFlags = flags;
+    mInput = input;
 
     return NO_ERROR;
 }
@@ -384,6 +385,13 @@
     return NO_ERROR;
 }
 
+unsigned int AudioRecord::getInputFramesLost()
+{
+    if (mActive)
+        return AudioSystem::getInputFramesLost(mInput);
+    else
+        return 0;
+}
 
 // -------------------------------------------------------------------------
 
@@ -517,10 +525,11 @@
 
 audio_io_handle_t AudioRecord::getInput()
 {
-   return AudioSystem::getInput(mInputSource,
+    mInput = AudioSystem::getInput(mInputSource,
                                 mCblk->sampleRate,
                                 mFormat, mChannels,
                                 (AudioSystem::audio_in_acoustics)mFlags);
+    return mInput;
 }
 
 // -------------------------------------------------------------------------