AudioPolicy: Add support for USB capture

Adding support for USB capture. Currenlty assuming all the USB
headsets have capture capability.

Change-Id: I6cc49d02a5ba689856df99c0a4ffb8f94b6e3fb1
Signed-off-by: Karimuddin sayed <sayed.karimuddin@ti.com>
FM Rx: FM Radio support in Android Audio framework

Added the FM Rx radio changes for opening the capture path and playback path
for FM Rx device

Change-Id: Ibbaff3d9b0e7ada320ce60b55e07b25de95df861
Signed-off-by: Shitiz Kumar <shitiz_kumar@ti.com>
BT HF Tx: Modified the AudioPolicyManager for BT HF MM Streaming

The patch changes the audio routing policy once the SCO connection is
established. Once SCO connection gets established the media stream gets
routed to BT SCO headset as per BT SCO MM use case.
The patch is pulled in from commit b23f556b4e542eff5351609ba895177be861e3bc
from gingerbread branch.

Change-Id: Iea64d8e4eca1a0eadb526f290935c81156f30bf2
Signed-off-by: Shitiz Kumar <shitiz_kumar@ti.com>
FM Tx: FM Tx routing support in Android Audio framework

Added the FM Tx routing policy in HAL and also added FM definitions
in HAL.

Change-Id: If0c9c2d4c6c621a2ad3ff776eb2b49e3c8142e7b
Signed-off-by: Shitiz Kumar <shitiz_kumar@ti.com>
AudioSystem: voice call record: new channel CHANNEL_IN_VOICE_UPLINK_DNLINK

porting from http://review.omapzoom.org/#change,12556

Voice call record is started by selecting inputsource
AUDIO_SOURCE_VOICE_UPLINK or AUDIO_SOURCE_VOICE_DOWNLINK
or AUDIO_SOURCE_VOICE_CALL.
For inputsource AUDIO_SOURCE_VOICE_UPLINK and
AUDIO_SOURCE_VOICE_DOWNLINK, there's only 1 dedicated input channel
that permits to start record in mono.
But for inputsource AUDIO_SOURCE_VOICE_CALL, there's no dedicated
channel so the channel CHANNEL_IN_VOICE_UPLINK and
CHANNEL_IN_VOICE_DNLINK are enable.
Therefore the record is done in stereo.
To avoid that and be inline with a voice call record uplink only
or downlink only a new input channels is created.

Change-Id: Ice9a2947add5020bfca436be12836809c56c7d2e
Signed-off-by: Francois Mazard <f-mazard@ti.com>
Signed-off-by: Pierre Moos <p-moos@ti.com>
AudioPolicyManager: WFD: Audio policy updated for WFD devices

This patch adds WFD IN and OUT devices for audio policy manager
and updates the strategy for using WFD OUT and IN device.

Change-Id: Id4971bbccec1d9a185ece9eb8cf60df979474549
Signed-off-by: Rohit Choraria <rohitkc@ti.com>
AudioPolicyManager: Adding supported for WFD HAL

Adding initial supported for dedicated WFD HAL
Current policy will send all output to WFD output even
in cases where STRATEGY_ENFORCED_AUDIBLE is used.

Change-Id: Iafe1a28c0452ab301965cb1d50487e81206c5574
Signed-off-by: Priyesh Bisla <a0271372@ti.com>
AudioPolicyManager: Render only MUSIC streams via WFD output

When WFD output is being used only move streams of type MUSIC
to the WFD output. All other stream types will go to speaker
when speaker is the default output

Change-Id: Iaa7cba1085052b171bce940c2a336ccbe57399dc
Signed-off-by: Priyesh Bisla <a0271372@ti.com>
AudioPolicyManager: Add WFD stream type support

New audio stream type added for usage for Cinema mode support

When applications use EXCLUSIVE streams, only this audio will be
sent to WFD output, music and all other streams will be sent to
speaker

When EXCLUSIVE stream is not used music streams are sent to WFD output
and all other streams to speaker

Change-Id: If7f911ec1b3fdfaca7e5f1c17ed39f8ad9a4f766
Signed-off-by: Priyesh Bisla <a0271372@ti.com>
Audio Policy: Improve policy for fm radio

Add provision for muting fm radio.
Add knowledge of active fm radio playback to policy by incrementing
the music stream type reference count for the audio output.
This is for OMAPS00270010.

Change-Id: I9aee9d9efa1525812adb1bde1332a8c94ce00831
Signed-off-by: Bryan Honza <honza@ti.com>
Merge branch 'p-ics-mr1' of git://git.omapzoom.org/platform/hardware/libhardware_legacy