diff --git a/camera/libcameraservice/CameraHardwareStub.cpp b/camera/libcameraservice/CameraHardwareStub.cpp
index 9a47705..0f1ae8e 100644
--- a/camera/libcameraservice/CameraHardwareStub.cpp
+++ b/camera/libcameraservice/CameraHardwareStub.cpp
@@ -29,7 +29,8 @@
 
 CameraHardwareStub::CameraHardwareStub()
                   : mParameters(),
-                    mHeap(0),
+                    mPreviewHeap(0),
+                    mRawHeap(0),
                     mFakeCamera(0),
                     mPreviewFrameSize(0),
                     mRawPictureCallback(0),
@@ -62,13 +63,17 @@
 
 void CameraHardwareStub::initHeapLocked()
 {
-    int width, height;
-    mParameters.getPreviewSize(&width, &height);
+    // Create raw heap.
+    int picture_width, picture_height;
+    mParameters.getPictureSize(&picture_width, &picture_height);
+    mRawHeap = new MemoryHeapBase(picture_width * 2 * picture_height);
 
-    LOGD("initHeapLocked: preview size=%dx%d", width, height);
+    int preview_width, preview_height;
+    mParameters.getPreviewSize(&preview_width, &preview_height);
+    LOGD("initHeapLocked: preview size=%dx%d", preview_width, preview_height);
 
     // Note that we enforce yuv422 in setParameters().
-    int how_big = width * height * 2;
+    int how_big = preview_width * preview_height * 2;
 
     // If we are being reinitialized to the same size as before, no
     // work needs to be done.
@@ -79,15 +84,15 @@
 
     // Make a new mmap'ed heap that can be shared across processes. 
     // use code below to test with pmem
-    mHeap = new MemoryHeapBase(mPreviewFrameSize * kBufferCount);
+    mPreviewHeap = new MemoryHeapBase(mPreviewFrameSize * kBufferCount);
     // Make an IMemory for each frame so that we can reuse them in callbacks.
     for (int i = 0; i < kBufferCount; i++) {
-        mBuffers[i] = new MemoryBase(mHeap, i * mPreviewFrameSize, mPreviewFrameSize);
+        mBuffers[i] = new MemoryBase(mPreviewHeap, i * mPreviewFrameSize, mPreviewFrameSize);
     }
-
+    
     // Recreate the fake camera to reflect the current size.
     delete mFakeCamera;
-    mFakeCamera = new FakeCamera(width, height);
+    mFakeCamera = new FakeCamera(preview_width, preview_height);
 }
 
 CameraHardwareStub::~CameraHardwareStub()
@@ -99,7 +104,12 @@
 
 sp<IMemoryHeap> CameraHardwareStub::getPreviewHeap() const
 {
-    return mHeap;
+    return mPreviewHeap;
+}
+
+sp<IMemoryHeap> CameraHardwareStub::getRawHeap() const
+{
+    return mRawHeap;
 }
 
 // ---------------------------------------------------------------------------
@@ -114,7 +124,7 @@
         // Find the offset within the heap of the current buffer.
         ssize_t offset = mCurrentPreviewFrame * mPreviewFrameSize;
 
-        sp<MemoryHeapBase> heap = mHeap;
+        sp<MemoryHeapBase> heap = mPreviewHeap;
     
         // this assumes the internal state of fake camera doesn't change
         // (or is thread safe)
@@ -255,10 +265,9 @@
         // In the meantime just make another fake camera picture.
         int w, h;
         mParameters.getPictureSize(&w, &h);
-        sp<MemoryHeapBase> heap = new MemoryHeapBase(w * 2 * h);
-        sp<MemoryBase> mem = new MemoryBase(heap, 0, w * 2 * h);
+        sp<MemoryBase> mem = new MemoryBase(mRawHeap, 0, w * 2 * h);
         FakeCamera cam(w, h);
-        cam.getNextFrameAsYuv422((uint8_t *)heap->base());
+        cam.getNextFrameAsYuv422((uint8_t *)mRawHeap->base());
         if (mRawPictureCallback)
             mRawPictureCallback(mem, mPictureCallbackCookie);
     }
