OSDN Git Service

Merge ee4618bc
authorJean-Baptiste Queru <jbq@google.com>
Fri, 20 Jan 2012 01:18:25 +0000 (17:18 -0800)
committerJean-Baptiste Queru <jbq@google.com>
Fri, 20 Jan 2012 01:18:25 +0000 (17:18 -0800)
Change-Id: Ie1dc6ad38e7c30636d80f6caef11cf6673144940

1  2 
media/libstagefright/AwesomePlayer.cpp
services/audioflinger/AudioFlinger.cpp
services/audioflinger/AudioMixer.cpp

@@@ -1940,12 -1940,11 +1940,12 @@@ 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 -2221,9 +2230,15 @@@ uint32_t AudioFlinger::MixerThread::pre
  
              // reset retry count
              track->mRetryCount = kMaxTrackRetries;
 -            mixerStatus = MIXER_TRACKS_READY;
 +            // 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;
 +            }
          } 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 -3003,11 +3023,12 @@@ 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");
Simple merge