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
audioflinger: Fix to release wakelock after closeoutput

-In DirectTrack destructor, closeOutput is called after
releaseWakelock is done. This may sometimes result in
power collapse happening even before actual close
sequence of Audio path is completed and will result
in high power consumption.
-Release wakelock only after closeOutput is done
in directtrack destructor.

(cherry picked from commit fb48938f73e335ac66c83e6adba96431e050ec94)

Change-Id: Ib8d05a38f28d7e2f0bdf9e420e5db526cf874bc6
CRs-Fixed: 430786

Conflicts:
	services/audioflinger/AudioFlinger.cpp
Fixed the wrong timestamps issue about camera recording

On emulator, the camera video recording crashes randomly.
It's caused by wrong timestamp when encoding the video frame.
The element of the vector is erased before accessing it.
Therefore, when reading the timestamp from the element,
the memory of the element has been changed.

Change-Id: I9750417fbb9dc4697ccae1e78e286b23925d3764

Signed-off-by: Panfeng Chang <panfengx.chang@intel.com>
Signed-off-by: Jun Tian <jun.j.tian@intel.com>
Fix overflow of rand in ARTPConnection

without this fix, (rand()*1000)/RAND_MAX is mainly 0.

Change-Id: I48ae940a7b6974b197d81732774c9dcea107bcf1
Signed-off-by: Yajun Zeng <beanz@marvell.com>
fix a race condition of MediaPlayerServce::Client::mClient

there will be race condition between mClient.clear in MediaPlayerServce::Client::disconnect method
and c=client->mClient in in MediaPlayerServce::Client::notify method

Change-Id: I767294c4cb864c08e9c0e9f23d6d304a39016205
Signed-off-by: beanz <beanz@marvell.com>
libmedia: Add ICS AudioStreamType constructor

Needed for Samsung legacy camera libs.

Change-Id: If03d8525b55181ea20dc934dbcbfef85402c42c7
Add camera parameters for htc evo 3D. (1/2)

Use BOARD_HTC_3D_SUPPORT to enable.

Change-Id: I28fa3f1586071bcc78b8e887bbbf699d338a0ceb
camera: Add a few missing legacy camera params.

Fixes camera for some HTC msm7x30 devices

Change-Id: If6975e3a5470fdeb603bf8ad9c164c9a000309ef
libstagefright: support for disabling buffer metadata

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

Ported from jellybean (was Change-Id: I8ce90e633b262c5b2d1c9d7e367b7b5487b6d1b4)

http://review.cyanogenmod.org/#/c/22404/

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I422c49c0ace0c3a3e1f4459c7e4bf29e70af763a
camera: Don't segfault if we get a NULL parameter

 * Values end up NULL on some drivers, don't crash.

Change-Id: Ic897dbd4629cf3af98c85f93be202c382dde806b
[WIP]: camera: add parameters for htc cameras

Change-Id: I1456e5af22d1cb68fd19626a136fef68c5573074
camera: fixup htc params

Change-Id: Iee0086e8a7319ada09f5191092c314c099e0d66a
frameworks/av: Add metadata mode changes to LPAPlayer

-Seek to EOS was causing playback to hang for 3 seconds before
 switching to the next clip.
-This is because the lpa driver works on period size. Partial
 buffers are not handled.
-Add support for metadata mode changes to LPAPlayer to support
 partial frames.

CRs-Fixed: 458904
Change-Id: I8673756b54ae7bca18855d326c85ae1064652514
Noise will be heard if audio sample rate not matched with audio track

When audio sample rate which set to audio track is not the same with
the actual pcm data, noise will be heard. Fix the bug when write 8 bit
pcm samples.

Change-Id: Idcb0d7b0e9aaa250dd22b758c8337e23d1706049
Signed-off-by: Ming Zhou <b42586@freescale.com>
Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
Revert "frameworks/av: Add metadata mode changes to LPAPlayer"

This reverts commit ae57fbc021cfc8b018cfb23b90112b1b17173d1b.
Fix build error from commit 3da446303432e640c4c8240bbb2404f7c5dad97d

frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp:1465:20:
error: 'PROPERTY_VALUE_MAX' was not declared in this scope
frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp:1466:57:
error: 'value' was not declared in this scope
frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp:1466:70:
error: 'property_get' was not declared in this scope
make: *** [/android/mydroid-cm10/out/target/product/xt926/obj/
SHARED_LIBRARIES/libmediaplayerservice_intermediates/StagefrightRecorder.o]
Error 1

Change-Id: I346300231f977082314b05e09184ea519b50c719
audioflinger: remove redundand ifdef

Change-Id: Iefc64cf477fd58a29984a9c198d84e876dbcf1c5
libcamera_client: Add missing camera keys required by Samsung STE devices

Change-Id: I88281ce765326d43d97e82507c37274da135545f
Fix includes for media-caf

Change-Id: I5d6dedbb9ba03fc313ab27f91bf83376fa20a7a9
Camera: Add more htc parameters

Change-Id: Ica43a42f6ec6e25671b22536c768140469fb9824