* changes:
Plumb the notification about audio HAL services update to APM
libaudiohal: Allow late registration of HIDL HAL services
Allow for late audio module discovery in APM
Android added support for correctly applying color transfer for
thumbnails of HDR videos with PQ color transfer, this expands it to HLG
color transfer.
Bug: 151096599
Test: manual - see bug
Change-Id: I880b2baeeab49a623fcc6e3568c1569b9d3788e4
AudioFlinger registers a callback with libaudiohal to receive
notifications when new HAL services get registered. It relays
the notification to AudioPolicyManager via AudioSystem /
IAudioPolicyService interface.
Because AF / APM only interact via Binder interfaces and APM's
interface gets registered later than AF's, the notification
from AF is made asynchronous.
Bug: 149854039
Test: audio test on a regular phone configuration
audio test on a phone with MSD audio HAL module
Change-Id: I158e941b8f75e2a4614b9d84ca798b0f1f47aa6a
DevicesFactoryHalHidl registers a notification callback
with a service manager to get notified about registration
of new HAL services.
The specific code for the MSD HAL has been removed,
this HAL service is now handled using the added generic
mechanism.
Bug: 149854039
Test: make
Change-Id: I2f7f83dec11ac2390f674afd9e4451ef46dde04e
Extract code that loads hardware modules and fills out
mAvailable{Input|Output}Devices into a reusable function.
It is used both during APM initialization and on
receiving a notification that a new HAL service has
been discovered.
Bug: 149854039
Test: atest audiopolicy_tests
Change-Id: Ifb7f0b61b06a0609802e63dccb26f3472328ef48
setMediaCas could fail even when the cas object is validated,
don't assume it always succeeds.
bug: 151006394
test: android.media.cts.MediaDrmClearkeyTest#testClearKeyPlaybackMpeg2ts
when the cfi check appears, mediaextractor will crash, and the
above test should show Fail result.
Change-Id: Ie4c04c5bd073e0000de893d16de466b36cb0fb86
Codec2 Vorbis codec was dynamically linking with libvorbisidec.
By linking statically instead, unused code can be stripped, reducing
size and improving relative coverage.
Test: CTS
Bug: 149042245
Change-Id: If1203ecf2d488bd285cb469f786a14a0eb64a7f4
(cherry picked from commit 048d7c3229170a9a0cc4f72c2a47584d93dc9551)
If effect chain has non-offloaded effect, and is enabled for direct
output, when there's no volume control for all the effect modules
within this chain, volume should still be set to HAL.
Test: Play Music, Videos with effects
Bug: 149899134
CRs-Fixed: 2625597
Change-Id: I77bd0d456d5fa4e88afb283002a5eb1e2b704ca8
Use SYSTEM_TIME_REALTIME instead.
As we always specify the time when the item arrives,
this has no real effect, just for internal consistency.
Test: atest mediametrics_tests
Bug: 149850236
Change-Id: I34d7bed0c4e25b288493ce1ecf3574c4d87334d9
1) Correct TransactionLog low water mark
2) Limit number of items historically stored in any TimeMachine property.
Test: Special instrumented atest
Bug: 150547711
Bug: 150598686
Change-Id: I67b25c84b1fb62ce83caa5ec48b800cab85467c9
Having a sp<ProviderInfo> in DeviceInfo resulting in the parent
ProviderInfo not being deallocated.
Test: Check camera characteristics object freed by killing provider
Bug: 149813446
Change-Id: Ic15ffcd3a5ce424187877e17a14b4db581e2c50a
Fix two concurrent capture scenarii when VoIP call is active:
1) when the audio mode is IN_COMMUNICATION, only allow capture
from the app owning the audio mode.
2) fix capture by a privileged app when a privacy sensitive capture is
active: capture was silecend if the privacy sensitive capture was
started after the privileged capture.
Bug: 148368476
Test: Manual test of various VoIP apps and phone calls scenarii
Test: cts AudioRecordTest
Change-Id: I166f91c43ce86bb23c2f171700ece634091caaad
am skip reason: Change-Id I614ac881ecde6bad13f22f1382de701f314a7ada with SHA-1 140a34fbfe is in history
Change-Id: Ib6d783a021a9935c4da82371d3f232ce0620cf52
AudioSystem.setAllowedPolicyCapture is only called from audio service.
In that case, checking if the calling uid is system uid to before taking
action.
Bug: 145115448
Test: dumpsys audio, query active playback configuration
Change-Id: I614ac881ecde6bad13f22f1382de701f314a7ada
Merged-In: I614ac881ecde6bad13f22f1382de701f314a7ada
(cherry picked from commit 140a34fbfe)
WebmFrameThread.cpp does not set the resumed state as false in pause() function.
Hence when multiple pause/start APIs are called, both the mPaused and mResumed
variables remain true. When read happens in paused state, since mResumed
is true, timestamp adjustment logic goes wrong causing an abort. So, set
mResumed=false in pause().
Bug: 146319756
Test: atest writerTest -- --enable-module-dynamic-download=true
Change-Id: I8ec246df4e1ff491c3ade6116696c53551fea11c
Merged-In: I8ec246df4e1ff491c3ade6116696c53551fea11c
(cherry picked from commit 36d77d7f25df8f6e9ba80608311b397581c2763c)
1) Don't count tracks with no samples as malformed for MediaMuxer, but
keep the old behavior as it is for MediaRecorder.
2) When there are no samples to be written in a track, skip that one, but
compose mpeg4 file with all other tracks in it.
3) Allow notifications in MediaMuxer during stop() process.
Bug: 144108285
Bug: 146423844
Bug: 148754639
Test: 1) Unit tested by adding a video and an audio track, once leaving
audio track with no samples and once leaving video with no
samples. Mpeg4 file with expected track was created both the times
and played well.
2) android.mediav2.cts.MuxerUnitTest$TestApi#testSimpleStartStopMuxer
3) android.media.cts.MediaMuxerTest
4) android.media.cts.MediaRecorderTest
Change-Id: If76a1f3b60d09836d53bce6f6e759e6a751f5538
Merged-In: If76a1f3b60d09836d53bce6f6e759e6a751f5538
(cherry picked from commit afc9f27233fa7dfb8c03e0fc83f612e7a19f27f2)
Added ability to set duration of last frame by writing an empty buffer with
EOS flag marked along with presentation time stamp at the end.
This timestamp would be used to calculate the duration of the original last frame.
Bug: 141573686
Bug: 121052341
Test: atest android.media.cts.MediaMuxerTest
atest android.media.cts.MediaRecorderTest
Unit tested with last sample duration equal to previous sample,
different from previous sample and zero as well. STTS entries and
track duration were created as expected.
Change-Id: Ie769dcd013c8c13e69529480d51d124a7ee3b094
Merged-In: Ie769dcd013c8c13e69529480d51d124a7ee3b094
(cherry picked from commit 53f255f5fc560274d69cccb9a546f0aa494e76f2)
ASSERT_*() calls in getInbufBUfferInfo() weren't resulting in test failures earlier
Also added a sanity check for MediaAdapter allocation failure
Test: atest writerTest -- --enable-module-dynamic-download=true
Bug: 150181503
Change-Id: I600ab1e7cbbd6d5e508efbf85c3a40753ca14a18
am skip reason: Change-Id I6a8f7dd374a3252ba93f386d3c62cd735fe82802 with SHA-1 84e512b692 is in history
Change-Id: If591f7687ddd740f5f97ba24b8a5768832376e07