frameworks/media: Fix aliasing violations

Change-Id: I0c3ad4d935abe6cf6df222f7d70381d868f15fe8
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
av: Fix aliasing violations in AudioFlinger

Change-Id: Iec37ad0c2e30f34d72f8bf63c6c1aeceba0e3d50
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
downmix: Fix aliasing violation

Change-Id: I1907da54e9ec40c9afe56c488a974d5286b787e4
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
EffectVisualizer: Fix aliasing violations

Change-Id: I35532464df41a64ed920c34ad4bc1054cf6324b2
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
frameworks/av: Fix build in ISO C++ 11 mode

Fix build in ISO C++ 11 mode: constructs that are being interpreted as
new string literals and const vs. constexpr

Change-Id: Ibdf4867da37b819b1a499180edcf7ad480b6b9de
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
av: More ISO C++ 11 fixes

Change-Id: I84bfab66d561cb0ded6e312b8cfe02e5fe2a182f
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
av: Fix build in ISO C++11 mode

Change-Id: I461d8ce5b24afedee245a6441b600df286c76b63
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
av: Fix compile errors

Don't use memcpy() on areas that may overlap
Fix aliasing violation

Change-Id: Icd54cf12c2485a3d2789d1fb75c3a8a964c4163f
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
camera: add parameters for samsung cameras

From: codeworkx <codeworkx@cyanogenmod.com>
Date: Sat, 22 Sep 2012 11:36:26 +0200
Subject: [PATCH] camera: added weather key for samsung cameras

Change-Id: I1c6dc38f548fb3087abbdf7d7f83c39afaa217a1
---

From: Steve Kondik <shade@chemlab.org>
Date: Tue, 15 May 2012 09:41:02 -0700
Subject: [PATCH] camera: Add parameters for some Samsung cameras

 * Enable with SAMSUNG_CAMERA_HARDWARE
 * Adds anti-shake, metering, and wdr modes.

Change-Id: I080c90e11fcb8fa48900c01a454868f173f61eb0
---
camera: add iso parameter

Enable with BOARD_CAMERA_HAVE_ISO

From: jt1134 <jt1134@gmail.com>
Date: Mon, 17 Sep 2012 22:05:04 -0500
Subject: [PATCH] camera: add define for ISO settings

Change-Id: I8716a260ad552d3684197237c2055dce129e461e
---
Avoid memory leaks when handling metadata strings

Don't duplicate strings when retrieveing metadata from media
files. As any requests for metadata strings would pass through
the binder, this would cause the reference to the duplicate string
to be lost, causing a memory leak as the duplicate would not be
freed.

Change-Id: I2593733472b1bb589bc502b2c11080f581015bb5
libmedia: add pre jb-4.2.1 signature for AudioSystem::getDeviceConnectionState

With jb-4.2.1 the type audio_devices_t found in system/core/include/system/audio.h
was redefined from a typedef enum to uint32_t.  This causes the signature
of AudioSystem::getDeviceConnectionState to change in libmedia.so.
Any older than 4.2.1 prebuilt audio.primary.___.so binaries (such as mine from ICS)
may refer to the old signature.  This patch adds back in that reference.

Change-Id: Ie4f92eaec20d581c9bebc805cfd25f8558406e30
Signed-off-by: Hashcode <hashcode0f@gmail.com>
camera: Ignore CAF_RESTART callbacks

 * Ignore these callbacks which are sent by Samsung camera drivers, as
   they can cause a deadlock in normal operation.

Change-Id: Iae59eb0d3050751c1a4d372c80d430a8ba957252
WifiDisplay: Add an HDCP toggle

Some WFD dongles have frequent (or permanent) failures while
negotiating HDCP with the device, so add a toggle to allow
skipping HDCP entirely

Change-Id: I999158df84d4a7489c40ecdf07ebcf107d071d40
stagefright: add support for samsung proprietary omx

Change-Id: Iab0d014c3c237871e46135aecbbcea99a58f87e7
libstagefright: Add support to seek to zero

- Add CAN_SEEK_TO_ZERO flag in MediaExtractor to allow
  seek to zero, when previous button is pressed, for clip
  that can't be seeked.

Change-Id: Ic2761cc5bac2403ee1339da77ad02fde942a3437
Fix potential NULL pointer deference in ToneGenerator destructor

Initial members in ToneGenerator so destructor can free
allocation properly.

Change-Id: I4a686084af48f99d2eefc33e56e3239846d3d34f
Squashed commit of audio changes from CodeAurora

libstagefright: Add QC specific media format

- Add QC specific media extensions
- Add QC specific media definitions

Change-Id: I7dca90be3b977701d9537f5e017117790a030f1f

audio: Compile AudioParameter as shared library

- AudioParameter as shared lib is needed by BT
  support in WFD source.

Change-Id: I464b428ace0cbb57ce6bf7bf3b57d51a7d56f032

