[donot merge][part 2 ]Squashed msm7x30

audio/msm7x30: Fix for Echo in Gtalk

- Echo is observed in Gtalk.
- Audio HAL informs that clients that it handle the Echo
  cancellation and with AHAL client turns off the EC.
- EC is not supported in this PL remove it from getparam
CRs-Fixed: 427161

Change-Id: I62eba7ed7566045f61c34a51c8ac36029b8596ea

audio/msm7x30: Use q5v2_msm_audio_mvs_frame struct

Otherwise a packet size of 640, which 7x30 modem doesn't support,
will be used. 7x30 expects a packet size of 320.

Was changed in AudioHardware::AudioStreamOutDirect::write, but
seems to have been forgotten here.

Related kernel change: http://bit.ly/M7ZqMN

Change-Id: Ie89da836cbe27ea6b6cd10ef5c830ecc7020a624

legacy/msm7x30: Use audio policy from legacy/alsa_sound

* Clone of the legacy/alsa_sound audio policy HAL

audio/msm7x30: Only use earpiece when specified.

There are a few cases where the audio gets routed to earpiece, while it should
be at the speaker mode. To fix this, always default to speaker mode and only use
earpiece when it is specified.

Change-Id: I9fe2e54b20e2aa8aeac4b75b191a51790612f468

audio/msm7x30: fix a crash on audio initialize

Fixes crash on mediaserver if the device_count got from
audioalsa library is greater than DEVICE_COUNT in HAL

Change-Id: Ic5a29ddbee4f7b79ec944e6b48ef8272177659e6

audio/msm7x30: Add system property to toggle headset microphone.

Change-Id: Idb9782808f190da4a715a0c5597043f9c06134d8

audio/msm7x30: Allow devices with mono speaker to function.

If the device has both speakers, stereo will be used.

Change-Id: Ia73a00f09fff56d58f9cd9a29723251734353f83

audio/msm7x30: Allow devices with broadside dual mic to function.

If the device has both dual mics, endfire will be used.

Change-Id: Id6a197e85b159bb4f5452553e3b6a417bd1b9db4

legacy/msm7x30: Make sure to update voice volume when starting call.

Change-Id: I4f42d5d36c5d059e7877503d2ec6d0aad29778dc

legacy/msm7x30: Add support for FM radio.

Fix up the volume handler.
Remove dead code.
Fix cflag naming.

Change-Id: Id088556d0b3591dad913c4bb9e54c526ea7520ea

audio/msm7x30: Update AUDIO_FORMAT to latest API.

Change-Id: I0ab4f665a3d9ab3732274769fa5aec74230abb44

legacy/msm7x30: Add supported devices.

Change-Id: I8f18d99dec1102bd444f8891baa394d49aa994ce

legacy/msm7x30: Use new audio API defines.

Also fix some error cases where input is routed from the wrong device.

Change-Id: Ibee1c54cb42245b88725ff7f001c167da1d9f770

audio/msm7x30: fix for SEMC devices with stereo hw speaker

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

Change-Id: I2a326b13101bfe589eebe46012559633d8b361df

legacy/msm7x30: Various routing fixes ported from msm8660

Change-Id: I1ef642bb565b8d4dd729800f976770da84ae6b79

audio/msm7x30: Remove unsupported QCOM_CSDCLIENT

legacy/msm7x30: Remove dead code.

Change-Id: I729508452f317fc3c4a36fd19b72ab9836c7b3d2

legacy/msm7x30: Change default audio sample rate

Return Host PCM interface sample rate based on
AF resampler quality value.

(cherry picked from commit fbaba9b736d0b77c989c80946ffb7d105641c07d)

Change-Id: I204f423051d97be5ff4dfa9805406eca61a25966

audio/msm7x30: Support for Samsung audio devices

Change-Id: I2a624cddd99e02a9e0c73e829cc28dd520902074

legacy/msm7x30: Fix audio resampler check

https://github.com/CyanogenMod/android_frameworks_av/commit/ac6020508acedd316391dee42329040bf45f8d90 changed 255 to 4

legacy/msm7x30: Silence logcat spam

legacy/msm7x30: Enable stereo recording

Change-Id: I49e3a828af4308d514754bf7d78b0749576a0162