summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Effects.cpp
Commit message (Collapse)AuthorAgeFilesLines
* AudioFlinger: add specific mutex for client listsEric Laurent2014-05-131-2/+2
| | | | | | | | | | | | | Add a specific mutex to protect access to mClients and mNotificationClients lists. This avoids locking the main AudioFlinger mutex from inside thread loops and allows not to worry about cross deadlocks when sending a config event with status reply while keeping the ThreadBase or AudioFlinger mutex locked. As a way of consequence, remove notification client list passed to processConfigEvents_l() and audioConfigChanged() as the list can now be accessed by locking client mutex only. Change-Id: I228022204b6709a8bb60cc96d9514a6ffe59b62e
* resolved conflicts for merge of 566be7c3 to masterNarayan Kamath2014-02-111-13/+13
|\ | | | | | | Change-Id: I7b1cc71057b2bd4f771e7bcf508a8c3abd6017ce
| * Make frameworks/av 64-bit compatibleKévin PETIT2014-02-111-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
* | Merge "Fix clang warnings in AudioFlinger"Glenn Kasten2014-02-101-2/+2
|\ \
| * | Fix clang warnings in AudioFlingerGlenn Kasten2014-02-101-2/+2
| | | | | | | | | | | | Change-Id: I0fa61025c979709ad7d655bc717df5f194b6089e
* | | Pretty up audioflinger dumpsysMarco Nelissen2014-02-101-35/+143
|/ / | | | | | | Change-Id: I57e44b4c36b99f7149542bbcf9645521c6152dfa
* | Fix unused parameter warnings in audioGlenn Kasten2014-02-031-1/+1
| | | | | | | | Change-Id: I665ba3358dd9502f0adec70d486e7bf8a2e1b0fe
* | Fix bug in creation of EffectHandle when out of memoryGlenn Kasten2013-11-201-8/+10
| | | | | | | | | | | | | | | | If there is insufficient client memory to create the EffectHandle, it was returning a handle which would be useless. Now it correctly reports the out-of-memory error back to client. Change-Id: I894e65d5d17df39383032c1527be6ccd35f578bb
* | am 3424d6e1: am 1adf20ce: Merge "fix volume and effect enable delay on ↵Eric Laurent2013-10-011-5/+17
|\ \ | |/ | | | | | | | | | | offloaded tracks" into klp-dev * commit '3424d6e17637e0743ddf3bf4688af8ee36e69264': fix volume and effect enable delay on offloaded tracks
| * fix volume and effect enable delay on offloaded tracksEric Laurent2013-09-301-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Volume: add a method to wake up the mediaserver playback thread when a volume command is received on an offloaded track. Effects: call effect chain process on offloaded playback threads asynchronously from writes to allow effect state updates while waiting for async write callback. Bug: 10796540. Change-Id: Id2747ae88783575d1d7ffd6fc86fbd054ab2c739
* | am a2340b30: Merge "Don\'t call audio effect process on offloaded playback ↵Jean-Michel Trivi2013-09-301-3/+4
|\ \ | |/ | | | | | | | | | | threads" into klp-dev * commit 'a2340b3059b9d6e4286d0db7069df477c164df0c': Don't call audio effect process on offloaded playback threads
| * Don't call audio effect process on offloaded playback threadsJean-Michel Trivi2013-09-261-3/+4
| | | | | | | | | | | | | | | | | | An audio effect process command is not meant to be called for playback threads belonging to offloaded playback. Bug 10933817 Change-Id: Idc7b6a0224791bbf8d61648474d3c288617c498f
* | am bf5e2397: am 5baf2af5: more support for audio effect offloadEric Laurent2013-09-181-5/+44
|\ \ | |/ | | | | | | * commit 'bf5e23979a03da96ce1d63126c480103232f174b': more support for audio effect offload
| * more support for audio effect offloadEric Laurent2013-09-181-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Offloading of audio effects is now enabled for offloaded output threads. If an effect not supporting offload is enabled, the AudioTrack is invalidated so that it can be recreated in PCM mode. Fix some issues in effect proxy related to handling of effect commands to offloaded and non offloaded effects. Also fixed a bug on capture index in software Visualizer effect. Bug: 8174034. Change-Id: Ib23d3c2d5a652361b0aaec7faee09102f2b18fce
* | am 8a910716: am 6ca83fad: Merge "audioflinger: no effects on offloaded ↵Eric Laurent2013-09-091-11/+23
|\ \ | |/ | | | | | | | | | | tracks" into klp-dev * commit '8a910716892d17a2ac62c7e9884af0e9d75b26bc': audioflinger: no effects on offloaded tracks
| * audioflinger: no effects on offloaded tracksEric Laurent2013-09-091-11/+23
| | | | | | | | | | | | | | | | | | | | | | Invalidate offloaded tracks when an effect is enabled so that the track is recreated in PCM mode and the effect can be applied. This is temporary until effect offloading is implemented. Bug: 8174034. Change-Id: I77b8b54a10db6cb8334be76d863ea7e720eaad09
* | Use curly braces in 'if' to make it easier to add logsGlenn Kasten2013-08-131-1/+2
|/ | | | Change-Id: I58b33fefdd8bf703647414157a99a3223be3531c
* AudioFlinger: offload playback, non-blocking writeEric Laurent2013-07-251-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | - Added specialized playback thread class for offload playback, derived from directoutput thread. This thread type handles specific state transitions for offloaded tracks and offloading commands (pause/resume/drain/flush..) to audio HAL. As opposed to other threads, does not go to standby if the track is paused. - Added support for asynchronous write and drain operations at audio HAL. Use a thread to handle async callback events from HAL: this avoids locking playback thread mutex when executing the callback and cause deadlocks when calling audio HAL functions with the playback thread mutex locked. - Better accouting for track activity: call start/stop and release Output methods in audio policy manager when tracks are actually added and removed from the active tracks list. Added a command thread in audio policy service to handle stop/release commands asynchronously and avoid deadlocks with playback thread. - Track terminated status is not a state anymore. This condition is othogonal to state to permitted state transitions while terminated. Change-Id: Id157f4b3277620568d8eace7535d9186602564de
* Make AudioFlinger::instantiate() more resilient when called from separate moduleGlenn Kasten2013-07-191-0/+1
| | | | | Bug: 8834855 Change-Id: I4cd842cdfb09d2aaaaab9df9ac3bec6179709bd3
* AudioFlinger: do not cache audio device when 0.Eric Laurent2013-06-061-1/+1
| | | | | | | | | AudioFlinger should not cache the audio device passed to the audio HAL when it is AUDIO_DEVICE_NONE but keep previous valid selection instead. Bug: 9323399. Change-Id: I6f9480e55a21be4115453e6a5eebc5cf2536c476
* audioflinger: add effect config status checkEric Laurent2013-04-021-12/+51
| | | | | | | | | | Check the result of the effect engine configuration command and do not attempt to send parameters to, enable, or process the effect if configuration fails. Bug 8512027 Change-Id: I8c78a05d79fba36b1a387aa5cf2700612301ac91
* AudioFlinger files reorganizationEric Laurent2012-11-191-0/+1684
Audioflinger.cpp and Audioflinger.h files must be split to improve readability and maintainability. This CL splits the files as follows: AudioFlinger.cpp split into: - AudioFlinger.cpp: implementation of IAudioflinger interface and global methods - AFThreads.cpp: implementation of ThreadBase, PlaybackThread, MixerThread, DuplicatingThread, DirectOutputThread and RecordThread. - AFTracks.cpp: implementation of TrackBase, Track, TimedTrack, OutputTrack, RecordTrack, TrackHandle and RecordHandle. - AFEffects.cpp: implementation of EffectModule, EffectChain and EffectHandle. AudioFlinger.h is modified by inline inclusion of header files containing the declaration of complex inner classes: - AFThreads.h: ThreadBase, PlaybackThread, MixerThread, DuplicatingThread, DirectOutputThread and RecordThread - AFEffects.h: EffectModule, EffectChain and EffectHandle AFThreads.h includes the follownig headers inline: - AFTrackBase.h: TrackBase - AFPlaybackTracks: Track, TimedTrack, OutputTrack - AFRecordTracks: RecordTrack Change-Id: I512ebc3a51813ab7a4afccc9a538b18125165c4c