AudioTrack::mute() is unused so remove it

If ever needed again, it could be implemented on client side by forcing
a track volume of 0.

Change-Id: I88a9b4f675b6dca2948549414f9ec2c192d29269
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 46a8e0f..6d3f0a1 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -385,7 +385,6 @@
         virtual status_t    start();
         virtual void        stop();
         virtual void        flush();
-        virtual void        mute(bool);
         virtual void        pause();
         virtual status_t    attachAuxEffect(int effectId);
         virtual status_t    allocateTimedBuffer(size_t size,
diff --git a/services/audioflinger/PlaybackTracks.h b/services/audioflinger/PlaybackTracks.h
index b898924..37e39a0 100644
--- a/services/audioflinger/PlaybackTracks.h
+++ b/services/audioflinger/PlaybackTracks.h
@@ -44,7 +44,6 @@
 
             void        flush();
             void        destroy();
-            void        mute(bool);
             int         name() const { return mName; }
 
             audio_stream_type_t streamType() const {
@@ -78,7 +77,6 @@
 
     virtual size_t framesReady() const;
 
-    bool isMuted() const { return mMute; }
     bool isPausing() const {
         return mState == PAUSING;
     }
@@ -111,11 +109,6 @@
 
 protected:
 
-    // written by Track::mute() called by binder thread(s), without a mutex or barrier.
-    // read by Track::isMuted() called by playback thread, also without a mutex or barrier.
-    // The lack of mutex or barrier is safe because the mute status is only used by itself.
-    bool                mMute;
-
     // FILLED state is used for suppressing volume ramp at begin of playing
     enum {FS_INVALID, FS_FILLING, FS_FILLED, FS_ACTIVE};
     mutable uint8_t     mFillingUpStatus;
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index fd64395..a285e6c 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -2544,8 +2544,7 @@
                 }
                 // cache the combined master volume and stream type volume for fast mixer; this
                 // lacks any synchronization or barrier so VolumeProvider may read a stale value
-                track->mCachedVolume = track->isMuted() ?
-                        0 : masterVolume * mStreamTypes[track->streamType()].volume;
+                track->mCachedVolume = masterVolume * mStreamTypes[track->streamType()].volume;
                 ++fastTracks;
             } else {
                 // was it previously active?
@@ -2637,8 +2636,7 @@
 
             // compute volume for this track
             uint32_t vl, vr, va;
-            if (track->isMuted() || track->isPausing() ||
-                mStreamTypes[track->streamType()].mute) {
+            if (track->isPausing() || mStreamTypes[track->streamType()].mute) {
                 vl = vr = va = 0;
                 if (track->isPausing()) {
                     track->setPaused();
@@ -3139,8 +3137,7 @@
 
             // compute volume for this track
             float left, right;
-            if (track->isMuted() || mMasterMute || track->isPausing() ||
-                mStreamTypes[track->streamType()].mute) {
+            if (mMasterMute || track->isPausing() || mStreamTypes[track->streamType()].mute) {
                 left = right = 0;
                 if (track->isPausing()) {
                     track->setPaused();
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 2c6ba8b..e8ca5ee 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -248,10 +248,6 @@
     mTrack->flush();
 }
 
-void AudioFlinger::TrackHandle::mute(bool e) {
-    mTrack->mute(e);
-}
-
 void AudioFlinger::TrackHandle::pause() {
     mTrack->pause();
 }
@@ -315,7 +311,6 @@
             IAudioFlinger::track_flags_t flags)
     :   TrackBase(thread, client, sampleRate, format, channelMask, frameCount, sharedBuffer,
             sessionId),
-    mMute(false),
     mFillingUpStatus(FS_INVALID),
     // mRetryCount initialized later when needed
     mSharedBuffer(sharedBuffer),
@@ -397,7 +392,7 @@
 
 /*static*/ void AudioFlinger::PlaybackThread::Track::appendDumpHeader(String8& result)
 {
-    result.append("   Name Client Type Fmt Chn mask   Session StpCnt fCount S M F SRate  "
+    result.append("   Name Client Type Fmt Chn mask   Session StpCnt fCount S F SRate  "
                   "L dB  R dB    Server      User     Main buf    Aux Buf  Flags Underruns\n");
 }
 
@@ -461,7 +456,7 @@
         nowInUnderrun = '?';
         break;
     }
-    snprintf(&buffer[7], size-7, " %6d %4u %3u 0x%08x %7u %6u %6u %1c %1d %1d %5u %5.2g %5.2g  "
+    snprintf(&buffer[7], size-7, " %6d %4u %3u 0x%08x %7u %6u %6u %1c %1d %5u %5.2g %5.2g  "
             "0x%08x 0x%08x 0x%08x 0x%08x %#5x %9u%c\n",
             (mClient == 0) ? getpid_cached : mClient->pid(),
             mStreamType,
@@ -471,7 +466,6 @@
             mStepCount,
             mFrameCount,
             stateChar,
-            mMute,
             mFillingUpStatus,
             mCblk->sampleRate,
             20.0 * log10((vlr & 0xFFFF) / 4096.0),
@@ -708,11 +702,6 @@
     }
 }
 
-void AudioFlinger::PlaybackThread::Track::mute(bool muted)
-{
-    mMute = muted;
-}
-
 status_t AudioFlinger::PlaybackThread::Track::attachAuxEffect(int EffectId)
 {
     status_t status = DEAD_OBJECT;