Camera Service: Change max number of cameras to 3

Maximum number of cameras increased to 3 in order to support Stereo camera
in addition to the existing ones.

Change-Id: I63279daa17723669a8f116798b2687b73ddb5516
Signed-off-by: Dejan Ivanovski <x0162121@ti.com>
mediaserver: instantiate SecTVOutService for samsung tvout

Change-Id: I0e7767f8cf3ffd0bc376d14cf4fffffed225e701
exynos4: libstragefright: add support for samsung colorformat/omx/mfc

Source:
http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/av/commit/?h=exynos-jb&id=1614612f7ca2a00473d202dbedcb135fadc608ad

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

Change-Id: Ic275fd30a721f8161dcc44c2706b86ab5ea213ba
libstagefright: exynos4: set proper eColorFormat

Change-Id: Ie025face3c292e685fdf4d83c99276b0a9e4d71d
camera: Ignore CAF_RESTART callbacks

 * Ignore these callbacks which are sent by Samsung camera drivers, as
   they can cause a deadlock in normal operation.

Change-Id: Iae59eb0d3050751c1a4d372c80d430a8ba957252
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
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>
Camera: Enable QC Camera feature set.

Change-Id: Ie52b6207293abe5a57d3bbe9d9c43e8c5b070af5
fmradio: use caf naming

Change-Id: I9e0fefa3f2dabe991c6be63ab13a18ca38c37f71
OMXCodec: Re-implement requires-flush-before-shutdown quirk

Support is already there, but is not in the codec quirk reading list.
Re-implement it as required by Broadcom's OMX

Change-Id: I1beac06af8118dcf0c248b631bc8e6dbbab2c1d5
libstagefright: fix indefinate loop in QueryCodec

portFormat.nIndex is being incremented which is not
trustworthy since the nIndex value could be overriden
by the OMX Component,  which causes an indefinate loop
which inturn causes a memory leak and crashes the system.

OMX Component on encore and p970 exhibits this behaviour
(OMX.TI.720P.Decoder). This patch prevents stagefright
freezes when QueryCodec is called during Gallery Thumbnail
generation for videos and Adobe Flash playback.

Change-Id: I825c99ddecacbb927e22ac7d1a53facb26d95ff2
libstagefright: [Reworked] Fix incorrectness nPortIndex value for QueryCodec

http://review.cyanogenmod.org/#/c/32358/ was intended to fix
issues with OMX Components failing on ME722 (OMAP3).
This patch was working fine on OMAP3 devices and was required
to fix issues DSP MMU FAULTS. It has been reverted with patch
http://review.cyanogenmod.org/44486 which again broke OMX on
OMAP3.

Implement a Workaround for OMAP using OMAP_ENHANCEMENT

Log for this issue observed on P970 (OMAP3) during Gallery
Thumbnail Generation: http://pastebin.com/qRTpm7RN

DmmMap():1600 DSPProcessor_ReserveMemory() failed - error 0xfffffffb

Change-Id: Ifd0c784e354c6c00401686cc0f2188842df9496c
Add support for ICS audio blobs

Enable with the ICS_AUDIO_BLOB CFLAG

Change-Id: Ie174d5997202b8931c1f11db62b6ec2e377f096a

Conflicts:
	services/audioflinger/AudioFlinger.cpp
stagefright: Fix to play a specific Mp4 clip due to SYNCH_LOST_ERROR.

-Unable to play a Specific Mp4 clip.
-Mp3 playback is stopped if the Decoder errors out with SYNCH_LOST_ERROR.
-Ignore the frame with SYNCH_LOST_ERROR and play silence instead.

Change-Id: Id783af8a84f313ea31cd5454c8163928805a7072
stagefright: Remove assert for corrupt clips for AMRNB

Corrupt AMR NB clips were crashing media player
This was due to the assert in the AMRNB decoder.
To avoid this, post error and exit if corrupt
clip is played.
CRs-Fixed: 486681

Change-Id: I8f6809a896b91aaffa8f5ae17d8ae4a3920a4b73
Add checks before removing an active buffer in OMXNodeInstance

With this change, OMXNodeInstance will remove a buffer from it's
active list only if OMX_FreeBuffer returns successfully.

Change-Id: I8f6b675cdf1cede60dfe0aebaa902139e44b1233
framewroks/av:Fix ANR at the end of video recording

- While doing video recording, when the recording
  ends ANR observed while doing stress test for
  many hours
- When the recording is stopped, audio HAL receives error
  from driver and  audio HAL propagates this error to
  AudioFlinger.  But AudioFlinger  is not sending error
  status to audio source to stop recording.  Because of
  this audiorecord thread keeps on waiting for buffers
  which is resulting in ANR.
- To avoid indefinite wait, a timeout of 1 sec is set for buffer
  in audioSource and after timeout, -ETIMEDOUT is returned
  to recorder thread.

Change-Id: Ic191c63d2a0f0144eb6d5b53e5c6d7c8602f44ba
CRs-Fixed: 479968
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.
CRs-Fixed: 438149

Change-Id: Ifaf59a9c09c0ece956379e10c801cad4dacfc8f3