Revert "Remove the no longer used PV software aac decoder."

This reverts commit 1f8834711f23f66d528aca98cca9602fb18cab66.

Conflicts:

	media/libstagefright/codecs/aacdec/Android.mk

Change-Id: I32347bb08d5b04b7e3068329a2ebfd497fd085cf

av: Don't use fraunhofer for ARMv6 devices

Using fraunhofer on ARMv6 devices does not work - it causes a sigsev. Don't use it if ARMv7A is not present

Change-Id: I67e200ac2c1ab17a5c051fc5bc735ed7b1e5f21f

Fix build
(cherry picked from commit 9ea13d2f40b9d89edf817de829d6010c32592cbd)

Change-Id: Ic692f7b80c000842d9c70931a53aeece22a62b35
libstagefright: Enable meta mode for 7x27a video encoder

msm7627a family of chipsets supports only one input frame at
one time. camera expects the input frame to be released before
sending another frame. so send one input buffer and available
output bufefrs to video encoder component. Release the input
buffer to camera (to get another frame) after receiving input
frame done callback from video encoder component.

Change-Id: I8fbc911f046ff7e2a3047dd65d8c09ac2d8608e2

Conflicts:
	media/libmediaplayerservice/Android.mk
legacy OMX: squashed commit for legacy OMX support

Enable by setting TARGET_QCOM_LEGACY_OMX := true in BoardConfig.mk.

This is a combination of 7 commits.

commit ff5604878d2bf74555adcf938ffbf98d04bea305
Author: Alexey Shavykin <ganster0x29@gmail.com>
Date:   Sun Oct 28 22:46:34 2012 +0200

    Added support legacy Qualcomm OpenMAX IL libs for MSM7x27

    Change-Id: I63e68e63fce955fef52813360032f5e8e90a4b92

commit 27cf702ac81f27cae206ef182420c1cbcdadb709
Author: Ganster41 <ganster0x29@gmail.com>
Date:   Mon Nov 19 15:35:36 2012 +0200

    Correct gralloc usage flags for renderer

commit 3feab8906fcb4464d5f46bc13dcae9da36e41040
Author: Conn O'Griofa <connogriofa@gmail.com>
Date:   Fri Jan 4 00:31:13 2013 -0200

    Fix legacy OMX encoders

    Ensure that a valid frame_rate is passed to the encoder, otherwise
    encoding will fail.

    Change-Id: Iaaa298496755ff405e393120973d1ed782f5d8f4

commit f03627bce1de975ad9b88206874dda851b7d2bf4
Author: Grigori Goronzy <greg@blackbox>
Date:   Sat Jan 19 18:26:25 2013 +0100

    Fix alignment and copy size for legacy QCOM OMX

    Change-Id: I6d13c67601da0f0c35d3dd455401f982406cefe3

commit 3e6134027e9faa6b24b1cb1d205e4de0e76f9ed2
Author: Ganster41 <ganster0x29@gmail.com>
Date:   Sat Jan 5 19:33:44 2013 +0200

    Fixed Gingerbread mmparser using

    Change-Id: Ib931fa6ed4522b5851d42297f929183cf76043fd

commit 25edf9884ebbd3c608edc88d8bd8a7196d58b190
Author: Ganster41 <ganster0x29@gmail.com>
Date:   Mon Jan 7 19:56:32 2013 +0200

    Try use ExtendedExtractor only if no suitable default extractors available f

    Change-Id: I57a9cc39caee7e3fa2b709ab09cca5629bf81f44

commit 9e983100a684493d6c2df7952af4fa04f252c19b
Author: Konsta <konsta09@gmail.com>
Date:   Sun Oct 6 20:30:50 2013 +0300

    legacy OMX: use local flags

    Allows use of legacy mmparser without enabling all QCOM A/V
    enhancements that are not supported with legacy OMX blobs.

    Change-Id: Ieccf29ed8036864634ee167c1e21908377516494

Change-Id: Ieccf29ed8036864634ee167c1e21908377516494

Conflicts:
	media/libstagefright/Android.mk

Conflicts:
	include/media/stagefright/DataSource.h
	media/libstagefright/DataSource.cpp
	media/libstagefright/OMXCodec.cpp
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0
audio: Modified API for compress voip formats

 - Modified API for supported compress voip formats.

Change-Id: I0165fc48bbe631d3febf2104e8a28708bf85ef23
audio: do not invalidate stream used by voip

During the process of invalidation of voip streams,
actual driver is not closed so when it tries to open again
getoutput fails as only one instance of voip can be created.
so do not invalidate the tracks used by voip driver.
CRs-Fixed: 494093

Change-Id: I42a962991ce1d586d87f4aecba19c0e5dde6b9dd
audio: Fix for OMXCodec::read() getting blocked

- Sometimes notification sound is not heard if it is played
  and stopped multiple times in a short duration.
- If OMXCodec::read() gets blocked for filled buffers while
  in pause, it never returns as mFilledBuffers is always empty.
  Due to this AudioTrack destructor never exits as it waits for
  the AudioCallback thread to unblock it.
- Ensure OMXCodec::read() returns even if timeout occurs while
  in pause and handle the same in AudioPlayer by returning zero
  bytes in AudioCallback.
CRs-Fixed: 478768

Change-Id: I2ca40a673fdf95bccc3069a18b694670612a9895
 audio: Fix framecount calculation in AudioFlinger

 -Sharedblock implementation expects the framecount to
  be round up to the next highest power of 2. This is
  not done in TrackBase for non-voip case which leads
  to shared block getting corrupted.
 -Fix is to round up the framecount in TrackBase for
  all the audio formats.

  CRs-Fixed:  571279, 573735

Change-Id: I0186bb0e04a080100b364aead447ff2fce495ca2
Audio: Tunnel Exception for AAC main profile format

- Audio is not decoding properly for some mp4 content

- ADSP audio decoders don't support aac main profile

- Added tunnel exception for AAC main profile format

Change-Id: I8470457492e32d94ab36eea7b97f4e4ec8776bb4
NuPlayer: Check if video input format is NULL

Adds null check on querying for video input format metadata.
CRs-Fixed: 582533

Change-Id: I3832de56f67bf8e6b4abb426c6e539dd66009fa5
libstagefright: Do not use offload playback for DRM content

- Check DRM handle before checking canOffloadStream.
  Do not use offload playback for DRM contents

Change-Id: I519ab05ffe7812968cccc7beaa16709959cf7a53
CRs-Fixed: 587600
libmedia: Increase offload shared buffer size

Ensure that AudioTrack and OffloadThread share at least twice fragment
size worth of buffer space. This helps avoid failure to restart
on an underrun

Change-Id: I4dd9e5e5a7c8aebb34b13f2e6626b73adc2ba557
Camera: Rotate display if app doesn't use setDisplayOrientation.

Third party application not following setDisplayOrientation
logic properly and as a result preview used to come inverted.

Fix made to track setDisplayOrientation call invocation and
if no call had been made then, rotate the buffers accordingly.

Change-Id: I9eac28396c4ce8844bf6a4f19ee7650a620ff4a5
CRs-fixed: 575558
stagefright: Cleanup ifdefs in pause code

Change-Id: I01ec529811c664fb90f7ccd23c2df561b5504f7c