Make frameworks/av 64-bit compatible

Contains the necessary changes to make frameworks/av build and work
on a 64-bit machine.

Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
diff --git a/services/audioflinger/FastMixer.cpp b/services/audioflinger/FastMixer.cpp
index 3054619..85d637e 100644
--- a/services/audioflinger/FastMixer.cpp
+++ b/services/audioflinger/FastMixer.cpp
@@ -321,7 +321,7 @@
                                 (void *) mixBuffer);
                         // newly allocated track names default to full scale volume
                         mixer->setParameter(name, AudioMixer::TRACK, AudioMixer::CHANNEL_MASK,
-                                (void *) fastTrack->mChannelMask);
+                                (void *)(uintptr_t)fastTrack->mChannelMask);
                         mixer->enable(name);
                     }
                     generations[i] = fastTrack->mGeneration;
@@ -351,7 +351,7 @@
                             mixer->setParameter(name, AudioMixer::RESAMPLE,
                                     AudioMixer::REMOVE, NULL);
                             mixer->setParameter(name, AudioMixer::TRACK, AudioMixer::CHANNEL_MASK,
-                                    (void *) fastTrack->mChannelMask);
+                                    (void *)(uintptr_t) fastTrack->mChannelMask);
                             // already enabled
                         }
                         generations[i] = fastTrack->mGeneration;
@@ -400,9 +400,9 @@
                 if (fastTrack->mVolumeProvider != NULL) {
                     uint32_t vlr = fastTrack->mVolumeProvider->getVolumeLR();
                     mixer->setParameter(name, AudioMixer::VOLUME, AudioMixer::VOLUME0,
-                            (void *)(vlr & 0xFFFF));
+                            (void *)(uintptr_t)(vlr & 0xFFFF));
                     mixer->setParameter(name, AudioMixer::VOLUME, AudioMixer::VOLUME1,
-                            (void *)(vlr >> 16));
+                            (void *)(uintptr_t)(vlr >> 16));
                 }
                 // FIXME The current implementation of framesReady() for fast tracks
                 // takes a tryLock, which can block
@@ -731,7 +731,7 @@
     double mixPeriodSec = (double) mFrameCount / (double) mSampleRate;
     fdprintf(fd, "FastMixer command=%s writeSequence=%u framesWritten=%u\n"
                  "          numTracks=%u writeErrors=%u underruns=%u overruns=%u\n"
-                 "          sampleRate=%u frameCount=%u measuredWarmup=%.3g ms, warmupCycles=%u\n"
+                 "          sampleRate=%u frameCount=%zu measuredWarmup=%.3g ms, warmupCycles=%u\n"
                  "          mixPeriod=%.2f ms\n",
                  string, mWriteSequence, mFramesWritten,
                  mNumTracks, mWriteErrors, mUnderruns, mOverruns,
@@ -845,7 +845,7 @@
             mostRecent = "?";
             break;
         }
-        fdprintf(fd, "%5u %6s %4u %7u %5u %7s %5u\n", i, isActive ? "yes" : "no",
+        fdprintf(fd, "%5u %6s %4u %7u %5u %7s %5zu\n", i, isActive ? "yes" : "no",
                 (underruns.mBitFields.mFull) & UNDERRUN_MASK,
                 (underruns.mBitFields.mPartial) & UNDERRUN_MASK,
                 (underruns.mBitFields.mEmpty) & UNDERRUN_MASK,