This can prevent some loud noises during unit tests.
Also use std::unique_ptr
Bug: 154342174
Test: libaaudio/tests/test_various.cpp
Change-Id: I1c1dc0f4a6a29cf7d7a656392a81a325847de22d
The list of possible paths for the audio configuration
files is now retrieved using audio_get_configuration_paths()
function. All duplicated lists of known configuration
directories have been removed.
Bug: 153680356
Test: test audio on built image working
atest VtsHalAudioV6_0TargetTest VtsHalAudioPolicyV6_0TargetTest
Change-Id: I8c369442f5ca7baa17df95e6a001396fc9de5681
Merged-In: I8c369442f5ca7baa17df95e6a001396fc9de5681
Use listManifestByInterface in v1.2 servicemanager to list all
instances of drm service from the manifest. If it's lazy hal, the
service will be started as lazy hal service in getService.
Test: Play secure video in ExoPlayer
Bug: 153636761
Change-Id: Ifda4c9c433cfc1cd38980b10b8641f1db4460773
Do not systematically request a stream disconnect upon
EVENT_NEW_IAUDIOTRACK received AudioTrack but only if the new
audio Track properties have changed in such a way that the initial
contract is broken.
Bug: 139763500
Test: OboeTester TEST DISCONNECT
Test: OboeTester TEST OUTPUT while enabling/disabling Live Caption
Change-Id: I3b43275a888e23471fcd1ce20725f5731a77a255
Bug: 147894326
Test: build
Exempt-From-Owner-Approval: This CL only changes build config, but not
the test logic.
Change-Id: I5f2e6db3ebff48cd53be07c49c24c58c9b116306
With HAL1-camera2 legacy implementation, the getCameraCharacteristics
may be called without camera permission. So the cameraserver's Uid is
used in that case.
AppOpsManager returns MODE_IGNORED when the cameraserver's Uid is passed.
Do not treat this as an error case.
Bug: 153511543
Test: On Pixel 2 device, run "adb root; adb shell setprop
persist.camera.HAL3.enabled 0; adb reboot", then "atest
cts/tests/camera/CaptureRequestTest"
Change-Id: I29aaa2045b14233537c737bf0738fbc32422540e
Based on some usecase, outputing in float is not an option.
Should allow a property to select the behavior
Bug: 140952553
Test: NativeDecoderTest#testExtractor
Test: MediaExtractorTest#testFlacIdentity
Change-Id: Idf2bf382f50d12c00a85aa7bb5582fb0439c6ea1
Signed-off-by: Jean-Baptiste Théou <jb@essential.com>
Because callbacks are called from a looper thread, if the subscriber
unsubscribes and frees the callback, invalid memory access may occur from the
looper thread.
Address this by draining all pending callbacks at the time of listener
unregistration.
NOTE: There is rare chance that the wait on the condition times out,
still resulting in the original NPE issue. We intensionally allow that
to avoid deadlock, in case the application uses the same mutex lock for
callbacks and unregister functions.
Test: for i in {1..10}; do atest -it NativeImageReaderTest; done
Test: ACameraNdkVendorTest
Bug: 148976953
Change-Id: I92f5a02a4e3e63f2e72e8043ff4f4ac16c1eec5d
Duplicating outputs do not have an associated IOProfile and
getPolicyAudioPort() returns null.
Add a method to AudioIODescriptorInterface to query if the
input or output descriptor corresponds to MMAP IO profile or not.
Bug: 153849965
Test: repro steps in the bug
Change-Id: I300356880198f1785e3a5e1359ffd393c6ae4190
Scenario: startAudioSource (SW bridge) started, then stopped.
AF patch is released, so PlaybackThread has empty patch.
Next playback using the same sink will not recreate any patch
on AF as same device (and output desc has still valid patch handle)
Hence, ioconfichanged will get PORT NONE as sink device, no
onAudioDeviceUpdate cb can be fired.
This CL fixes this issue by reset of patch handle on the output
Bug: 136121584
Test: startAudioSource / stopAudioSource then playback on the same
sink. Ensure onAudioDeviceUpdate is fired
Test: atest RoutingTest
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: Ia9c2570f687166f38335ed7efae28920f7acc474
mDistortionMappers are used in callback thread and request thread.
However, callback thread does not query before calling mDistortionMappers[mId.c_str()],
this may cause insertion to the map and mDistortionMappers.find may run at the same time.
Bug: 153506800, 153457587
Test: Camera CTS
Change-Id: I899033bacd355113fbad3e8f7ec76482aa147158
With b/152655547, all aidl_interface modules are considered as stable
unless it is explicitly with "unstable: true". This change marks the
aidl_interface that are not used across updatable module bounraries
as unstable, so that the build system does not run the API
dumping/checking on them.
Bug: 152655547
Test: m
Change-Id: I5597f7d3fa0e2196dbfcf7ab9a33c71c15a33806
The internals of AData do exactly the type casting that upsets CFI
sanitizers, so disable CFI for those routines.
Bug: 153739236
Test: atest sf_foundation_test
Change-Id: I69ac7f064a8d3c874d7587598b450af657c4ba59
Add error checks for invalid number of coupled streams and channel
mapping values
Bug: 148771305
Test: test in bug
Change-Id: I0d8fcbaa514dfe55a94246f8f847be9a14be7a60
Instead of assuming stride to be a multiple of 64, use the value
returned by graphic view.
These codecs require chroma stride to be half of luma, hence the luma stride
should be a multiple of 32. Hence request for stride that is multiple of
32, then use returned stride.
This is needed where allcoated buffer has a stride that is multiple of
128.
Test: atest android.media.cts.DecoderTest
Test: Test decoding clips with dimensions that are not multiples of 16
Bug: 144190181
Change-Id: I08912396e495326fca787e8ae0b47256505210ca
Merged-In: I08912396e495326fca787e8ae0b47256505210ca
In order to support signalling lower levels, default dimensions
and frame rate are set to smaller values, such that minimum level
calculations done with default values still stay at lowest level
supported
Bug: 149360064
Bug: 151423508
Test: atest android.media.cts.MediaRecorderTest#\
testProfileAvcBaselineLevel1
Change-Id: Ic86e5d728d99652ea4e4a46df4f46b3ff3b357ac
Merged-In: Ic86e5d728d99652ea4e4a46df4f46b3ff3b357ac
This fixes a rebase issue between f72774b and 2a24a30.
Bug: 153120636
Test: Manually run ARC c2 e2e test app
Change-Id: I68987ff27f43380e7ad149c2776830219c42dba9
Only the primary HAL has to support mic mute function.
Ignore errors returned by other HALs in setMicMute() and
only report mic mute state from primary HAL in getMicMute().
Bug: 153103117
Test: CTS AudioManagerTest.testMicrophoneMute
Test: manual phone call and verify microphone mute.
Change-Id: Ic121c49e7e7cd75eeee9342249271c7fca7c1c2a
Without trunksize as restriction, function parseClearEncryptedSized()
can read the rest of file. If the file has a large number of saiz trunk,
large number of bytes will be copied, which can lead to high cost of
CPU time.
Bug: 124777526
Test: please see #3 and #8 in b/124777526: push senc.mp4 to devices's
sdcard, play with photo app, manuly print log. Also need to verify if
Dexter app (b/152531488) not crash.
Change-Id: I87f215cf04c5d002076e145f21c10556773f4bb2
If there is an issue where this is not loaded, we should know.
Bug: 146059841
Test: boot health check on devices
Change-Id: I3c50078b254e3caff5c824024909cb722dfb1aae