From 78e8d9f6068a8644f5bd19a46786d0bda0e8eeab Mon Sep 17 00:00:00 2001 From: Dheeraj CVR Date: Sat, 29 Jun 2013 04:12:48 +0530 Subject: libstagefright: [Reworked] Fix incorrectness nPortIndex value for QueryCodec http://review.cyanogenmod.org/#/c/32358/ was intended to fix issues with OMX Components failing on ME722 (OMAP3). This patch was working fine on OMAP3 devices and was required to fix issues DSP MMU FAULTS. It has been reverted with patch http://review.cyanogenmod.org/44486 which again broke OMX on OMAP3. Implement a Workaround for OMAP using OMAP_ENHANCEMENT Log for this issue observed on P970 (OMAP3) during Gallery Thumbnail Generation: http://pastebin.com/qRTpm7RN DmmMap():1600 DSPProcessor_ReserveMemory() failed - error 0xfffffffb Change-Id: Ifd0c784e354c6c00401686cc0f2188842df9496c --- media/libstagefright/OMXCodec.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index efb5f26..91ba093 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -5432,7 +5432,11 @@ status_t QueryCodec( // Color format query OMX_VIDEO_PARAM_PORTFORMATTYPE portFormat; InitOMXParams(&portFormat); +#ifdef OMAP_ENHANCEMENT + portFormat.nPortIndex = !isEncoder ? 0 : 1; +#else portFormat.nPortIndex = !isEncoder ? 1 : 0; +#endif for (OMX_U32 index = 0;;index++) { portFormat.nIndex = index; err = omx->getParameter( -- cgit v1.1