audio: provide a hook for audio amplifier implementations

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

Change-Id: Ib236598a5888b2af19bcfb81e285f644a0e84c0d
alsa_sound: Fix for short break in music when touch tone plays

-When touch tone plays for the first time while music playback is
going on, a short break in music happens.
-In checkDeviceMuteStrategies whenever there is a change in device
on an output, tempMute is set. However the same tempMute is used to
decide whether to mute an already existing session on a different output
irrespective of the current active device on that output. Due to this
mute and unmute happens even when there is no real change in device on
a particular output which might cause a short break in playback.
-Add check to ensure that active streams are temporarily muted only
in case of a change in device on that particular output.

CRs-Fixed: 495009
Change-Id: Icbc2afa4516f700b170c1f6801135cc5ca61fbfe
alsa-sound: Fix to sound burst on switching from speaker to headset

 -During device switch stream mute(vol 0) for compressed or lpa
  stream is getting applied after the device set for primary output
  because first it check for primary output, set the device then it
  check for lpa or tunnel output and mute the stream.

 -Set the stream mute for other output(LPA or Compressed) followed
  by device setting for lpa or compressed output and then set the
  device for primary output.

CRs-Fixed: 480077

Change-Id: I6bc1ba5d8df766fbbbffaba4d44f14f7a0be666f
msm8660: Fix VoIP device for Samsung Audio

* Add USE_SAMSUNG_VOIP_DEVICE for voip devices
* Added ifdef for MVS include

Change-Id: I57b52cc159eb6ef5cadadf8acacffceaf2bc77aa
msm8660: Fix call/voip audio routing for Samsung audio

Change-Id: I021344b1c4672b2fb92503059b3eaec6121bdc19
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
Merge "audio: provide a hook for audio amplifier implementations" into cm-10.1
msm8660: only use voip stream if sample rate is 16k or less

Change-Id: If735eee450fa9f9c99aa83c9cf1a81a955b12c57
msm8660: add routing for VOIP_CALL input stream

Change-Id: I5556f308670c6fe94dd8a82e2cb9484affd5e791
msm8660: use defines instead of "magic" numbers

* use AUDIO_HW_VOIP_SAMPLERATE_8K and AUDIO_HW_VOIP_SAMPLERATE_16K
  for sample rates for voip
* use AUDIO_HW_VOIP_BUFFERSIZE_8K and AUDIO_HW_VOIP_BUFFERSIZE_16K
  for buffer sizes for voip

Change-Id: Iba62c778711a5a9258a8492719dcabed834513dc
msm8660: fix getInputBufferSize to calculate buffer sizes

* dirived from alsa driver

Change-Id: Ife6dc216230617c2bc11bf6a51abe0488075acc5
audio/msm7x30: Use kernel headers for 7x30.

Just like msm8660, add support to pull headers from the kernel.

Patch Set 2: Make sure the kernel source is there.
Patch Set 3: No tabs!

Change-Id: I235c49e25963e82e0d2ac4cad4d01dd02c8320aa
audio/msm7x30: #ifdef HTC audio changes

Patchset 1: Initial ifdef
Patchset 2: Get rid of isHTCPhone check
            Finish conditional revert of HTC changes
Patchset 3: More cleanup
            Fix build
Patchset 4: Reorganize start of AudioHardware::AudioHardware()
            and move mVoiceVolume out of HTC ifdef
Patchset 5: Minor changes to the order done in previous patchset
Patchset 6: Actually use mVoiceVolume for non-HTC devices too
Patchset 7: Really fix mVoiceVolume

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

Change-Id: Id3ddfc8d8a22be13b5f56e66f7fa8af3b2bf8bd3