History log of /frameworks/av/include/media/AudioSystem.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d7086030fcf731e4bcef6c033cc6418cd04e6b91 10-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Support querying active record sources

Add support for querying whether there is currently a recording
underway from the specified audio source.

Bug 7314859

Change-Id: I986b231a10ffd368b08ec2f9c7f348d28eaeb892
cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d 24-Sep-2012 Glenn Kasten <gkasten@google.com> Implement android.media.AudioManager.getProperty()

Bug: 6635041
Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
58e5aa34f01d663654d8bafad65db1dda42161ff 20-Jun-2012 Glenn Kasten <gkasten@google.com> effect_descriptor_t const correctness

Change-Id: Iad008f20d35a18acf500f773900164552fd0c19e
bf04a5d7f287fc712e0ed91849dc85c90c1e182d 12-Jul-2012 Glenn Kasten <gkasten@google.com> Simplify AudioRecord::getInputFramesLost()

This also fixes a benign race in reading mActive without a lock.

Change-Id: I19e953d4f275e5c266ca1ca3fece7b6c02ad1707
254af180475346b6186b49c297f340c9c4817511 03-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t more places

Use it in AudioSystem::getOutput(), AudioSystem::getInput(),
IAudioPolicyService::getOutput(), IAudioPolicyService::getInput(),
and various other places in AudioFlinger.

Not done: AudioTrack and OutputDescriptor.

Change-Id: I70e83455820bd8f05dafd30c63d636c6a47cd172
dd8104cc5367262f0e5f13df4e79f131e8d560bb 02-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t more consistently

In IAudioFlinger::createTrack() and IAudioFlinger::openRecord(),
declare input parameter to use correct type audio_channel_mask_t.

In IAudioFlinger::getInputBufferSize(), input parameter is now channel mask
instead of channel count.

Remove unused IAudioFlinger::channelCount(audio_io_handle_t).

In AudioRecord::getMinFrameCount() and AudioSystem::getInputBufferSize(),
input parameter is channel mask instead of channel count.

Change-Id: Ib2f1c29bea70f016b3cfce83942ba292190ac965
20010053daabfa43fcfe781bbf004473b4c08538 22-Jun-2012 Glenn Kasten <gkasten@google.com> Remove acoustics from AudioSystem::getInput()

Change-Id: I29fb3ee5664c1f0ee0409c1bb2be087ecca637db
2986460984580833161bdaabc7f17da1005a8961 09-May-2012 Eric Laurent <elaurent@google.com> Fix issues with synchronous record start.

- Added a timeout in case the trigger event is never fired.
- Extend AudioRecord obtainBuffer() timeout in case of
synchronous start to avoid spurious warning.
- Make sure that the event is triggered if the track is
- Reject event if the triggering track is in an incompatible state.

Also fix a problem when restoring a static AudioTrack after
a mediaserver crash.

Bug 6449468.

Change-Id: Ib36e11111fb88f73caa31dcb0622792737d57a4b
0ca3cf94c0dfc173ad7886ae162c4b67067539f6 18-Apr-2012 Eric Laurent <elaurent@google.com> rename audio policy output flags

Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
1a9ed11a472493cac7f6dfcbfac2064526a493ed 21-Mar-2012 Eric Laurent <elaurent@google.com> audio policy: add configuration file

removed outputs to stream mapping cache in audio system: the output for a
given stream type must always be queried from audio policy manager as the cache
is not always updated fast enough by audioflinger callback.

removed AudioFlinger::PlaybackThread::setStreamValid() not used anymore if
stream to output mapping is not cached.

Change-Id: Ieca720c0b292181f81247259c8a44359bc74c66b
a011e35b22f95f558d81dc9c94b68b1465c4661d 30-Mar-2012 Eric Laurent <elaurent@google.com> implemented synchronous audio capture

