Previously, audio policy client would call an method on the sound
trigger middleware service. This has been replaced by the sound
trigger service registering a callback, in order to avoid a cyclic
dependency between the services.
Bug: 146157104
Merged-In: I876461a7650d337d6dd05fbe80efaf08f8ef20dd
Change-Id: Ia8f674d7dd50f6dcdd6595bcbadec2f25fdb3561
This is a helper class for notifying a client of capture
state changes.
Bug: 146157104
Test: Compiles (further testing as part of the topic).
Merged-In: Ie27bc404805d319a6969290a6369d59fb68c1f38
Change-Id: I2902468c4692ba68e4bc9be0e5038d5505da7154
Initialize variable 'strategy' in
AudioFlinger::EffectBase::updatePolicyState.
Found by clang-tidy.
Bug: 152526318
Test: m
Change-Id: I5aad916a9873122eed0bb8e40bb26d677f338b16
wasn't clearing size/filled when we cleared buffer.
Bug: 151159638
Test: poc, but it didn't fail either before or after the patch
(cherry picked from commit f2acb7a018)
Change-Id: Ie62c28c0b91a1ec36ba1a307fea5ff73d5c085bf
The UID of the current InputMethodService (DEFAULT_INPUT_METHOD) is
pushed from AudioService to AudioPolicyService via AudioSystem.
Allow capture audio if:
- the UID is the current InputMethodService's UID,
- AND a RTT call is active,
- AND the source is AUDIO_SOURCE_VOICE_RECOGNITION.
Bug: 147037345
Test: use voice input with Gboard 9.1.4 during a simulated RTT call.
Change-Id: Ib32ec25e962833eddd0320742e177e3c1e0e5c05
Bug: 152541934
Bug: 152531488
This reverts commit bce9a57e0f.
Reason for revert:
This change aims at fixing b/124777526, but it has led to two new bugs: b/152531488 and b/152541934.
Change-Id: I812c64a68c15542dec2521b985e987f5329a1320
In aaudio, when adding tracks to mixed stream, it is needed to update
audio attributes to HAL whenever the tracks are added or removed.
Currently, only the audio attributes used to open the stream will be
sent to the HAL. In that case, adding audio attributes of the clients
when starting the stream can help solve the problem. In audio flinger,
the client's audio attributes will be used to create MmapTrack.
Test: play multiple aaudio tracks, add log
Bug: 77279923
Change-Id: Ic1c536049e194a2bb7513425ee4828d52769d27f
am skip reason: Change-Id I8e409e7048c9058f2d91ad2d467131f49e378259 with SHA-1 9ad157448a is in history
Change-Id: I96a2baed3c7cd2829f20b68211632a4a363370e5
media time and segment duration entries from 1st edit list entry only is
used for gapless playback, hence don't process the same from second edit
list entry.
Bug: 152372048
Test: atest android.media.cts.MediaMetadataRetrieverTest
atest android.media.cts.MediaMuxerTest
atest android.media.cts.MediaExtractorTest
Gapless playback files played as expected.
Change-Id: I79ce7c69c65f71440e0ba6552e150586fab64aac
Variable 'tag' in TimeCheck::TimeCheckThread::threadLoop
may end up being used w/o prior initialization.
Found by clang-tidy.
Bug: 152526318
Test: m
Change-Id: Ifc1efbee39007ea9cfba8083edbfdb763eafb8dc
Initialize variable 'io' in
AudioFlinger::EffectBase::updatePolicyState.
Found by clang-tidy.
Bug: 152526318
Test: m
Change-Id: Ib8c71eaf83dc140874d3e65a094e52e36918160f
Sample rate and channel counts should be the only settings that
triggers skip-cut-buffer update.
Bug: 150270199
Test: atest CtsMediaTestCases:DecoderTestAacDrc
Change-Id: Iecf54833d6b484374e6336fd31d8038a441e1c30
Added missing notification to the APM client
about new audio ports. This should make the
ports provided by the newly discovered HAL
to be available to apps.
Process the onNewAudioModulesAvailable notification
on the "APM Output" command thread to avoid clashing
with outgoing commands from APM during module
initialization.
Bug: 149854039
Test: atest audiopolicy_tests
Change-Id: I3fede7f5a04419b15e15476d8b5ac7dc6d63c98d
The buffers queued in Puller need to be flushed when resuming
recording, or these buffers' timestamps would be modified by
the InputBufferTimeOffset incorrectly.
Bug: 143046077
Test: atest android.media.cts.MediaRecorderTest
Change-Id: Ia904c8cdd3e2ba59a05df5702d8682b02b3fa30c
* changes:
MPEG4Extractor: check the default sample info before checking the validity of sample size.
Add size checking for 'saiz' box
Add more size checking for 'stts' box
Add more size checking for 'stss' box
Add size checking for 'saio' box
Stream for which no attributes is associated (aka no strategy supports it)
will use default attributes hence it will change the default strategy
volume (aka Music).
It leads to eroneous volume changes.
This bug does not happen on phone / tablets targets as all streams are
linked to a strategy with specifc attributes.
In case of OEM configuration, some stream types may not be supported
and associated to any strategy.
Bug: 136121584
Test: dumpsys audio & dumpsus media.audio_policy.
Ensure volumes of stream types and their aliases match.
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: I5e12b2c7248074d10affb6c28d1866d4589cb9e8
Merged-In: I5e12b2c7248074d10affb6c28d1866d4589cb9e8
If a strategy matches a attributes, whatever a stream type has
been provided, the MUSIC stream type shall be returned as a fallback
to ensure AudioFlinger will apply the right gain to the right stream
(which always fallback as music if none is provided)
Bug: 136121584
Test: build & run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioProductStrategyTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupChangeHandlerTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testPermissionsForVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateProductStrategies
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateVolumeGroups
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributesWithInvalidAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testVolumeGroupCallback
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
Change-Id: Ic79effb1341b788d90f5d73d23ae92b983f17225
Merged-In: Ic79effb1341b788d90f5d73d23ae92b983f17225