hal: Support for FLAC 24 bit format in offload path

- Add flac in supported codecs list
- Set FLAC codec specific parameters
- Set fragment size based on bit width and sampling rate
  for flac.
- Configure backend to 24/16 bit based on the current
  usecases running

Change-Id: If013078e277fd3053fba6489345803f8f58bd86d
Audio: Fix for sound card status overwrite issue

 - Sound card status is getting over written to OFFLINE
   by HAL internally on continuous SSR
 - Fix by returning different error code for snd card offline
   update in HAL internally instead of ENETRESET

Change-Id: I98a34d8b667dff045a1e99d18307376579ac4ebc
hal: add support for pcm_ioctl() api

- Tinyalsa doesn't expose an api to call
  ioctls exposed by the audio drivers.
- Add pcm_ioctl() api to support pcm ioctl.

Change-Id: I448252e8d3347257a73c56bc8ed341abc2dd2dab
policy: Add support for multiple instances of offload playback

Add support for multiple offload playback instances

Change-Id: Icab3c7d6e89121a7aa23744729a634d8e402fabf
hal: Add multiple offload support for msm8974

 * msm8974 can also benefit from multiple tunnel support, but
   is limited to four devices. This allows for reliable gapless
   playback and other use cases.

Change-Id: Ie0698cc0d600a23df0799482a79181f248a001e7
hal: Featureize FLAC offload support

 * Not all devices will have this code in the DSP, let alone the kernel.
 * Featurize it, but leave the codec bit width and sample rate controls
   in place so that 24-bit PCM offload still works.

Change-Id: I6e156048906a2b638e9ec4a083755536a14e161f
hal: Offload bugfixes

 * Always reset the bit width and sample rate if any active offload
   stream is different. Failure to do this can crash the DSP, and
   certain limitations come into play when a high samplerate is used
   such as effects being unavailable.
 * Don't send errors to the framework when the timestamp query fails
   before the stream is up and running.

Change-Id: Ieeaafe8965e3cdc69b8dd64be85fbb3bf48c020b
hal: Extend MULTIPLE_OFFLOAD_ENABLED ifdef

* Fixes compilation for non-MSM8974 devices without
  MULTIPLE_OFFLOAD_ENABLED

Change-Id: I8a83d10e68618e141a128af5198ebf1bfb731a6a
hal: PCM offload shouldn't enable all types of offloading

 * Some older versions of the DSP cannot offload audio streams
   for A/V content. Remove the extra check so each feature must
   be explicitly enabled on the device.

Change-Id: I23aac6be5bd160b61e54eab8761e97bbbd5ae045
hal: Fix the samplerate/bitwidth comparison

Change-Id: If507ee28d4b3333dd91af286f2653554590fd7c4
hal: Avoid unnecessary rerouting for sample rate changes

 * The backend codec supports just a few sample rates directly,
   so make sure that we base our decision to reroute on this
   value instead of the actual sample rate of the stream.

Change-Id: I2ed82354563f60d04febb0e200252d0f45644a5e
Limit codec offload to devices with QCOM_AV_ENHANCEMENTS enabled

Don't even try to build this, nothing will invoke it and it may require
non-existing definitions for compression on the device

Change-Id: I1bf8055259e1dc937048269132a7e717d5fc6a01
Remove current msm7x30 audio HAL

This HAL is outdated & contains legacy code
Remove it so we can import the newest HAL from jb_2.5.3 branch
Import msm7630 audio HAL from jb_2.5.3 branch

Squashed import of the following CAF commits:

a0947f8 audio/msm7630: Initial commit for MR1 Audio bringup.
67550d7 audio: compile only if TARGET_USES_QCOM_MM_AUDIO set to true
51e24b7 msm7630 : Propagate the flag value to status
4642b91 Remove audio_poliy.conf from msm7630
b982f5a audio/8655: Enabling LPA playback by adding AudioSessionOutLPA class
fef3c65 audio/msm8655: Fix for AAC recording failure.
eeae23f msm7630 : Send proper channleMask for getInputProfile()
fe2acf4 Update copyright to The Linux Foundation
4931e2c audio/msm7630: Add usb audio hal profile.
04bcc5f audio/msm7630: Fix for volume change during voice call
58de776 7x30 : Port heap mask change to ion
c0a97d0 audio/msm7630: Fix the issue of voice call when HDMI connected
223c325 audio/msm7630: Fix to enable TTY device
387befb audio/msm7630: Add latency support for LPA
701b6c6 audio/msm7630: Fix for routing camcorded encoded clip audio to wired headset
a20c757 audio/msm7630: Fix for back to back VOIP calls failure
8f6be8a audio/msm7630 : Stability issue with LPA play back.

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>
legacy/msm7x30: Use CM standard qcom naming

* Also add msm7x30 to the build barrier
audio/msm7x30: Fix build in CM

* Build without qcom audio calibration
* Hack for prebuilt libraries we don't have access to
* Little cleanup of makefile
audio/msm7x30: Fix log tags and disable debug logging

Change-Id: I4712b09c86e3a067b0c847661fa43828be6eee23
audio/msm7x30: Stop the log spam during VOIP calls

Change-Id: Idfe211b1fef6f2aeee51ebe7f1b6ce3f4a0787be
audio/msm7x30: disable logcat spam

Change-Id: I82ebb39e62f49c24f236cc9eeadbc303f8dbd823
audio/msm7x30: Fix for Echo in Gtalk

- Echo is observed in Gtalk.
- Audio HAL informs that clients that it handle the Echo
  cancellation and with AHAL client turns off the EC.
- EC is not supported in this PL remove it from getparam
CRs-Fixed: 427161

Change-Id: I62eba7ed7566045f61c34a51c8ac36029b8596ea