Added the infrastructure to support the synchronization of playback and
capture actions on specific events.
The first requirement for this feature is to synchronize the audio capture
start with the full rendering of a given audio content.
The applications can further be extended to other use cases
(synchronized playback start...) by adding new synchronization events and
new synchronous control methods on player or recorders.

Also added a method to query the audio session from a ToneGenerator.

Change-Id: I51f1167290d9cafdf2fbcdf9e4785156973af44c
a19ffb656616feec70613ba67ddfe15a504a4e76 09-Mar-2012 Eric Laurent <elaurent@google.com> Merge "audio policy: use audio_devices_t when appropriate"
6374252107fd6539397598195ea6defd5870fafb 08-Mar-2012 Eric Laurent <elaurent@google.com> audio policy: use audio_devices_t when appropriate

Change-Id: I1b3a5879e81c789fb53d356af3d3a1ee2dca955f
b81cc8c6f3eec9edb255ea99b6a6f243585b1e38 01-Mar-2012 Glenn Kasten <gkasten@google.com> IAudioFlingerClient::ioConfigChanged param2 const

The 3rd parameter (param2) to AudioFlingerClient::ioConfigChanged
is used as an input. So changed it from void * to const void *.
It is then cast to const OutputDescriptor *
or const audio_stream_type_t * depending on the event.

Change-Id: Ieec0d284f139b74b3389b5ef69c7935a8e5650ee
3030fcefcfcfc48789612659206b957cd0489a54 01-Mar-2012 Eric Laurent <elaurent@google.com> renamed audio policy output flag.

which is more appropriate.

Change-Id: Ia14d60397df0f2dcd9bea0186400a09da35bc104
99e53b86eebb605b70dd7591b89bf61a9414ed0e 19-Jan-2012 Glenn Kasten <gkasten@google.com> Update comments

We no longer put the filename at start of file.

Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
72ef00de10fa95bfcb948ed88ab9b7a177ed0b48 17-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_io_handle_t consistently instead of int

- add a comment to nextUniqueId
- made ThreadBase::mId const, since it is only assigned in constructor.

Change-Id: I4e8b7bec4e45badcde6274d574b8a9aabd046837
211eeaf17e5565b68447d29799dbf158a33cf4cf 20-Jan-2012 Glenn Kasten <gkasten@google.com> More audio_stream_type_t

Change-Id: I1260259efe0aa3fc1ef13de69758aaa592e1f815
eba51fb3a361f67a6a64d5a16eba6084fe27d60e 23-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_source_t consistently

Was a mix of audio_source_t, uint8_t, and int.

Related fixes:
- fix comments in MediaRecorder.java
- AudioPolicyService server side was not checking source parameter at
all, so if the client wrapper was bypassed, invalid values could be
passed into audio HAL
- JNI android_media_AudioRecord_setup was checking source for positive
values, but not negative values. This test is redundant, since already
checked at Java and now checked by AudioPolicyService also, but might
as well make it correct.

Change-Id: Ie5e25d646dcd59a86d7985aa46cfcb4a1ba64a4a
58f30210ea540b6ce5aa6a46330cd3499483cb97 12-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_format_t consistently, continued

Was int or uint32_t.

When AudioFlinger::format can't determine the correct format,
return INVALID rather than DEFAULT.

Init mFormat to INVALID rather than DEFAULT in the constructor.
Subclass constructors will set mFormat to the correct value.

Change-Id: I9b62640aa107d24d2d27925f5563d0d7407d1b73
ea3cc3bca949139e401b77f2ac0cce7ac6e76f8f 20-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Remove dead setRingerMode(mode, mask)"
0b07b8085d7b837b4dd5f09e0c8c39408f6bdbf7 18-Jan-2012 Glenn Kasten <gkasten@google.com> Remove dead setRingerMode(mode, mask)

Change-Id: Ia4cc8be8424a40b3dcb7ebd0264fdff4e5247f7f
c813985abd8ba61e999b3505f6a332574f87a1be 18-Jan-2012 Andreas Huber <andih@google.com> Temporarily restore AudioSystem/AudioTrack APIs with their former signatures

