libstagefright: support for disabling buffer metadata

- Metada mode video recording is enabled by default.
- use setprop debug.camcorder.disablemeta 1 to disable metadata mode recording.

Change-Id: I8ce90e633b262c5b2d1c9d7e367b7b5487b6d1b4
libstagefright: Fix for media server crash when seeking during pause

-Media server crash when clip is in pause and seek is done.
-There is mismatch in pause state in LPAPlayer and driver.
-Remove AudioSink flush

Change-Id: I0ea51bc576c4680c94648cc39a62524433d9fa06
libstagefright: Fix for failure in LPA clip playback

-When non-LPA clip follows an LPA clip in Music App,
 playback of LPA clip fails.
-setNextPlayer causes the loading of decoder omx component
 and acquires the DSP resources for non-LPA clip, even before
 LPA clip acquires DSP resources.
-Move mp3 and aac to sw decoders.

Change-Id: Ie04e8ffe5a5822245301a52b3fc8613fb1dab1ef
libstagefright: LPA playback fails when non-LPA clip is next clip

-When non-LPA clip follows an LPA clip in Music App,
 playback of LPA clip fails.
-setNextPlayer causes the loading of decoder omx component
 and acquires the DSP resources for non-LPA clip, even before
 LPA clip acquires DSP resources.
-Add property to check if hardware decoder needs to be overridden.
 If LPA is in progress, the select software decoder for next
 clip.

Change-Id: I0e40fa9859faf84f241e721cdbcb88302c698b8b
libstagefright: TCXO shutdown support and Misc fixes for LPA

- Add support for onPauseTimeout. This runs a 3s timer and then
  closes the Audio path. This allows TCXO shudown to happen.
- Fix the crash for pause and next song.

Change-Id: If68f53345c67d330390e2d9ecec5b8ceff3f9340
(cherry picked from commit 0dffdd9a679b32674f328bd6c6002778f61e07f0)
(cherry picked from commit 688ccbe244cc997cd4da451deaa8e8cdc60a1b55)
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
Merge "AudioFlinger: Fix compile with enabled debug flag." into jellybean
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
libstagefright: support for disabling buffer metadata

- Metada mode video recording is enabled by default.
- use setprop debug.camcorder.disablemeta 1 to disable metadata mode recording.

Change-Id: I8ce90e633b262c5b2d1c9d7e367b7b5487b6d1b4
libstagefright: Fix for media server crash when seeking during pause

-Media server crash when clip is in pause and seek is done.
-There is mismatch in pause state in LPAPlayer and driver.
-Remove AudioSink flush

Change-Id: I0ea51bc576c4680c94648cc39a62524433d9fa06
libstagefright: Fix for failure in LPA clip playback

-When non-LPA clip follows an LPA clip in Music App,
 playback of LPA clip fails.
-setNextPlayer causes the loading of decoder omx component
 and acquires the DSP resources for non-LPA clip, even before
 LPA clip acquires DSP resources.
-Move mp3 and aac to sw decoders.

Change-Id: Ie04e8ffe5a5822245301a52b3fc8613fb1dab1ef
libstagefright: LPA playback fails when non-LPA clip is next clip

-When non-LPA clip follows an LPA clip in Music App,
 playback of LPA clip fails.
-setNextPlayer causes the loading of decoder omx component
 and acquires the DSP resources for non-LPA clip, even before
 LPA clip acquires DSP resources.
-Add property to check if hardware decoder needs to be overridden.
 If LPA is in progress, the select software decoder for next
 clip.

Change-Id: I0e40fa9859faf84f241e721cdbcb88302c698b8b
libstagefright: TCXO shutdown support and Misc fixes for LPA

- Add support for onPauseTimeout. This runs a 3s timer and then
  closes the Audio path. This allows TCXO shudown to happen.
- Fix the crash for pause and next song.

Change-Id: If68f53345c67d330390e2d9ecec5b8ceff3f9340
(cherry picked from commit 0dffdd9a679b32674f328bd6c6002778f61e07f0)
(cherry picked from commit 688ccbe244cc997cd4da451deaa8e8cdc60a1b55)
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
Merge 'AudioFlinger: Fix compile with enabled debug flag.' into jellybean-cm
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
Merge remote-tracking branch 'upstream/jellybean' into jellybean-cm