audio: Add support for offloading MPEG2 and WMA

Change-Id: I75afa455537cc8aaecd5d5a36ffda9e62785c723
hal: Add support for multiple instances of offload playback

Add support for multiple offload playback instances

Change-Id: I9d35b68fc8ca27c4eeb3976eb508b06c5ad3ca8f
hal: configure HDMI channels based on sink capability.

- configure output HDMI channel count based on sink
  capability when audio.use.hdmi.sink.cap is set to true

CRs-Fixed: 656308
Change-Id: I3dd3226054c68a69a2c29f8bb2f9c27e429ad2dc
hal: SSR support for compress offload

- add support for time stamp error propagation
  to frameworks on compress driver error

- close active compress session on SSR

Change-Id: I9cbd3a6c271097b81c9b79e71573fda8d78c7dbf
hal: SSR support for compress offload

- reject offload request based on sound
  card state

Change-Id: I38256ce6163f948a9e9c14cb895de3f71529a0e9
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