until we get updated prebuilts from vendor.

Change-Id: I8aae81d2513edca0ab268053a11c8c4206879e61
63ad6aacc6ce6b729bf25f41376cfea731a2c1eb 18-Jan-2012 Eric Laurent <elaurent@google.com> Merge "audio framework: manage stream volume per device"
83844cc2f95dc279015b47fd1e18c7cb4eabe9a1 19-Nov-2011 Eric Laurent <elaurent@google.com> audio framework: manage stream volume per device

Improve volume management by keeping track of volume for each type
of device independently.
Volume for each stream (MUSIC, RINGTONE, VOICE_CALL...) is now maintained
per device.

The main changes are:
- AudioService now keeps tracks of stream volumes per device:
volume indexes are kept in a HashMap < device , index>.
active device is queried from policy manager when a volume change request
is received
initalization, mute and unmute happen on all device simultaneously
- Settings: suffixes is added to volume keys to store each device
volume independently.
- AudioSystem/AudioPolicyService/AudioPolicyInterface: added a device argument
to setStreamVolumeIndex() and getStreamVolumeIndex() to address each
device independently.
- AudioPolicyManagerBase: keep track of stream volumes for each device
and apply volume according to current device selection.

Change-Id: I61ef1c45caadca04d16363bca4140e0f81901b3f
0696400a6bb9abbed62b3b9c6aa105495dc600a2 17-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_mode_t consistently"
fff6d715a8db0daf08a50634f242c40268de3d49 13-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_stream_type_t consistently

At native level it was a mixture of audio_stream_type_t, int, uint32_t,
and uint8_t. Java is still int. Also fixed a couple of hard-coded -1
instead of AUDIO_STREAM_DEFAULT, and in startToneCommand a hard-coded 0

Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83
f78aee70d15daf4690de7e7b4983ee68b0d1381d 04-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_mode_t consistently

It was int or uint32_t.
Also make getMode() const.

Change-Id: Ibe45aadbf413b9158e4dd17f2b3bcc6355288d37
9f6530f53ae9eda43f4e7c1cb30d2379db00aa00 30-Aug-2011 Eric Laurent <elaurent@google.com> 226483: A2DP connected, but music out to speaker

When the A2DP headset is connected, there is a possible
race condition when the audio tracks are moved from
the mixer thread attached to the speaker output to the thread
attached to A2DP output.
As the request to clear the stream type to output mapping cache in
the client process is asynchronous, it is possible that the flag
indicating to the client audio track to re-create the IAudioTrack
on the new thread is processed before the cache is invalidated.
In this case, the track will be attached to the old thread and
music will continue playing over the device speaker instead of being
redirected to A2DP headset.

Change-Id: Ib2ce1eb5320eaff83287b93779061bf4e7a330df
db7c079f284f6e91266f6653ae0ec198b1c5006e 10-Aug-2011 Eric Laurent <elaurent@google.com> Audio effects: track CPU and memory use separately

Before this change, CPU and memory usage for an audio effect were
registered and checked against the limit by audio policy manager
upon effect instantiation. Even if an effect was not enabled
it would prevent another effect to be created if the CPU load budget
was exceeded, which was too restrictive.

This change adds a method to register/unregister CPU load only when
an effect is enabled or disabled.
It also adds a mechanism to place all effects on the global output mix
in suspend state (disabled) when an effect is enabled on a specific session.
This will allow applications using session effects to have the priority
over others using global effects.

Also fixes some issues with suspend/restore mechanism:
- avoid taking actions when an effect is disconnected and was not enabled.
- do not remove a session from the suspended sessions list when corresponding
effect chain is destroyed.

Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
3a34befc6fb04a4945a849e8bda8b84e4bf973fe 02-Aug-2011 Marco Nelissen <marcone@google.com> Keep effects sessions active when the caller dies.

