stagefright: Increase raw codec buffer size

 * Enlarge the buffer to handle up to 6 channels of 32-bit data.
 * We should probably do this dynamically in the future.

Change-Id: Id1af10b52c4e71e811d0d034baf2d3f1388f4abd
AudioTrack: Reject offloading for non-music streams

Reject AudioTrack initialization if called with non-music
stream type (or attribute) but with AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD.

This will allow the client to fall back to SW decode or
deal with the error appropriately.

CRs-Fixed: 740607
Change-Id: I4d1dda6523bd792ab26b0363e16febcd14b1ad98
stagefright: Revert patches which should not have carried over

 * These patches cause problems on L, revert them.

Revert "Disconnect the mediaplayer when reset"

This reverts commit 9ab0b00dcd43f9f695aec13da4613058f69f7678.

Revert "Remove potential cause of underrun."

This reverts commit a60271120ca16959a9ed0f6a16cfd08543e28375.

Change-Id: I1ee0a447cc5820afd4c068170d6d04b50e45a36d
stagefright: Allocate only what is needed for FLAC decoding

 * Choose buffer size based on bit depth

Change-Id: Ic3aef0ac77f330896dfcfe4cccfc5113925d28b1
libstagefright: back off exynos4 hacks

Change-Id: I953f502171bc98854b5d59165057c57b3c65cdaa
libstagefright: align YV12 for software codecs on exynos4

YV12 chroma stide should be aligned to 16 according to the
android framework. But, GSC & Mali couldn't accept a seperate
stride for U & V components. They just use Y_stride/2 as a
UV Stride.

Change-Id: Ibeeb3439ee10a4666420e5fa34ff0a6d6ea7c003
libstagefright: fix YV12 stride for software codecs on exynos4

Change-Id: I3612899d2bffa474eb6447788858911757a7f45d
omx: exynos4: bring inline with jellybean

Change-Id: Ic275fd30a721f8161dcc44c2706b86ab5ea213ba
Fix overload of SoftVideoDecoderOMXComponent::updatePortDefinitions

An overloaded function should take the same parameters as the function
it is overloading.

Change-Id: I8327fe1b363917515cf76c8f76bdbc05b2c0fbf0
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
MPEG4Writer: fix mMoovBoxBuffer memory leak

In some cirumstances the writing of the moov box
leaks memory since mMoovBoxBuffer is not freed.

Change-Id: I441360f6c7e84e31fea06067eca98b66b86b54bc
Prevent ANR when AudioTrack is paused or re-routed

If ClientProxy was interrupted by AudioTrack::pause() just before futex syscall() in obtainBuffer() was called,
It will not call releaseBuffer to wake up AudioTrackThread.
It puts the AudioTrackThread to sleep and then a deadlock occurs.

In this case, CBLK_INTERRUPT flags can't prevent a deadlock,
so this patch set mFutex to FUTEX_WAKE during interrupt() to avoid deadlock.

A similar problem could occur due to re-route or recovery after mediaserver death.

Bug: 18641665
Change-Id: I66fcae43af9a91eb55f6cdb52c644ee6c0999772