camera: allow proper preview window updates to be disabled

This causes issues with various video chat apps for devices such as
Sensation and possibly others using HTC MSM8660 camera HAL.

This is needed in Jellybean too.
See: https://github.com/CyanogenMod/android_frameworks_base/commit/795b92632696bcb307332ce32d682664b8c21d94

Change-Id: Ib4ae37df214b774e521b5bfad55f9b4558da148f
AudioFlinger: Fix compile with enabled debug flag.

Change-Id: Ibba48dce4fed6101af6b8f0c1519c3a4779eb40f
libstagefright: LPA: Fix for delay in stopping LPA playback

- Start MP3/AAC clip with duration > 1min.
  Go to settings --> apps --> Running --> Music and stop
  MediaplaybackService. The audio playback does not stop
  immediately but continues for next couple of seconds.
- While trying to tear down the LPA playback path, if the
  decoder thread is blocked on write to audio HAL, it is
  unable to stop audio playback until the decode thread
  gets unblocked.
- Fixed by issuing flush() before killing the decoder thread
  while LPA playback tear down.

Change-Id: I9d7a0c583f870db243c76fe4f38e2ae751176ab8
CRs-Fixed: 399499
Fixed sample video corrupted in MediaCodec mode.

Change-Id: I50c5660072d40f6e297e58fd026ea04c89d6a70a
related-to-bug: 6732061
framework/av: port change for vocoders support

- For EVRC, AMR vocoder support change missed
to port from ICS. Added the changes required.

Change-Id: Iab619ce435233d83943335574a104ecf88725c7b
(cherry picked from commit d40680a88ec0a209d3108bbdd0d360fc90a93a3a)

Conflicts:

	services/audioflinger/AudioFlinger.cpp
libstagefright: Fix for LPA playback not resuming after pause

-LPA clips playback fails after pause and resume.
-After onPauseTimeOut, LPA driver is closed.
-Do not trigger call of onPauseTimeOut.

Change-Id: Id5ae4fecc40dea8ab4431ab01bc7dafc56ffc63c
Merge "Fixed sample video corrupted in MediaCodec mode." into jb
libmedia: Add ICS audiotrack constructor

Change-Id: I5c1a3d1093cbf16111638a37601093c5eb977dd4
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>
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

Conflicts:

	services/camera/libcameraservice/CameraService.cpp
camera: added weather key for samsung cameras

Change-Id: I1c6dc38f548fb3087abbdf7d7f83c39afaa217a1
stagefright: OMXCodec: Re-enable OMX.TI.Video.encoder's quirks

These have been around since early stagefright, and were dropped for
JB. Unfortunately, they're still necessary with for this encoder to
work.

Change-Id: I8a251bf195a24b166db7464a90a822d6e69b644d
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
frameworks/av: Syncronize resume and onPauseTimeOut

- All the mixer controls are closed 3s after pausing playback
through the onPauseTimeOut function
- A scenario where onPauseTimeOut is closing mixer controls, a
resume is issued, causes a crash
- Synchronize these 2 functions using a mutex to prevent
concurrent execution.

Change-Id: I850452f4d38d05cfa92ca4690a665b8e64170a49
CRs-Fixed: 398948
audioflinger: Add support for post proc effects in Direct Track

Change-Id: I3434bfdf300f18a4d3ac6e7de3e7c7c76a6619c1
libmedia: Fix build on non qcom hardware.

Change-Id: I3eca4d5612785bbdb3dc4d23fca4f96280b34461