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
Revert "msm8660: prevent input routing during VOIP recording"

Reverting this small change fixes an issue where the mic does not work
in anything else but dialer/phone. GNow etc all crash. This small change
fixes that.

This reverts commit c3a461aabec762307d77dd18db11593e96885cd7.

Change-Id: I70ec65f7372575bd7e98b842681c37f76916c4e3
Revert "Revert "msm8660: prevent input routing during VOIP recording""

 * Fixed, was missing { } around the log message and return statement
   causing it to abort with no error in any mode.

This reverts commit 1f11a83a50dcd859338613f12c802175a0bcfc8f.

Change-Id: I98208884fdb514b466a321c3f1a57815aeb33205
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
msm7x30: disable logcat spam

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

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

This reverts commit b7d4839fff30b743458a6e62e94b9413dbbd4da8.
Remove High water mark check in ALSA Device

- High water mark framecount check while reading from proxy
  device is causing issues during A2DP Music Playback
- Remove this check to avoid freeze during A2DP Playback

Change-Id: If066438c9f1886aa29ad57ccba154e0ca970a5f3
alsa_sound: Add boundary check for alsa appl and hw ptr

for continuous playback the hw_ptr and appl_ptr may go beyond boundary.
The overflow check is required to ensure boundary check.

CRs-Fixed: 483203
Change-Id: I8c56a97ad1cc2a895f904bb9c03f23714ea61035
alsa_sound:Removed AWB from tunneled-input-formats

-AMRWB recording is failing because tunnelled mode is
 getting enabled in Sound Recorder use case
-Fix is to remove AWB parameter from tunneled-input-
 formats as it is not supported on A Family devices

Change-Id: I0cfc9b62639dfd179bc13af0988776a6c89999da
CRs-fixed: 521809
libalsa-int: Check for valid mixer control

 When the mixer value is NULL , the mixer_close function
 crashes.
 Added a check to make sure that only a valid mixer function
 is handled

 CRs-Fixed: 516186
Change-Id: I61a45e4fbc68fbd82fdcb8f372e5b66a36487f2f
alsa_sound: Fix to Support in-call uplink recording

Uplink recording during voice call fails as the case was not
 getting handled while opening the input stream.
 -Added support for Incall Uplink recording in openInputStream.

GTalk call doesn't work if call is started during an existing
 recording session. All subsequent calls are failing after this
 scenario
 - Move the pcm device node open to read() call instead which will
   avoid opening the pcm device node of normal recording session
   and doesn't go into the error state. This will allow GTalk call
   to work and also all the subsequent calls to work

CRs-Fixed: 517810
Change-Id: I440ac4090b9f3e3a70b8acb4a818cfbf97e8c868
alsa_sound :Starting "UsbRecordingThread" if not started

- Recorder stop() was getting called in hangout app before the
  call got connected, this will stop UsbRecordingThread.
  Recorder set() is called with a sample rate of 48k due to which
  the USB recording thread doesnt get re-started because for VOIP
  the sample rate expected is 8/16k.

- UsbRecordingThread has to get started when the call
  gets connected.

Change-Id: I12c4d1f473224de7df2041f22fdc45cf77ac4acb
CRs-Fixed: 516270
alsa_sound : send voc-cal data for play voip use case

- Volume not being changed when playing voicemail
  during MODE_IN_CALL
- The calibration data was not being sent to the DSP
  for the play voip use case
- Setting the current modifier properly
  Permitting sending of calibration data despite
  no change in rx and tx devices

Change-Id: Ice9599941d3d6c115daa63c44bf4a1daa8f50ba3
CRs-Fixed: 508126
Merge remote-tracking branch 'upstream/cm-10.2' into cm-10.2