exynos4:  Part of Netflix fix

codeworkx pulled the Samsung colorformat patch from Insignal's
exynos-jb branch, which is an invalid source for exynos4 patches.

It was checking for an OMX codec name that didn't exist.

This still doesn't stop Netflix JPlayer failing in 10.1, but
does fix Netflix failing if you disable JPlayer by convincing
it that it's on an older Android version.

Change-Id: Ia55878dc08f81e2900307558e35c4e0c5b9cac2f
stagefright: add support for samsung proprietary omx

Change-Id: I79b7b4dd8a2ba71d7c95f067d13620260a2e0f63
camera: add power mode support

Based on commit 7036d66bec7697160ba1b2e255f1e7fae0c8c435 from CAF,
branch ics_chocolate.

Change-Id: I652d63c33db9a8da4a9f8f613be12877d032de37
camera: add ISO3200 and ISO6400

This change adds camera ISO 3200 and 6400, needed by some camera hal.

Change-Id: I65172a7de6554c3c288f0a4153d3fcb432b70db8
Fix typo

Change-Id: I311f608d761987d0c714be9ab81188a3ca8eef61
Fix the build on non-QCOM

Change-Id: Idb8d5c98fbdc01e6063ad0eb224baba66acc813d
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
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
CameraService: Add compatibility for OMAP ICS blobs

Workaround the conflict created by usage of the 0x800 enum
in JB (focus move) vs its OMAP usage in ICS (burst jpeg)

Originally:
CameraService: Adds support for burst compressed images

Signed-off-by: Emilian Peev <epeev@mm-sol.com>

Moved the changes under OMAP_ENHANCEMENT

Signed-off-by: Solaiyappan Saravanan <saravanan.s@ti.com>
Change-Id: I1f17675b2854793de83c2b7cdecafc039c46f355

CameraService: Adds support for burst compressed images

Depends on:
  - http://review.omapzoom.org/#/c/24537/
  - http://review.omapzoom.org/#/c/24538/

Change-Id: I1f17675b2854793de83c2b7cdecafc039c46f355
Signed-off-by: Solaiyappan Saravanan <saravanan.s@ti.com>
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Signed-off-by: Daniel Levin <dendy@ti.com>

Add CAMERA_MSG_RAW_BURST handling to CameraService

Change-Id: Id958836e726e9908f60311d5bfc6d26eb8298cea
Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>

CameraService: Disable capture message types before stopping preview

If we try to stopPreview in the middle of capture, these
callbacks might occur. In this case, stopPreview will already be
holding mLock while the message handler will try to grab mLock.
Deadlock occurs if the stopPreview and message callback dependencies
are in the same thread.

Issue reproduced with Image Capture/Home Key scenario.

Port from GB: Issue is still reproducible (although extremely
              rarely) in ICS.

Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Signed-off-by: Jean Johnson <jean-johnson@ti.com>
Signed-off-by: Daniel Levin <dendy@ti.com>
Change-Id: I222d00f8bd69c11302a35610095efe0ddc49f876
Camera: Enable QC Camera feature set.

Change-Id: Ie52b6207293abe5a57d3bbe9d9c43e8c5b070af5
Squashed commit of updates from CodeAurora

auido: Add amr-wb+ codec to ACodec.

-Add an entry for amr-wb+ decoder in ACodec.
-amr-wb+ non tunnel will be enabled by default.

Change-Id: Ied8902eb83da29a3164eb99e88630570a43f681e

libstagefright: Create MP3 decoder libraries without OMX layer

- With the current MP3 OMX SW decoders, the decoding time
is increased w.r.t the libraries without OMX layer that are
present in GB. This increase in decoding time results reduction in
power savings in LPA mode.
- This commit is to remove OMX layer for MP3 to reduce the
power consumption in LPA mode

Change-Id: I835ab6d013a326f111e513586f884bacd5f7106a

audioflinger: EffectModules are updated with device change

Issue: Effects modules are not updated with the device change
information
Fix: 1) Add setDevice information to mLPAEffectChain
2) Remove the return after sending the device route information to
Direct track so that mixer thread is also aware of the device
change for EffectsChain

Change-Id: I82936cd47290946a5e4772e448669d81e0e4d6f5

libmedia : Add a NULL pointer check

- Print frame count in AudioTrack::dump() only if the control
  block is valid

Change-Id: Icf594eb721b48795c43d7bd165f6086031ce6efd
CRs-Fixed: 435050

