Squashed merge with cm-10.2:

Summary:
Squashed commit of the following:
qcom: Split off caf AUDIO_VARIANT support from QCOM_HARDWARE

One does not imply the other, add a different flag to allow using
them independently

Change-Id: I7fe0c0391967132a65f86f0c5f4bc0f54d50777d

frameworks/av: init rc to avoid effect's fault state

Effect command doesn't necessarily fill cmd return code into &cmdStatus,
so we should initialize cmdStatus to avoid uninitialized value propagates
to upper stack caller.

Change-Id: I2a2985e3010f0d7b8aedf9244a6faabdf05740ac
CRs-Fixed: 517766

libstagefright: enable smooth-streaming based on shell property

Enable smoothstreaming in Acodec/OMXCodec if shell property
mm.enable.smoothstreaming is set to true.

Change-Id: Ic5d64623c3001144f36562c8abf4b5f7be42f1e0

frameworks/av: fix for testAACEncoder CTS testcase

- testAACEncoders CTS testcase is failing for
  Hardware aac encoder use case

- hardware encoder has bitrate limitation
  due to which  CTS testcase is failing

- Removed hardware AAC encoder component from MediaCodec list,
  added in OMXCodec path on specific request from
  Stagefright recorder

Change-Id: Idff8abf4b768f63262da0576768fb13c9d6df1de

frameworks/av: AAC CSD support for MediaCodec path

- AudioFlush CTS test case is failing for AAC

- AAC Codec specific data is missing for
MediaCodec path for AAC if we use Qualcomm
ExtendedExtractor for demuxing

- Added CSD buffer while converting from
metadata to message , which can be used by
ACodec/MediaCodec

Change-Id: Ic8197138f5107f2a6026c28847e74987d91acc16
CRs-Fixed: 509575

audioflinger: Do not apply effect on multichannel content

-Do not apply effect on multichannel content.
-Effects are applied only for mono or stereo.
CRs-Fixed: 484078

Change-Id: I623d40f926d5dd80e74f9aa2f98448158518047e

stagefright: synchronously change nativewindow crop

Only change the nativewindow crop before queuing frames
with the new crop.

Change-Id: Icd8a84c82e66a8be3d6bc1675c777b1de8dc39b9
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 9395753

media: Fix merge issues

Change-Id: I89ab96a1ae415822c6d35e244fb3ebed389a1de6

frameworks/av: enable voip flag based on channelcount

voip flag should be enabled based on channelcount instead of
channelmask. Some of voip apps like viber may not use
AUDIO_CHANNEL_OUT_MONO but still configures to single channel
like by using AUDIO_CHANNEL_OUT_FRONT_CENTER.

Change-Id: I3f69a5c50b6e1bb9336e08eb9619e15de2d8a532
CRs-Fixed: 511713

audio: fix meta MIME type failure in MPEG4Writer

- MIME type info included in source->getFormat()
  is not updated properly because only temp
  variable is updated in AudioSource::getFormat().
  MIME type string contains garbage value and it
  results in invalid audio formats.
  MPEG4Writer returns ERROR_UNSUPPORTED and tunnel
  mode recording with 3gpp format fails
- Fix this issue by assigning return value of
  getFormat() to a local variable, and check the
  return value of findCString.

Change-Id: I242fa25a5d4f7b7e2c88fdd855208dcd42883b6c

audioflinger: Fix for removing noise while resuming playback after pause

-Issue: While resuming playback after pausing and seeking to backward,
there is a noise.
-Rootcause: When Resuming a Playback after Pausing and seeking,
AudioResampler's reset() function is resetting their member
variables but derived classes' s member variable are not resetting.
This is causing a noise in Playback because AudioResamplerSinc,
AudioResamplerOrder1 and AudioResamplerCubic's member variables
pointing to some previous state/values.
-Fix: To reset the derived class member variables,
override the reset function in all the derived classes.

Change-Id: I0584947ac203f9470cdc4a680ebccadf60e4e7db
CRs-Fixed: 482838

audioflinger: Fix buffer size for VOIP

 * Crazy ternary is crazy.

Change-Id: I9d076bf8c72f4266be054b093889ec763bf2bb00

libstagefright: Add legacy LPAPlayer

Change-Id: Ie2551345bbf047c022d1fecbb7cb2cc4a4c97d72

Merge branch 'cm-10.2' of git://github.com/CyanogenMod/android_frameworks_av into jb-devel-mr2-release-new-merge

Test Plan: Win!

Reviewers: randall.rushing, Mustaavalkosta, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D340