hal: Add audio support for 8092

- Add support for OMX audio encoder components for mpq8092.

Change-Id: I7a652581fd48fc22c025193d2c825b6e747edcfe
hal: pass set parameters call to listen hal

Pass set parameters call to listen hal. Currently it used
to handle SSR in listen hal.

Change-Id: Ia8df94ca87916afff45fe4e3fd569f6268bc3560
audio: Re-arrange member var initializations

Rearrange initializations of some stream_out member
variables to prevent possible uninitialized use.

CRs-Fixed: 587676
Change-Id: I7018f38f29a19b130185b285f4acf22219e4228c
audio: hal: Fix to use correct EC_REF_RX

In 8610, we need to use I2S_RX as ec_ref_rx
parameter and for SLIM based targets use
SLIM_RX.

CRs-Fixed: 575647
Change-Id: Ia220498f302a58dc3dbd42b1874fa01f081ce3dd
hal: Add property to configure the compress offload fragment size.

Add property - audio.offload.buffer.size.kbytes to configure offload
fragment size. The maximum value for fragment size is 256k. Default
value is 32k. The minimum value is 8k.

Change-Id: I9b440a420270b27f5fdba9f82de6944da0afb9d2
hal: Fix slowtalk key value type

Slowtalk key value is defined as string in upper layer but
HAL expects key value as type 'int' which causes type mismatch.
change slowtalk key value as string.

Change-Id: I66499436d1d09528e4f4b3079c39c9c1a0777385
hal: Fix voice call with QUAD MIC

voice call using quad mic doesn't work.
Fix this by update quad mic acdb entry in the table.

Change-Id: I744ac2fe26e39e24f0b0c8f0eed337c86cd7bd6c
hal: Detect sound card dynamically

- HAL always assumed SOUND_CARD/MIXER_CARD
  number to be zero. This could cause HAL
  not to load when some other card is
  detected earlier to HAL.
- Fix by removing these Macro(s) and reading
  correct sound card number runtime while loading
- Corrected its use cases across HAL replacing it
  with appropriate platform API

CRs-fixed: 580226

Change-Id: I4512e4a2f7f81d8415c3ba8ec393c96867e6d69a
Merge "audio: hal: Fix to use correct EC_REF_RX"
hal: Fix for adev_open causing hang

- Mutex acquired in the begining of
  the synchronised block but is not
  unlocked when platform_init fails.

- Fix by adding the mutex unlock code.

Change-Id: I02b7f7cac0185dd40ec9f03e443e4de98b18c105
CRs-fixed: 590216
policy_hal: remove unused function isVirtualInputDevice

- isVirtualInputDevice is a static member function and
  its implementation should be modified in base class only.
- Remove isVirtualInputDevice in policy_hal and modify
  APM_AUDIO_IN_DEVICE_VIRTUAL_ALL in base class to support
  FM recording over A2DP headset.

Change-Id: Ib0527cfdff170367491feb62b117815558e139e1
CRs-Fixed: 581377
Merge "hal: Detect sound card dynamically"
hal: Avoid duplicate primary outputs

open_output_stream API expects the default usecase to
be returned if other usecases are unavailable or unusable.
However, the output returned in this default case must be
the default primary if it exists.

Change-Id: Ie5cc53f077358d7039d62b09b29edb58c213bc08
audio: Add support for 8974 Voice2

Add the Voice2 pcm ID to enable DSDS on 8974.

CRs-fixed: 587066
Change-Id: Ifd134313a49af601f4e0f1d66ad0b4ff8596609d
hal: set gapless metadata for compress  offload playback

-If any of the  metadata parameters are set from the framework.
 set the gapless metadata to one.

CRs-Fixed: 588353
Change-Id: I66a79d3f64515d108585527496a754c06a441560
policy_hal: Do not allow sonification for USB headset.

- Ringtone will be played on speaker when USB headset is connected.
- Sonification is not allowed for USB headset. The behavior is
  similar to HDMI.

CRs-Fixed: 588622
Change-Id: I5fba6ae0e42235f4144ccebac2a55fe1529b530a
policy_hal: Fix to route the call to proper device

When voice/volte call is setup over USB headset, the call is
still on USB headset even after turning on speaker.

Don't set the device to USB headset when speaker is forced
by Telephony during call.

Change-Id: If6a95895a33423ff5150862a823fc669fd44e59a
CRs-Fixed: 588884
Merge "hal: Fix for adev_open causing hang"
hal: Fix for adev_open causing hang

- Mutex acquired in the begining of
  the synchronised block but is not
  unlocked when platform_init fails.

- Fix by adding the mutex unlock code.

Change-Id: I02b7f7cac0185dd40ec9f03e443e4de98b18c105
CRs-fixed: 590216
hal: Add support for Volume Boost

Add support in AHAL for Volume Boost. A parameter is received
from the UI and the volume boost feature set ID is sent to the
calibration driver to send the volume boosted calibration.

Change-Id: Iafb099b2750deaf58dc5f073f31a23abb9bfe950