Don't remove effects until the session they are in goes away or all
AudioEffects have been explicitly released. This allows the control
panel process to die without stopping the effects.

Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
7c7f10bd4fda9a084e5e7f0eb3a040dfcbf01745 18-Jun-2011 Eric Laurent <elaurent@google.com> Audio framework: support for audio pre processing

Audio effect framework is extended to suport effects on
output and input audio path.

AudioFlinger: Support for audio effects and effect chains is
moved from PlaybackThread class to ThreadBase class so that
RecordThread can manage effects.
Effects of type pre processing are allowed on record thread
only. When a pre processing is enabled, the effect interface handle is
passed down to the input stream so that the audio HAL can call the
process function. The record thread loop calls the effect chain process
function that will only manage the effect state and commands and skip the
process function.

AudioRecord: The audio session is allocated before calling getInput() into
audio policy serice so that the session is known before the input theead is
created and pre processings can be created on the correct session.

AudioPolicyService: default pre processing for a given input source are
loaded from audio_effects.conf file.
When an input is created, corresponding effects are created and enabled.

Change-Id: Id17119e0979b4dcf189b5c7957fec30dc3478790
7394a4f358fa9908a9f0a7c954b65c399f4268e6 14-Jun-2011 Dima Zavin <dima@android.com> audio: update for audio/audio_policy header names/locations

Change-Id: I36c49352eee57559403cd1597f56a8485a360289
Signed-off-by: Dima Zavin <dima@android.com>
64760240f931714858a59c1579f07264d7182ba2 11-May-2011 Dima Zavin <dima@android.com> update for new audio.h header location

Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876
Signed-off-by: Dima Zavin <dima@android.com>
fce7a473248381cc83a01855f92581077d3c9ee2 20-Apr-2011 Dima Zavin <dima@android.com> audio/media: convert to using the audio HAL and new audio defs

Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
db5cb14318bb24cd6ea14ff7ceea0d5e1f83d903 20-Apr-2011 Dima Zavin <dima@android.com> libmedia: move AudioParameter out of AudioSystem

Change-Id: I9eb7e002d141936258050d4fa4f0ccd8202bfc54
Signed-off-by: Dima Zavin <dima@android.com>
4bcae82f9b07d1a39956c45a6f5bec0b696c4dd1 04-Apr-2011 Glenn Kasten <gkasten@google.com> Miscellaneous code cleanup in audio framework

- Move declaration of kClassPathName to top of file so it can be used
in more than one place, instead of "android/media/AudioSystem".
- Make private methods static.
- Add comment to stream_type, audio_mode, force_use types that they must match
values in AudioSystem.java.
- Add comment about unused types mp3_sub_format and vorbis_sub_format.
- Fix typos.
- Use @ in javadoc comments.
- Delete dead APIs setMode, getMode, setRouting, getRouting in AudioSystem.java
(they are all hidden, deprecated, and unused by rest of framework)
- Delete unused private log method.
- Fix pathname for android_media_AudioSystem.cpp.
- Improve code formatting for space after == and !=.
- Add logging of delta for changing audio policy manager ref count.

Change-Id: I18037c7beb8ab76d1fda08c11e589f6e591d36e1
6b2718c67aa7b1a8e3b0f25a73a0d5f72c59ffc3 04-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3352047 Wrong message when adjusting volume

Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
eda6c364c253ba97ee45a3adeb8c2b45db1f81db 02-Feb-2011 Eric Laurent <elaurent@google.com> Fix issue 3371080

Modified default volume control logic in AudioService:
1 IN_CALL volume if in video/audio chat
2 NOTIFICATION if notification is playing or was playing less than 5s ago.

Modified silent mode:
- now also affect MUSIC stream type
- entering silent mode when VOL- hard key is pressed once while selected
stream volume is already at 0 (except for VOICE_CALL stream).
- exiting silent mode when pressing VOL+ hard key while in silent mode

