alsa_sound: add HTC CSD CLIENT board flag for special cases (BT)

New HTC phones like m7 have special settings for BTSco CSD device
ids. Adding board flag BOARD_HAVE_HTC_CSDCLIENT to handle
these special cases related to HTC's csd client.

Change-Id: Iae3cb4568c0d1d6b5d75cef7a836d78ab3fa9522
alsa_sound: change noisy debug statements to verbose

Change-Id: Iaa1f0603d9efc1b4593c61b0558a2369ac77d7dc
alsa_sound: Kill LPA logspam

Change-Id: I61e4e0500911865d2a119f552cc97c8bba99c3b8
audio-caf: fix dbg message derp

Change-Id: Id64e7c8fa04cafa57f422558c5aa84a21127b88f
audio: modify the SPEAKER_RX_ACDB to support both MONO and STEREO speaker

Change-Id: Iea7d8d5cdb7b04b347be84343f5bd44caeb51609
alsa_sound: Add support for seperated VOIP devices

 * Similar to the VOC devices tuned for voice calls, some new devices
   are using VOIP devices tuned for SIP and Hangouts.
 * Enable with BOARD_USES_SEPERATED_VOIP

Change-Id: I3a49be26ca2ad3e1aafb8b0960935ac8c735fe51
alsa_sound: Add support for seperated headset mic devices

 * Some recent devices such as the Galaxy S4 use dedicated 3-pole
 * headset mic devices while in-call.
 * This also supports the seperated VOIP headset mic device.
 * Only engage the ES325 dualmic for speaker/earpiece usecases.

Change-Id: I1c0b01a9df70fbb7364ba69004aa7828e3f1f01c
alsa_sound: Add support for VR-on-wired-headset device

Change-Id: Ib206649194794f46480b7f87eaeb9e3fdb0df1b1
audio: provide a hook for audio amplifier implementations

Example: http://review.cyanogenmod.org/#/c/38221

Change-Id: Ib236598a5888b2af19bcfb81e285f644a0e84c0d
audio-caf: Trigger immediate doRouting() on setMode() change to normal

On call hangup, this normally happens as consequence of
a setParameter call shortly after the change of mode.
However, if a stream write occurs between the mode change
and setParameter, AudioStreamOutALSA::write calls route()
which then laters causes doRouting() not to deroute voice
properly.

By triggering an immediate doRouting() on a setMode change
to normal, we remove this window of opportunity for voice
derouting to fail.

Resolves calls with mute audio on jf.  This could
theoretically show up on other platforms if the
timing conditions are right.

Change-Id: I90e98596dcb42a0b4b164fc27790c39349ea777c
aacenc: Shut your facehole!

Change-Id: I962f6d99449868187d95b86c3a6672f098de5923
alsa_sound: Untangle VOIP/voice speaker handling

Change-Id: Ieedac3af120a08f567a6575fdb06e6e22946307d
alsa_sound: Allow dual-mic device to be used for VOIP calls

Change-Id: I7a4a79a1c48bd082be8d5163fa8978bca4421390
alsa_sound: Improve USB device detection

 * Samsung's proprietary dock was hijacking the routing when a USB audio
   device such as a DAC was connected in host mode.
 * Instead of blindly shoving stuff down a route that doesn't work for
   the dock case, check the switch in sysfs for the proprietary dock
   first.
 * Remove the DOCK_USBAUDIO define entirely and just wrap it up with
   everything else that SAMSUNG_AUDIO includes.

Change-Id: Id9ea2641b67c68a8b38d24aae88b186ee6e991f0
alsa_sound: Don't use USB devices for calls

 * Causing audio failure on JF. Disable until it's sorted.

Change-Id: I492e1882450f26aa6c6c062915df83f03dfa193b
alsa_sound: Add support for sound card in Galaxy S4 Mini

Change-Id: I9ff14fa6cc1b1a0c5b2307f4f84dc42b378ae8c9
Fix -Wreorder warnings

In file included from hardware/qcom/audio-caf/alsa_sound/AudioHardwareALSA.cpp:42:0:
hardware/qcom/audio-caf/alsa_sound/AudioHardwareALSA.h:
In constructor 'android_audio_legacy::AudioHardwareALSA::AudioHardwareALSA()':
hardware/qcom/audio-caf/alsa_sound/AudioHardwareALSA.h:971:11: warning:
'android_audio_legacy::AudioHardwareALSA::mCsdHandle' will be initialized after [-Wreorder]
hardware/qcom/audio-caf/alsa_sound/AudioHardwareALSA.h:957:10: warning:
'bool android_audio_legacy::AudioHardwareALSA::mMicMute' [-Wreorder]

Change-Id: I778f97bb52ac717cc6915555a177f4335dfde1c4
audio-caf: ensure mInputSource is initialised

Change-Id: I59f2f1aeca460256bfa4989302c2f74c6f791ab1
Fix Wformat warnings

warning: format '%d' expects argument of type 'int', but argument 4
has type 'long int' [-Wformat]

Change-Id: I406189caca08356efe92060cb86a2f8f87e57fcf
audio: libaudioamp: add hooks to open/close for amplifier init

Change-Id: I64e8cafad3e5eb872f2924eabde9b5dbfc947710