The cause of frequent "EffectModule 0xxx destructor called with unreleased
interface" messages was due to not releasing the effects when purging
stale effects.
The cause of "Effect handle 0xxx disconnected after thread destruction"
message was due to late binder call for disconnecting already purged
effect handle.
Also improved logging to communicate uuids of the effects causing
these issues.
Bug: 62267926
Test: no aforementioned warnings in the log when opening the Effects
panel in Play Music
Change-Id: I6ec6f60c46dc704226931fb59a641e4cd74c2fd1
Always allow effects with no process function on any output
thread type as there is no impact on performance and no risk of
the audio properties not being supported by the effect.
Bug: 63015903
Test: place a Skype call over SCO and verify the volume listener
can be created.
Change-Id: I99db7802cec88a618808e500b74f4c78165199fe
Make sure we suspend/restore AEC and NS only when the suspend condition
actually changes to avoid mismatch in number of suspends/restores
causing the ref counting mechanism to leave the effects in suspend mode
while they should not.
Also clear the suspend state on an effect session before parking it in
the orphan chains list so that it is in default state whne attached to a
new record thread.
Bug: 63015903
Test: verify that switching BT SCO on/off with Duo enables or disables
AEC and NS accordingly
Change-Id: I4d0f0bf818deca3952da3c67bb7e83cb500429c7
This releaves reviewing burden from the frameworks/av owners.
Note that the lists of owners are inherited from the parent
directories thus the people listed in these files are owners
*in addition* to people listed in frameworks/av/OWNERS,
and frameworks/av/{media|services}/OWNERS.
Change-Id: I5e2db1c40cb807b906b2701fe446c874a8d19983
Test: not needed
Calls flushTsSeries when a state change was detected
to avoid logging idle audio time as a buffer period.
Test: dumpsys media.log
Change-Id: Ia33bec8829dcd5d2de5c40f904e5ea19c5a2b453
Implement correct indication of client UID and PID to audio flinger
for AAudio MMAP streams in both exclusive mode and shared mode.
- Add start/stop client methods on MMAP streams used only when the MMAP
stream is in AAudio service and carries a mix of shared streams.
- Add "In Service'" indication from "client" side to AAudioServiceStreamMMAP
so that the behavior can be adapted accordingly.
- Modify logic on audio flinger side with regard to mmap tracks and
audio HAL stream activity:
- use same audio session for all clients on a same stream to match
audio policy logic to share same direct output stream for clients on same
session. This is also more consistent with current volume and effect
handling as all MMAP clients sharing the same output stream have the
same volume and use case.
- start/stop the HAL when the stream is started/stopped with the initial client
handle (returned when the stream is opened) but do not create a track.
AAudioService implementation will always send an additional start command before
first client starts and a stop command after last client stops,
in both shared and exclusive mode.
- start/stop a track only if the start/stop stream command is received
with a handle different from the initial handle.
- Allow more than one active client from the same UID on a MMAP input in audio policy.
Bug: 62950008
Test: verify playback and capture in mmap mode
Merged-In: I86151bbb637ff172d2fd5f813056eab13a7bcd3c
Change-Id: I86151bbb637ff172d2fd5f813056eab13a7bcd3c
Without a 'return', the code attempts to call a method on
a null thread instance.
Bug: 62918718
Test: doesn't crash when bogus audio_io_handle passed to 'getParameters'
Change-Id: I356dfd9531e0de41d869b8e29909dee5843dc795
Implement correct indication of client UID and PID to audio flinger
for AAudio MMAP streams in both exclusive mode and shared mode.
- Add start/stop client methods on MMAP streams used only when the MMAP
stream is in AAudio service and carries a mix of shared streams.
- Add "In Service'" indication from "client" side to AAudioServiceStreamMMAP
so that the behavior can be adapted accordingly.
- Modify logic on audio flinger side with regard to mmap tracks and
audio HAL stream activity:
- use same audio session for all clients on a same stream to match
audio policy logic to share same direct output stream for clients on same
session. This is also more consistent with current volume and effect
handling as all MMAP clients sharing the same output stream have the
same volume and use case.
- start/stop the HAL when the stream is started/stopped with the initial client
handle (returned when the stream is opened) but do not create a track.
AAudioService implementation will always send an additional start command before
first client starts and a stop command after last client stops,
in both shared and exclusive mode.
- start/stop a track only if the start/stop stream command is received
with a handle different from the initial handle.
- Allow more than one active client from the same UID on a MMAP input in audio policy.
Bug: 62950008
Test: verify playback and capture in mmap mode
Change-Id: I86151bbb637ff172d2fd5f813056eab13a7bcd3c
Block effect commands reserved for framework use when
received on server side IAudioEffect. Applications have no reason
to use these commands and they present a unnecessary attack surface.
Bug: 62019992
Test: run CTS tests for audio effects
Change-Id: Ie680d5d5650f99dbabf93891703e1cde2c2e852d
Turning audio on and off does not cause this event to be
written to the buffer. Now, a call to dumpsys media.log
simply writes to console an analysis of the data in memory,
and does not delete it afterwards.
Test: dumpsys media.log
Change-Id: Ie75fb27ec4050fb3891635f4c7933196cfd03643
Bug: 62090113
Test: run AAudio test and verify a valid device is reported just
after opening playback or capture streams in legacy mode.
Merged-In: Ic8be42e1735690eb00c811ef0cb8b5abb36172d6
Change-Id: Ic8be42e1735690eb00c811ef0cb8b5abb36172d6
Bug: 62090113
Test: run AAudio test and verify a valid device is reported just
after opening playback or capture streams in legacy mode.
Change-Id: Ic8be42e1735690eb00c811ef0cb8b5abb36172d6