diff --git a/camera/libcameraservice/CameraHardwareStub.h b/camera/libcameraservice/CameraHardwareStub.h
index cdd6011..0d26d47 100644
--- a/camera/libcameraservice/CameraHardwareStub.h
+++ b/camera/libcameraservice/CameraHardwareStub.h
@@ -30,6 +30,7 @@
 class CameraHardwareStub : public CameraHardwareInterface {
 public:
     virtual sp<IMemoryHeap> getPreviewHeap() const;
+    virtual sp<IMemoryHeap> getRawHeap() const;
 
     virtual status_t    startPreview(preview_callback cb, void* user);
     virtual void        stopPreview();
@@ -93,7 +94,8 @@
 
     CameraParameters    mParameters;
 
-    sp<MemoryHeapBase>  mHeap;
+    sp<MemoryHeapBase>  mPreviewHeap;
+    sp<MemoryHeapBase>  mRawHeap;
     sp<MemoryBase>      mBuffers[kBufferCount];
 
     FakeCamera          *mFakeCamera;
diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp
index e5d4220..953e637 100644
--- a/camera/libcameraservice/CameraService.cpp
+++ b/camera/libcameraservice/CameraService.cpp
@@ -152,7 +152,7 @@
 }
 
 CameraService::Client::Client(const sp<CameraService>& cameraService,
-        const sp<ICameraClient>& cameraClient, pid_t clientPid) 
+        const sp<ICameraClient>& cameraClient, pid_t clientPid)
 {
     LOGD("Client E constructor");
     mCameraService = cameraService;
@@ -429,7 +429,7 @@
         ret = mHardware->startPreview(NULL, mCameraService.get());
         if (ret != NO_ERROR)
             LOGE("mHardware->startPreview() failed with status %d\n", ret);
- 
+
     } else {
         ret = mHardware->startPreview(previewCallback,
                                       mCameraService.get());
@@ -684,13 +684,33 @@
         return INVALID_OPERATION;
     }
 
-    if (mSurface != NULL && !mUseOverlay)
-        mSurface->unregisterBuffers();
 
-    return mHardware->takePicture(shutterCallback,
+    Mutex::Autolock buffer_lock(mBufferLock);
+    result = mHardware->takePicture(shutterCallback,
                                   yuvPictureCallback,
                                   jpegPictureCallback,
                                   mCameraService.get());
+
+    // It takes quite some time before yuvPicture callback to be called. 
+    // Register the buffer for raw image here to reduce latency.  
+    // But yuvPictureCallback is called from libcamera. So do not call into a
+    // libcamera function here that gets another lock, which may cause deadlock.
+    if (mSurface != 0 && !mUseOverlay) {
+        int w, h;
+        CameraParameters params(mHardware->getParameters());
+        params.getPictureSize(&w, &h);
+        mSurface->unregisterBuffers();
+        uint32_t transform = 0;
+        if (params.getOrientation() == CameraParameters::CAMERA_ORIENTATION_PORTRAIT) {
+            LOGV("portrait mode");
+            transform = ISurface::BufferHeap::ROT_90;
+        }
+        ISurface::BufferHeap buffers(w, h, w, h,
+            PIXEL_FORMAT_YCbCr_420_SP, transform, 0, mHardware->getRawHeap());
+        mSurface->registerBuffers(buffers);
+    }
+
+    return result;
 }
 
 // picture callback - snapshot taken
@@ -732,23 +752,9 @@
 #endif
 
     // Put the YUV version of the snapshot in the preview display.
