Core HAL changes:
1. Add StreamPrimary implemented via StreamAlsa.
2. Align the configuration with the HIDL HAL.
3. Fix position retrieval vs. standby call.
4. Fix sleeps in StreamAlsa.
VTS changes:
1. Use several bursts for stream I/O test scenarios that check
observable position increase. This is because the position may
not be available until a couple of transfers have been made.
2. Do not require position increase for the scenarios that do
not make several bursts. As specified above, the position may
not have been increased for the ALSA case. Whereas, using
multiple bursts in all scenarios will increase test time, and
make the state machine transitions graph more complicated.
3. Hook up the test config file to shut down audioserver during
VTS tests, fix the test config file.
Bug: 286914845
Test: atest VtsHalAudioCoreTargetTest
Test: compare APM dumps for AIDL vs. HIDL
Change-Id: I85271564c664fa40008d60e82b32eaa66a99c68f
(cherry picked from commit cf824f65c8)
Merged-In: I85271564c664fa40008d60e82b32eaa66a99c68f
Plumb propagation of errors reported by the implementations
of DriverInterface::setConnectedDevices up to the Module.
This allows returning the reported errors from the corresponding
IModule interface methods. Implement handling of errors
from connection state update by the Module implementation.
When updating streams about the connection status
ensure that the list of connected devices is not empty.
Also, add an extra check to AudioStreamIn#ActiveMicrophones
to validate the size of the returned active microphones
list.
Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Merged-In: I62a422d95c37a672fce4ad221bea435cc7b4ebfa
Change-Id: I62a422d95c37a672fce4ad221bea435cc7b4ebfa
(cherry picked from commit 75b59dfb4e)
Clarify what should happen to mix port profiles after
connection of an external device. Add a test to verify
this behavior.
Also, add an XML file for the test runner for
VtsHalAudioCoreTargetTest.
Bug: 273252382
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3381dd29c5922bf31fa3a8ae6fa273597e8333a1
Add 'isDefaultAudioFormat' to Utils.h.
Print the module type in 'setModuleDebug'.
Align 'suggestDeviceAddressTag' with framework code.
Bug: 273252382
Test: m
Change-Id: I0248d2e866522a63a745d4af6132b7d2b6a01564
RS2 represents an interval of power levels. This is why it is clearer to
specify upper bound in the naming to make it clear that we refer to the
upper limit which when exceeded will trigger a momentary exposure.
Test: atest VtsHalAudioCoreTargetTest
Bug: 273961110
Change-Id: If4e065deeedb32c3e5e81caf4cd6924fb5815dc0
Since BT LE can also have offloaded codecs, it might need
a reconfiguration event similar to the one that BT A2DP
receives.
Bug: 272658632
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I04fb7c99f0457f87e1f4aaf7e77165317163387b
These utilities are for types generated from AIDL. Since
the types end up in the 'aidl' namespace (NDK backend), it makes
sense to keep the utilities in the same namespace.
While changing the namespace, I've found numerous useless
includes of 'Utils.h' and removing them, also reorganizing
lists of includes along the way to match the style guide.
Bug: 205884982
Test: m
Test: atest --test-mapping hardware/interfaces/audio/aidl/TEST_MAPPING
Change-Id: Ib23b47092364046f632f9503b92b9baff5b902f5
Similar to IBluetooth and IBluetoothA2dp interfaces,
IBluetoothLe controls the LE profile. This interface
replaces the following string parameter:
"LeAudioSuspended"
Bug: 270731693
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I9df28053cd270fc2d446ba9a8ada4dd6ab761c7b
Merged-In: I9df28053cd270fc2d446ba9a8ada4dd6ab761c7b
This method is needed to implement HAL modules that
are proxies for other subsystems, for example
the "bluetooth" and "r_submix" modules. This method
replaces string parameters "exiting=1" and "closing=true"
which the framework sends to streams prior to closing
them in order to unblock the I/O thread of the stream.
Bug: 270731693
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3d13fe34535ab853c9f8237a08c31cdafadbb390
Merged-In: I3d13fe34535ab853c9f8237a08c31cdafadbb390
Similar to IBluetooth interface which controls SCO/HFP,
IBluetoothA2dp controls the A2DP profile. This interface
replaces the following string parameters:
AUDIO_PARAMETER_A2DP_RECONFIG_SUPPORTED
AUDIO_PARAMETER_RECONFIG_A2DP
"A2dpSuspended"
Also, refactor fields used by Module implementation
for persistent child interfaces.
Bug: 270731693
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie62952c3bc3af2f53535d716e5b57bf48c661306
Merged-In: Ie62952c3bc3af2f53535d716e5b57bf48c661306
AudioOffloadMetadata contains the same information
as 'AUDIO_OFFLOAD_CODEC_*' framework parameters.
It is updated via a new method IStreamOut.updateOffloadMetadata
which only works for compressed offload streams.
Bug: 270731693
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I6c8a8853f216438284082f79e3f57e511a2a1f06
Merged-In: I6c8a8853f216438284082f79e3f57e511a2a1f06
The client can pass the I/O handle to the HAL as part of
the requested audio port config. The HAL can store that handle
and use it as a cookie to match the port config with other HALs
(for example, SoundTrigger).
Updated behavior of IModule.setAudioPortConfig to copy
the handle for mix ports, and pass it back with the applied
config. Enforced this behavior in VTS.
Bug: 269551518
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ibc3f9eea4169610f1680937c764de42b4fe5194a
When generating an address for an external device, consider
the connection type and choose the appropriate variant of
the AudioDeviceAddress struct.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ic791ba7de80e482c7e721e082fc9678f0f564b62
These parcelables are also used by the framework.
Bug: 263964254
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ib30b69c325040e474fb58a8e7e515912fccab4c7
Merged-In: Ib30b69c325040e474fb58a8e7e515912fccab4c7
Add interfaces to query aaudio hardware information. The new interfaces
are supposed to replace the system properties. The information includes
aaudio mixer burst count and aaudio hardware burst minimum usec.
Bug: 193275465
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Id3442dae15937baba84f053f2e244bc294f4d718
In tests that do not request and activate simulation of
connection of external devices, limit the mix port query to
return ports that can be routed to attached device ports only.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I7e77b269c07b763a5080f42ebf7ec7d0fcaee195
Add API to query if the Module supports control of variable latency over
playback paths.
Bug: 197823000
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3a08d682a1a639d8373869725e12702fff962d53
I missed that there is already android.media.audio.common.AudioMode.
However, due to use by the framework, it contains more values
(all of them are SYS_RESERVED), thus the implementation and VTS
have to be updated as well.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If260413b1f774a69514de978792d5ad2eb46481a
Merged-In: If260413b1f774a69514de978792d5ad2eb46481a
For small buffers, the driver can perform draining
synhronously, returning control to the HAL only after
the buffer is empty. This makes going through
the 'DRAINING' state artificial. Thus, we allow going
to the 'IDLE' state directly.
In order to make sure that VTS handles both transitions:
to 'DRAINING' and to 'IDLE', correctly, add an "AOSP as
vendor" parameter "aosp.forceSynchronousDrain" to induce
this behavior in the default implementation.
Bug: 262402957
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ic8eaee53cb4596afb5317b4b905e004af3f112aa
Add a vendor-specific parameter "aosp.forceTransientBurst"
which helps to cover the case of non-full async writes.
This parameter is specific to the "AOSP as vendor" implementation,
other vendors are not required to have it—that's why it's
not in AIDL.
Fix minor issues in VTS found after revisiting the code, and by
looking at logs during testing.
Bug: 262402957
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ide961d91a8d9da24392561654f04eb8207b7b781
Use a DAG instead of a list for representing stream state machine
transitions. This allows accomodating multiple possible replies
from the stream state machine, and enables following different,
possibly converging test sequences depending on actual replies.
Update the async output state machine graph including possible
state transitions that are implemented but were missing from the
graph.
Bug: 262402957
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie97f3ce9222eec812d4eb4dfbce1f678370bef26
This interface corresponds to BT-specific functions
of the IPrimaryDevice in the HIDL HAL.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I5f52d65e06f42e1a5fb2e51d27b79e94fe423eaa
Fix the issue pointed out by gkaiser@ on aosp/2256190.
I also went over other usages the logic which checks for
methods support, and made the code more consistent.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I1b06c1fd9dddcbdadfd6e04525493a049283f31f
This refactoring is fixing the hal_implementation_test workaround from
aosp/2363076. Adjusted the package name to match the aidl_interface and
declared the ISoundDose interface types only.
Test: VtsHalSoundDoseFactoryTargetTest, VtsHalAudioCoreTargetTest,
hal_implementation_test
Bug: 263388737
Change-Id: Ibce4cd95aaf600de2096179f137243939114ba6a
Merged-In: Ibce4cd95aaf600de2096179f137243939114ba6a
Implement telecom functions in ITelephony corresponding
to the IPrimaryDevice in the HIDL HAL.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia83fa4341dd50919d885ac1e10fb31c9a30c5a86
Add the following methods to IStreamOut:
- get/setAudioDescriptionMixLevel;
- get/setDualMonoMode;
- getRecommendedLatencyModes/setLatencyMode;
- get/setPlaybackRateParameters;
- selectPresentation.
Add IStreamOutEventCallback interface for async notifications
of the client about playback-related events. This callback
can be provided to IModule.openOutputStream.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I8974102d232cdd121a53edccbf26c33778a94e5e
This affects AudioStream{In|Out}.OpenInvalidBufferSize test.
Leave only values that are obviously invalid.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I148b823761175959a1cf658599c038378ac4b116
Fix test code in AudioStream#GetStreamCommon test.
Avoid crashing if the HAL module returns a null
IStreamCommon instance pointer.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I118ea1df49a127780a901479cf8cd5787be601f7
Introduce IStreamCommon which contains methods that apply
both to input and output streams. Move the 'close' method
to it. Add 'IStreamIn/Out.getStreamCommon' method to retrieve
the common interface.
Add methods for dealing with HW AV Sync and vendor parameters.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie1a7b32e28425f5398afc95192fcbc5403b5c332
The ISoundDose HAL interface is used for reporting the sound dose
relevant information from/to the HAL. This is necessary for all devices
that certify with the IEC62368-1 3rd edition and EN50332-3 standard
for safe hearing.
Bug: 248567177
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ib89e09243a01cebc2f7996b6b572384a1471867a
Merged-In: Ib89e09243a01cebc2f7996b6b572384a1471867a
(cherry picked from commit 83a2146546)
This is to simplify switching of cuttlefish to
the AIDL implementation. Split out 'r_submix' module.
Add all IModule instance names to the compatibility
matrix.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I424db14257281671eea87aa743deb778ca75f388