stagefright: Fix "add an extra buffer to ANW's BUfferQueue"

OMAP devices, such as maguro, don't work properly with an extra buffer.
This fixes the commit 2bce3e06f60a8d60c81261b0438d0cc6f2bbe7d1.

Change-Id: Id78442831e95b6021ea8b6d3648678db094f4565
frameworks/av: Enable subsystem re-start for LPA/Tunnel

-Audio Daemon in Audio HAL intimates AudioFlinger
 of ADSP status (online/offline) using set_paramaters.
-AudioFlinger send set_parameters to its clients
 which is DirectTrack used for LPA/Tunnel playback.
-In case of ADSP crash during LPA/Tunnel playback,
 clean up of DirectTrack is initiated.

Change-Id: I87f720f305765e00e12032eed3e018aeff952390
(cherry picked from commit 02861e0f092c46640576bb8c700418ed82c266c3)
(cherry picked from commit 5abe97aa9e103420813b87e7abb2b676ffe8d097)
(cherry picked from commit 9a27f1e6c449585095e518f0d2f44e621ef18f52)
Revert extra buffer hack.

 * Breaks too many things, and this is an awful hack anyway.

Revert "stagefright: Fix "add an extra buffer to ANW's BUfferQueue""

This reverts commit dbb2bb90acd47a53d84809b1aa150bac6093f752.

Revert "stagefright: add an extra buffer to ANW's BUfferQueue"

This reverts commit 2bce3e06f60a8d60c81261b0438d0cc6f2bbe7d1.
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
camera: Handle the num-jpegs-per-shutter mode

 * M7 will set this value to 1, but set the number of burst shots to 3.
 * We need to call takePicture on the hardware a number of times before
   accepting the jpeg.

Change-Id: I169ee3139e8643a39133d7385afe2f88982a1612
Merge remote-tracking branch 'aokp/kitkat' into kitkat
Added Camera Parameters for Samsung Legacy QCOM Camera

This adds the Missing Legacy Samsung Camera Parameters to load the Camera HAL

Change-Id: If3c6802a2fae5daedd8ec0b81c65ca5fab145995