stagefright: Don't enforce 16kHz rate for AMR-WB

This breaks android.media.cts.MediaRecorderTest#testRecordingAudioInRawFormats,
which tests specifically with 8kHz.

Change-Id: Ibfa54db4b2a82e502268be18f4ea405a41a88bfd
Merge remote-tracking branch 'github/cm-11.0' into HEAD
Revert "stagefright: Cleanup ifdefs in pause code"

Breaks audio pause-resume on non-QCOM device. The code here goes
with QCOM-specific mPaused code in OMXCodec.cpp.

Also added one more ifdef to fix compile error.

This reverts commit f771dc65603c8d06865f08a1b88be60cb53e19dd.

Change-Id: I1ebf3d15cfb7bf5c92745e0ab88cffd7adf192a0
FLAC coded file does not play (single metadata block files)

FLAC files which has the last metadata block flag set in
STREAMINFO were not playing. Sniff of FLAC is modified to
accomodate this set flag.

Change-Id: I76f216cc2cde6e10958324afbc704fc3e5a0e2bf
Author: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 32421
(cherry picked from commit 95f676260cb035b2f2bd2d75e0ddd3ed9658692f)
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
Revert "Camera: Rotate display if app doesn't use setDisplayOrientation."

This reverts commit 4b52ba4cec578962ec2695b7d10abdd32f088065.
Merge remote-tracking branch 'github/cm-11.0' into HEAD
libstagefright: fix AV sync late margin on non-QCOM_HARDWARE

Change I65cd3dce9b31b87f1488c37af9618669b29c362c changed the
late margin to a property defaulting to the same 40ms as the
original code, but uses QCOM_HARDWARE dependencies to read
the value (otherwise it's left unset).

Hardwire it back as the default 40ms

Change-Id: If63e171ea4e9693aa90dd7fabd8997f361a3959c
Merge remote-tracking branch 'github/cm-11.0' into HEAD
Merge remote-tracking branch 'github/cm-11.0' into HEAD
Merge remote-tracking branch 'github/cm-11.0' into HEAD
Merge remote-tracking branch 'github/cm-11.0' into HEAD
Merge remote-tracking branch 'github/cm-11.0' into HEAD
libmedia: Add timelapse profiles for 4k sizes

 The encoder profiles need to be extended to
 support 4k resolutions during timelapse as well.

Change-Id: If67ef1cca45bc61ce1d08bcd5b33adcf22ed8751
CRs-Fixed: 642013
Merge remote-tracking branch 'github/cm-11.0' into HEAD
Merge remote-tracking branch 'github/cm-11.0' into HEAD
Merge remote-tracking branch 'gerrit/cm-11.0' into HEAD
camera: Disable extra HDR frame on QCOM_HARDWARE

Qualcomm camera HALs default to adding an extra zero-exposure frame
to HDR snapshots; this is breaking third-party apps, and we don't
use it in system-bundled apps, so disable it unless explicitly
requested by the client

Change-Id: Iecb868c5c344d972de7f36dc1bd9cc9fdbabaf4e
audio: mute duration at the beginning of recording

-AudioSource mutes for predefined duration (kAutoRampStartUs)
 at the beginning of a recording. Current kAutoRampStartUs
 is not sufficient to mute the shutter sound click on
 B-Family devices. Sometime shutter sound is getting recorded
 with the current kAutoRampStartUs.

-Issue with calculating muteDuration from getOutputLatency is,
 more delay is getting added for Bt(~1 sec) which is really not
 required.

-Fix is to use constant mute delay which is appropriate

Change-Id: Ied20dc44c56cc74c74fb001383d3c533cb54b632
CRs-Fixed: 636491
libstagefright: Fix to handle EAGAIN error on first read to source

 -Some of AV streaming clips are not played
 -In streaming use case when source does not have sufficent data it
  return error EAGAIN on first read request, player ignore this error
  and treat it as a first buffer.
 -Make the read request again to source on EAGAIN error.

Change-Id: I3feaccce757c17c4e80e6d62375c3d700ca29e72