alsa_sound: Add support for sound card in Galaxy S4 Mini

Change-Id: I9ff14fa6cc1b1a0c5b2307f4f84dc42b378ae8c9
Revert "alsa_sound: Calculate proxy port latency"

This reverts commit 6f72b5fba2f1020466d4a6531618331b8f8c0632.

Revert "alsa_sound: Query BT/USB streams for audio latency"

This reverts commit d46eca4d243daefb28fefbffdcb389070fd58c30.

Revert "alsa_sound: Flush Proxy data at high water mark"

This reverts commit a7e0ca0ab5f39c5840d25594f2a3d86a49aaa70f.

Revert "alsa_sound: Fix buffer pointer mismatch in proxy"

This reverts commit 6a6c9ec67be6375e00d42b12cbeb986ef5e121c3.
legacy/alsa_sound: Return bytes written to HAL for tunnel playback.

- Return bytes written to HAL on successful pcm_write for tunnel and
lpa playback. Return error value returned by pcm write in other
condition.

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

Change-Id: Ieedac3af120a08f567a6575fdb06e6e22946307d
alsa_sound: fix for out-of-order deadlock in AudioSessionOut

-standby() and setParameters() acquire lock and parent locks in
 out-of-order fashion.
-Moved lock acquisition in standby() after flush() call which
 fixes the order and aligns it as in setParameters()

Change-Id: I0d1ad3d4b0cbf818a6fa2844024cd62aa882de22
CRs-Fixed: 514367, 518682
(cherry picked from commit 21ed4009199637a67419dc36131c68d44af5eb95)
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: Clean up makefiles

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

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

Change-Id: I492e1882450f26aa6c6c062915df83f03dfa193b
Merge "alsa_sound: Add support for sound card in Galaxy S4 Mini" into cm-10.2
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
msm7x30: use policy manager from ALSA

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I81b65df83425fbb3fada33d53eda4f449f55ea55
msm8660: suppress some logcat spam.

There is a lot of logcat spamming going on by this. Moved some logs down
a level to ALOGV, and some of the AudioHardware.xxxx.(standby) commented
out completely.

Adapted from this patch: http://review.cyanogenmod.org/#/c/48202/

Change-Id: I6b33fbc8e004337a7670452c0c1823a06d244de9
Merge remote-tracking branch 'cm/cm-10.2'; commit 'HEAD' into HEAD