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
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
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
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
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I6cc85a91afb603e31b85090917f9f3b59d82a4d1
Bug: 134042971
Test: NTS case AUDIO-026-DDP51-TC3-NonTunnel / Tunnel verify volume starts at 0 when fading in
Change-Id: I8ee4444e3ceb2d8a0ceb979fada10c644b5db35c
This is no longer necessary because the headers are exported by the
libicuuc library which is a dependency of libxml2.
Bug: 134379140
Change-Id: I01dfe41c6584d71de47a5a76e1f7cc718083ca8c
Test: m libaudiopolicyengine_config
Exempt-From-Owner-Approval: cherry pick from qt-dev-plus-aosp.
(cherry picked from commit 2142c72cd7)
This change moves almost everything from libaadio.so to
separate libaaudio_internal.so library. This is done to
avoid exporting symbols which apps are not allowed to use
but have them available for platform libraries by exporting
them from libaaudio_internal.so
Bug: http://b/69603741
Test: make
Merged-In: If93118ed2c266faf2964abf21e17b0b13df493d2
Change-Id: If93118ed2c266faf2964abf21e17b0b13df493d2
Force close mmap input streams when a capture device is
connected to force disconnect callback to client.
Bug: 137311579
Test: capture with oboetester and connect headset
Change-Id: Iafe939247fa565e2424b40afacdb79a31b8955b7
(cherry picked from commit 7bd2939d6c)
(cherry picked from commit c833ccc86b)
unlinkToDeath is no longer required, (this change in behavior is to
avoid leaks) so holding onto ActivityManager here (still calling
unlinkToDeath to avoid a log, but may for instance remove all
unlinkToDeath calls in the future).
Exempt-From-Owner-Approval: approval received on AOSP CL, only
whitespace difference here.
Bug: 134576445
Test: boot
Change-Id: I273f77aac2b80ba9be70197cc3842f83a11bbd1c
Merged-In: I273f77aac2b80ba9be70197cc3842f83a11bbd1c
(cherry picked from commit 2f34814d1b)
unlinkToDeath is no longer required, (this change in behavior is to
avoid leaks) so holding onto ActivityManager here (still calling
unlinkToDeath to avoid a log, but may for instance remove all
unlinkToDeath calls in the future).
Exempt-From-Owner-Approval: approval received on AOSP CL, only
whitespace difference here.
Bug: 134576445
Test: boot
Change-Id: I273f77aac2b80ba9be70197cc3842f83a11bbd1c
unlinkToDeath is no longer required, (this change in behavior is to
avoid leaks) so holding onto ActivityManager here (still calling
unlinkToDeath to avoid a log, but may for instance remove all
unlinkToDeath calls in the future).
Bug: 134576445
Test: boot
Merged-In: I273f77aac2b80ba9be70197cc3842f83a11bbd1c
Change-Id: I273f77aac2b80ba9be70197cc3842f83a11bbd1c
Original logic was comparing an overridden format int, switch
to use a const original format.
Test: partner device, Pixel 3 CTS
Bug: 136456900
Change-Id: I03d6e190770ee05e40446c417e323f546fdc2689
in addition to the time-based expiration, enable count based expiration
and set it to 2000 records, about 5x the daily average. Caps the memory
footprint.
Bug: 135552978
Test: boot, enough traffic to force expirations
Change-Id: Ide96df24b00e8f115905678800c782f29a91bcba
Make sure 'jpeg_destroy_compress()' is always called
before leaving 'encodeGrayscaleJpeg()'.
Additionally fix misspelling of 'intrinsic'.
Bug: 135622974
Test: atest
cts/tests/camera/src/android/hardware/camera2/cts/StillCaptureTest.java#testDynamicDepth
--generate-baseline=12
Change-Id: I55c1f86881ba05aac6aac6981df5fcb276c9d4da
Set voice volume to 0 when SCO volume index is 0 to
allow muting RX audio. when index is not 0, voice volume
is set to max to allow volume control by headset as before.
Bug: 111195322
Test: check call volume with SCO headset
Change-Id: I90466b01a9899929cd3e6fb1ac0a4985099497fc
AudioInputDescriptor, AudioOutputDescriptor, and AudioSession used
to reference AudioMix instances using a raw pointer. This isn't
safe as AudioMix was owned by AudioPolicyMix, which is not
referenced by descriptors.
Change AudioMix* pointers in Audio{Input|Output}Descriptor and
AudioSession to wp<AudioPolicyMix> which reflects their
relationship correctly.
To ensure that code does not operate on AudioMix instances
independently from AudioPolicyMix, and to avoid introducing
a lot of getter / setter methods into AudioPolicyMix, make
the latter to inherit AudioMix. This makes sense because
AudioPolicyMix is essentially a ref-counted version of AudioMix.
Bug: 124899895
Test: build and sanity check on marlin,
build marlin with USE_CONFIGURABLE_AUDIO_POLICY := 1
Merged-In: Ic508caedefe721ed7e7ba6ee3e9175ba9e8dc23a
Change-Id: Ic508caedefe721ed7e7ba6ee3e9175ba9e8dc23a
(cherry picked from commit a306e2a357)
Enable audio capture by the Assistant when RTT is ON during a call
similarly to when an accessibility service is in the foreground.
Also remove log when permission checked for hotword
and audio output capture fail as those checks are now done
systematically.
Also do not check permission to bypass interruption policy if
bypass flags are not set.
Bug: 132976361
Test: use voice input during a call with RTT enabled.
Change-Id: Iff45b0816dac889262ec29ea115f74dea4dc6b6d
With the new dataSpace/format override logic, during
finishConfiguration, we shouldn't check mDataSpaceOverride flag anymore
because now mDataSpaceOverride will be true for reconfigure.
Instead, we should check if the new override is the same as old
override.
Test: testPrepare on HAL device with dataSpace override
Bug: 134800141
Change-Id: I1ddc258100dfd7e3c2cc86f9e476d8d52c710e3f
[Context]
When a LOOPBACK dynamic audio policy mix PLAYER/RECORDER
is registered, first the REMOTE_SUBMIX device that will be
used by the app to capture/play respectively is activated.
Eg a mix RECORDER (used to inject audio to apps recording),
when registered will activate an OUT_REMOTE_SUBMIX.
Then the app can open a record/playback track on this
REMOTE_SUBMIX, which will trigger the other end of the pipe
to be activated.
Following this the playback/Record Tracks that match the
mix will be routed to the IN/OUT REMOTE_SUBMIX.
[Example for an app FUU]
1) App FUU register Playback/record mix
2) APM activates out/in remote submix
3) App FUU opens track to out/in remote submix
4) APM activates in/out remote submix
5) tracks matching mix are redirected to the out/in remote submix
When an OUT_REMOTE_SUBMIX is activated, it tries to check if it matches
a mix, if it does, it saves the output in the mix (in mOutput).
This output is then used to find a matching mix output in
getOutputForAttr(). If a mix has no output is is considered inactive.
Note that IN_REMOTE_SUBMIX do not save their input in the mix, the
input is queried by APM each time in its mAvailableInputDevices.
[Issue]
The issue is that in step (2), when an OUT_REMOTE_SUBMIX is
activated (thus for a MIX_TYPE_RECORDERS), no mix is matched because the
mix is of type IN_REMOTE_SUBMIX as it will be used to route AudioTracks
in step (5).
Thus no mix output is found in getOutputForAttr and the step (3) fails.
This is a recent regression as previously the type was not checked when
looking up for a mix in step (1).
The Change-Id of the patch that caused the regression is:
I4dc7f23bef19a7d47afc2998102da07dde41fbca, its sha1 is:
679172768d
[Workaround]
For now, given the release timing, implement a minimal fix that restore
the previous behavior for the OUT_REMOTE_SUBMIX output save lookup.
Aka, make sure to query for a IN_REMOTE_SUBMIX mix in step (2).
Step (4) is fine as the mix type is the same as the REMOTE_SUBMIX type.
As IN_REMOTE_SUBMIX do not attempt to save their output in the mix, no
issue is present on this code path.
A proper fix needs to be implemented on master, preferably by having the
same device save behaviour on both mix type.
Bug: 134068143
Test: Wifi calling call screening
Test: atest AudioPlaybackCaptureTest AudioHostTest
Change-Id: I1547948ae412dbdeb2d85cc62bf18f7ac5f1efc0
Signed-off-by: Kevin Rocard <krocard@google.com>
libhidltransport symbols are being moved into libhidlbase in order to
optimize linking/memory usage. libhidltransport will no longer be
required in the future (however removing references to it will come
separately).
Bug: 134961554
Test: boot
Change-Id: Ie8b9b03a53ae1f5672ce2565550768b4bcd321ee
Since vendor native clients don't have package names, appOps reporting
would be inaccurate for them. In order to avoid that, we stop appOps
reporting for vendor clients.
Bug: 132718220
Test: AImageReaderVendorTest, use hal client for cameraserver, GCA(sanity)
Change-Id: Ie6f80e8ab530aa755df57f8d25d9f1a15a20d7f7
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>