summaryrefslogtreecommitdiffstats
path: root/media/libmedia/IAudioFlinger.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Upintegrate Audio Flinger changes from ICS_AAHJohn Grossman2012-02-161-1/+4
| | | | | | | | 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>
* Follow raw pointer and sp<> conventionsGlenn Kasten2012-02-101-1/+1
| | | | | | | | Unconditional delete for raw pointers. Use "if (sp != 0)" not "if (sp.get() != 0)" or "if (sp != NULL)". Use "if (raw != NULL)" not "if (raw)". Change-Id: I531a8da7c37149261ed2f34b862ec4896a4b785b
* Use audio_io_handle_t consistently instead of intGlenn Kasten2012-02-081-75/+79
| | | | | | | | Other: - add a comment to nextUniqueId - made ThreadBase::mId const, since it is only assigned in constructor. Change-Id: I4e8b7bec4e45badcde6274d574b8a9aabd046837
* Effect UUID inputs passed by pointer are constGlenn Kasten2012-02-081-1/+1
| | | | Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
* Declare more IAudioFlinger methods constGlenn Kasten2012-02-031-7/+8
| | | | | | | 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
* Merge "Use audio_in_acoustics_t consistently"Glenn Kasten2012-02-031-4/+4
|\
| * Use audio_in_acoustics_t consistentlyGlenn Kasten2012-01-271-4/+4
| | | | | | | | Change-Id: I0a9dd668fb2e57b1c3ece3190588194974b99062
* | Use NULL not 0 for raw pointersGlenn Kasten2012-02-031-1/+1
|/ | | | | | Use if (p != NULL) instead of if (ptr) Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
* Use audio_format_t consistently, continuedGlenn Kasten2012-01-201-16/+16
| | | | | | | | | | | | 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
* Merge "Use audio_mode_t consistently"Glenn Kasten2012-01-171-2/+2
|\
| * Use audio_mode_t consistentlyGlenn Kasten2012-01-121-2/+2
| | | | | | | | | | | | | | It was int or uint32_t. Also make getMode() const. Change-Id: Ibe45aadbf413b9158e4dd17f2b3bcc6355288d37
* | Use audio_stream_type_t consistentlyGlenn Kasten2012-01-131-18/+18
|/ | | | | | | | | 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 instead of AUDIO_STREAM_VOICE_CALL. Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-3/+3
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-2/+2
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Keep effects sessions active when the caller dies.Marco Nelissen2011-08-091-1/+31
| | | | | | | | 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
* Use channel mask instead of channel count for track creationJean-Michel Trivi2011-06-011-7/+7
| | | | | | | | | | | | | | | | | 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
* Removed interface to load audio effects librariesEric Laurent2011-05-271-48/+0
| | | | | | | Removed unused functions allowing dynamic loading of audio effects libraries from effects factory API. Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca
* Fix issue 3371080Eric Laurent2011-02-031-16/+0
| | | | | | | | | | | | | | | | | | | | | | 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. 3 MUSIC 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
* Audio policy manager changes for audio effectsEric Laurent2010-07-201-1/+21
| | | | | | | | | | | | | | | 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
* Various fixes and improvements in audio effects implementationEric Laurent2010-06-251-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Issue 2667801: [Audio Effect Framework] AudioFlinger, AudioMixer AudioTrack ↵Eric Laurent2010-06-031-3/+257
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Issue 2071329: audio track is shorter than video track for video capture on ↵Eric Laurent2010-03-021-1/+18
| | | | | | | | sholes Add API to retrieve number of frames dropped by audio input kernel driver. Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
* Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V syncEric Laurent2010-01-261-1/+35
| | | | | | | | | | | | 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-5/+7
| | | | | | | | | 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 2192181: AudioFlinger must provide separated methods to set ↵Eric Laurent2009-10-211-1/+17
| | | | | | | 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 2107584: media server crash when AudioFlinger fails to allocate ↵Eric Laurent2009-09-091-5/+14
| | | | | | | | memory for track control block. AudioFlinger: verify that mCblk is not null before using it in Track and RecordTrack contructors. IAudioFlinger: check result of remote transaction before reading IAudioTrack and IAudioRecord. IAudioTrack and IAudioRecord: check result of remote transaction before reading IMemory.
* Fix issue 2001214: AudioFlinger and AudioPolicyService interfaces should not ↵Eric Laurent2009-08-071-99/+67
| | | | | | | 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-98/+284
| | | | | | | 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()
* some work to try to reduce the code size of some native librariesMathias Agopian2009-05-261-6/+0
| | | | | | | | | | | | | | | | | - make sure that all binder Bn classes define a ctor and dtor in their respective library. This avoids duplication of the ctor/dtor in libraries where these objects are instantiated. This is also cleaner, should we want these ctor/dtor to do something one day. - same change as above for some Bp classes and various other non-binder classes - moved the definition of CHECK_INTERFACE() in IInterface.h instead of having it everywhere. - improved the CHECK_INTERFACE() macro so it calls a single method in Parcel, instead of inlining its code everywhere - IBinder::getInterfaceDescriptor() now returns a "const String16&" instead of String16, which saves calls to String16 and ~String16 - implemented a cache for BpBinder::getInterfaceDescriptor(), since this does an IPC. HOWEVER, this method never seems to be called. The cache makes BpBinder bigger, so we need to figure out if we need this method at all.
* am de8268d6: Merge change 2331 into donutAndroid (Google) Code Review2009-05-261-4/+4
|\ | | | | | | | | | | | | Merge commit 'de8268d6d1cd168510c490b17e93154d2eab767c' * commit 'de8268d6d1cd168510c490b17e93154d2eab767c': Fix issue 1846343 - part 1
| * Fix issue 1846343 - part 1Eric Laurent2009-05-261-4/+4
| | | | | | | | | | | | | | | | 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.
* | move libbinder's header files under includes/binderMathias Agopian2009-05-201-1/+1
|/
* Fix issue 1745312: Various cleanups in media frameworkEric Laurent2009-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | AudioTrack, AudioRecord: - remove useless mAudioFlinger member of AudioTrack and AudioRecord. - signal cblk.cv condition in stop() method to speed up stop completion. - extend wait condition timeout in obtainBuffer() when waitCount is -1 to avoid waking up callback thread unnecessarily AudioFlinger: - remove some warnings in AudioFlinger.cpp. - remove function AudioFlinger::MixerThread::removetrack_l() as its content is never executed. - remove useless call to setMasterVolume in AudioFlinger::handleForcedSpeakerRoute(). - Offset VOICE_CALL stream volume to reflect actual volume that is never 0 in hardware (this fix has been made in the open source): 0.01 + v * 0.99. AudioSystem.java: - correct typo in comment IAudioflinger, IAudioFlingerClient: - make AudioFlinger binder interfaces used for callbacks ONEWAY. AudioHardwareInterface: - correct routeStrings[] table in AudioHardwareInteface.cpp
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+553
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-553/+0
|
* auto import from //branches/cupcake/...@131421The Android Open Source Project2009-02-131-12/+35
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-0/+50
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-22/+52
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+450