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.

PS2: Disable metadata mode in timelapse mode too.

Change-Id: I422c49c0ace0c3a3e1f4459c7e4bf29e70af763a
libstagefright: Add msm7x30 to the legacy alsa audio check

Change-Id: Ia936d9b04e99d942ee9af37be81e3b81add6698c
libstagefright: Disable multi slice mode

- Disable multi slice mode video encoding for all
  targets

CRs-Fixed: 573731

Change-Id: I5087cbd2b2932b08e2c663be25104d82fc766ad4
libstagefright: Handle error on allocate buffer failure

Set state to error on allocate buffer failure at start(init)
of decoding.

Change-Id: Ice54f2d3f9cb087dd1f8f14913aacb632c4a8f9a
CRs-Fixed: 332373
libstagefright: Update handling of SBR explict siganlling

In case of SBR explict signalling in the bitstream, the core
AAC sample rate is overwritten by extension sample rate.
HW AAC decoder relies on core sample rate to parse the
bitstream when supplied in raw format.
Do not overwrite core sample rate but store it as separate
field in the meta data.

CRs-fixed: 572242

Change-Id: I5c70cfcc40a44bff9f9da4082c6b4dccd7c6788e
libstagefright: Set the maximums AAC framesize

The maximum AAC frame size is made equal to 8k*4
to handle multiple AAC frames in single buffer.

CRs-Fixed: 505248

Change-Id: I7c7e07620e2da8e1efe3914ebf73832f2f885ec9
audio: Add support for tunnel mode recording and compress voip

- Use modulo operator for common block buffer handling. Common block
  size is rounded to power of two. This limitation is avoided with
  modulo operator.
- Add support for tunnel mode recording
- Add support for compress voip

PS 2: Fixup ifdefs.

Change-Id: I95cdfff729affd784141487521c9f2f714221d11
Merge remote-tracking branch 'cm/cm-11.0' into cm-11.0