SoundPool API commands are based on an atomic
compare-StreamID if match then operate (see compare-exchange).
Test: soundpool_stress
Test: atest SoundPoolAacTest
Test: atest SoundPoolHapticTest
Test: atest SoundPoolMidiTest
Test: atest SoundPoolOggTest
Bug: 201233890
Bug: 201262390
Change-Id: I63cc07d581a0ac1d5440852bfe0c75edc9d73e75
As per sp's recommendations.
Bug: 204401299
Change-Id: Ida464b7ef44e2ad5855764e4e7d03b9f6bd5d1b0
Test: Built and flashed device.
Test: atest CtsMediaTestCases:MediaPlayerTest
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.
Bug: 161456198
Test: m
Merged-In: I674244ff9b873d3779d3d649822389ad441fa0af
Change-Id: I674244ff9b873d3779d3d649822389ad441fa0af
(cherry picked from commit 672b1349c86f4ae024e71587fc05bf8af046a53d)
Since the EffectCallback in android::AudioEffect can
keep an instance of the latter alive for a longer time
than Java AudioEffect is alive, the callback need to
ensure that it's not trying to use deallocated objects
and deleted JVM references.
Bug: 178363662
Test: manual using EffectsTest app
Test: atest CtsMediaTestCases:AudioEffectTest
Test: atest CtsMediaTestCases:BassBoostTest
Test: atest CtsMediaTestCases:DynamicsProcessingTest
Test: atest CtsMediaTestCases:EnvReverbTest
Test: atest CtsMediaTestCases:EqualizerTest
Test: atest CtsMediaTestCases:LoudnessEnhancerTest
Test: atest CtsMediaTestCases:PresetReverbTest
Test: atest CtsMediaTestCases:VisualizerTest
Change-Id: I8c36f5af4a1a2b14e81b1344570d2f8746ffa91e
We unconditionally leak every instance that we `new` of this. Move it to
the stack to fix this, since it doesn't need to be on the heap.
Bug: 188752500
Test: TreeHugger
Change-Id: I24ed3bb29c5a6912398a9e00e7748fd406cf6a62
Android Host is not capable to deal with the long processing time for
runtime thumbnail generation.
Skip runtime thumbnail generation for Android Host
but keep no impact to other Host
Bug: 188752500
Test: atest MtpTests
Test: atest MtpServerTest
Test: atest MtpServiceTests
Test: manual test on Windows 10 File Explorer
Test: manual test on Android Host Files App
Change-Id: I24ed3bb29c5a6912398a9e00e7748fd406cf6a64
Attribution source is the abstraction to capture the data
flows for private data across apps. Checking permissions
for an attribution source does this for all apps in the
chain that would receive the data as well as the relevant
app ops are checked/noted/started as needed.
Teach speech recognition service about attribution
chains. If an implementation does nothing the OS
would enforce permisisons and do blame as always.
This apporach leads to double blaming and doesn't
support attribition chains where app calls into
the default recognizer which calls into the on
device recognizer (this nests recursively). If the
implementer takes advantage of the attribution chain
mechanims the permissions for the entire chain are
checked at mic access time and all apps are blamed
only once.
Fixed a few bugs around finishing ops for attribution
chains. Also ensured that any app death in a started
attribution chain would lead to finishing the op for
this app
bug: 158792096
Test: (added tests for speech reco)
atest CtsMediaTestCases
atest CtsPermissionTestCases
atest CtsPermission2TestCases
atest CtsPermission3TestCases
atest CtsPermission4TestCases
atest CtsPermission5TestCases
atest CtsAppOpsTestCases
atest CtsAppOps2TestCases
Merged-In: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
Change-Id: Ic92c7adc14bd2d135ac13b96f17a1b393dd562e4
Get multiple audio/video codec profiles from MediaProfiles object
instead of just wrapping the old CamcorderProfiles objects.
Bug: 171673898
Test: atest CamcorderProfileTest
Change-Id: If56ac6c2a89992361f0491d8175af1f89dffd3d0
The resource id/handle mapping is no longer needed in the TunerClient
once the TunerService migration is done.
The mapping should only be maintained in the TunerService
Test: make
Bug: 186785141
Change-Id: Idfb02fe5935d9b25aac749c0f77eda111e0959ea
media filter
Previously we get the share memory handle on filter opening, which only
has the information on filter types.
Now we move the share memory handle to the filter config API call so
that only the non-passthrough filter will get the share memory handle.
Test: sample tis on cuttlefish
Bug: 185627837
Change-Id: I33fd4950ec12291f6ca31a36b081d66643d5c319
1. TunerJNI is setting Tuner 1.1 Frontend extended settings regardless of the tuner hal version
2. SectionSettings section bit copy issue
Test: make
Bug: 185627837
Change-Id: I7ab03e2c96b6abd1439f6a277450005e625c0015
Previously we created the Filter FMQ from the AIDL MQ Descriptor after
it is passed from the TunerService to the client side.
But the default creation would reset the mq pointer.
Since we only get the mq when read operation is executed on the filter,
the mq could have already been writtern. The default creation would
reset the pointer and erase the data.
Test: atest TunerTest
Bug: 185542142
Change-Id: I56a09e30b0cfbf9fadcaa7f0c7ef1ac6a6d601b1
This CL also cleans up some local pointers
Test: atest android.media.tv.tuner.cts
Test: manual sampletis
Bug: 184782012
Change-Id: Ia30b82f9b5e1e984bedbe9abb8bf79d0cf4f5c24
A stream on the restart queue can cause the StreamManager to
busy-wait. This was introduced by a fix
commit ba04dbe7732bc2d016bf81c81bd349d931de63f2.
Test: Verbose log on StreamManager.cpp, run SoundPool CTS tests.
Bug: 182923919
Merged-In: Iae794bc957869426a4e1e27cd3c088aa9dd83208
Change-Id: Iae794bc957869426a4e1e27cd3c088aa9dd83208
libmedia_jni is the non-updatable part of the platform. However, it has
been built with `min_sdk_version: "29"` inherited from
libcodec2-internal-defaults and then again from libcodec2-impl-defaults.
The setting is for the codec2 cc_* modules that are part of the media
APEX.
So far, this however, hasn't caused a problem because the build system
ignored min_sdk_version for the platform variants. This will change
starting from I88f64c5a35f1b5276c3350e177b116932011a940. Then
libmedia_jni will actually be built with min_sdk_verison: 29, and it
will be enforced that any APIs above the API level 29 should be guarded
with __builtin_available.
Adding the guards will not only be cumbersome, but also wouldn't give
any benefit because libmedia_jni is tied to the platform. The check will
always be true.
Instead, this change resets the min_sdk_version of libmedia_jni, so that
it can keep the existing behavior.
Bug: N/A
Test: m libmedia_jni
Change-Id: Ie963d71f60cbfe849b5400a5ecf2d52119078554
By design, the StreamManager ramps down volume
on a Stream stop to prevent pops and glitches.
When the SoundPool is configured only with a single stream,
there may be a short period of unavailability of that stream
while stop is called by the worker thread; an immediate
play after a stop may return 0 (failure).
To allow immediate play after stop for a *single* Stream configured
SoundPool, we lock the StreamManager worker thread so that the
stop call is processed and the stream is visible to the client for use.
We prefer not to keep this lock for the multiple Stream case as it
prevents concurrent initiation of sounds from multiple StreamManager
worker threads and such blocking is not appropriate for games.
Test: SoundPoolAacTest SoundPoolHapticTest
Test: SoundPoolMidiTest SoundPoolOggTest
Bug: 175097719
Bug: 177287876
Merged-In: Iec777d6319d5ed76000d4c5b12336b106dacede4
Change-Id: Iec777d6319d5ed76000d4c5b12336b106dacede4
A stream on the restart queue can cause the StreamManager to
busy-wait. This was introduced by a fix
commit ba04dbe7732bc2d016bf81c81bd349d931de63f2.
Test: Verbose log on StreamManager.cpp, run SoundPool CTS tests.
Bug: 182923919
Change-Id: Iae794bc957869426a4e1e27cd3c088aa9dd83208
By design, the StreamManager ramps down volume
on a Stream stop to prevent pops and glitches.
When the SoundPool is configured only with a single stream,
there may be a short period of unavailability of that stream
while stop is called by the worker thread; an immediate
play after a stop may return 0 (failure).
To allow immediate play after stop for a *single* Stream configured
SoundPool, we lock the StreamManager worker thread so that the
stop call is processed and the stream is visible to the client for use.
We prefer not to keep this lock for the multiple Stream case as it
prevents concurrent initiation of sounds from multiple StreamManager
worker threads and such blocking is not appropriate for games.
Test: SoundPoolAacTest SoundPoolHapticTest
Test: SoundPoolMidiTest SoundPoolOggTest
Bug: 175097719
Bug: 177287876
Change-Id: Iec777d6319d5ed76000d4c5b12336b106dacede4
At ag/13824423 we fixed the description of
WrapNativeCodec2GrallocHandle() that the returned handle should be
closed and deleted. This CL closes and deletes the handle if the
ownership of the returned handle is not transfered to
C2GraphicAllocation successfully.
Bug: 181541291
Test: android.media.cts.AdaptivePlaybackTest
Change-Id: I18464f860a93a750db653eb615ae0c92a672535e