* changes:
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba am: 63539c399a am: d98b2019db am: a29ede5e56
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba am: 63539c399a am: d98b2019db
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba am: 63539c399a
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca
audio: ensure effect chain with specific session id is unique
* changes:
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba am: 63539c399a am: d98b2019db
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba am: 63539c399a
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca
audio: ensure effect chain with specific session id is unique
* changes:
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba am: 63539c399a
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca
audio: ensure effect chain with specific session id is unique
* changes:
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca am: d2967d3fba
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca
audio: ensure effect chain with specific session id is unique
* changes:
[automerger] audio: ensure effect chain with specific session id is unique am: 5945746bca
audio: ensure effect chain with specific session id is unique
It's possible that tracks with the same session id running on various
playback outputs, which causes effect chain being created on the same
session twice. As a result, the same effect engine will be released
twice as the same context is reused.
Output that has effect chain with same session id is more preferable.
Test: No regression with Play Music and Effects
Bug: 123082420
Bug: 123237974
Merged-In: I690ea3cb942d1fdc96b46048e271557d48000f43
Change-Id: I690ea3cb942d1fdc96b46048e271557d48000f43
(cherry picked from commit 9aeb1770d4)
Allow at most one effect chain with same sessionId on mPlaybackThreads.
Test: poc, CTS effect tests
Bug: 123237974
Merged-In: Ide46cd23b0a9f4295f0dca2fea23379a76b836ee
Change-Id: Ide46cd23b0a9f4295f0dca2fea23379a76b836ee
(cherry picked from commit 1631f06feb)
make parameters to GetSizeWidth() reflect values being used in
corresponding EncodeSize() invocations so we won't overflow the buffer.
Bug: 123701862
Test: y
Change-Id: I78596176e6042c95582494a8ae1b9c3160bf5955
Check for the effects of setting a bogus counter.
Check for writes to memory surrounding the FIFO.
Check for negative array indices.
Bug: 120789744
Test: this is a test
Change-Id: Ia30cdef7f9d60f0a98b9af964cb3b3159df37dc9
The index into the FIFO is calculated by using:
counter % capacity
But the counter is signed and when it is negative the
modulo can have a negative result. That can cause
a negative array index and an access out of bounds.
This is not normally a problem because the counter
is 64 bits and it will not overflow until the audio
has run for a few million years. But a hacker might
be able to modify this internal counter and force
an error.
The solution involves casting to a uint64_t before doing
the modulo.
Note that there may still be a discontinuity when the
counter wraps from -1 to 0. But that will not result
in an out-of-bounds access. It may cause a noise but
an app could simply create a noise directly. So that is
not considered an exploit.
Bug: 120789744
Test: test_atomic_fifo.cpp
Change-Id: I6fe57bcb44528d29b5edb817c592e5e9a8aaf8eb
The number of frames in the second part was incorrect
when it wrapped past the end of the FIFO.
Bug: 78139448
Bug: 120789744
Test: adb shell aaudio_loopback -c2 -C2 -tm -m2 -Pl -pn
Change-Id: Ib6a22f30f0ee5321444c6d6137d9488943c34f3d