hal: Clear VI feedback cal after VI capture path is started

When speaker protection is enabled, afe TX common calibration will be
pointing to VI feedback calibration. If any TX capture usecase is started
by passing HAL(tinycap), recording will fail.
Speaker protection module will set the afe tx common cal block to
handset mic once VI feedback path is started. This will ensure that
capture usecases can be supported with speaker protection enabled and
HAL by passed.

Change-Id: I1716d66aa87591b7a7e456ed059c2f75de8a5f84
CRs-fixed: 620979
post_proc: Enable reverb in DSP to start effect

During switch to tunnel playback, reverb enable command is not sent to
DSP and causes reverb effect not applied continuously.

Send reverb enable params to DSP to start effects during switch.

Change-Id: I6e8bbdf4c1e5933be9a37413a4c4f1b7106fe6ba
CRs-Fixed: 637016
post_proc: reverb preset id is not mapped correctly

Array index is not correct and causes uninitialized value being used
when 'Plate' is chosen. Correct index to retrieve the right preset id.

Change-Id: I2ad058bc7dc5d9b74882da2f5d4c0e3570f9e952
CRs-Fixed: 630429
post_proc: disable Bassboost and Virtualizer for certain devices

WFD, Hdmi and usb audio are not intended to be applied with
SA+ bassboost and virtualizer, so add into invalid device list.

Change-Id: Ifcf9cdffb6657cf82bf903d16d4a3ae8471590f0
CRs-Fixed: 630408
hal: update bt-sco sample rate before device enable

- Some BT solutions set sample rate only at the time of BT connection
  but not for every device switch. Due to this sample rate is not
  set properly after device switch.
- Update bt-sco sample rate before device enable instead of sample rate
  set parameters call.

Change-Id: I07cb0c186296b00a99713b67628fb87b2f134d32
post_proc: disable effect immediately when routed to invalid devices

Offload effect is still perceived when invalid output device is
connected. We should send disable command immediately once phone is
routed to unexpected device and forbid effect enablement during
temporary disabled state.

Change-Id: I26d4ccfd77037a879622b0437ae3916ff0071a69
CRs-Fixed: 630408
Audio: Add routing option between HDMI speakers and device speakers

Add option that routing  between HDMI audio output and device audio
output, when HDMI is connected.

Change-Id: I9bbe9b1cbee5b6659502dae386c086f37bef2120
audio: primary desc check for sonification

- Audio glitches on alarm expiry if alarm starts
  on screen lock/standby mode

- On alarm expiry alarm tone will start play on combo device
  &screen unlock tone try to play on headset which results
  multiple device switch, as a result audio glitches are audible

- Fix is to treat all non-music streams as sonification
  if sonfication strategy is used by primary desc which
  will avoid device switch

Change-Id: Ie280400d5f754a8d4bd8885b6836be5e120f8783
CRs-Fixed: 514467
Crs-Fixed: 626722
hal: start voip driver independent of voip output stream

- Voip driver requires voip output stream to be opened
to start itself. But it is possible that some applications
may use voip input and normal audio output. Code changes are
done to handle this scenario.
- It is possible that some applications may use different
sample rates for voip input and voip output streams. It is
handled now in such a way that, if the sample rate of the
secondly opening stream does not match with that of the
first one, the second stream will not be allowed to open
voice path for VoIP.

Change-Id: Id9d86181eeee2c4ea0aa49a723ca92c1961a559b
CRs-fixed: 601785
hal: HFP support for setting volume

-Add support for setting volume using setparameter.

Change-Id: Id614d719324ab6b280116fd952c3fa73844ce1b0
CRs-Fixed: 596437
hal: apply TTY mode change for all voice use cases

Update devices for Voice2, VoLTE and QCHAT sessions
based on the TTY mode. This change is needed to support
enabling/disabling and switching TTY mode during
voice call.

Change-Id: I4f1fde8ce6b20fad0d24e0cd963e2c3709ff25d5
CRs-fixed: 608183
hal: Add new CSD API to reduce in call device switch delay

New CSD api is added to reduce device switch delay during voice call.
This api is called before enabling the devices so that csd voice call
sequence on MDM can run in parallel with device enable configuration
on APQ.

Change-Id: I9239ff21e1c07370516d0ed668e1e94af12f9eb2
hal: Check hfp usecase to differenciate between nb and wb

 - Need to check if the hfp session is WB or not before
   setting the device to avoid rerouting.

CRs-Fixed: 605465
Change-Id: Ice6fd2776b89e5358004071b011ac304f35dbf58
hal: Do not apply CSD voice switch API on 8960

Introduced by I9239ff21e1c07370516d0ed668e1e94af12f9eb2, not relevant
here.

Change-Id: Icb63ad5dc17029bc79f81051458b47a9ddb00bf5
Revert "audio-caf: legacy: Sync FM flag with ALSA"

This reverts commit 761a36f17b4ef4a6d2ca98c5f7b52c993007a947.
Revert "audio-caf: Remove STE fmradio"

This reverts commit 1898778aed29cd375d7a67f799d2ad943b9f5191.
Revert "audio-caf: resurrect msm7x30 audio"

This reverts commit 5dc4018be394e44b385583f116d334177094bc9a.
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
Fix build in CM

* Build without qcom audio calibration
* Hack for prebuilt libraries we don't have access to
* Little cleanup of makefile