Play sound FX (audible selections, keyboard clicks) at a fixed volume.

Modified audio framework:
- isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger)
- iStreamActive() now specifies a time window during which the stream is considered
active after it actually stopped.

Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
f1fb01a7f00b8da90a36268aba8584a872e99175 15-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Add new audio mode 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.

Change-Id: Id744cd26520ea1d1a4795eabe6a1f0c58789af76
56ecd20263d7f63476f756fc5d8b043b325c7bfb 09-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Add support for audio recording source in generic audio policy mgr.

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()

Change-Id: I6b4fd0f8a3acea0d7d30bbad98edd1977dc012bf
b235dee7be544a6c990ba4f8d89ab03e38c826f8 06-Oct-2010 Praveen Bharathi <pbharathi@motorola.com> Added support for dock headset observer

Change-Id: I06b2e65e3bfa10735e6c7fd3349afa9ae7d45292
Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
de070137f11d346fba77605bd76a44c040a618fc 13-Jul-2010 Eric Laurent <elaurent@google.com> Audio policy manager changes for audio effects

Added methods for audio effects management by audio policy manager.
- control of total CPU load and memory used by effect engines
- selection of output stream for global effects
- added audio session id in parameter list for startOutput() and stopOutput().
this is not used in default audio policy manager implementation.

Modifications of audio effect framework in AudioFlinger to allow moving and reconfiguring
effect engines from one output mixer thread to another when audio tracks in the same session
are moved or when requested by audio policy manager.
Also fixed mutex deadlock problem with effect chains locks.

Change-Id: Ida43484b06e9b890d6b9e53c13958d042720ebdb
ffe9c25ce85e1af55d58ec025adc6367d70db7e8 24-Jun-2010 Eric Laurent <elaurent@google.com> Various fixes and improvements in audio effects implementation

Effect API:
- Use different definitions for audio device, channels, formats... in AudioSystem and EffectApi:
Removed media/AudioCommon.h file created for initial version of EffectApi
- Indicate audio session and output ID to effect library when calling EffectCreate(). Session ID can be useful to optimize
the implementation of effect chains in the same audio session. Output ID can be used for effects implemented in audio hardware.
- Renamed EffectQueryNext() function to EffectQueryEffect() and changed operating mode:
now an index is passed for the queried effect instead of implicitly querying the next one.
- Added CPU load and memory usage indication in effects descriptor
- Added flags and commands to indicate changes in audio mode (ring tone, in call...) to effect engine
- Added flag to indicate hardware accelerated effect implementation.
- Renamed EffectFactoryApi.h to EffectsFactoryApi.h for consistency with EffectsFactory.c/h

Effect libraries:
- Reflected changes in Effect API
- Several fixes in reverb implementation
- Added build option TEST_EFFECT_LIBRARIES in makefile to prepare integration of actual effect library.
- Replaced pointer by integer identifier for library handle returned by effects factory

Audio effect framework:
- Added support for audio session -1 in preparation of output stage effects configuration.
- Reflected changes in Effect API
- Removed volume ramp up/down when effect is inserted/removed: this has to be taken care of by effect engines.
- Added some overflow verification on indexes used for deferred parameter updates via shared memory
- Added hardcoded CPU and memory limit check when creating a new effect instance

Change-Id: I43fee5182ee201384ea3479af6d0acb95092901d
be916aa1267e2e6b1c148f51d11bcbbc79cb864c 02-Jun-2010 Eric Laurent <elaurent@google.com> Issue 2667801: [Audio Effect Framework] AudioFlinger, AudioMixer AudioTrack modifications.

First drop of audio framework modifications for audio effects support.

- AudioTrack/AudioRecord:
Added support for auxiliary effects in AudioTrack
Added support for audio sessions
Fixed left right channel inversion in setVolume()

- IAudioFlinger:
Added interface methods for effect enumeraiton and instantiation
Added support for audio sessions.

