audio_policy: Fix for mute count mismatch for sonification strategy

- Sometime ring tone is not heard while in MT call

- During call mode, primary output ringtone/alarm stream mute count
  is incremented on startOutput and decremented on stopoutput
  for all Output requests.
    This is resulting side effect if stop output for non-primary outputs
  called, when no active streams available on primary output(mute count
  will not decrement)

- Add requested output check on start & stop output before calling
  handleIncallSonification API

Change-Id: Id4f328e2f9fc6820cecfbd73df11c871f8587aad
audio_policy : Fix for incorrect input device selection

BLUETOOTH_SCO_HEADSET is not avaibale in input devices list
for recording usecases. Add the same to allow VOIP applications
to select BLUETOOTH_SCO_HEADSET as input device when
BT is connected.

Change-Id: I5d5010ab396f85bf58573943c91fd815f39f57c1
CRs-fixed: 712950
stagefright: httplive: Fix deadlock for low duration clips

PlaylistFetcher buffers up to 3 * target-duration bytes of data,
but if a stream is slow (ie due to bad network conditions), a
buffer threshold of 10s is used to resume playback. This results
in an indefinite freeze as PlaylistFetcher has stopped buffering
before this threshold. Reduce the 10s threshold to be more in-sync
with PlaylistFetcher's buffering size.

CRs-Fixed: 745835
Change-Id: Ife846e7c5b4f9645895873d08250c4bee0164972
stagefright: httplive: Reduce memcpy calls for chunked content

Streams using http chunking will not report the segment's total
content-length. In this case, a 64k buffer is allocated and is
increased by 32k each time the buffer is filled again. For high
bitrate content, this can lead to a large number of copies that
affect the HLS framework delay. Increase fetchFile buffer size
exponentially by 50% or at least 32k instead of by 32k each time
to reduce the number of memcpy calls.

Example for a chunked 6 MB 1080p segment (ie ~3s):
Adding 32k:
190 copies with 572.97 MB copied

Increasing by 50%:
12 copies with 16.09 MB copied

CRs-Fixed: 745835
Change-Id: Iedf0e4437e96026a58d50bce2660f85ac90d0ada
Added support for YEAR metadata key from VorbisComments

The OggExtractor wasn't extracting the YEAR key when the metadata in
the file was parsed. The YEAR key is now extracted when the file
metadata is parsed.

Change-Id: Idf0d1a37fb141491dce5de527703ca1b27f621e7
stagefright: Keep track of the bit width in the RAW codec

 * We need this to push 24-bit PCM around Stagefright and OMX

Change-Id: Ic94ec972162a01545d5dd0ad0bf3eb6c6731f42e
stagefright: Add FLAC support to MatroskaExtractor

Change-Id: Ib1b7d7e6fed617404eb5581a5f87ab67531f5bb8
stagefright: Support HEVC tracks in Matroska containers

 * Pass the HVCC atom to Stagefright.

Change-Id: I7fdca25e20b9051925936a34e594808b18a3a3bd
stagefright: Improve FLAC and WAV support for 24-bit

 * Forward-port changes from CM11
 * Remove truncation support as AudioFlinger handles
   rebuffering in case it can't go to the hardware.

Change-Id: Iad30d04ee051050e444c3d665fa8bb7a1cfef348
audioflinger: Enable floating point samples in AudioFlinger

 * Enable "new" mixer mode to enable mixing and reformatting
   of high precision (> 16-bit) streams.
 * Add missing 8_24 format to list of allowed formats.

Change-Id: I7d7b8ca7e34b25afda3af7e796d24cb94779715a
stagefright: Support for 24-bit audio in StageFright

 * Plumb bit depth thru ACodec and OMX
 * Add support for 24-bit PCM offload in NuPlayer on QC devices
 * Use new AudioFlinger features for mixing multi formats without offload
 * Clean up a bunch of code

Change-Id: I018d3a995b63450a38c6c43eaa37c86be30fd893
libstagefright: back off exynos4 hacks

Change-Id: I953f502171bc98854b5d59165057c57b3c65cdaa
libstagefright: align YV12 for software codecs on exynos4

YV12 chroma stide should be aligned to 16 according to the
android framework. But, GSC & Mali couldn't accept a seperate
stride for U & V components. They just use Y_stride/2 as a
UV Stride.

Change-Id: Ibeeb3439ee10a4666420e5fa34ff0a6d6ea7c003
libstagefright: fix YV12 stride for software codecs on exynos4

Change-Id: I3612899d2bffa474eb6447788858911757a7f45d
omx: exynos4: bring inline with jellybean

Change-Id: Ic275fd30a721f8161dcc44c2706b86ab5ea213ba
Fix overload of SoftVideoDecoderOMXComponent::updatePortDefinitions

An overloaded function should take the same parameters as the function
it is overloading.

Change-Id: I8327fe1b363917515cf76c8f76bdbc05b2c0fbf0
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>