hal: Add support for PCM in offload path

- Translate PCM Offload format to pcm codec id
- Set 16/24 sub format id in compress params format
- Calculate offload fragment size for pcm
- Move offload calculation functions to platform file
- Update audio policy manager isOffloadSupported
  for pcm offload profile. Use audio.offload.pcm.enable

Change-Id: I2064d646b66e8283fce2cc736e96fb93cba0a552
hal: Fix memory leak in HAL debug logs

String returned from str_parms_to_str for set/get parameter in
debug logs is not de-allocated. Fix is to make sure the memory
allocated for set parameter key value pair is de-allocated.

CRs-Fixed: 610079
Change-Id: I5027d8f1741c9e7223e7b4721f8d5473404998d3
hal: fix a bug introduced as part of changes done for fixing memroy leak

The return value of platform_get_parameters() is getting freed up
wrongly which is fixed now. This bug was introduced as part of the
gerrit-id 611791.

Change-Id: I61e4f5abc732fbe84702452e27cde7c1c36f77e6
hal: Update the correct channel count for dolby configuration

-Wfd supports both 5.1 and stereo. Based on the sink capabilities
 update the correct channel count for dolby configuration for wfd.

CRs-Fixed: 609429
Change-Id: I85b81ba7db7134a6781007393f0f3c2adb5ea138
hal: set Dolby DMID for low latency playback

- Remove additional check to set Dolby DMID
  for low latency playback. DMID should
  be set for all playback use cases.

Change-Id: Ia93e1b13cc61145148a1bf520a222f8e480b3e2b
CRs-Fixed: 620246
hal: Fix for down-mixing of multi-ch offload playback

- Check if multi-ch playback in offload path is active
 before re-configuring the HDMI channels

Change-Id: If3639ffbbbc56083f9d09257ea4fafdc2b204e76
CRs-Fixed: 622339
hal: Enhance compress offload logging

Add/Enable msg logging
-Salient funtion calls to tinycompress
-Salient funtion calls from frameworks
-Events sent to frameworks
-miscellaneous important events

Change-Id: I493d98d3f3c1216f7c6030a539e01d1f2dd8c202
post_proc: send ENABLE_FLAG directly to offload effect driver

Enable flag should be sent directly through offload effect driver to
adsp whenever bundle receives EFFECT_CMD_ENABLE. Otherwise enablement
will only take effect in adsp after subsequent parameters being set, and
that's not expected.

Change-Id: I5a8f936095b5667f0e04b9109b67eaa0faec3a69
mm-audio: Update bitrate based on profile and samplerate

As per AAC specification bitrate is a function of profile
and sample rate. Change ensures that bitrate will be programmed
as per the specification.

Change-Id: I188f7155c50c32b7c9945036c0ad0ef3f5ee164a
CRs-fixed: 606251
hal: Fix memory leak in listen module

String returned from str_parms_to_str for set/get parameter
key-value pair for listen module is not de-allocated. Fix is
to make sure the memory allocated for key value pair
is de-allocated.

CRs-Fixed: 610083
Change-Id: I290e61168b8fd1569a7b89e13257e142aa5aa1ac
hal: msm8960: Don't even try to calculate a compress-offload buffer

The platform doesn't support compress offload

Change-Id: I1132659f1cd1d4f7131c99a64ddd94e1eac8b506
Merge remote-tracking branch 'upstream/cm-11.0' into HEAD