audio: msm8960: add extra sound usecases for in-call usage

Add support for use cases suffixed with "Voice" for in-call usage.
HTC MSM8960 devices seem to rely on ACDB to enable in-call echo
cancellation. This requires additional devices with different ACDB IDs
in the current msm8960 audio implementation.

Change-Id: I559de8cdefe7af10c95f50b46283e87688d65e5a
mm-audio: Revert csd-client related commits
We do not have csd-client, nor do we need it currently.

Revert "alsa_sound: Define csd-client flag to enable voice call on Fusion3"

This reverts commit 5b2c92762b0070eb2a887830b3e802ca6819aa91.

Revert "alsa_sound: enable csd-client for fusion3 voice call"

This reverts commit dd36f0775a9d9f57b3db3c2f6637a79177a33f3e.
We do not have csd-client.
audio: msm8960: fix ACDB for MSM8960 audio

Squash of the following commits to fix and enable ACDB using the
BOARD_USES_QCOM_HARDWARE flag:

audio: msm8960: update alsa_sound build to include libacdbloader

Change-Id: Ic28b2345f3e8616393e3052eb7489e87894728d3

audio: msm8960: add workaround for prebuilt libacdbloader

Jellybean expects the presence of headers for every linked library,
which doesn't account for linking against prebuilt libraries. Create and
touch the exported includes directory for libacdbloader as a workaround.

Change-Id: If79a5d38691fcdb725be31b13f8a92f89150f356
alsa_sound: Fixed in-call audio with wired headsets

Function getUCMDevice didn't return the correct use_case because
it was ifdef'ed with QCOM_ANC_HEADSET_ENABLED.

Change-Id: I84d6082131f77b7748d343a3d19cba3ddf54d0a6
alsa_sound: Send the correct channelcount to HAL

-send the correct channel count to HAL in case of getInputBufferSize function.

Change-Id: Ic6bbcda021601ba7b0515c3ce9761d54d2f19dd7
audio/msm8660: Add support for LG's camcorder mic

Change-Id: Ibac76fd053c3ae4a04503a24d0090c1c83fd2f11
alsa_sound: Enable QCOM proxy device in audio HAL

Change-Id: I6ce3fb48cf7bca69920eb9090f6594771ebd5add

Conflicts:

	alsa_sound/Android.mk
Add support for wifi display

- Use AudioPolicyManagerALSA to handle PROXY device

Change-Id: I19726ecb9a38b9209ae8cc1c6d3b9a03605c9522
hardware/alsa_sound: Add NULL check for pcm handle in recover code

- Mediaserver crash is observed in pcm stream close
- The recovery code doesnt check if handle is invalid before trying
  to close the stream. Last read or write call may be blocked on
  acquiring lock and by the time it acquires lock the pcm stream
  might be closed. This results in calling pcm stream close on a
  NULL handle
- Fix this problem by adding a NULL check for pcm handle before pcm
  stream close in read and write recovery code

Change-Id: I74a4dc6e621862e0c43fbc3f7b19e6594ef4685e
CRs-Fixed: 385020
hardware/alsa_sound: Implement AudioSessionOut to support LPA and Tunnel.

Change-Id: I739fe9494c46c7eb1c9ff0e7c5a5d0f403c7ef62

Conflicts:

	alsa_sound/Android.mk
	alsa_sound/AudioHardwareALSA.h
hardware/qcom/audio: Misc fixes for LPA/Tunnel

- Add support for Mono clips.
- Fix the issue for short clips or end of duration
- Prevent flush after EOS is completed as this will put
  DSP in bad state
- Acquire mParent's mLock before closing device to prevent
  concurrency issues with other streams.
- Device switch is crashing because of empty set parameter
  implementation. Implement setparameter to allow proper routing.

Change-Id: I155d3be3b8818292e91d4b0bf6e8fb8eef89d0d9
alsa_sound: VOIP bringup and add flags to openOputputStream.

Change-Id: I183d47f208aad97c83f85ef1876f8329ef94014a
(cherry picked from commit aa93e5e7bcbaf889855f352c1ec82b2d1cb1b0bb)
libalsa-intf: Port fix in ICS to JB

- libalsa-intf: update amix command to support numeric strings as parameter
- ucm: Add MI2S usecase to support Analog Broadcast
- ucm: Adjust headphone gain for Sitar
- ucm: Route voice call only after enabling device
- ucm: Fix native crash in free_list function
- ucm: Add modifier for voice over HDMI
- ucm: Push audio calibration during device switch with voice and audio concurrency use case
- ucm: Correct the capability check logic
- msm: Fix crash in snd_ucm_parse function
- Fix crash in ucm test app observed in LE
- ucm: Remove MIC BIAS CAPLESS switch setting
- mm-audio: libalsa-intf: Include alsaucm_test for LE builds
- Handle ESTRPIPE error in pcm_read
- Remove redundant mixer settings for Dual mic broadside for Sitar.
- ucm: Update the controls for speaker headset device
- Fix native crash when closing use case manager
- add voice earpiece, headphone, ANC heaset device mode
- Add new usecases for HDMI IN and Broadcast Playback
- ucm: Add support for audio recording with EC
- ucm: Add macro for acdb id of mono speaker device
- ucm: Add UCM files for I2S.

Change-Id: I361720bcf7d3e3e7e41e75e8778d55b69d14a07f

Conflicts:

	libalsa-intf/Android.mk
	libalsa-intf/msm8960_use_cases.h
	libalsa-intf/snd_soc_msm/snd_soc_msm_2x
hardware/alsa_sound: Port fixes in ICS to JB

- Fix duplicated use case entries in specific scenario
- Propogate Proper error code for pcm_open
- Fix no audio in FM with recording and system tone
- Add support for audio recording using EC. Android.mk changes are already present
- query for voice devices
- Fix usb-audio playback - recording issues
- Add NULL check for pcm handle in recover code
- Change voice call stop sequence
- Change the device disable sequence
- Fix Device Switch during voice + VoIP call
- Fix speaker dualmic getting enabled for handset mode
- Add getParameter support for surround sound record

Change-Id: I1e1c52cb2ac94c3ae38321e6f546e5ab0e19f272
alsa_sound: AudioPolicyManagerALSA implementation for QCOM added feature.

- Derive APMALSA from APMBase, keep proxy device support for WFD

Change-Id: Ia10a763900774b47ac1c0e7b1fe36eaa2dc55c85
alsa_sound: Add new ACDB function

Change-Id: I3da663cf2c95bd0aecea0f338f24faa616613c12
audio: Interface changes for the msm8660 and 7627

Interface changes to avoid build errors for the JB HAL

Change-Id: I4fb7e41218642d1e3ccf7b148e4881ae9b5a7347
libalsa-intf: ucm: Set appropriate volume for headphone device

While playback on headphones, the digital volume on the headphones
need to be set correctly and the setting needs to be undone when
the headphone path is torn down

Change-Id: If1c7cc93ecf1a44c1b6d6abe4c4e172670f0c5ce
CRs-fixed: 383917
hardware/alsa_sound: Fix for  VOIP call issue

-Removed devName1 and used the existing devName
-update input device for voip case

Change-Id: I3e3b49da4c6164a7b2f54bf62b2fe9d0b56b3064
CRs-fixed: 388019, 388033
audio: Interface changes for the msm7x30

Interface changes to avoid build errors for the JB HAL

Change-Id: I5f0d53ee1080fb98ca258126157783f4e8f24d7e