AudioFlinger: mOutput->stream->get_latency must be inside mLock scope

Otherwise lock-ups during simultaneous playback of multiple
audio streams can happen.

Change-Id: Idd392761e50c1754f9740b7151fc90396542b909
camera: remove redundant QCOM_HARDWARE ifdefs

Change-Id: I9bccd7cb2fd3a7a7b3bda8002cf57ad21ce6b37e
camera: add missing symbols for HTC 8660 camera HAL

Forward port of patch from HTC 8660 missing symbols patch from ICS.

Change-Id: I9ed27e3bc1b0d63c437b3cf9518b36e0da546e81
AudioFlinger: Disable AUDIO_WATCHDOG to reduce high audio power

- AudioWatchDog daemon wakes up the app processor every 50ms.
  This causes audio power to increase by ~3.5-4mA.
- Disable AUDIO_WATCHDOG to reduce high audio power.

CRs-fixed: 386481

Change-Id: Id8f038bd082b9aa711411db33c5302e1d12cadd6
libstagefright: Enable suspension policy

- ADSP doesn't enter suspend state after audio playback.
- No support for suspension policy in stagefright.
- Enable suspension policy in stagefright to allow
  component to move into suspend mode.

CRs-fixed: 386381
(cherry picked from commit 735bc83e32e64af25a6163c07e2039eb4354ff00)

Change-Id: If32bfc63bbb25563e14b128712cc90639b15dc5b
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Merge "camera: remove redundant QCOM_HARDWARE ifdefs" into jellybean
Merge "camera: add missing symbols for HTC 8660 camera HAL" into jellybean
Merge "libstagefright: Enable suspension policy" into jellybean
CameraParameters: Underp non-qcom hardware

Move setPostviewSize to QCOM_HARDWARE

Change-Id: I830d1385be0e784f9fcb6dc40f014bea36b4b65b
fixup for non QCOM targets

*potential memory leaks in MediaPlayerService
*fix ifdef placement in AudioTrack
*duplicate entry in MPEG4Extractor
*(int)mChannelCount == mReqChannelCount being checked twice in AudioFlinger
*pLatencyMs not getting assigned in AudioFlinger
*CAMERA_MSG_FOCUS_MOVE was lost in CameraService

Change-Id: I349a25078148d25f43bf5666fe04b84017b7daa7
Revert "camera: Set the min undequeued buffer count to 2 for camera"

This reverts commit f2075c18d7bf65e6c0286b2c4b5d90cec7823efd.
Merge remote-tracking branch 'upstream/jellybean' into jellybean-cm
i9300: Enable back forgotten ISO modes (1/2)

Change-Id: Icefcd8dee6848e684b6c0c191ee485ed973e4ce8
camera: Full support for HTC camera switch

* Adds the changes for using the "htcwc" switch.
* ICS commit: https://github.com/CyanogenMod/android_frameworks_base/commit/6fa3953df37f6744af7c777f4ac803d4df44af33

Change-Id: I845d628106e386608590df7a1ed4f635f655f140
Merge "i9300: Enable back forgotten ISO modes (1/2)" into jellybean
framework/av: Fix AudioFlinger create track failure

- AudioFlinger track creation fails after mediaserver crash
- Mediaplayer doesn't register for new sessionId value if
  mediaserver crashes during a song switch of music player
  and it uses the old sessionId though sessionId values are
  reset by AudioFlinger.
  AudioFlinger assigns the same sessionId to Tone Generator
  and since strategies of these two session differ it would
  result in track creation failure.
- Fix this issue by registering for new sessionId for
  mediaplayer if mediaserver crashes in idle state

Change-Id: Icc8d204bec5d2fa97db17a7319904baa29115b19
audoflinger: Add A2DP Notifications.

LPAPlayer needs A2DP Notifications to support LPA over BT-A2DP
devices.

Change-Id: Ib43231fd51070059cbe876ec54ee7c542bf2caa3
libstagefright: Enable LPA playback on BT-A2DP devices.

-Applicable for msm8660, msm7630 & msm7627a.
-LPAPlayer need to be put in a new file for the above
 targets as proxy port kind of implemention that is used
 for LPA on BT in 8960 is not available for the above targets.
-Consider LPA & Tunnel player compilation only for  QCOM
 targets as it was in ICS.

Change-Id: I638bd8427a7420e7e27b711008e9c6a51fb761b5
libstagefright: Fix for LPA crash and timestamp issue

-Timestamps during LPA playback is incorrect.
Crash is observed during moving to next clip.
-Timestamp after seek is incorrect.
AudioFlinger does not call stop of LPA Audio session.
-Manage timestamps in LPAPlayer.
Call stop of LPA Audio session.

CRs-Fixed: 388808

(cherry picked from commit e839365b783893c8070da587dac8aa5cb56d63f4)

Change-Id: Icccfb7d2325beb0f19d85af67a6719171e3fa625
Cameera: Correct camera orientation for front sensor

Change-Id: I4bc1d02af41ce863631afcbffc07b64277f8f1fe