-    int w, h;
-    CameraParameters params(client->mHardware->getParameters());
-    params.getPictureSize(&w, &h);
-
-//  Mutex::Autolock clientLock(client->mLock);
+    // Use lock to make sure buffer has been registered.
+    Mutex::Autolock clientLock(client->mBufferLock);
     if (client->mSurface != 0 && !client->mUseOverlay) {
-        client->mSurface->unregisterBuffers();
-        
-        uint32_t transform = 0;
-        if (params.getOrientation() == CameraParameters::CAMERA_ORIENTATION_PORTRAIT) {
-            LOGV("portrait mode");
-            transform = ISurface::BufferHeap::ROT_90;
-        }
-        ISurface::BufferHeap buffers(w, h, w, h,
-                PIXEL_FORMAT_YCbCr_420_SP, transform, 0, heap);
-        
-        client->mSurface->registerBuffers(buffers);
         client->mSurface->postBuffer(offset);
     }
 
diff --git a/camera/libcameraservice/CameraService.h b/camera/libcameraservice/CameraService.h
index d9b7927..812b928 100644
--- a/camera/libcameraservice/CameraService.h
+++ b/camera/libcameraservice/CameraService.h
@@ -172,6 +172,9 @@
         // for a callback from CameraHardwareInterface.  If this
         // happens, it will cause a deadlock.
         mutable     Mutex                       mSurfaceLock;
+        // mBufferLock synchronizes buffer registration between takePicture() 
+        // and yuvPictureCallback().
+        mutable     Mutex                       mBufferLock;
         mutable     Condition                   mReady;
                     sp<CameraService>           mCameraService;
                     sp<ISurface>                mSurface;
diff --git a/include/ui/CameraHardwareInterface.h b/include/ui/CameraHardwareInterface.h
index b068c52..73036f0 100644
--- a/include/ui/CameraHardwareInterface.h
+++ b/include/ui/CameraHardwareInterface.h
@@ -87,6 +87,9 @@
     /** Return the IMemoryHeap for the preview image heap */
     virtual sp<IMemoryHeap>         getPreviewHeap() const = 0;
 