- IAudioTrack:
Added method to attach auxiliary effect.

- AudioFlinger
Created new classes to control effect engines in effect library and manage effect connections to tracks or
output mix:
EffectModule: wrapper object controlling the effect engine implementation in the effect library. There
is one EffectModule per instance of an effect in a given audio session
EffectChain: group of effects associated to one audio session. There is one EffectChain per audio session.
EffectChain for session 0 is for output mix effects, other chains are attached to audio tracks
with same session ID. Each chain contains a variable number of EffectModules
EffectHandle: implements the IEffect interface. There is one EffectHandle object for each application
controlling (or using) an effect module. THe EffectModule maintians a list of EffectHandles.

Added support for effect modules and effect chains creation in PlaybackThread.
modified mixer thread loop to allow track volume control by effect modules and call effect processing.

Each track now specifies its output buffer used by mixer for accumulation
Modified mixer process functions to process tracks by groups of tracks with same buffer
Modified track process functions to support accumulation to auxiliary channel

Change-Id: I26d5f7c9e070a89bdd383e1a659f8b7ca150379c
135ad07e33d30e5202deb21061a0e3ecf0ffad35 21-May-2010 Eric Laurent <elaurent@google.com> Fix issue 2667796: [Audio Effect Framework] Effect factory and libraries.

First effect factory and effect library API implementation.
Also added default effect libraries for reverb and equalizer effects.
These libraries are for functional test only and are not fine tuned with
regard to audio quality. They will probably be replaced by other implementations
before the release.

Change-Id: I6868f8612146ae282c64052765c61a52ec789ec8
05bca2fde53bfe3063d2a0a877f2b6bfdd6052cf 26-Feb-2010 Eric Laurent <elaurent@google.com> Issue 2071329: audio track is shorter than video track for video capture on sholes

Add API to retrieve number of frames dropped by audio input kernel driver.

Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
342e9cf388cceb807def720e40e8b0a217f4bcaa 20-Jan-2010 Eric Laurent <elaurent@google.com> Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync

Added getRenderPosition() API to IAudioFlinger to retreive number of audio frames
written by AudioFlinger to audio HAL and by DSP to DAC.

Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames
written by DSP to DAC.

Exposed AudioTrack::getPosition() to AudioSink() to make it available to media player.

Removed excessive log in AudioHardwareGeneric.
b72a396826da8bd934b9531bbd40f86d7509e71c 25-Jan-2010 Eric Laurent <elaurent@google.com> Fix issue 2378022: AudioService should direct volume control to STREAM_VOICE_CALL stream when STREAM_VOICE_CALL stream is active.

Modified AudioService.getActiveStreamType() so that STREAM_VOICE_CALL is selected when a track using this stream
type is playing.

Chanded isMusicActive() for a more generic isStreamActive(stream) method in AudioSystem, IAudioFlinger and AudioFlinger.
492e666e47795326f4b12b87b150b550e6074bd8 10-Dec-2009 Eric Laurent <elaurent@google.com> Create base class for audio policy manager.

First implementations of audio policy manager in Eclair branch have shown that most code is common to all platforms.
Creating AudioPolicyManagerBase base class will improve code maintainability and readability.

Audio policy manager code for platforms using generic audio previously in AudioPolicyManagerGeneric is replaced by AudioPolicyManagerBase.
Audio policy manager test code previously in AudioPolicyManagerGeneric is moved to AudioPolicyManagerBase.

Also added a wake lock for delayed commands in AudioPolicyService.
7ddd450f91dc508b26cc550f5b42fded8a731654 17-Dec-2009 Eric Laurent <elaurent@google.com> Fix issues 2333450 and 2333559:

