OSDN Git Service

do not merge bug 3370834 Cherrypick from master
authorJean-Michel Trivi <jmtrivi@google.com>
Mon, 15 Nov 2010 20:11:32 +0000 (12:11 -0800)
committerJean-Michel Trivi <jmtrivi@google.com>
Wed, 26 Jan 2011 19:20:01 +0000 (11:20 -0800)
commit2ba92c71b5684dce700cf848bf157153c156df1d
tree4a5fd1c92f47a6557552adbb65898c35866d9662
parent138757db4f19cb626ef5c1d371d4fca004304a08
do not merge bug 3370834 Cherrypick from master

Cherripick from master CL 79833, 79417, 78864, 80332, 87500

Add new audio mode and recording source for audio communications
 other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
 call is currently underway. There was no way for audio video
 chat or VoIP applications to signal a call is underway, but not
 using the telephony resources. This change introduces a new mode
 to address this. Changes in other parts of the system (java
 and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
 state variable directly, but to use two new convenience methods,
 isInCall() and isStateInCall(int) instead.

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Update the platform-independent audio policy manager to pass the
 nature of the audio recording source to the audio policy client
 interface through the AudioPolicyClientInterface::setParameters()
 method.

SIP calls should set the audio mode to MODE_IN_COMMUNICATION,
 Audio mode MODE_IN_CALL is reserved for telephony.

SIP: Enable built-in echo canceler if available.
1. Always initialize AudioRecord with VOICE_COMMUNICATION.
2. If echo canceler is available, disable our echo suppressor.

Note that this CL is intentionally not correcting the
 getAudioSourceMax() return value in MediaRecorder.java as the
 new source is hidden here.

Change-Id: Ie68cd03c50553101aa2ad838fe9459b2cf151bc8
14 files changed:
include/media/AudioSystem.h
include/media/EffectApi.h
include/media/mediarecorder.h
media/java/android/media/AudioManager.java
media/java/android/media/AudioRecord.java
media/java/android/media/AudioService.java
media/java/android/media/AudioSystem.java
media/java/android/media/MediaRecorder.java
media/libmedia/AudioSystem.cpp
services/audioflinger/AudioFlinger.cpp
services/audioflinger/AudioHardwareInterface.cpp
services/audioflinger/AudioPolicyManagerBase.cpp
telephony/java/com/android/internal/telephony/CallManager.java
voip/jni/rtp/AudioGroup.cpp