AudioMixer: fix artifact on 2 short sounds

On multiple devices, when 2 short sounds are played simultaneously, there will be artifact
on the speaker due to the buffer not being cleared.

A common example of this is lockscreen sounds during music playback.

Change-Id: Ifcdbbd7e443aa78ef392f14003d498404f2e4d3a
Fixes for mic and A/V issues on capri based devices

[PATCH 1/2] OMXCodec: set default input buffer size

Broadcom OMX only set the buffer size to 65536 by default which
is not enough for higher bitrate video

[PATCH 2/2] OMXCodec: set default input buffer size only for BCM
decoder

Needed for capri based i9082 device .

Change-Id: Iee5d02829da46f91a326c0fab3e60996af55a1f9
libstagefright: Return EOS after buffers are released

Return EOS from SurfaceMediaSource after buffers
have been released, due to disconnect from producer..

CRs-Fixed: 550868
Change-Id: I4b2f3ef1c2895f155260baa0c58d90df4b4210d9
libstagefright: adjust AV sync late margin based on property

- Current AV late margin is 40 ms
- Read system property media.sf.set.late.margin and if
  new AV sync late margin is set then use the same
- Max AV sync late margin allowed is 250 ms
- Min AV sync late margin is default 40 ms

Change-Id: I65cd3dce9b31b87f1488c37af9618669b29c362c
libstagefright: Add hooks for extended media utils

Add following enhancements:
 - Shell property to disable audio
   property: persist.debug.sf.noaudio
   0 = all audio enabled
   1 = audio decode disabled (AwesomePlayer)
   2 = audio encode disabled (StagefrightRecorder)
   3 = audio encode & decode disabled
 - Shell property to override encoding profiles
   property: encoder.video.profile
   H264 profiles: base, main, high
   MPEG4 profiles: simple, asp

CRs: 573176

Change-Id: Iec32177cae40b0de606b52bbbd41eb24b1643c56
av: Cleanup a lot of QCOM cruft

 * Remove some legacy code to bring us closer to kk_3.5

Change-Id: I5c2ec1b7da9281adfcb1eb6ff9ca71d423a2e07b
libstagefright: Smooth Streaming in OMXCodec

This change is to address startup latency during playback.

Set smooth-streaming mode from OMXCodec by default
if mm.enable.smoothstreaming property is enabled

When crop change is detected, save the target crop/stride and apply
them just before the buffer is (potentially) rendered.
Applying the updates right away may cause artifacts as buffers with
previous resolution are not rendered yet.

This approach assumes that there will not be a crop change within
the detection and application of current crop

CRs-Fixed: 584629

Change-Id: Ia164309edf1c51ed28b929deabecc53fc56cbf33
audioflinger: update track ready condition

Signal track ready if the track isStopping().

Change-Id: Ie279995d5f90fa8211a20dfbeacc1cf9b921d0bf
CRs-Fixed: 592189
audio: ID3 tags of most chinese songs display messy

- ID3 coding format detect and convert issue
- Enhance the detect and convert function

Change-Id: Idf59dd100b8a01b65338a51109d752616abec81b
CRs-Fixed: 494956