libstagefright: Query AudioSystem for suggested record mute duration

- AudioSource mutes a pre-defined duration (defined by kAutoRampStartUs)
  at the beginning of a recording.
- Instead, query the audio system for any ongoing playback streams
  and use its output latency to calculate the duration to mute the incoming PCM stream.
- This assumes all current playback threads will be paused once recording
  is started.

Change-Id: Ie9b1d62e7be803ef1d8a59127b95c73e03fa5ce6
CRs-Fixed: 438149

libstagefright: Convert mono to stereo for LPA clips

- Sound effects are not supported for mono clips
- Repetative calling of effects_configure and effect_process for
  mono clips is resulting in crash in the sound effects library.
- So, Mono clips are now converted to stereo by copying the left
  sample to right.
- This is same as what Resampler does in Non-LPA Playback.

This commit is a port of fcc0647fab20ceaf1c07bc10bb243f14c48b114c
CRs-Fixed: 421639

Change-Id: Ie579c8d11afe3db8d42a35956e8bf23eeb88cfe6

audioflinger: Fix to set volume from MediaPlayer in Tunnel mode

Issue: MediaPlayer.setVolume does not have effect on Playback
volume in TunnelPlayer mode
Fix: the left and right volume parameters of setVolume are
hardcoded and defaulted in DirectAudioTrack. Updating the
parameters from the input arguments fixes the issue

Change-Id: I8a107ce57284b225b17d95fed0f69e3adc5fb131
CRs-Fixed: 441849

libstagefright: Enable Tunnel Decode for select formats

- Enable tunnel mode decode only if the audio mime type
  matches a supported list.

Change-Id: I32afd83e5fda1e90cb671dd747f17cb83bb84fc1
CRs-Fixed:437651

framework/av:: Add support to decode mp3 data in mp4 container

- Added support to decode mp3 data in mp4 container packed as mp4a
  atom and .mp3 atom as well.

Port of 8fa3774adf9259b33ee721cfaeff26da42c29928

Change-Id: I1a04022f30a9f6516575440aba7652986ab7dc58
CRs-Fixed: 439897

audiomixer: Use High Quality resampler

Use very high quality resampler to upsample to 48KHz sample
rate.

Change-Id: I1ba5b839f1e74ae71b405538d970e6a966bd1d47
CRs-fixed: 416730

audioflinger: Fix a deadlock

- A deadlock will happen if the obit recipient
  registered by the DirectAudioTrack is called.
- Fix this by moving the lock acquisition in DirectAudioTrack::clearPowerManager()
  to after DirectAudioTrack::releaseWakeLock() is called.
- Also synchronize use of mPowerManager in the DirectAudioTrack
  destructor with DirectAudioTrack::clearPowerManager()

Change-Id: Ib127db1406c4a61a4054ca0cf30f4c7347a5c92a
CRs-Fixed: 444093

libstagefright: TunnelPlayer: update condition to send SEEK_COMPLETE

- If the client tries to seek to 0 (e.g as a result of LOOPING)
  without ever calling getPosition(), we will always sent an immediate
  seek notification without seeking.

Change-Id: Id2b9d00c611278d0521cb6fd402710f0ec37bbdd
CRs-Fixed: 441411

libstagefright: Remove unnecessary code from TunnelPlayer

- TunnelPlayer tries to mimick AudioPlayer when trying
  to delete the extractor source.
- It is needed for AudioPlayer as the OMXCodec object
  is referenced by the CallbackDispatcher as well as AudioPlayer.
- This condition is not true for TunnelPlayer, so why do it.

Change-Id: I79c4e17d01910e73ad01c5640ef374626313a18e
CRs-Fixed: 442365

Add MediaDebug header from CAF

Change-Id: I68dbe72f86a49685b82b64927d1aa80231647a7a
Revert "libstagefright: Convert mono to stereo for LPA clips"

Change-Id: Ib6cc3401c889a8ec52dc83e3bea367f94a582a40
Fix mako build.

Change-Id: Ic73cb2f4152ac77a83fcda7e89b4a8202df440c6
stagefright: Fix tunnel mode ifdefs

 * Was breaking on 8660 due to previous commit.

Change-Id: Ia9f5c45552cc933db336a66b6d1214b65e810488
Merge branch 'jb-mr1' of https://github.com/AOKP/frameworks_av into jb-mr1

Conflicts:
	media/libstagefright/OMXCodec.cpp
	services/camera/libcameraservice/CameraClient.cpp