The deprecated method AudioManager.isBluetoothA2dpOn() calls
getDeviceConnectionState on APM with an empty address, which
caused HwModuleCollection::getDeviceDescriptor to set an empty
address on the DeviceDescriptor for the currently connected
A2DP device. This method is called by MediaRouter.
When the address was reset, the java listener for audio device
connection monitoring was reporting the connection of an A2DP
device with an empty address, which in turn caused AvrcpManager
to behave as if the audio device connection failed.
If MediaRouter called isBluetoothA2dpOn() before AvrcpManager
received its called for device connection, the error would occur.
Bug: 132416679
Test: call isBluetoothA2dpOn() and check for valid address in dumpsys media.audio_policy
Test: atest AudioServiceHostTest#testInjectForRecord ; atest AudioHostTest ; atest AudioPlaybackCaptureTest
Change-Id: I1370edbbca46657506a990855d06a176f07c54d3
Merged-In: I1370edbbca46657506a990855d06a176f07c54d3
Android provides 2 audio policy engines:
libaudiopolicyenginedefault and
libaudiopolicyengineconfigurable. This change makes the engine
to be loaded dynamically based on the configuration (currently
the engine name is hardcoded into AudioPolicyConfig). Dynamic
loading allows building and installing of both libraries without
any conflicts.
Technical changes:
- AudioPolicyManagerInterface renamed to EngineInterface
for clarity;
- For the purpose of dynamic loading, APM does not depend
anymore on the EngineInstance class. The class got removed
from the default AP engine, but left in the configurable engine
because it is also used by its plugins;
- Added EngineLibrary class to encapsulate dynamic loading
of the AP engine. The class name EngineInstance is repurposed
for a smart pointer to EngineInterface;
- services/audiopolicy/managerdefault/Android.mk converted
into Android.bp;
- Added engine loading failure test;
Bug: 132639720
Test: sanity tests for audio; audiopolicy_tests
Change-Id: I0581569a172f810e030aec879225e817bfa7851a
Merged-In: I0581569a172f810e030aec879225e817bfa7851a
We're already locking in yuv mode, use the stride info returned
by mapper instead of trying to align it to arbitrary number.
bug: 139921053
test: ImageReaderDecoderTest
Change-Id: I0e1e875f296f9aade907686440b077dff32e3cdc
Remove the "template" configuration file and the header file.
Bug: 132435217
Test: make
Change-Id: I0b8ae921ac046e11b020d5766a60f9b341e1d6ee
Merged-In: I0b8ae921ac046e11b020d5766a60f9b341e1d6ee
The usages were only checking that the property is set
to catch attempts to update to Q while still using legacy
configurations.
Bug: 132435217
Test: build various devices
Change-Id: Ib8bda8ab7f791ac5cd3875816de46a42f0a4cbb6
Merged-In: Ib8bda8ab7f791ac5cd3875816de46a42f0a4cbb6
NdkMediaCodec checks for wrong item in case of CB_ERROR callback. It
is checking for action instead of actionCode, because of which error
is not getting propagated. This leads to hang in application using
async NdkMediaCodec APIs.
Test: encoderTest --gtest_repeat=20 -P /sdcard/res/
Test: decoderTest --gtest_repeat=20 -P /sdcard/res/
Bug: 141458223
Change-Id: I9da8a361d1925b73f341f36e55f7426888155fc6
Adds support to save
a. Extractor - Bytes extracted per call
b. Muxer - Bytes being muxed per call
c. Decoder - Input bytes decoded per call
d. Encoder - Output bytes encoded per call
Test: builds
Bug: 140051680
Change-Id: I2740a4476ed6c06342fc13f4f1242a689cd4b46a
Shared libcrypto provides FIPS self tests, use it whenever possible.
Bug: 141248879
Test: m checkbuild
Change-Id: I811db67a35b321505e50476313384fe51d8154d2
The libnativeloader-dummy-headers target has been deprecated in favour
of the more appropriately named by otherwise identical
libnativeloader-headers
Test: m checkbuild
Change-Id: I176e0b345dea7d60d27a5fbdbcee34f7f1874088
Exempt-From-Owner-Approval: minor build change, owners unresponsive
Prevent selection of DIRECT and MMAP_NOIRQ output profiles
if these flags were not requested.
Test: atest audiopolicy_tests
Change-Id: I6940caed519b6237ea3038e646a84e4403a0c1ed
Merged-In: I6940caed519b6237ea3038e646a84e4403a0c1ed
Bug: http://b/120788908
This reverts commit f82a6c36da.
Reason for revert: The analyzer no longer issues the false-positive warning.
Change-Id: Ie8d8336285115e3e7c287b2d1831fe9884afaa93
Previously, Audio HAL implementers need all HW A/V sync profiles
declared after non HW A/V sync profiles in their audio policy
configurations, otherwise a HW A/V sync profile match could be
found for a non HW A/V sync (e.g. direct only) request, the
Audio HAL output stream would be opened with the HW A/V sync
flag, and Audio HALs typically fail to process the stream as
they are setup to parse in-band HW A/V sync headers (even if
they don't receive keyStreamHwAvSync AudioParameter).
Test: atest audiopolicy_tests
AudioPolicyManagerTVTest#MatchOutputNoHwAvSync fails w/o IOProfile change,
passes with the change.
Bug: 140447125
Merged-In: Icfc806497b5b23013e63621a585c28d1d7a9882a
Change-Id: Icfc806497b5b23013e63621a585c28d1d7a9882a
mpeg4 encoder doesn't support a stride that is not equal to align(width, 16)
In such cases copy the input to an intermediate buffer and use that for
encoding
Bug: 136962421
Bug: 139921039
Test: tested few nv12 and i420 encoding
Change-Id: I5a8adfc48aff79f52852be94bb46c10e7f9a0469
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I6cc85a91afb603e31b85090917f9f3b59d82a4d1
Protobuf 3.9.1 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long. Use PRIu64 to print it.
Bug: 117607748
Test: m checkbuild
Change-Id: Idb741c8be97df1c752083350fb8fed257903944c
Merged-In: Idb741c8be97df1c752083350fb8fed257903944c