audio : reconcile with CAF

N/A

Change-Id: I301a75b15a62a8a4e3c1a04fd9fd204a13b95d5b
Signed-off-by: huangqiwu <huangqiwu@xiaomi.com>
audio-caf: allow devices to only set min buffer sizes

Change-Id: I182f86549b01d4c452cc94201c638c410592083e
audio: enable fluence incall feature
audio: Fix separated audio input support

 * Fix declarations for QCOM's refactoring.
 * Allow enablement via board flags.

Change-Id: I162d6f1d9a955df2dd9f4e47fb04b081664fcaf4
audio: Dynamic library loading, compilation fixes.

Squashed commit of the following:

  commit 45b2a0b5e2344ead1413d627875bf10f79e15163
  Author: Steve Kondik <shade@chemlab.org>
  Date:   Sun Dec 23 04:50:52 2012 -0800

      audio: Dynamic library loading, compilation fixes.

      Change-Id: I04d5e7b96611572a7758c610ebdf0fd00e8346aa

  commit 2c78505b30f2362295e4a995039abf2c650f0d7f
  Author: Mike Kasick <mike@kasick.org>
  Date:   Tue Jan 8 10:31:51 2013 -0500

      alsa_sound: Add missing assignment of acdb_handle, fixes in-call volume

      Assigns AudioHardwareALSA::mUcMgr->acdb_handle to mAcdbHandle, which is
      missing in the port of dynamic library loading from the AOSP/mako HAL
      (I04d5e7b96611572a7758c610ebdf0fd00e8346aa).

      Restores acdb_send_voice_cal and acdb_send_audio_cal calls, which among
      other things, are required for in-call volume adjustment to function.

Change-Id: I5b991a0be410af5eaff133625b63504545d7aa86
alsa_sound: Support using legacy CAF input buffersize logic

Older CAF audio HALs only used getInputBufferSize for 5.1 channel
audio.  Newer CAF HALs use it in numerous other use cases too,
including for stereo audio recording.

This logic breaks with older kernels using the legacy CAF
logic for input buffer sizes.  Allow the board to force the old
logic.

Typical symptoms of needing this logic are if any form of
audio recording (including video recording in the camera)
fail.

Examples of affected CAF tags:
A8064AAAAANLYA101034
A8064AAAAANLYA1334

Change-Id: Idc79b63ee781d7a7ac7eed20bad261e1020abd65
Add back ifdef QCOM_COMPRESSED_AUDIO_ENABLED for sound/compress_params.h

Motorola Qcom devices haven't completed a 3.4 kernel and use a 3.0.31
kernel.  This brings back ability to use audio-caf on these devices.
This was originally part of commit b0f0fce093190136a2def290051a2102be2ba0e4
    audio: Initial bring up of QCOM added audio feature(jb_cho).

Change-Id: Id83897b3e9b5b027d4c27ab3fa82f37fb4846f15
alsa_sound: Allow SPEAKER_DUAL_MIC_* UCMs with USES_FLUENCE_INCALL

Enables SND_USE_CASE_DEV_SPEAKER_DUAL_MIC_* UCMs when using speakerphone
with USES_FLUENCE_INCALL defined.  This allows devices to use different
DMIC settings for earpiece and speakerphone modes.

Devices that wish to retain the old behavior should clone the DUAL_MIC_*
UCMs for SPEAKER_DUAL_MIC_*.
alsa_sound: Add option to use seperated speakerphone device

 * Enable use of this with BOARD_USEDS_SEPERATED_VOICE_SPEAKER

Change-Id: I3fb8f8c97c4116ce9717165878d63483e2facb06
alsa_sound: Disable verbose logging

 * Kill the logspam.

Change-Id: I121cddb04c613e03a95b751b7c2fc86a46b89bd4
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
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
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