libstagefright: Add HEVC as a recognized MIME in ExtendedExtractor

For HEVC playback through ACodec, ExtendedExtractor needs to recognize
the HEVC mime type and set the appropriate role to the component.

Change-Id: I60e05f4f1e480e137401112431c5c8093e637d56
audioflinger: Fix for a deadlock

AudioFlinger enters a deadlock (with itself) on trying to free a
RecordTrack object that failed initialization. Clear this
bad object from the caller instead.

CRs-Fixed: 589020
Change-Id: I926f2beb922a70f6924e593e2bbf1a5b5df85b16
DTS Postpro integration (for frameworks/av)

Adds DTS Postpro support in <root>/frameworks/av

Change-Id: I46edfb41571574ffa52c3a3f301cc003f914b00a
libmedia: Add support for LCH tones

- Add the INCALL_MUSIC flag for tracks
  created for INCALL_MUSIC stream.
- Adding tones to the ToneGenerator that are
  to be used for Local Call Hold.

Change-Id: If4092630ec67b11fd2844d0218639a2c5ae6b687
stagefright: provide a custom key to prefer adaptive playback

Provide a custom key "prefer-adaptive-playback" that can be
set in MediaFormat by java apps or by Native players to
prefer adaptive-playback over dynamic buffering

Change-Id: Ic02fc9f1d68fd9803ec154498a86e2537efcce85
av: Additional ifdefs for QCOM DirectTrack

 * Tunnel and LPA mode on legacy QC devices requires the DirectTrack
   code path, which going forward has been deprecated.
 * In order to properly support QC features on 8974, this needs broken
   out in order to not cause problems on new devices.
 * With this patch, QCOM_HARDWARE will enable features common to all
   QC platforms (including legacy), and legacy support will
   automatically be enabled based on the use of driver variant and
   value of BOARD_USES_LEGACY_ALSA_AUDIO.

Change-Id: I1da503309963734fd6603472fb87dd9c95c7b7b5
Revert "Camera: Rotate display if app doesn't use setDisplayOrientation."

This reverts commit 4b52ba4cec578962ec2695b7d10abdd32f088065.
libstagefright: support for disabling buffer metadata

- Metada mode video recording is enabled by default.
- use setprop debug.camcorder.disablemeta 1 to disable metadata mode recording.

PS2: Disable metadata mode in timelapse mode too.

Change-Id: I422c49c0ace0c3a3e1f4459c7e4bf29e70af763a
libstagefright: Add msm7x30 to the legacy alsa audio check

Change-Id: Ia936d9b04e99d942ee9af37be81e3b81add6698c
libstagefright: Disable multi slice mode

- Disable multi slice mode video encoding for all
  targets

CRs-Fixed: 573731

Change-Id: I5087cbd2b2932b08e2c663be25104d82fc766ad4
libstagefright: Handle error on allocate buffer failure

Set state to error on allocate buffer failure at start(init)
of decoding.

Change-Id: Ice54f2d3f9cb087dd1f8f14913aacb632c4a8f9a
CRs-Fixed: 332373
libstagefright: Update handling of SBR explict siganlling

In case of SBR explict signalling in the bitstream, the core
AAC sample rate is overwritten by extension sample rate.
HW AAC decoder relies on core sample rate to parse the
bitstream when supplied in raw format.
Do not overwrite core sample rate but store it as separate
field in the meta data.

CRs-fixed: 572242

Change-Id: I5c70cfcc40a44bff9f9da4082c6b4dccd7c6788e
libstagefright: Set the maximums AAC framesize

The maximum AAC frame size is made equal to 8k*4
to handle multiple AAC frames in single buffer.

CRs-Fixed: 505248

Change-Id: I7c7e07620e2da8e1efe3914ebf73832f2f885ec9
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)
camera: Allow any target to use message management

 * Previously this was set for QCOM only, but it has
   value for other cameras who have janky drivers.

Change-Id: I233bbd544388a7f019db48034c21d4406f9e33b4
Merge remote-tracking branch 'cm/cm-11.0' into kk-4.4