Add new config values to AudioSystem::FOR_DOCK force usage to differenciate car and desk docks.
Use a receiver for the sticky Intent.ACTION_DOCK_EVENT in AudioService to detect the type
of dock and select force usage accordingly.
48643f38c9e92dd0a3d4a31c293c954f3df4db1b 08-Dec-2009 Jean-Michel Trivi <jmtrivi@google.com> Partially fix bug 2111240 Detect docking / undocking event by reporting
to the AudioPolicyManager a new forced usage AudioSystem::FOR_DOCK
values. This CL is complemented by an update of the APM to take into
account the FOR_DOCK usage.
0f2d1e2dd7601e06fdf834f3f942eeb5c8b33a15 12-Nov-2009 Eric Laurent <elaurent@google.com> Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.

The headset state indicated by HeadsetObserver in the broadcast intent ACTION_HEADSET_PLUG was not 0 or 1 as specified in the java doc but contained a bit field indicating the type of headset connected.

Modified HeadsetObserver to broacast a state conforming to java doc.
Added an extra to intent ACTION_HEADSET_PLUG to indicate if headset has a microphone or not.
Removed handling of non standard headset indications from HeadsetObserver.
Removed platform specific devices from output devices defined in AudioSystem.
Modified AudioService to use new ACTION_HEADSET_PLUG intent extra instead of bitfield in state.
90b75fbd19571784c8ceee4841a28b8333a8198e 02-Nov-2009 Eric Laurent <elaurent@google.com> Fix 2194140: [Passion] Support Audience chip.

Added new input device DEVICE_IN_BACK_MIC.
Added new audio source AUDIO_SOURCE_CAMCORDER.
f0ee6f4055e26fb35d9c526a596668a4dc9da5ba 21-Oct-2009 Eric Laurent <elaurent@google.com> Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.

Added setVoiceVolume() method to AudioSystem, AudioFlinger, IAudioFlinger, AudioPolicyService.
Removed call to AudioHardwareInterface::setVoiceVolume() from AudioFlinger::setStreamVolume().
a9c322e398a1f5fdcace3b8b73967f010b1c31ca 27-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.

Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.
fa2877b9ea48baed934b866d2ab3658b69c4c869 28-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 2001214: AudioFlinger and AudioPolicyService interfaces should not use pointers as handles to inputs and outputs.

Use integers instead of void* as input/output handles at IAudioFlinger and IAudioPolicyService interfaces.
AudioFlinger maintains an always increasing count of opened inputs or outputs as unique ID.
9a92037bd6477533062d635b676a6c9833aab96e 27-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 2001517: AudioTrack compatibility issue.

Modified enum values in AudioFormat.java and AudioSystem.h.
Added code for backward compatibility in AudioTrack.java and AudioRecord.java.
c2f1f07084818942352c6bbfb36af9b6b330eb4e 17-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 1795088 Improve audio routing code

Initial commit for review.
Integrated comments after patch set 1 review.
Fixed lockup in AudioFlinger::ThreadBase::exit()
Fixed lockup when playing tone with AudioPlocyService startTone()
29a65006e517ae5bb164e973b2d805ebfa834a2e 28-Mar-2009 Eric Laurent <> AI 143327: am: CL 143177 am: CL 142889 Fix issue #1736153 Camera shutter sound can be muted by new AlarmClock setting.
Current implementation of Camera service plays the camera shutter sound over the ALARM stream so that it cannot be muted by silent mode in order to comply to some country specific requirement. A recent change made it possible for the user to mute the ALARM stream thus making this stream not suitable any more for the camera shutter sound.
The fix consists in creating a new stream type only accessible by native code and that cannot be muted and use it to play camera sounds.
Original author: elaurent
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...

Automated import of CL 143327
89fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
15f767b960b38059a74a42a33e16d8df2aec8bc1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
25658fd43d150a45fb37734a9f9f27f48bb5c133 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
7a2146d5807030b2629f347736be5301b61e8811 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
5e07b5774c8b376776caa4f5b0a193767697e97e 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
7b5eb023f8d87cca6d830ae6c11c6aadbe02aca8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
2729ea9262ca60d93047e984739887cfc89e82eb 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution