History log of /frameworks/av/include/media/IAudioFlinger.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d 24-Sep-2012 Glenn Kasten <gkasten@google.com> Implement android.media.AudioManager.getProperty()

Bug: 6635041
Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
1879fff068422852c1483dcf8365c2ff0e2fadfc 12-Jul-2012 Glenn Kasten <gkasten@google.com> Add tid parameter to IAudioFlinger::openRecord

Not yet implemented

Change-Id: I35523fb15ad71727ecc9f4bb870f07e4b7397dc4
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
3acbd053c842e76e1a40fc8a0bf62de87eebf00f 28-Feb-2012 Glenn Kasten <gkasten@google.com> Configure policy of mediaserver threads

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

Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
a4c5a550e2a3bc237179b8684e51718e05894492 29-Mar-2012 Eric Laurent <elaurent@google.com> audio policy: load audio hw modules.

Audio HW modules are now loaded upon request from audio policy manager
according to the configuration in audio_policy.conf.
Removed hard coded HW module loading by AudioFlinger at init time.
Added methods to IAudioFlinger and AudioPolicyInterface
to control the loading of audio HW modules.
Added methods to open an output or input stream on a specific hw module.

Change-Id: I361b294ece1a9b56b2fb39cc64259dbb73b804f4
cc1110dc92e53e9cc0afbb043e6ef8295bd9c5d5 19-Mar-2012 Glenn Kasten <gkasten@google.com> Add TRACK_FAST for IAudioFlinger::createTrack

Currently not implemented by client or server

Change-Id: Ib11dda57db3eeb871bcc7b546e340078776875f5
a075db4ff9b086ac2885df77bb6da0869293df92 06-Mar-2012 Glenn Kasten <gkasten@google.com> IAudioFlinger::createTrack and openRecord flags

createTrack and openRecord don't need the "old" flags parameter,
which was either audio_policy_output_t or audio_in_acoustics_t
shifted left by 16 bits. But they do need "new" flags, which
are defined by the application use case. Initially, the only
application use case flag is timed output, but others are planned.

For output, the audio_policy_output_t flags are passed to
AudioSystem::getOutput, which returns an audio_io_handle_t, and that
handle is then passed to createTrack. So createTrack doesn't need the
old flags parameter.

For input, the audio_in_acoustics_t flags are passed to
AudioSystem::getInput, which returns an audio_io_handle_t, and that
handle is then passed to openRecord. So openRecord doesn't need the
old flags parameter.

Change-Id: I18a9870911846cca69d420c19fe6a9face2fe8c4
2d6ef93773465cd3e66146fac35050a472c589f7 12-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Remove virtual from methods that don't need it"
18868c5db2f90309c6d11e5837822135e4a0c0fa 07-Mar-2012 Glenn Kasten <gkasten@google.com> Use audio_policy_output_flags_t consistently

This affects:
- IAudioFlinger::openOutput
- AudioTrack::AudioTrack
- AudioTrack::set
- apps that call these

Change-Id: I26fb281bac6cb87593d17697bc9cb37a835af205
688aac7675f18bdd7bff13334759e20bc4e6c390 09-Mar-2012 Glenn Kasten <gkasten@google.com> Remove virtual from methods that don't need it

Change-Id: I30e17e61aae25b036436c0e270313c80c43e5f06
4ff14bae91075eb274eb1c2975982358946e7e63 09-Feb-2012 John Grossman <johngro@google.com> Upintegrate Audio Flinger changes from ICS_AAH

Bring in changes to audio flinger made to support timed audio tracks
and HW master volume control.

Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae
Signed-off-by: John Grossman <johngro@google.com>
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
5e92a7861196ddae14638d4b7a63fc4892b7ef59 30-Jan-2012 Glenn Kasten <gkasten@google.com> Effect UUID inputs passed by pointer are const

Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
f587ba5b991c7cd91e4df093d0d796bd419e5d67 27-Jan-2012 Glenn Kasten <gkasten@google.com> Declare more IAudioFlinger methods const

This is just documentation, as C++ method const-ness doesn't mean anything
for a binder API. Instead, here const means "no side effects".

Change-Id: Iaa9cd2fe477db10ae9a40cac4f79f0faa9b4e5e6
de9719b3ec71472e6bf75117152176af51d1a515 27-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_in_acoustics_t consistently

Change-Id: I0a9dd668fb2e57b1c3ece3190588194974b99062
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
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
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
0d255b2d9061ba31f13ada3fc0f7e51916407176 25-May-2011 Jean-Michel Trivi <jmtrivi@google.com> Use channel mask instead of channel count for track creation

Record and playback objects (resp AudioRecord and AudioTrack)
are created using a channel mask, but this information is lost
in the mixer because only the channel count is known to
AudioFlinger. A channel count can always be derived from a
channel mask.

The change consists in:
- disambiguiting variable names for channel masks and counts
- passing the mask information from the client to AudioFlinger
and the mixer.
- when using the DIRECT ouput, only verifying the format of
the track is compatible with the output's for PCM.

Change-Id: I50d87bfb7d7afcabdf5f12d4ab75ef3a54132c0e
65580f9adf6c4d98449ad0716488f9fe3869aa5a 28-May-2011 Eric Laurent <elaurent@google.com> Removed interface to load audio effects libraries

Removed unused functions allowing dynamic loading of audio effects libraries
from effects factory API.

Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca
e1315cf0b63b4c14a77046519e6b01f6f60d74b0 18-May-2011 Eric Laurent <elaurent@google.com> New effect library API

Moved and renamed media/EffectApi.h to hardware/audio_effect.h
Modified the effect library API to expose a library info structure
containing an interface functions table.
Also removed enums for audio channels, audio format and devices
from effect API and use values from system/audio.h instead.

Modified effects factory to support new library interface format and
load libraries and efffects listed in audio_effects.conf file.
The file audio_effects.conf is first loaded from /vendor/etc and
then from /system/etc/audio_effects.conf if not found.

Modified existing effect libraries to implement the new library interface.

Change-Id: Ie52351e071b6d352fa2fbc06c3846686f8c45df9
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
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
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.
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().
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.
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()
95634c8b6ad5419e310a5196bcc37f5988ed82da 26-May-2009 Android (Google) Code Review <android-gerrit@google.com> am de8268d6: Merge change 2331 into donut

Merge commit 'de8268d6d1cd168510c490b17e93154d2eab767c'

* commit 'de8268d6d1cd168510c490b17e93154d2eab767c':
Fix issue 1846343 - part 1
f5879c1448cc6aebc51b26d3ec2399d66144f8f4 22-May-2009 Eric Laurent <elaurent@google.com> Fix issue 1846343 - part 1

This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.

A second change is required in opencore author driver and android audio input to completely fix the issue.
7562408b2261d38415453378b6188f74fda99d88 20-May-2009 Mathias Agopian <mathias@google.com> move libbinder's header files under includes/binder
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
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