diff --git a/api/current.txt b/api/current.txt
index f4bfced..f7d6bce 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -22105,8 +22105,11 @@
   public class Gravity {
     ctor public Gravity();
     method public static void apply(int, int, int, android.graphics.Rect, android.graphics.Rect);
+    method public static void apply(int, int, int, android.graphics.Rect, android.graphics.Rect, int);
     method public static void apply(int, int, int, android.graphics.Rect, int, int, android.graphics.Rect);
+    method public static void apply(int, int, int, android.graphics.Rect, int, int, android.graphics.Rect, int);
     method public static void applyDisplay(int, android.graphics.Rect, android.graphics.Rect);
+    method public static void applyDisplay(int, android.graphics.Rect, android.graphics.Rect, int);
     method public static int getAbsoluteGravity(int, int);
     method public static boolean isHorizontal(int);
     method public static boolean isVertical(int);
diff --git a/core/java/android/view/Gravity.java b/core/java/android/view/Gravity.java
index 63f5ec1..f031fe7 100644
--- a/core/java/android/view/Gravity.java
+++ b/core/java/android/view/Gravity.java
@@ -153,7 +153,8 @@
      *                container.
      * @param layoutDirection The layout direction.
      *
-     * @hide
+     * @see {@link View#LAYOUT_DIRECTION_LTR}
+     * @see {@link View#LAYOUT_DIRECTION_RTL}
      */
     public static void apply(int gravity, int w, int h, Rect container,
             Rect outRect, int layoutDirection) {
@@ -268,6 +269,37 @@
     }
 
     /**
+     * Apply a gravity constant to an object.
+     *
+     * @param gravity The desired placement of the object, as defined by the
+     *                constants in this class.
+     * @param w The horizontal size of the object.
+     * @param h The vertical size of the object.
+     * @param container The frame of the containing space, in which the object
+     *                  will be placed.  Should be large enough to contain the
+     *                  width and height of the object.
+     * @param xAdj Offset to apply to the X axis.  If gravity is LEFT this
+     *             pushes it to the right; if gravity is RIGHT it pushes it to
+     *             the left; if gravity is CENTER_HORIZONTAL it pushes it to the
+     *             right or left; otherwise it is ignored.
+     * @param yAdj Offset to apply to the Y axis.  If gravity is TOP this pushes
+     *             it down; if gravity is BOTTOM it pushes it up; if gravity is
+     *             CENTER_VERTICAL it pushes it down or up; otherwise it is
+     *             ignored.
+     * @param outRect Receives the computed frame of the object in its
+     *                container.
+     * @param layoutDirection The layout direction.
+     *
+     * @see {@link View#LAYOUT_DIRECTION_LTR}
+     * @see {@link View#LAYOUT_DIRECTION_RTL}
+     */
+    public static void apply(int gravity, int w, int h, Rect container,
+                             int xAdj, int yAdj, Rect outRect, int layoutDirection) {
+        int absGravity = getAbsoluteGravity(gravity, layoutDirection);
+        apply(absGravity, w, h, container, xAdj, yAdj, outRect);
+    }
+
+    /**
      * Apply additional gravity behavior based on the overall "display" that an
      * object exists in.  This can be used after
      * {@link #apply(int, int, int, Rect, int, int, Rect)} to place the object
@@ -320,7 +352,32 @@
             }
         }
     }
-    
+
+    /**
+     * Apply additional gravity behavior based on the overall "display" that an
+     * object exists in.  This can be used after
+     * {@link #apply(int, int, int, Rect, int, int, Rect)} to place the object
+     * within a visible display.  By default this moves or clips the object
+     * to be visible in the display; the gravity flags
+     * {@link #DISPLAY_CLIP_HORIZONTAL} and {@link #DISPLAY_CLIP_VERTICAL}
+     * can be used to change this behavior.
+     *
+     * @param gravity Gravity constants to modify the placement within the
+     * display.
+     * @param display The rectangle of the display in which the object is
+     * being placed.
+     * @param inoutObj Supplies the current object position; returns with it
+     * modified if needed to fit in the display.
+     * @param layoutDirection The layout direction.
+     *
+     * @see {@link View#LAYOUT_DIRECTION_LTR}
+     * @see {@link View#LAYOUT_DIRECTION_RTL}
+     */
+    public static void applyDisplay(int gravity, Rect display, Rect inoutObj, int layoutDirection) {
+        int absGravity = getAbsoluteGravity(gravity, layoutDirection);
+        applyDisplay(absGravity, display, inoutObj);
+    }
+
     /**
      * <p>Indicate whether the supplied gravity has a vertical pull.</p>
      *
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 7a1923b..e7bc74c 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -9819,8 +9819,8 @@
      *
      * @param layoutDirection the direction of the layout
      *
-     * {@link #LAYOUT_DIRECTION_LTR}
-     * {@link #LAYOUT_DIRECTION_RTL}
+     * @see {@link #LAYOUT_DIRECTION_LTR}
+     * @see {@link #LAYOUT_DIRECTION_RTL}
      */
     public void onPaddingChanged(int layoutDirection) {
     }
diff --git a/core/tests/coretests/src/android/view/GravityTest.java b/core/tests/coretests/src/android/view/GravityTest.java
deleted file mode 100644
index d8ef650..0000000
--- a/core/tests/coretests/src/android/view/GravityTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.view;
-
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-public class GravityTest extends AndroidTestCase {
-
-    @SmallTest
-    public void testGetAbsoluteGravity() throws Exception {
-        assertOneGravity(Gravity.LEFT, Gravity.LEFT, false);
-        assertOneGravity(Gravity.LEFT, Gravity.LEFT, true);
-
-        assertOneGravity(Gravity.RIGHT, Gravity.RIGHT, false);
-        assertOneGravity(Gravity.RIGHT, Gravity.RIGHT, true);
-
-        assertOneGravity(Gravity.TOP, Gravity.TOP, false);
-        assertOneGravity(Gravity.TOP, Gravity.TOP, true);
-
-        assertOneGravity(Gravity.BOTTOM, Gravity.BOTTOM, false);
-        assertOneGravity(Gravity.BOTTOM, Gravity.BOTTOM, true);
-
-        assertOneGravity(Gravity.CENTER_VERTICAL, Gravity.CENTER_VERTICAL, false);
-        assertOneGravity(Gravity.CENTER_VERTICAL, Gravity.CENTER_VERTICAL, true);
-
-        assertOneGravity(Gravity.CENTER_HORIZONTAL, Gravity.CENTER_HORIZONTAL, false);
-        assertOneGravity(Gravity.CENTER_HORIZONTAL, Gravity.CENTER_HORIZONTAL, true);
-
-        assertOneGravity(Gravity.CENTER, Gravity.CENTER, false);
-        assertOneGravity(Gravity.CENTER, Gravity.CENTER, true);
-
-        assertOneGravity(Gravity.FILL_VERTICAL, Gravity.FILL_VERTICAL, false);
-        assertOneGravity(Gravity.FILL_VERTICAL, Gravity.FILL_VERTICAL, true);
-
-        assertOneGravity(Gravity.FILL_HORIZONTAL, Gravity.FILL_HORIZONTAL, false);
-        assertOneGravity(Gravity.FILL_HORIZONTAL, Gravity.FILL_HORIZONTAL, true);
-
-        assertOneGravity(Gravity.FILL, Gravity.FILL, false);
-        assertOneGravity(Gravity.FILL, Gravity.FILL, true);
-
-        assertOneGravity(Gravity.CLIP_HORIZONTAL, Gravity.CLIP_HORIZONTAL, false);
-        assertOneGravity(Gravity.CLIP_HORIZONTAL, Gravity.CLIP_HORIZONTAL, true);
-
-        assertOneGravity(Gravity.CLIP_VERTICAL, Gravity.CLIP_VERTICAL, false);
-        assertOneGravity(Gravity.CLIP_VERTICAL, Gravity.CLIP_VERTICAL, true);
-
-        assertOneGravity(Gravity.LEFT, Gravity.START, false);
-        assertOneGravity(Gravity.RIGHT, Gravity.START, true);
-
-        assertOneGravity(Gravity.RIGHT, Gravity.END, false);
-        assertOneGravity(Gravity.LEFT, Gravity.END, true);
-    }
-
-    private void assertOneGravity(int expected, int initial, boolean isRtl) {
-        final int layoutDirection = isRtl ? View.LAYOUT_DIRECTION_RTL : View.LAYOUT_DIRECTION_LTR;
-
-        assertEquals(expected, Gravity.getAbsoluteGravity(initial, layoutDirection));
-    }
-}
diff --git a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/include/FwdLockEngine.h b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/include/FwdLockEngine.h
index 34804cf..c0e408e 100644
--- a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/include/FwdLockEngine.h
+++ b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/include/FwdLockEngine.h
@@ -499,6 +499,14 @@
 
 private:
 
+    static const String8 Description;
+    static const String8 FileSuffixes[];
+    static const String8 MimeTypes[];
+    static bool IsFileSuffixSupported(const String8& suffix);
+    static bool IsMimeTypeSupported(const String8& mime);
+    static void AddSupportedMimeTypes(DrmSupportInfo *info);
+    static void AddSupportedFileSuffixes(DrmSupportInfo *info);
+
 /**
  * Session Class for Forward Lock Conversion. An object of this class is created
  * for every conversion.
diff --git a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/include/FwdLockEngineConst.h b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/include/FwdLockEngineConst.h
deleted file mode 100644
index da95d60..0000000
--- a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/include/FwdLockEngineConst.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __FWDLOCKENGINECONST_H__
-#define __FWDLOCKENGINECONST_H__
-
-namespace android {
-
-/**
- * Constants for forward Lock Engine used for exposing engine's capabilities.
- */
-#define FWDLOCK_EXTENSION_FL           ("FL")
-#define FWDLOCK_DOTEXTENSION_FL        (".fl")
-#define FWDLOCK_MIMETYPE_FL            ("application/x-android-drm-fl")
-
-#define FWDLOCK_EXTENSION_DM           ("DM")
-#define FWDLOCK_DOTEXTENSION_DM        (".dm")
-#define FWDLOCK_MIMETYPE_DM            ("application/vnd.oma.drm.message")
-
-#define FWDLOCK_DESCRIPTION            ("OMA V1 Forward Lock")
-
-};
-
-#endif /* __FWDLOCKENGINECONST_H__ */
diff --git a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
index 0273a4b..5ee41e6 100644
--- a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
+++ b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
@@ -35,7 +35,6 @@
 #include "FwdLockConv.h"
 #include "FwdLockFile.h"
 #include "FwdLockGlue.h"
-#include "FwdLockEngineConst.h"
 #include "MimeTypeUtil.h"
 
 #undef LOG_TAG
@@ -160,6 +159,48 @@
     return DRM_NO_ERROR;
 }
 
+const String8 FwdLockEngine::FileSuffixes[] = {
+    String8(".fl"),
+    String8(".dm"),
+};
+
+const String8 FwdLockEngine::MimeTypes[] = {
+    String8("application/x-android-drm-fl"),
+    String8("application/vnd.oma.drm.message"),
+};
+
+const String8 FwdLockEngine::Description("OMA V1 Forward Lock");
+
+void FwdLockEngine::AddSupportedMimeTypes(DrmSupportInfo *info) {
+    for (size_t i = 0, n = sizeof(MimeTypes)/sizeof(MimeTypes[0]); i < n; ++i) {
+        info->addMimeType(MimeTypes[i]);
+    }
+}
+
+void FwdLockEngine::AddSupportedFileSuffixes(DrmSupportInfo *info) {
+    for (size_t i = 0, n = sizeof(FileSuffixes)/sizeof(FileSuffixes[0]); i < n; ++i) {
+        info->addFileSuffix(FileSuffixes[i]);
+    }
+}
+
+bool FwdLockEngine::IsMimeTypeSupported(const String8& mime) {
+    for (size_t i = 0, n = sizeof(MimeTypes)/sizeof(MimeTypes[0]); i < n; ++i) {
+        if (mime == MimeTypes[i]) {
+            return true;
+        }
+    }
+    return false;
+}
+
+bool FwdLockEngine::IsFileSuffixSupported(const String8& suffix) {
+    for (size_t i = 0, n = sizeof(FileSuffixes)/sizeof(FileSuffixes[0]); i < n; ++i) {
+        if (suffix == FileSuffixes[i]) {
+            return true;
+        }
+    }
+    return false;
+}
+
 DrmSupportInfo* FwdLockEngine::onGetSupportInfo(int uniqueId) {
     DrmSupportInfo* pSupportInfo = new DrmSupportInfo();
 
@@ -167,12 +208,9 @@
 
     // fill all Forward Lock mimetypes and extensions
     if (NULL != pSupportInfo) {
-        pSupportInfo->addMimeType(String8(FWDLOCK_MIMETYPE_FL));
-        pSupportInfo->addFileSuffix(String8(FWDLOCK_DOTEXTENSION_FL));
-        pSupportInfo->addMimeType(String8(FWDLOCK_MIMETYPE_DM));
-        pSupportInfo->addFileSuffix(String8(FWDLOCK_DOTEXTENSION_DM));
-
-        pSupportInfo->setDescription(String8(FWDLOCK_DESCRIPTION));
+        AddSupportedMimeTypes(pSupportInfo);
+        AddSupportedFileSuffixes(pSupportInfo);
+        pSupportInfo->setDescription(Description);
     }
 
     return pSupportInfo;
@@ -182,14 +220,8 @@
     bool result = false;
 
     String8 extString = path.getPathExtension();
-
     extString.toLower();
-
-    if ((extString == String8(FWDLOCK_DOTEXTENSION_FL)) ||
-        (extString == String8(FWDLOCK_DOTEXTENSION_DM))) {
-        result = true;
-    }
-    return result;
+    return IsFileSuffixSupported(extString);
 }
 
 DrmInfoStatus* FwdLockEngine::onProcessDrmInfo(int uniqueId, const DrmInfo* drmInfo) {
@@ -308,8 +340,7 @@
     *    (regardless of the relation between them to make it compatible with other DRM Engines)
     */
     if (((0 == path.length()) || onCanHandle(uniqueId, path)) &&
-        ((0 == mimeType.length()) || ((mimeStr == String8(FWDLOCK_MIMETYPE_FL)) ||
-        (mimeStr == String8(FWDLOCK_MIMETYPE_DM)))) && (mimeType != path) ) {
+        ((0 == mimeType.length()) || IsMimeTypeSupported(mimeType)) && (mimeType != path) ) {
             return DrmObjectType::CONTENT;
     }
 
diff --git a/libs/rs/Android.mk b/libs/rs/Android.mk
index 45ed453..f92741c 100644
--- a/libs/rs/Android.mk
+++ b/libs/rs/Android.mk
@@ -1,6 +1,41 @@
 
 LOCAL_PATH:=$(call my-dir)
 
+include $(CLEAR_VARS)
+LOCAL_MODULE := libRSDriver
+
+LOCAL_SRC_FILES:= \
+	driver/rsdAllocation.cpp \
+	driver/rsdBcc.cpp \
+	driver/rsdCore.cpp \
+	driver/rsdFrameBuffer.cpp \
+	driver/rsdFrameBufferObj.cpp \
+	driver/rsdGL.cpp \
+	driver/rsdMesh.cpp \
+	driver/rsdMeshObj.cpp \
+	driver/rsdPath.cpp \
+	driver/rsdProgram.cpp \
+	driver/rsdProgramRaster.cpp \
+	driver/rsdProgramStore.cpp \
+	driver/rsdRuntimeMath.cpp \
+	driver/rsdRuntimeStubs.cpp \
+	driver/rsdSampler.cpp \
+	driver/rsdShader.cpp \
+	driver/rsdShaderCache.cpp \
+	driver/rsdVertexArray.cpp
+
+LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2
+LOCAL_SHARED_LIBRARIES += libbcc libbcinfo libgui
+
+LOCAL_C_INCLUDES += external/zlib dalvik
+LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
+
+LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter -Wno-unused-variable
+
+LOCAL_LDLIBS := -lpthread -ldl
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_LIBRARY)
 
 # Build rsg-generator ====================
 include $(CLEAR_VARS)
@@ -23,19 +58,6 @@
 # TODO: This should go into build/core/config.mk
 RSG_GENERATOR:=$(LOCAL_BUILT_MODULE)
 
-# include $(CLEAR_VARS)
-# input_data_file := $(LOCAL_PATH)/rslib.bc
-# slangdata_output_var_name := rs_runtime_lib_bc
-# LOCAL_MODULE := librslib_rt
-
-# LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-
-# LOCAL_MODULE_TAGS := optional
-# include frameworks/compile/slang/SlangData.mk
-# include $(BUILD_STATIC_LIBRARY)
-
-# Build render script lib ====================
-
 include $(CLEAR_VARS)
 LOCAL_MODULE := libRS
 
@@ -110,24 +132,6 @@
 	rsStream.cpp \
 	rsThreadIO.cpp \
 	rsType.cpp \
-	driver/rsdAllocation.cpp \
-	driver/rsdBcc.cpp \
-	driver/rsdCore.cpp \
-	driver/rsdFrameBuffer.cpp \
-	driver/rsdFrameBufferObj.cpp \
-	driver/rsdGL.cpp \
-	driver/rsdMesh.cpp \
-	driver/rsdMeshObj.cpp \
-	driver/rsdPath.cpp \
-	driver/rsdProgram.cpp \
-	driver/rsdProgramRaster.cpp \
-	driver/rsdProgramStore.cpp \
-	driver/rsdRuntimeMath.cpp \
-	driver/rsdRuntimeStubs.cpp \
-	driver/rsdSampler.cpp \
-	driver/rsdShader.cpp \
-	driver/rsdShaderCache.cpp \
-	driver/rsdVertexArray.cpp \
 	RenderScript.cpp \
 	BaseObj.cpp \
 	Element.cpp \
@@ -136,9 +140,10 @@
 	Script.cpp \
 	ScriptC.cpp
 
-LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc libbcinfo libgui
+LOCAL_SHARED_LIBRARIES += libz libcutils libutils libEGL libGLESv1_CM libGLESv2 libbcc
+LOCAL_SHARED_LIBRARIES += libui libbcinfo libgui
 
-LOCAL_STATIC_LIBRARIES := libdex libft2
+LOCAL_STATIC_LIBRARIES := libdex libft2 libRSDriver
 
 LOCAL_C_INCLUDES += external/freetype/include external/zlib dalvik
 LOCAL_C_INCLUDES += frameworks/compile/libbcc/include
diff --git a/media/libstagefright/WAVExtractor.cpp b/media/libstagefright/WAVExtractor.cpp
index 501f4806..c35a77a 100644
--- a/media/libstagefright/WAVExtractor.cpp
+++ b/media/libstagefright/WAVExtractor.cpp
@@ -28,15 +28,22 @@
 #include <media/stagefright/MediaSource.h>
 #include <media/stagefright/MetaData.h>
 #include <utils/String8.h>
+#include <cutils/bitops.h>
+
+#define CHANNEL_MASK_USE_CHANNEL_ORDER 0
 
 namespace android {
 
 enum {
-    WAVE_FORMAT_PCM = 1,
-    WAVE_FORMAT_ALAW = 6,
-    WAVE_FORMAT_MULAW = 7,
+    WAVE_FORMAT_PCM        = 0x0001,
+    WAVE_FORMAT_ALAW       = 0x0006,
+    WAVE_FORMAT_MULAW      = 0x0007,
+    WAVE_FORMAT_EXTENSIBLE = 0xFFFE
 };
 
+static const char* WAVEEXT_SUBFORMAT = "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71";
+
+
 static uint32_t U32_LE_AT(const uint8_t *ptr) {
     return ptr[3] << 24 | ptr[2] << 16 | ptr[1] << 8 | ptr[0];
 }
@@ -84,7 +91,8 @@
 
 WAVExtractor::WAVExtractor(const sp<DataSource> &source)
     : mDataSource(source),
-      mValidFormat(false) {
+      mValidFormat(false),
+      mChannelMask(CHANNEL_MASK_USE_CHANNEL_ORDER) {
     mInitCheck = init();
 }
 
@@ -161,21 +169,37 @@
                 return NO_INIT;
             }
 
-            uint8_t formatSpec[16];
-            if (mDataSource->readAt(offset, formatSpec, 16) < 16) {
+            uint8_t formatSpec[40];
+            if (mDataSource->readAt(offset, formatSpec, 2) < 2) {
                 return NO_INIT;
             }
 
             mWaveFormat = U16_LE_AT(formatSpec);
             if (mWaveFormat != WAVE_FORMAT_PCM
                     && mWaveFormat != WAVE_FORMAT_ALAW
-                    && mWaveFormat != WAVE_FORMAT_MULAW) {
+                    && mWaveFormat != WAVE_FORMAT_MULAW
+                    && mWaveFormat != WAVE_FORMAT_EXTENSIBLE) {
                 return ERROR_UNSUPPORTED;
             }
 
+            uint8_t fmtSize = 16;
+            if (mWaveFormat == WAVE_FORMAT_EXTENSIBLE) {
+                fmtSize = 40;
+            }
+            if (mDataSource->readAt(offset, formatSpec, fmtSize) < fmtSize) {
+                return NO_INIT;
+            }
+
             mNumChannels = U16_LE_AT(&formatSpec[2]);
-            if (mNumChannels != 1 && mNumChannels != 2) {
-                return ERROR_UNSUPPORTED;
+            if (mWaveFormat != WAVE_FORMAT_EXTENSIBLE) {
+                if (mNumChannels != 1 && mNumChannels != 2) {
+                    ALOGW("More than 2 channels (%d) in non-WAVE_EXT, unknown channel mask",
+                            mNumChannels);
+                }
+            } else {
+                if (mNumChannels < 1 && mNumChannels > 8) {
+                    return ERROR_UNSUPPORTED;
+                }
             }
 
             mSampleRate = U32_LE_AT(&formatSpec[4]);
@@ -186,7 +210,8 @@
 
             mBitsPerSample = U16_LE_AT(&formatSpec[14]);
 
-            if (mWaveFormat == WAVE_FORMAT_PCM) {
+            if (mWaveFormat == WAVE_FORMAT_PCM
+                    || mWaveFormat == WAVE_FORMAT_EXTENSIBLE) {
                 if (mBitsPerSample != 8 && mBitsPerSample != 16
                     && mBitsPerSample != 24) {
                     return ERROR_UNSUPPORTED;
@@ -199,6 +224,42 @@
                 }
             }
 
+            if (mWaveFormat == WAVE_FORMAT_EXTENSIBLE) {
+                uint16_t validBitsPerSample = U16_LE_AT(&formatSpec[18]);
+                if (validBitsPerSample != mBitsPerSample) {
+                    ALOGE("validBits(%d) != bitsPerSample(%d) are not supported",
+                            validBitsPerSample, mBitsPerSample);
+                    return ERROR_UNSUPPORTED;
+                }
+
+                mChannelMask = U32_LE_AT(&formatSpec[20]);
+                ALOGV("numChannels=%d channelMask=0x%x", mNumChannels, mChannelMask);
+                if ((mChannelMask >> 18) != 0) {
+                    ALOGE("invalid channel mask 0x%x", mChannelMask);
+                    return ERROR_MALFORMED;
+                }
+
+                if ((mChannelMask != CHANNEL_MASK_USE_CHANNEL_ORDER)
+                        && (popcount(mChannelMask) != mNumChannels)) {
+                    ALOGE("invalid number of channels (%d) in channel mask (0x%x)",
+                            popcount(mChannelMask), mChannelMask);
+                    return ERROR_MALFORMED;
+                }
+
+                // In a WAVE_EXT header, the first two bytes of the GUID stored at byte 24 contain
+                // the sample format, using the same definitions as a regular WAV header
+                mWaveFormat = U16_LE_AT(&formatSpec[24]);
+                if (mWaveFormat != WAVE_FORMAT_PCM
+                        && mWaveFormat != WAVE_FORMAT_ALAW
+                        && mWaveFormat != WAVE_FORMAT_MULAW) {
+                    return ERROR_UNSUPPORTED;
+                }
+                if (memcmp(&formatSpec[26], WAVEEXT_SUBFORMAT, 14)) {
+                    ALOGE("unsupported GUID");
+                    return ERROR_UNSUPPORTED;
+                }
+            }
+
             mValidFormat = true;
         } else if (!memcmp(chunkHeader, "data", 4)) {
             if (mValidFormat) {
@@ -224,6 +285,7 @@
                 }
 
                 mTrackMeta->setInt32(kKeyChannelCount, mNumChannels);
+                mTrackMeta->setInt32(kKeyChannelMask, mChannelMask);
                 mTrackMeta->setInt32(kKeySampleRate, mSampleRate);
 
                 size_t bytesPerSample = mBitsPerSample >> 3;
diff --git a/media/libstagefright/include/WAVExtractor.h b/media/libstagefright/include/WAVExtractor.h
index ce1f33a..c567ccd 100644
--- a/media/libstagefright/include/WAVExtractor.h
+++ b/media/libstagefright/include/WAVExtractor.h
@@ -47,6 +47,7 @@
     bool mValidFormat;
     uint16_t mWaveFormat;
     uint16_t mNumChannels;
+    uint32_t mChannelMask;
     uint32_t mSampleRate;
     uint16_t mBitsPerSample;
     off64_t mDataOffset;
