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
hardware/qcom: 8660: Fix video gtalk call with no voice issue

- While Video voip call, no voice is heard at all.
- Here, Output Stream open does MVS driver open and increments
the voip stream count. Then Input Stream open checks the
MVS driver is already opened and returning without incrementing
the voip stream count. As a result, standby called after Input
Stream open will use this count to check whether both Input
and Output streams are active. But as count is not incremented
in Input stream open, it assumes only one stream is opened and
results in closing of MVS driver which is not expected and
causing no voice packets sent to downlink and uplink.
- Increment the voip stream count both in Output stream
open and Input Stream open even if MVS driver is already
opened. This will reflect the voip stream count correctly
and avoids failure cases like this.

CRs-Fixed: 340102
(cherry picked from commit e935fb0461269b151c3db74d73de0d349c6701db)

Change-Id: Ifbcfb9ba6c60f49b5f2b8f456c24b5d5b0792cb3
hardware/qcom: 8660: Fix voice uplink distortion in VOIP

-When Gtalk voip call is used, observing distortion on
uplink voice.
-There is a sofware bug in the code while returning the
number of bytes read from HAL StreamInVoip read. The
upper layers rely on this value for calculating the delay
to read the next voice uplink packet. As this value is
returned 1280 bytes instead of 640, it is resulting in
20ms more delay for each packet read and causing
packet drops and disortion in uplink voice.
-Fix the issue by returning the actual number of bytes
that are read from MVS and filled into buffer.

CRs-Fixed: 331850
(cherry picked from commit b2a90147720040d6bdf8df0737370052507be7b0)

Change-Id: I662e3d47b919a20198b0203539ddb5d5bb2073ea