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
hal: mpq:  configure HDMI channel number

Fixed the issue that HDMI channel number was not configured
from audio HAL

Change-Id: Ibd141befb677ef4a00c4c4a14f0d6e58c225acbd
  hal: Correct pcm device ID for QCHAT session

  Correct QCHAT pcm device ID of 8x10 as per the
  machine driver.

Change-Id: I7f782d08584f95941e6041c0b5e1661a4398c20e
hal: add support for all_call_states key

Add support for all_call_states which can be queried by
applications to know call states.

Change-Id: I5ba66186e9d9f6d5769a814f4c1e0627c6f6dd74
hal: fix set_parameter() returning -2 error

When setparameters() is called and if the known keys are not found,
the implementation returns -2 error.Fix this by setting error only
when keys are found and there is an error while executing corresponding
implemention.

CRs-fixed: 589280
Change-Id: If5544d6fdeac47ddfc1f7e8e18bfa81e2ef5cbc2
hal: HFP support for setting sampling rate

- Add support for setting sampling rate using setparameter. This
is to support 8000 or 16000 sampling rate set from BT

Change-Id: Ia6c7e530df0ba0226e492937e1c9acc70f6c6d13
hal: avoid audio rerouting to different device when hfp is active

 - when hfp is active we make sure we do not reroute anything
   new to different device with same backend.

CRs-Fixed: 592390
Change-Id: I75e69916a8fe7e711b326cf82b206e3e16508b60
hal: audio routing enable in hfp case

 - When hfp is enabled make sure to reroute during device
   switch

CRs-Fixed: 595541
Change-Id: I680b4198a2d3baf257ae4bcfaf0c955eb62df3d9
Merge "  hal: Correct pcm device ID for QCHAT session"
Merge "hal: set gapless metadata for compress  offload playback"
Merge "policy_hal: Do not allow sonification for USB headset."
Merge "hal: HFP support for setting sampling rate"
hal: Disable gapless offload playback by default.

-Set the property-audio.offload.gapless.enabled to true to enable
 gapless playback by default.
-Set mixer control to the driver to decide if gapless playback needs
 to be used or not
-If gapless playback is not enabled then partial drain from HAL is
 treated as full drain.

Change-Id: Id7f4967fe528bab9097c3f609058276ec02174e1
Merge "hal: add support for all_call_states key"
Merge "hal: fix set_parameter() returning -2 error"
Merge "hal: Disable gapless offload playback by default."
hal_mpq: Fix the underrun issue in the offload playback

The cmd_pending variable was not updated correctly leading to the
underrun

Change-Id: Ic5a779c2caf737da097ce9165242f1bdbfa737aa
hal_mpq: Add the SPDIF device entry

Add the SPDIF device entry.

Change-Id: I865c65a150e713586adebb1541055feacaadcdf0
hal: fix no audio when switching devices in voice concurrency

When voip usecase is active and voice call is recieved, voip
usecase will go to standby causing devices to be disabled
resulting no audio in voice call.

CRs-fixed: 589353, 592531
Change-Id: I6d5e2f9c5dd72438affd82799333d7227c72533f

Conflicts:

	hal/audio_hw.c