hal: Add support for VoWLAN feature

Add VoWLAN pcm id, usecase to enable voice
over WLAN feature.

Change-Id: I2d10ff06342bfcbef15a4769ba90deaeb4218107
hal: Add support for VoWLAN on MSM8974

Update the VoWLAN pcm id for MSM8974

CRs-fixed: 662362
Change-Id: Ia0894fa1347f05e55993af91da91272af3161f83
hal: Update EC support for HPF usecase

- Ensure reference device is set if audio is routed
to speaker/headset during HFP usecase.

Change-Id: Ia404aaa8ec8b80e9f4be14840dfef3bf9afef435
CRs-Fixed: 641513
hal: Permit device switch for primary output in a voip call

The device switch from speaker to earpiece or vice versa fails
during a QQ voip call. Currently, we use the same devices for
all usecases as that of voice/voip call and avoid switching the
same for other usecases when a voip/voice call is active. At
times, voip call has primary output which uses deep buffer path.
With current design in place, we do not permit device switch on
deep buffer path since voip call is active despite the rx on
primary output.
Do not select voip usecase devices if the output stream uses
primary output or in effect permit switching.

Change-Id: Ie61a7d7d8f27d55a393d173a724697045f66e1d6
CRs-Fixed: 685222
post_proc: Fix improper datatype of EQ preset band level value

unsigned int causes negative band level turn out to be extreme large
value, which results in EQ works abnormally due to unexpected parameter
sent.

Change-Id: I81120c604f4e9f23b25d5a45a7b0294fea63d207
CRs-Fixed: 696825
hal: Add/remove speaker protection usecase to/from global list

Audio hal maintains link list that contains all active audio/voice
usecases. When usecase is being started it shoule be be added to
list and removed when usecase is disabled.
Speaker protection usecases were not being added to the list which was
causing the speaker calibration pre-emption to fail. Change updates the
usecase list and ensures that device lock is not acquired when
calibration is being pre-empted

CRs-fixed: 688972
Change-Id: I377346243ceaaebfcf80673f367dbd8bb83d5381
hal: Speaker protection pre-emption fixes

Speaker protection module should acquire the device lock for all global
operations. This change will ensure that the pre-conditions required for
calibration will be met and if any audio/voice usecase is started when
speaker calibration is being done,speaker protection thread should
cancel the calibration.

Change-Id: I0d5fa23657161ec971e851944a0045a01d8248ea
CRs-fixed: 688972
hal: add the stream to uc_info for speaker protection enablement

Stream was null causing data abort when speaker
protection is enabled. Set it to primary_output in case
of playback and set device in case of recording.

Change-Id: I4b532ad7d76adab75e1ef0719eaba197eb3d9379
hal: allow msm8610 to use same functions as msm8226/msm8974

Change-Id: I0e161e28fe798884ed42bb13e23100ab0b66a062
hal: speaker protection is msm8974 only

Change-Id: If07c3b1ad902de283707da673c5c305451e4ee10
audio/msm7630: Introduce LowPowerAudio.

Change-Id: I77cadf3c028bc9dead0b0887c308f7394d4b14f2
audio/msm7630: Add support for audio effects for LPA clips

Add support for audio effects for LPA clips on msm7630

(cherry picked from commit 176dd4c4f0a926fd463cf2d4cf1051327a75598b)

Conflicts:

	msm7630/AudioHardware.cpp

Change-Id: Ibfa9376dae14bc772fa0cb90e2bae3309a684fc8
7x30 : Port heap mask change to ion

-mp3 clips fails to play intermittently.
-ION fails to register with the driver.
-Heap mask field passes as argument at allocation
time to specify ion heap.

CRs-Fixed: 444197

Change-Id: I35b7f162c906b856b7b4f5ee2270cd10256144bf
msm7x30: Add missing get_supported_devices in HW HAL

Change-Id: Idb90528899ae3d5a6d037f1af0544225faa02cc6
msm7x30: Fix routing for all AudioSessionOut types

 * Pass the new output device around so that we're not always just using
   the one in the base class. This was preventing proper routing for
   all output streams.

Change-Id: I07a6bf4cf15c7b6bea310c2cd593ca494a89ca5f
audio/msm7630: Add latency support for LPA

-Audio loss for few seconds on headset connection.
-Stream is unmute in checkDeviceMuteStrategies before device switch
occurs.
-Increase delay in tempMute to ensure unmuting happens after device
switch happens. Also change latency for LPA to correct value similar
to that of hpcm.

Change-Id: I539a4726f6b9d53bbfdc5f92a8801d5f14c360eb
CRs-Fixed: 448355
audio/msm7630 : Stability issue with LPA play back.

- ANR is observed during LPA playback when there is song switch for
  every few seconds
- The song switch does not happen when the song is played till the end
- Native crashes are observed during rapid seek, next and previous
  song switch operations. There is some race condition between write and
  flush which results in adding a buffer multiple times to empty queue.
  This tries to free the buffer multiple times during reset and results
  in native crash. Fix this issue by adding proper mutex in write and
  flush calls which synchronizes these operations and avoids crashes.
  After Pausetimeout, reset is called due to which EOS is posted
  to observer. This results in start or reset operation on a closed
  sink leading to crashes. Avoid posting EOS if reset is already
  called.

Change-Id: Ie171d86f39fc4484710002c4940496dc90fbb05a
CRs-Fixed: 463272
msm7x30: Update device API

Change-Id: I15bd511c3b753dc4ce076a482095e675f601c1ec
msm7x30: Fixup ifdefs so LPA playback works

Change-Id: Ia389f2c3905ba5062933912150b856e3464c2e13
Revert "msm7x30: Update device API"

 * Causes some routing issues, for example when using GEL
   and listening to music via headset, audio is routed to
   speaker when jumping to home screen from Apollo. Probably
   missing some additional changes, so revert this for now.

This reverts commit 75afa6a8a1a928f861280b640222f35e64929995.