libstagefright: refactor Legacy LPA makefile

  - add in msm7x27a
  - remove unused USE_LPA_MODE flag

Change-Id: I9e8d9376e1cfbd37e6457c0fd8e6252848f6b24d
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
libstagefright: Add support for custom LPA buffer size in legacy LPAPlayer

     - on msm7x27a with bootloader heap for lpa audio during audio playback with,
       DSP Manager effects enabled there is a lot of stuttering with the default buffer size.
       with bl heap we need buffer size of 480, but that breaks audio at in cm. So we have,
       to use buffer size of 512 to get audio working but it makes stuttering as mentioned.
       so add support for a custom buffer size so we can use 480 buffer size.

Change-Id: Ib4b5222b4b64d42288e0ad5c95910e385d172374
Revert "audio:Avoid AudioTrackThread if Track creation fails"

This reverts commit b96f07930159ebbdcd44645ac62604ff6cbddfc7.

Change-Id: Iae20ed1c59a206450b3de18118b1b9c4a8a469c5
audioflinger: only exchange AUDIO_SOURCE_HOTWORD when using pre-kitkat audio-policy

Change-Id: I46bb3074484853682c75ddc417e77b6ae846136c
Revert "Fix decoder EOS handling"

 * This is causing carnage for apps and games which make assumptions
   about the (bad) behavior of EOS handling. While this patch makes
   it consistent across the board, let's stay bug-for-bug compatible.
 * L is going to break a lot of shit :(

This reverts commit ff9a42d3c4460714dcb963f1a9f22f06a8f7fc8d.

Change-Id: Iab33edf64f5ec02e4391713e2bd0630ea056b3fd
Merge "Revert "Fix decoder EOS handling"" into cm-11.0
ENGR00294739 coreimage, screenrecord sometimes fail when shift different video

The recorder exit because can't request encoder buffer. In this case,
sample table is not written to the mp4 file, so can't play.
Make sure the sample table is written can fix it.

Change-Id: Ia38e28d4a9a10a70bb352b03dd17a62d090c9ad4
stagefright: Move to 64 available tracks

Many games use numerous tracks.  If the system
runs out of tracks, new tracks won't be able
to be created.  This has been causing notifications
not to play if many apps are holding open tracks.

Issue: BACON-6

Change-Id: I9cea51b9bd678feba31a88e17dd22083b01d81de
stagefright: stop audio source if player fails to start

Change-Id: I70083f8bfe8409283e52eea017d27d94767c5244
Merge "stagefright: stop audio source if player fails to start" into cm-11.0
Merge "stagefright: Move to 64 available tracks" into cm-11.0
stagefright: Fix 24-bit WAV

 * When 24-bit output is enabled, we need to ensure that padding
   to 32 bits is done correctly.
 * Create new output buffers which conform to the correct format.

Change-Id: I5c07027ee8d3040147698c1f484b40991f943c03
cameraservice: Resolve message vs start/stop preview races

Move the mutex in start/stopPreview to include the metadata message
management. Fast start/stop sequences could (and would) eventually
cause the messages to be enabled/disabled out of sequence (or while
the camera wasn't ready for it)

Fixes BACON-173

Change-Id: I367bc45729ce2e858fea972f35e881a755c6021a
Revert "audio: ID3 tags of most chinese songs display messy"

This reverts commit b8c58116a5850b2daf8d9dde91623dd335737635.

This change causes encoding issues if one has files in a non-UTF8
encoding and uses en_US locale. For details, refer to the JIRA ticket.

JIRA: CYAN-3511
Change-Id: I64751297283038b570cce1eec173f3fbc08db83f
Merge remote-tracking branch 'cm/cm-11.0' into kitkat