+    /** Return the IMemoryHeap for the raw image heap */
+    virtual sp<IMemoryHeap>         getRawHeap() const = 0;
+
     /**
      * Start preview mode. When a preview image is available
      * preview_callback is called with the user parameter. The
diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h
index d83a33c..7d3fcf2 100644
--- a/include/utils/ResourceTypes.h
+++ b/include/utils/ResourceTypes.h
@@ -1101,16 +1101,22 @@
         return false;
     }
     
-    // Return true if 'this' can be considered a match for the parameters in
+    // Return true if 'this' can be considered a match for the parameters in 
     // 'settings'.
+    // Note this is asymetric.  A default piece of data will match every request
+    // but a request for the default should not match odd specifics
+    // (ie, request with no mcc should not match a particular mcc's data)
+    // settings is the requested settings
     inline bool match(const ResTable_config& settings) const {
         if (imsi != 0) {
-            if (settings.mcc != 0 && mcc != 0
-                && mcc != settings.mcc) {
+            if ((settings.mcc != 0 && mcc != 0
+                 && mcc != settings.mcc) || 
+                (settings.mcc == 0 && mcc != 0)) {
                 return false;
             }
-            if (settings.mnc != 0 && mnc != 0
-                && mnc != settings.mnc) {
+            if ((settings.mnc != 0 && mnc != 0
+                 && mnc != settings.mnc) ||
+                (settings.mnc == 0 && mnc != 0)) {
                 return false;
             }
         }
diff --git a/libs/audioflinger/A2dpAudioInterface.cpp b/libs/audioflinger/A2dpAudioInterface.cpp
index d1b7af3..eb00f8c 100644
--- a/libs/audioflinger/A2dpAudioInterface.cpp
+++ b/libs/audioflinger/A2dpAudioInterface.cpp
@@ -131,8 +131,7 @@
 // ----------------------------------------------------------------------------
 
 A2dpAudioInterface::A2dpAudioStreamOut::A2dpAudioStreamOut() :
-    mFd(-1), mStandby(true), mStartCount(0), mRetryCount(0), mData(NULL),
-    mInitialized(false)
+    mFd(-1), mStandby(true), mStartCount(0), mRetryCount(0), mData(NULL)
 {
     // use any address by default
     strncpy(mA2dpAddress, "00:00:00:00:00:00", sizeof(mA2dpAddress));
@@ -167,13 +166,14 @@
     status_t status = NO_INIT;
     size_t remaining = bytes;
 
-    if (!mInitialized) {
-        status = a2dp_init(mA2dpAddress, 44100, 2, &mData);
+    if (!mData) {
+        status = a2dp_init(44100, 2, &mData);
         if (status < 0) {
             LOGE("a2dp_init failed err: %d\n", status);
+            mData = NULL;
             goto Error;
         }
-        mInitialized = true;
+        a2dp_set_sink(mData, mA2dpAddress);
     }
     
     while (remaining > 0) {
@@ -191,7 +191,6 @@
     return bytes;
 
 Error:
-    close();
     // Simulate audio output timing in case of error
     usleep(bytes * 1000000 / frameSize() / sampleRate());
 
@@ -218,7 +217,8 @@
 
     if (strcmp(address, mA2dpAddress)) {
         strcpy(mA2dpAddress, address);
-        close();
+        if (mData)
+            a2dp_set_sink(mData, mA2dpAddress);
     }
     
     return NO_ERROR;
@@ -229,7 +229,6 @@
     if (mData) {
         a2dp_cleanup(mData);
         mData = NULL;
-        mInitialized = false;
     }
     return NO_ERROR;
 }
diff --git a/libs/audioflinger/A2dpAudioInterface.h b/libs/audioflinger/A2dpAudioInterface.h
index 5bef5da..a56e8a0 100644
--- a/libs/audioflinger/A2dpAudioInterface.h
+++ b/libs/audioflinger/A2dpAudioInterface.h
@@ -96,7 +96,6 @@
                 int         mRetryCount;
                 char        mA2dpAddress[20];
                 void*       mData;
-                bool        mInitialized;
     };
 
     Mutex                   mLock;
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp
index 557d93b..92c40e9 100644
--- a/libs/audioflinger/AudioFlinger.cpp
+++ b/libs/audioflinger/AudioFlinger.cpp
@@ -171,13 +171,6 @@
      } else {
         LOGE("Couldn't even initialize the stubbed audio hardware!");
     }
-
-    char value[PROPERTY_VALUE_MAX];
-    property_get("ro.audio.silent", value, "0");
-    if (atoi(value)) {
-        LOGD("Silence is golden");
-        setMasterMute(true);
-    }
 }
 
 AudioFlinger::~AudioFlinger()
@@ -995,6 +988,16 @@
                 IPCThreadState::self()->flushCommands();
                 mWaitWorkCV.wait(mLock);
                 LOGV("Audio hardware exiting standby, output %d\n", mOutputType);
+                
+                if (mMasterMute == false) {
+                    char value[PROPERTY_VALUE_MAX];
+                    property_get("ro.audio.silent", value, "0");
+                    if (atoi(value)) {
+                        LOGD("Silence is golden");
+                        setMasterMute(true);
+                    }                    
+                }
+                
                 standbyTime = systemTime() + kStandbyTimeInNsecs;
                 continue;
             }
diff --git a/libs/audioflinger/AudioFlinger.h b/libs/audioflinger/AudioFlinger.h
index dfbb1e9..77f064b 100644
--- a/libs/audioflinger/AudioFlinger.h
+++ b/libs/audioflinger/AudioFlinger.h
@@ -223,10 +223,7 @@
             enum track_flags {
                 STEPSERVER_FAILED = 0x01, //  StepServer could not acquire cblk->lock mutex
                 SYSTEM_FLAGS_MASK = 0x0000ffffUL,
-
-                AUDIO_IN_AGC_ENABLE = AudioSystem::AGC_ENABLE << 16,
-                AUDIO_IN_NS_ENABLE  = AudioSystem::NS_ENABLE << 16,
-                AUDIO_IN_IIR_ENABLE = AudioSystem::TX_IIR_ENABLE << 16
+                // The upper 16 bits are used for track-specific flags.
             };
 
                                 TrackBase(const sp<MixerThread>& mixerThread,
diff --git a/libs/audioflinger/AudioHardwareGeneric.h b/libs/audioflinger/AudioHardwareGeneric.h
index 1d58389..c949aa1 100644
--- a/libs/audioflinger/AudioHardwareGeneric.h
+++ b/libs/audioflinger/AudioHardwareGeneric.h
@@ -47,7 +47,7 @@
     virtual size_t      bufferSize() const { return 4096; }
     virtual int         channelCount() const { return 2; }
     virtual int         format() const { return AudioSystem::PCM_16_BIT; }
-    virtual uint32_t    latency() const { return 0; }
+    virtual uint32_t    latency() const { return 20; }
     virtual status_t    setVolume(float volume) { return INVALID_OPERATION; }
     virtual ssize_t     write(const void* buffer, size_t bytes);
     virtual status_t    standby();
diff --git a/libs/ui/Camera.cpp b/libs/ui/Camera.cpp
index 6c60b85..b3cbda1 100644
--- a/libs/ui/Camera.cpp
+++ b/libs/ui/Camera.cpp
@@ -110,6 +110,8 @@
     if (c->mCamera != 0) {
         c->mCamera->asBinder()->linkToDeath(c);
         c->mStatus = NO_ERROR;
+    } else {
+        c.clear();
     }
     return c;
 }
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp
index 74271ba..5f407a9 100644
--- a/libs/utils/Threads.cpp
+++ b/libs/utils/Threads.cpp
@@ -896,6 +896,7 @@
 {
     mLock.lock();
     if (mNumReaders == 0) {
+        mLock.unlock();
         LOG(LOG_WARN, "thread",
             "WARNING: unlockForRead requested, but not locked\n");
         return;
@@ -961,6 +962,7 @@
 {
     mLock.lock();
     if (mNumWriters == 0) {
+        mLock.unlock();
         LOG(LOG_WARN, "thread",
             "WARNING: unlockForWrite requested, but not locked\n");
         return;
@@ -972,7 +974,7 @@
     //printf(" wrlk held %.3f msec\n",
     //    (double) mDebugTimer.durationUsecs() / 1000.0);
 #endif
-    // mWriteWaiter.signal();       // should other writers get first dibs?
+    mWriteWaiter.signal();         // should other writers get first dibs?
     //printf("+++ signaling readers (if any)\n");
     mReadWaiter.broadcast();        // wake all readers (if any)
     mLock.unlock();
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 1446fb2..5b90bf0 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -463,6 +463,8 @@
 
 // ----------------------------------------------------------------------------
 
+#define VERSION_MAJOR 1
+#define VERSION_MINOR 2
 static char const * const gVendorString     = "Google Inc.";
 static char const * const gVersionString    = "1.2 Android Driver";
 static char const * const gClientApiString  = "OpenGL ES";
@@ -1002,8 +1004,8 @@
     }
 
     if (res == EGL_TRUE) {
-        if (major != NULL) *major = 1;
-        if (minor != NULL) *minor = 2;
+        if (major != NULL) *major = VERSION_MAJOR;
+        if (minor != NULL) *minor = VERSION_MINOR;
     }
     return res;
 }
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index e35773e..687c8bc 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -50,8 +50,8 @@
 namespace android {
 // ----------------------------------------------------------------------------
 
-#define VERSION_MINOR 1
-#define VERSION_MAJOR 4
+#define VERSION_MAJOR 1
+#define VERSION_MINOR 4
 static char const * const gVendorString     = "Android";
 static char const * const gVersionString    = "1.31 Android META-EGL";
 static char const * const gClientApiString  = "OpenGL ES";
@@ -648,8 +648,8 @@
     }
 
     if (res == EGL_TRUE) {
-        if (major != NULL) *major = 1;
-        if (minor != NULL) *minor = 2;
+        if (major != NULL) *major = VERSION_MAJOR;
+        if (minor != NULL) *minor = VERSION_MINOR;
         return EGL_TRUE;
     }
     return setError(EGL_NOT_INITIALIZED, EGL_FALSE);
