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
Merge branch 'cm-10.2' of https://github.com/CyanogenMod/android_hardware_qcom_audio-caf into HEAD