audioflinger: Allow mixed use of JB A2DP HALs and ICS policy

Old policies don't address the modules by handle and expect them
all to be scanned for supported devices; new modules stopped
listing supported devices. The combination of a new A2DP with
an old policy left policy unable to find A2DP outputs, so the
new HALs couldn't be used.

So... if an old policy is in use, searching for an A2DP output,
and finds a non-primary HAL that doesn't list any device, assume
it's A2DP and use it.

Change-Id: Ie946c065b5c325afd02ba3437077f634e079b386
libmedia: implement samsungs isSeparatedStream, built audioparameter

Change-Id: I96ec5b79c08e37c9bca59470addb5a9f7869eaea
Make an exception for MR0_AUDIO_BLOB in loadHwModule_l

Without this exception samsung JB stock audio HAL crashes

Change-Id: I596e6e077f5bd4236359de48db754100e0a133e4
Merge "Make an exception for MR0_AUDIO_BLOB in loadHwModule_l" into cm-10.1
camera: add cityid parameter and getInt64 stub for t0lte camera hal

Change-Id: I28a1a909aa8267ba77c2b44d4191f7a92e8ef533
frameworks/av : Playing AAC and MP3 clips using LPA.

-AAC and MP3 clips are not playing.
-AAC and MP3 are not using LPA path.
-Enable LPA decoder path and implement LPAPlayer class.

Change-Id: I76438319fc72c4898fad5910f8de874f89287687
libstagefright: Collection of fixes for TunnelPlayer

-Handling of EOS, and triggering EOS was wrong
in TunnelPlayer. Seeking when EOS was posted
to the HAL was wrong. EOS should
not be posted till seek is complete
-Also, EOS should not be posted to
the app if we are seeking
-Player should wake up when seeked,
even after EOS was posted from player
to HAL
-Fixed this issue by cleaning up the code for EOS
-Disable tunnel mode playback for streaming use cases
 to avoid jittery playback

Change-Id: I21699d2d5874bde6cbfe549ce0251b252e9a4090
CRs-Fixed: 433346
CRs-Fixed: 432233
CRs-Fixed: 429868

libstagefright: Add new mime for QC TS container

- Add new mime type for TS container that is sniffed by extended
  extractor. This is needed for media extractor to determine which
  parser to create.

Change-Id: I18dcebbbf3b31cea7db29a4dd65385638343bec1

libstagefright: Use software decoder for ADTS content.

Use software decoder for widevine content which uses ADTS
format.

CRs-fixed: 431096
(cherry picked from commit 3edf2e703bcdc47f122864865056d5cb65b7ab43)

Change-Id: I50eba673ddd6ec2bbb737577978e61902ff68d13

audioflinger: Fix to release wakelock after closeoutput

-In DirectTrack destructor, closeOutput is called after
releaseWakelock is done. This may sometimes result in
power collapse happening even before actual close
sequence of Audio path is completed and will result
in high power consumption.
-Release wakelock only after closeOutput is done
in directtrack destructor.

CRs-fixed: 438179
Change-Id: Ibe103804daf2cb09bade998d6d34c3a34508dd09

libstagefright: Add support to change clip duration to enable LPA

Added support to change the clip duration threshold value for LPA
playback. A new system property 'lpa.min_duration' has been added
which controls the minimum clip length for enabling LPA.
The default threshold value has been retained as 60sec.

Change-Id: I6a8be6d6bf67495977d8c75e5be14723a31353b1

frameworks/av: Skip tunnel mode for playback through AudioCache

In the use case of playback using SoundPool, decoded data is
cached from player and further rendered through AudioCache.
Avoid Tunnel mode for the use case AAC format through SoundPool

Change-Id: I21005a5b39f9fb480ae0d525ecb560fec4382620
CRs-Fixed: 437539

frameworks/base: dumpsys rendering statistics for Stagefright

- this adds extra fps statisticis
- report via dumpsys

Change-Id: I7b4d4582c4eb2ccf2d11557844dade92f9e587c0
CRs-Fixed: 435013

libstagefright: Stop extractor source after start in TunnelPlayer

Issue: In the use case of frequent suspend resume during Video
Playback with HDMI Connected, we encounter a scenario where tunnel
player is created and destroyed without the extractor source
started. In such use case, stopping the source in reset during the
tunnel player destruction leads to failure during assertion check.

Fix: Check for mStarted flag to ensure that stop on source is
called only after they are started.

Change-Id: Ib18e7ee3d10b2cc706944e358046f163d156706c
CRs-Fixed: 440239
[3/3] libstagefright/videoeditor: Allow custom DOMX source instead of Google DOMX default

Part 3 of 3 patches: To allow omap4 devices to use custom "domx" source
via a new BoardConfig.mk item:
TI_CUSTOM_DOMX_PATH := device/<manufacturer>/<device-name>/domx

This setting provides for 3 changes during the build:
1. In hardware/ti/omap4xxx this settings stops standard Google domx
source from being built and changes the domx reference for tiutils.
2. In frameworks/base it changes the default openmax references for
frameworks/base/media/jni/mediaeditor/Android.mk to the new location
3. In frameworks/av changes the openmax references in 5 places, and adds
new includes in ACodec.cpp, CameraSource.cpp and OMXCodec.cpp

This is a combination of cherry-picks from omapzoom (with a more descriptive
BoardConfig setting name):
http://www.omapzoom.org/?p=platform/frameworks/av.git;a=commit;h=8044105ca117c2e99b35ad9f341d630fc5a9d2e0
http://www.omapzoom.org/?p=platform/frameworks/av.git;a=commit;h=4adf712d1f3f2050fe0010652bbba7ecb8468870
http://www.omapzoom.org/?p=platform/frameworks/av.git;a=commit;h=fa37231ca59872ac491461ca3c14e019834848e5

Change-Id: I53dbf120d515eaf5ec82688dcea4c670c173ed01
Signed-off-by: Hashcode <hashcode0f@gmail.com>
Video Encoder: Enable Ducati h264 encoder profile change

This patch enables the TI ducati H264 encoder profile
via BoardConfig setting:
BOARD_USE_TI_DUCATI_H264_PROFILE := true

Allows correct video decoding on Motorola OMAP4 / Kindle Fires
and other devices using newer DOMX libs.

Effectively a cherry-pick of omapzoom commit (with creative
board setting name):
http://www.omapzoom.org/?p=platform/frameworks/av.git;a=commit;h=e28784d5c68c8699cfd9ebe0231e7132d8b13dad

Change-Id: Idc49b00030558a22a9e50e8798e5814ad54fe841
Signed-off-by: Hashcode <hashcode0f@gmail.com>
Merge branch 'cm-10.1' of git://github.com/CyanogenMod/android_frameworks_av into cm-10.1