History log of /frameworks/av/services/audioflinger/Effects.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1b92868010b5c1409692a86f6b27e4a265b64c1a 03-Oct-2014 Eric Laurent <elaurent@google.com> audioflinger: fix pre processing transfer between record threads.

Fix two problems remaining with pre processing effects transfer from
one record thread to the next in case of tear down due to device connection:
1 - the enabled state of the effects was not communicated to the new HAL
input stream.
2 - the effects saved in orphan chains list were not transfered to the
new thread when a AudioRecord was created.

Bug: 17757378.
Change-Id: I0923c98470db3b51154dc89846157780a4c21e86
cb4b6e9f05d1c0b3fcc5be5ebe3f7d6f32669b1a 01-Oct-2014 Eric Laurent <elaurent@google.com> audioflinger: fix failure to indicate volume to effect

If an effect is added and enabled after a track is started
it will not receive current volume information because volume
is indicated only to active effects and if there is a volume change.

Add a flag to force EffectChain::setVolume_l() to pass volume indication
to all effects each time an effect is enabled.

Bug: 17572556.

Change-Id: I6b68488c9aca8b2095fb210aa124d02e4f759660
aaa44478a373232d8416657035a9020f9c7aa7c3 13-Sep-2014 Eric Laurent <elaurent@google.com> audioflinger: fix pre processing effect leak

When a capture thread was closed, the effects attached to this thread
were left dangling and the associated effect chain destroyed.
When their last client was disconnected, the effects were not released
properly from the effect library because the destruction process could
not be completed without the effect being attached to a thread.

A similar problem prevented a RecordTrack to be properly released if
its client was destroyed after the capture thread.

The fix consists in allowing the effect or record track to be properly
released even if its parent thread cannot be promoted.

Also save any effect chain still present on a closed capture thread
in case a new client wants to reuse the effects on the same session later.

Bug: 17110064.
Change-Id: I5cd644daa357afd1f3548f9bcb28e6152d95fdb8
c56f3426099a3cf2d07ccff8886050c7fbce140f 22-Mar-2014 Glenn Kasten <gkasten@google.com> Pass stereo gains as packed minifloat

This will allow (eventually) a greater dynamic range for gains.
However there are still a few remaining places in effects and mixer
that will also need to be changed in order to get the full benefit.

Also fixes a minor bug: was not checking for NaN in AudioTrack C++.

Change-Id: I63bce9e82e0a61546d8ff475fb94bcb700d99c96
01d3acba9de861cb2b718338e787cff3566fc5ec 06-Feb-2014 Glenn Kasten <gkasten@google.com> Fix clang warnings in AudioFlinger

Change-Id: I0fa61025c979709ad7d655bc717df5f194b6089e
e75da4004b2c814987aa2adf8a76190f92d99c65 20-Nov-2013 Glenn Kasten <gkasten@google.com> Fix bug in creation of EffectHandle when out of memory

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
eb3c337a3d6c74ec857dfc8be7eeafe634614bcd 25-Sep-2013 Eric Laurent <elaurent@google.com> fix deadlock in audioflinger::createEffect()

commit 5baf2af5 introduced a regression by calling
getOutputForEffect() with AudioFLinger main mutex locked.
The locking order must always be AudioPolicyService mutex then
AudioFlinger then ThreadBase mutex.

Bug: 10916796.
Change-Id: Ide34a2d84dbb06dbb35abd0640d91b01b0ac4d40
5baf2af52cd186633b7173196c1e4a4cd3435f22 13-Sep-2013 Eric Laurent <elaurent@google.com> more support for audio effect offload

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

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
813e2a74853bde19e37d878c596a044b3f299efc 31-Aug-2013 Eric Laurent <elaurent@google.com> audioflinger: no effects on offloaded tracks

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
bfb1b832079bbb9426f72f3863199a54aefd02da 07-Jan-2013 Eric Laurent <elaurent@google.com> AudioFlinger: offload playback, non-blocking write

- 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
81784c37c61b09289654b979567a42bf73cd2b12 19-Nov-2012 Eric Laurent <elaurent@google.com> AudioFlinger files reorganization

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