summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Audio policy manager changes for audio effectsEric Laurent2010-07-201-4/+40
| | | | | | | | | | | | | | | 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
* Issue 2667801: [Audio Effect Framework] AudioFlinger, AudioMixer AudioTrack ↵Eric Laurent2010-06-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. -AudioMixer 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
* Fix issue 2416481: Support Voice Dialer over BT SCO.Eric Laurent2010-03-161-2/+13
| | | | | | | | | | | - AudioPolicyManager: allow platform specific choice for opening a direct output. Also fixed problems in direct output management. - AudioFliinger: use shorter standby delay and track inactivity grace period for direct output thread to free hardware resources as soon as possible. - AudioSystem: do not use cached output selection in getOutput() when a direct output can be selected. Change-Id: If44b50d29237b8402ffd7a5ba1dc43c56f903e9b
* Issue 2071329: audio track is shorter than video track for video capture on ↵Eric Laurent2010-03-021-0/+10
| | | | | | | | sholes Add API to retrieve number of frames dropped by audio input kernel driver. Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
* am 8978547f: am f5fe3949: Fix issue 2459650.Eric Laurent2010-02-221-1/+3
|\ | | | | | | | | | | | | Merge commit '8978547f254b6b6ba2e322794aa044803f3edc2a' * commit '8978547f254b6b6ba2e322794aa044803f3edc2a': Fix issue 2459650.
| * Fix issue 2459650.Eric Laurent2010-02-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a problem where an unwanted tone is generated by audio policy manager when a MT call is answered. This is because of a policy that replaces high visibility system sounds (ringtones, alarms...) by a beep when in call. There is a transitory phase while the call is being answered where the phone state is changed to IN_CALL but the ringtone is still playing. The audio policy manager then mutes the end of the ringtone and starts playing a beep in replacement because the ringtone is categorized as high visibility. The fix consists in changing the ringtone stream type from high visibility to low visibility. This is not a problem as the only actual use case where a ringtone would be generated while in call is if another call is received. But in this case, the phone system does not generate a ringtone but a call waiting tone instead. It is therefore not required to handle a ringtone as a high visibiltiy tone that must be somehow signaled to the user while in call.
* | Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V syncEric Laurent2010-01-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix issue 2378022: AudioService should direct volume control to ↵Eric Laurent2010-01-251-2/+2
| | | | | | | | | | | | | | | | | | 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.
* | Fix issue 2363154: Speech synthesis fails to start over A2DP after media ↵Eric Laurent2010-01-251-0/+3
|/ | | | | | | | | | | server process crash. The problem is that after a media_server crash, the value of the A2DP output handle can change. As this value is cached in AudioSystem for all client processes there can be a mismatch between the cached and actual value after a media_server restart. The fix consists in clearing the cached output handles and output to stream map values cached in AudioSystem in AudioFlingerClient::binderDied() which is called when the media_server crashes.
* Fix issue 2192181: AudioFlinger must provide separated methods to set ↵Eric Laurent2009-10-211-0/+7
| | | | | | | 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().
* Fix issue 2045911: Camera Shutter tone does not play correctly while ↵Eric Laurent2009-08-271-0/+10
| | | | | | listening to music. Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.
* Fix issue 2001214: AudioFlinger and AudioPolicyService interfaces should not ↵Eric Laurent2009-08-071-20/+19
| | | | | | | 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.
* Fix issue 1795088 Improve audio routing codeEric Laurent2009-07-231-119/+623
| | | | | | | 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()
* move libbinder's header files under includes/binderMathias Agopian2009-05-201-1/+1
|
* AI 144097: am: CL 144054 am: CL 144053 Fix issue #1751242 A2DP playback ↵Eric Laurent2009-04-021-16/+17
| | | | | | | | | | | | | fails first time: Invalid buffer size: minFrameCount 10240, frameCount 4800 The problem comes from the fact that AudioSystem::getOutputFrameCount() calls getOutput() to retrieve the active output (A2DP or Hardware) before calling get_audio_flinger(). If it is the first time AudioSystem::getOutputFrameCount() is called in a given process, getOutput() will return a wrong value because gA2dpEnabled has not yet been updated by get_audio_flinger(). The fix consists in calling get_audio_flinger() in getOutput() to be sure that gA2dpEnabled is valid when getOutput() reads it. Original author: elaurent Merged from: //branches/cupcake/... Original author: android-build Merged from: //branches/donutburger/... Automated import of CL 144097
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+383
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-383/+0
|
* auto import from //branches/cupcake/...@131421The Android Open Source Project2009-02-131-32/+71
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-7/+48
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-4/+52
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+255