[Galaxy Tab 2 (Unified 7" + 10.1") Android Developm] Mighty:
@RDS5 for the next espressowifi builds please apply these changes

user@mighty:~/android/lineage/frameworks/av$ git diff
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index def8ada..52d6942 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1182,6 +1182,12 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
// 2. try to allocate two (2) additional buffers to reduce starvation from
// the consumer
// plus an extra buffer to account for incorrect minUndequeuedBufs
+#ifdef BOARD_CANT_REALLOCATE_OMX_BUFFERS
+ // Some devices don't like to set OMX_IndexParamPortDefinition at this
+ // point (even with an unmodified def), so skip it if possible.
+ // This check was present in KitKat.
+ if (def.nBufferCountActual < def.nBufferCountMin + *minUndequeuedBuffers) {
+#endif
for (OMX_U32 extraBuffers = 2 + 1; /* condition inside loop */; extraBuffers--) {
OMX_U32 newBufferCount =
def.nBufferCountMin + *minUndequeuedBuffers + extraBuffers;
@@ -1201,6 +1207,9 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
return err;
}
}
+#ifdef BOARD_CANT_REALLOCATE_OMX_BUFFERS
+ }
+#endif

err = native_window_set_buffer_count(
mNativeWindow.get(), def.nBufferCountActual);
diff --git a/media/libstagefright/Android.bp b/media/libstagefright/Android.bp
index c8d4e4a..f03caa9 100644
--- a/media/libstagefright/Android.bp
+++ b/media/libstagefright/Android.bp
@@ -139,6 +139,7 @@ cc_library_shared {
"-Werror",
"-Wno-error=deprecated-declarations",
"-Wall",
+ "-DBOARD_CANT_REALLOCATE_OMX_BUFFERS",
],

product_variables: {
diff --git a/media/libstagefright/omx/OMXUtils.cpp b/media/libstagefright/omx/OMXUtils.cpp
index 5894837..2373e7c 100644
--- a/media/libstagefright/omx/OMXUtils.cpp
+++ b/media/libstagefright/omx/OMXUtils.cpp
@@ -213,6 +213,7 @@ bool DescribeDefaultColorFormat(DescribeColorFormat2Params &params) {
fmt != OMX_COLOR_FormatYUV420PackedPlanar &&
fmt != OMX_COLOR_FormatYUV420SemiPlanar &&
fmt != OMX_COLOR_FormatYUV420PackedSemiPlanar &&
+ fmt != OMX_TI_COLOR_FormatYUV420PackedSemiPlanar &&
fmt != (OMX_COLOR_FORMATTYPE)HAL_PIXEL_FORMAT_YV12) {
ALOGW("do not know color format 0x%x = %d", fmt, fmt);
return false;
@@ -289,6 +290,7 @@ bool DescribeDefaultColorFormat(DescribeColorFormat2Params &params) {
case OMX_COLOR_FormatYUV420SemiPlanar:
// FIXME: NV21 for sw-encoder, NV12 for decoder and hw-encoder
case OMX_COLOR_FormatYUV420PackedSemiPlanar:
+ case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar:
// NV12
image.mPlane[image.U].mOffset = params.nStride * params.nSliceHeight;
image.mPlane[image.U].mColInc = 2;

and

user@mighty:~/android/lineage/frameworks/native$ git diff
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index fab3795..1cab108 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -58,6 +58,10 @@ else
LOCAL_SRC_FILES += \
SurfaceFlinger_hwc1.cpp \
DisplayHardware/HWComposer_hwc1.cpp
+
+ ifeq ($(OMAP_ENHANCEMENT),true)
+ LOCAL_CFLAGS += -DOMAP_ENHANCEMENT
+ endif
endif

LOCAL_CFLAGS += -fvisibility=hidden -Werror=format
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer_hwc1.cpp b/services/surfaceflinger/DisplayHardware/HWComposer_hwc1.cpp
index dcb2913..2489fb6 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer_hwc1.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer_hwc1.cpp
@@ -111,6 +111,10 @@ HWComposer::HWComposer(
int fberr = loadFbHalModule();
loadHwcModule();

+#ifdef OMAP_ENHANCEMENT
+ // FB HAL must stay open independent of HWC API version. Closing FB HAL will
+ // result in destruction of flip chain and de-allocation of framebuffer.
+#else
if (mFbDev && mHwc && hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) {
// close FB HAL if we don't needed it.
// FIXME: this is temporary until we're not forced to open FB HAL
@@ -118,6 +122,7 @@ HWComposer::HWComposer(
framebuffer_close(mFbDev);
mFbDev = NULL;
}
+#endif

// If we have no HWC, or a pre-1.1 HWC, an FB dev is mandatory.
if ((!mHwc || !hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1))
@@ -166,7 +171,11 @@ HWComposer::HWComposer(
}
}

+#ifdef OMAP_ENHANCEMENT
+ if (!mHwc || !hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) {
+#else
if (mFbDev) {
+#endif
ALOG_ASSERT(!(mHwc && hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)),
"should only have fbdev if no hwc or hwc is 1.0");

@@ -424,7 +433,12 @@ status_t HWComposer::queryDisplayProperties(int disp) {
}

// FIXME: what should we set the format to?
+#ifdef OMAP_ENHANCEMENT
+ // Use pixel format native to DSS HW
+ mDisplayData[disp].format = HAL_PIXEL_FORMAT_BGRA_8888;
+#else
mDisplayData[disp].format = HAL_PIXEL_FORMAT_RGBA_8888;
+#endif
mDisplayData[disp].connected = true;
return NO_ERROR;
}
@@ -853,7 +867,12 @@ int HWComposer::getVisualID() const {
// FIXME: temporary hack until HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED
// is supported by the implementation. we can only be in this case
// if we have HWC 1.1
+#ifdef OMAP_ENHANCEMENT
+ // Use pixel format native to DSS HW
+ return HAL_PIXEL_FORMAT_BGRA_8888;
+#else
return HAL_PIXEL_FORMAT_RGBA_8888;
+#endif
//return HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED;
} else {
return mFbDev->format;

and https://github.com/Unlegacy-Android...mmit/33a389c88ec20f8e2370540738dc3cbbb499c516