libstagefright: Send flush on both i/p and o/p ports together

- ANR occurs in music due to race condition in OMX component if
  flush is issued separately for i/p and o/p ports as DSP only
  handles simultaneous flush on i/p and o/p ports.

Change-Id: I5b16cd5a9b57c857dc8bed489d2663b8f54769e3

libstagefright: Enable extended A\V format

- Add new files to support extended A\V format

Change-Id: I1e61d78d35b868d55fd8e99f95de8cab9c465db4

libstagefright: Framework to plug-in propritory parser

- Extend the current framework to plug-in propritory
  parser

Change-Id: Ia586a3048420ddf1515261f20035589447263b7b

audio: add support for QCOM audio formats

- Add support for EVRC, QCELP, and WMA formats.

Change-Id: Iaf80f982fc8b08617132dbd7d524a1748866745c

frameworks/av: Support Tunnel Playback

- Implement DirectTrack and DirectTrackClient
- DirectTrack exposes API to client so it can create a direct
  output.
- DirectTrackClient allows notifications to be sent to the
  client from DirectTrack
- DirectTrack is being used for Tunnel Audio

Change-Id: I2fbb18a781d8e44b8d65da9a357f6e39375f063a

frameworks/av: Support LPA Playback

Add support to enable Playback in LPA mode

Change-Id: I1b8ac4904f4735017d62f3757ede7bbb56e62fd3

audio: Send correct channel mask in voice call recording.

-Using popCount function to get channel count gives incorrect value on
voice call recording.
-Only STEREO and MONO bits to be considered to count
channels on input

Change-Id: I04c2c802422e868bdba0538ff8623dbf9eb659fe

libstagefright: Thumbnail mode initial commit

- use sync frame decoding mode when kClientNeedsFrameBuffer
  is set for hardware decoders
- hardware decoder will only expect I frames, OMXCodec will
  set EOS on first ETB to stop more frames from being pulled
- skip EOS check on FTB so that the first frame will be
  handled

Change-Id: I0e8974e088fdcc468e27764861c128cfe291499f

audio: Add support for QCOM's VOIP solution

Change-Id: I1150f536fa204b535ca4019fdaa84f33f4695d93

audio: define QCOM audio parameters

- Define QCOM audio paramters for FM, VOIP,
  fluence, SSR, and A2DP

Change-Id: I29d02e37685846f6d4f00dee02e2726b015eaae7

Add ifdefs for QCOM enhanced features

Change-Id: Ic8e5fe6ecc058466ced71030883b1af6c2bc055c
Squashed commit of updates from CodeAurora

libstagefright: Add support for VC1 clips

- configure decoder in frame-by-frame or arbitrary mode
  based on the codec type.

Change-Id: I6404e5b7ee217045e6456f51f914dbd8a651d98a
CRs-Fixed: 432847

stagefright: Miscellaneous fixes for LPA and Tunnel playback

1. Fix for AV sync issue with Tunnel playback
APIs for returning correct timestamps were implemented
2. Crash while exiting TunnelPlayer
Check whether sink is open before flushing or closing it.
Check for mIsAudioRouted is good to know if we are closing it
3. Seekbar freezes after seek and pause
Check pause status before writing

Change-Id: Id8ab7b258e9c05b20e121bdf3c4dc30d519f6c15

frameworks/av: Add support for surround sound recording

- Add 5.1 channel as supported input channel

Change-Id: I50fcd87245c5c855ede8f09ea1a7c5be2e684640

stagefright: Add tunnel decode for amr-wb/wb+

When tunnel.decode is true, playback of AMR-WB
and AMR-WB+ uses tunnel decode.

Change-Id: Ic06cb3faaac18f605402c98a27cb4dfa4b7faee2

stagefright: Skip LPA if #channels > 2

Skip LPA for Multi channel playback

Change-Id: I5b97471ef55aea260d1c02db672eb4bd64c3edef
stagefright: OMXCodec: Re-enable OMX.TI.Video.encoder's quirks

These have been around since early stagefright, and were dropped for
JB. Unfortunately, they're still necessary with for this encoder to
work.

Change-Id: I8a251bf195a24b166db7464a90a822d6e69b644d

libstagefright: Add support for the 720P OMAP3 encoders

Bring back some more OMAP code that was removed by Google in JB,
and a couple of omapzoom patches.
This may stop being necessary if TI publishes JB-specific OMAP3
code, but as long as we're using the ICS domx, these need to
be here
Change-Id: Ia29f8c9f9ed769ba07b09c07260486f6502841d6

libstagefright: Unbreak OMAP4 encoders

The "manual" construction of the h264 codec data is only needed
on OMAP3. Execution of this code on OMAP4 breaks the mpeg4 header
generation

Change-Id: I3ae52f2e685e2d9097796685c98dffa93cfa6430