OSDN Git Service

am fee5a860: Merge "DO NOT MERGE Revert "AudioFlinger: mix track only when really...
authorJustin Ho <justinho@google.com>
Mon, 23 Jan 2012 23:13:19 +0000 (15:13 -0800)
committerAndroid Git Automerger <android-git-automerger@android.com>
Mon, 23 Jan 2012 23:13:19 +0000 (15:13 -0800)
* commit 'fee5a860a8355cda071ff23644e943414ba7f65d':
  DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"

1  2 
services/audioflinger/AudioFlinger.cpp

@@@ -1940,12 -1940,11 +1940,11 @@@ bool AudioFlinger::MixerThread::threadL
  
                      releaseWakeLock_l();
                      // wait until we have something to do...
 -                    LOGV("MixerThread %p TID %d going to sleep\n", this, gettid());
 +                    ALOGV("MixerThread %p TID %d going to sleep\n", this, gettid());
                      mWaitWorkCV.wait(mLock);
 -                    LOGV("MixerThread %p TID %d waking up\n", this, gettid());
 +                    ALOGV("MixerThread %p TID %d waking up\n", this, gettid());
                      acquireWakeLock_l();
  
-                     mPrevMixerStatus = MIXER_IDLE;
                      if (mMasterMute == false) {
                          char value[PROPERTY_VALUE_MAX];
                          property_get("ro.audio.silent", value, "0");
@@@ -2230,15 -2229,9 +2229,9 @@@ uint32_t AudioFlinger::MixerThread::pre
  
              // reset retry count
              track->mRetryCount = kMaxTrackRetries;
-             // If one track is ready, set the mixer ready if:
-             //  - the mixer was not ready during previous round OR
-             //  - no other track is not ready
-             if (mPrevMixerStatus != MIXER_TRACKS_READY ||
-                     mixerStatus != MIXER_TRACKS_ENABLED) {
-                 mixerStatus = MIXER_TRACKS_READY;
-             }
+             mixerStatus = MIXER_TRACKS_READY;
          } else {
 -            //LOGV("track %d u=%08x, s=%08x [NOT READY] on thread %p", track->name(), cblk->user, cblk->server, this);
 +            //ALOGV("track %d u=%08x, s=%08x [NOT READY] on thread %p", track->name(), cblk->user, cblk->server, this);
              if (track->isStopped()) {
                  track->reset();
              }
@@@ -3023,12 -3011,11 +3011,11 @@@ bool AudioFlinger::DuplicatingThread::t
                      if (exitPending()) break;
  
                      releaseWakeLock_l();
 -                    LOGV("DuplicatingThread %p TID %d going to sleep\n", this, gettid());
 +                    ALOGV("DuplicatingThread %p TID %d going to sleep\n", this, gettid());
                      mWaitWorkCV.wait(mLock);
 -                    LOGV("DuplicatingThread %p TID %d waking up\n", this, gettid());
 +                    ALOGV("DuplicatingThread %p TID %d waking up\n", this, gettid());
                      acquireWakeLock_l();
  
-                     mPrevMixerStatus = MIXER_IDLE;
                      if (mMasterMute == false) {
                          char value[PROPERTY_VALUE_MAX];
                          property_get("ro.audio.silent", value, "0");