7x30: audio: device enum debug

Change-Id: Iecd65717c769471c9543c47d97c33ca7901fdc45
audio/msm8660: Add support for STRATEGY_ENFORCED_AUDIBLE in AudioPolicyManager

Merge changes related to STRATEGY_ENFORCED_AUDIBLE from AudioPolicyManagerBase
to 8660 specific AudioPolicyManager

Change-Id: I68d876dfb24761b73b56a2565bfef0eb7a7573e4
CRs-Fixed: 326947
audio/msm8660: Mute media on correct output during LPA ringtone preview

-Issues:PCM music does not mute for LPA ringtone playback over headset.
-Causes:Media is not muted on correct output during LPA ringtone preview.
-Fixes:Mute STRATEGRY_MEDIA on both hardware and LPA output(if active)
   for ringtone preview.

CRs-fixed: 326262

Change-Id: I5a2f8eab973018cc88db5b45e56a1d72ec4b1bcd
Merge "7x30: audio: device enum debug" into ics
7x30: audio: preliminar samsung support

Change-Id: If7c5604456417d7206c6f7a2308220cf51feba05
audio: msm7x30: fix ifdef derp

Change-Id: I1922d55cb0ddea0fa5ae7d16f24bb59bd550d297
audio/msm8660: Fix for Memory corruption during VOIP call.

-Random native crashes during VOIP calls.
-Incorrect resample buffer allocated in record thread.
-Audio HAL for AudioStreamInVoip to send channel mask not
 channel number, audio flinger uses channel mask to
 calculate number of channels and allocate resample buffer
 for the record thread.

(cherry picked from commit ccdf692b9b3a4c4193f65872196a38f82a516fbb)

Change-Id: I7964e04cabb5609608c576eceec24be5e6e260d3
audio/msm8660: Fix closing Rx Device While VOIP in progress.

-When PCM stream/session gets closed, it calls respective
standby function and closes Rx Device without checking
VOIP stream is running or not.
-Add check to verify VOIP call is running, then avoid closing
Rx or Tx devices.

CRs-Fixed: 330307
(cherry picked from commit 6a926cf7649af75f15d3be02e9427163db2d8dcc)

Change-Id: I585933f3157245029c9c47c41c9633f4bd354154
audio/8660: htc and aic3254 support

Change-Id: I8ee50c22f7e2cb86ac22cb9a6f95ff4364ca249b
Merge "audio/msm8660: Fix for Memory corruption during VOIP call." into ics
Merge "audio/msm8660: Fix closing Rx Device While VOIP in progress." into ics
Merge "audio/8660: htc and aic3254 support" into ics
audio: perform null checks when calling libhtc_acoustic functions

Fixes null pointer dereference when msm72xx_set_audpre_params and
msm72xx_enable_audpre are called from libhtc_acoustic.so that does
not have those functions (such as those for msm8x60 platform).

Change-Id: I9a93998fc0dc2bdfdf9665e93ec0ced4fc136278
audio/msm7x30: perform null checks when calling libhtc_acoustic functions

Fixes null pointer dereference when msm72xx_set_audpre_params and
msm72xx_enable_audpre are called from libhtc_acoustic.so that does
not have those functions (such as those for msm8x60 platform).

Change-Id: I273b312e63f8a95caefce2100c0402a4482da51b
audio/msm7x30: set mRecordState in AudioInputStreamMSM72xx::set

This fixes audio input/recording, including voice dialer and
voice search.

Change-Id: I36b07ce6c1475491689f77f82243559175df7724
audio: set mRecordState in AudioInputStreamMSM72xx::set

This fixes audio input/recording, including voice dialer and
voice search.

Change-Id: Id43c677c0cb2a9fb128b7e7651655e0f4934d1cf
qcom/media: build only legacy audio

mm-core and mm-video are 2 separate repos on ics.
libstagefrighthw is built from hardware/msm7k and is keep
there only for QComOMXMetadata.h inclusion.

Change-Id: I0210bd41ac7c9f4c8969dca52f541af2f5759cdc
audio/msm8660: Fix for no FM audio on BT A2DP headset

- While switching FM audio between Speaker and A2DP headset
  multiple times, audio is lost and ANR is seen in FM app.
- After opening an input stream to read FM data to play on
  A2DP, and before the first read the input device is being
  set to 0 which leads to no audio.
- Fixed the issue by ignoring the input device switch request
  with device 0.

CRs-Fixed: 330311
(cherry picked from commit 6c5c3d2a2604e0e5b8c18c3cb0c26cf920efdf8a)

Change-Id: I379a76c79d025768b54bd1f8fd9635903d58310a
hardware/qcom: msm8660: Fix FM audio getting muted at volume level 1

- FM Volume is getting muted at volume level one
- Corresponding linear value for volume level one is lesser than 0.5 and
  it gets rounded to zero and hence volume gets muted
- Fixed this issue by rounding the valid volume values to the nearest
  higher integer value so that such lower values are not ignored

CRs-Fixed: 337127
(cherry picked from commit 9d22f97b17ddcf4bc3c08b200a3606c6ee1f6e73)

Change-Id: I7845e1612afa1c30fc52196ac340fa2d28ec8303
hardware/qcom: 8660: Fix voice call mute issue after VOIP

- Observe CS voice call become silent after Voip call.
- Incase of mDirectOutput is opened multiple times,
MVS driver is not closed and Rx/Tx devices are not
de-routed even after Voip call terminates.
- Avoid creating mDirectOutput if already exists. This will
close the MVS driver properly,Rx/Tx devices are de-routed
and will not result in any issue for next usecase.

CRs-Fixed: 337952
(cherry picked from commit 078cff577844d25baf70126910f8ba89fbc6c73a)

Change-Id: I2295f85f841fa3c2e8009db39e369046dd2a595f