frameworks/av: Use software decoders for LPA clips

Use software decoders for aac and mp3 LPA clips

Change-Id: I0310e128505ff383138c6a7dcb934ae64e86d6bd
audioflinger:  Avoid deadlock for sound recording - LPA concurrency.

-Rapid button press will cause next clip playback. If next clip is lpa
 clip, opening lpa clip triggers set parameter. The set parameter would
 acquire flinger lock and wait for completion. The wait can only be
 signalled from checkForNewParameters_l() in threadloop but the record
 thread loop will be blocked on processConfigEvents() on audio flinger
 lock resulting in deadlock and record failure.
-Release the lock before setParameter on threadbase is called to avoid
 the deadlock scenario.

Change-Id: Ib165210d16bcf661b6aa56aac1529375087e4e4e
CRs-Fixed: 390918
libstagefright: Fix crash during next clip playback

-Decoder/Extractor thread and reset was not synchronized and this
 resulting in write being called during destruction of session out.
-This causes crash during continuous next clip playback.

Change-Id: Id0c953541f2ba74b2321b16636852cbe59c4cdcb
CRs-Fixed: 392250
libstagefright: Pass aligned width to color convert routine

- NV12Tile requires aligned buffer sizes.
  The size passed was un-aligned.

Change-Id: I0d6c618aab7588998ef0e9cfa3fb8a51d9bce93a
Merge "libstagefright: Pass aligned width to color convert routine" into jellybean
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.
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