audio/msm8660: Fix for no voice during voice call after SSR

- No voice heard, during the first voice call after SSR. The SSR
  is done during a concurrency of voice call and video streaming.
- The on going call before the SSR is not terminated, and the voice
  driver doesn't gets notified about this and ignores a new request
  for voice. Hence there is no voice heard in the first call after SSR.
- Fix is to terminate voice in audio HAL constructor there by
  notifying the voice driver that the call has ended. If there is
  no voice active, the driver would ignore the request.

CRs-fixed: 339562

Change-Id: I063b42c55e557bc2b0ddbc07bf040533cb61e944
audio/msm7x30: fix voice volume on first call

- Store float voice volume got from audioflinger even if
  msm_set_voice_rx_vol return an error and re-use it on next call.
- Check mic mute state before mute/unmute it.
- Remove redundant volume set.

Change-Id: Iaa65503e3dbe0464ac15c7e1cb00064b391c1123
audio/msm8660 fix voice volume on first call

- Store float voice volume got from audioflinger even if
  and re-use on next call.
- Check mic mute state before mute/unmute it.

Change-Id: I0e50157986be4a7bc1bf7f2394d1af110540b59c
audio/msm7x30: always unmute mic

Change-Id: I7cc45c08340cf7a78e0ebb03c7af02dbec6ffab1
msm8660: Fix argument type of msm_set_volume

 * This should be a float, not an int. It was breaking LPA and probably
   other things.

Change-Id: Icd021717995025fb9580d7b73693ee7381eb8622
msm7x30: fix for SEMC devices with stereo hw speaker
Merge "msm7x30: fix for SEMC devices with stereo hw speaker" into ics
hardware/qcom: msm8660: Fix no voice issue in Voipcall

-When Voip call is triggered, observe voice mute
issue sometimes.
-When Voip call is started, there is a ringer
that comes first and speaker is enabled. After
accepting the call, PolicyManager initiate route
device to Handset for Voip Usecase. Meanwhile
VoipStreamoutDirect thread opens MVS driver and also
routes the voice stream to current active rx device
and enables it. So enable Device is happening in
above two contexts at same time causing issue.
Need to acquire Lock in Voip context to avoid this.

Change-Id: I95c09204ae615e7255ed18beae9bd5c0a154eb8a
CRs-Fixed: 349440

Conflicts:

	audio/msm8660/AudioHardware.cpp
Merge "hardware/qcom: msm8660: Fix no voice issue in Voipcall" into ics
audio/msm8660: Fix for voice call volume change issue

- Volume does not change when a voice call is the
  first use case with all the tones disabled.
- When voice call is the first use case, acdb_loader_send_voice_cal()
  is called before ACDB is initialized causing ACDB to be
  initialized incorrectly.
- Fixed the issue by calling initACDB() before acdb_loader_send_voice_cal()

CRs-Fixed: 356557

Change-Id: Id696bc2548cc68b6e1ac023bb12f852af08c6d7e
qcom/media/audio/msm8660: Fix the issue of audio routing to headset during camcorder

-  During Camcorder Recording + Voice call with headset connected,
   audio is routing back to headset if the headset is removed and
   plugged in back to the target. But cam corder is always expected
   to record from handset tx.
-  When headset is removed and plugged in back, setDeviceConnectionState()
   is updating only output devices. Input devices not being updated as the
   condition checked for updating the input devices is always false.
   Also PhoneApp sends two intents headset connected and tty mode change
   when headset is connected. So even if input device is updated in
   SetDevice ConnectionState(), because of tty mode change intent audio
   is again routing to headset.
-  Fix this issue by changing the condition to update input devices and
   ignore the tty mode change event if current device is not headset.

Change-Id: I9de6da353bc23e279835403c163d6f400e024d0b
CRs-fixed: 336124
Merge branch 'ics' of git://github.com/CyanogenMod/android_hardware_qcom_media into ics