If a timeout happens, report the name of the service for which the
timeout happens.
Change-Id: Iad0076071f06f0ca5e53e07b1ef97e25e7bae887
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Since no data is retained in mDeathHandler across member function calls,
it should be a local variable instead of a member variable.
Change-Id: I58d6cc511a21e0e7f430b3cf528faba072e02ec7
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Return the std::condition::wait_for() return value instead of reading
the variable 'fired' again. See also
https://en.cppreference.com/w/cpp/thread/condition_variable/wait_for.
Change-Id: I48c270f5446f61b2ad828b19a1fc294737a123dd
Signed-off-by: Bart Van Assche <bvanassche@google.com>
- with defaults user don't have to change their Android.bp when there is
a update
- update AIDL audio interfaces with android.media.audio.common.types
- update Spatialization and HeadTracking AIDL usage
Bug: 273373363
Bug: 293370815
Test: m
Test: lunch panther-trunk_staging-userdebug; m; test Bluetooth Audio
Change-Id: Ic9d8afc1d4e19e4243c66065b0a5d29156632851
Merged-In: Ic9d8afc1d4e19e4243c66065b0a5d29156632851
* changes:
audio: Query minimum buffer size before opening streams
audio: Implement getters for hardware mixer controls
audio: Clean up and fix the bluetooth HAL module
audio: Provide a way for Module to specify nominal latency
audio: Fix default remote submix HAL implementation and VTS
CSD: Add default AIDL HAL implementation
The proper way to obtain the minimum buffer size when
opening a stream is to retrieve it from the patch. Thus,
a patch must be established prior to opening a stream.
This step was often skipped by VTS tests, they were
providing a fixed stream buffer size which might not
work for all HAL module implementations.
Created a helper class `StreamFixture` which handles
all necessary steps for opening a stream. Overhauled
tests to use this class.
Also, remove special treatment of remote submix devices
by ModuleConfig.
Bug: 300735639
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ic51d603d2bb8ff0fd62434bd16fc02c51326fc42
The VTS test for volume accessors first determines whether
the accessor is supported by calling the getter. The getter
must return `UNSUPPORTED_OPERATION` if the control is not
supported. For this reason, wire the getter to the hardware
mixer implementation.
Bug: 302132812
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia50def0d076b6d3c46db55123186eab34bbbb954
Fix the issue with retrieving BluetoothA2dp and BluetoothLe
instances access.
In 'Module::connectExternalDevice', always call
'populateConnectedDevicePort' to allow the module implementation
to cancel device connection.
Move frame count calculation into Utils.
Clean up includes and 'using' directives.
Bug: 302132812
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I22f65b8bcdcdd9bcd67a8290520eb4a465d4c720
The latency figure depends on the module implementation.
Instead of using a hardcoded value, each module should be
able to specify its own value. This value is then used
for calculating the minimum buffer size.
Set the nominal latency of the primary (CF) module to a high
value since the virtual device implementation fails CTS tests
if it attempts to pretend that it provides low latency.
Bug: 302132812
Test: atest CtsMediaAudioTestCases --test-filter=".*AudioTrackTest.*"
Test: atest CtsMediaAudioTestCases --test-filter=".*AudioRecordTest.*"
Change-Id: I8ce9f230378eea787c9b3c7ce3660c1e4e7bc895
The implementation had duplicated code in 'transfer', which already
present in 'outWrite'.
Cleaned up delay calculations and logging.
Fixed the VTS to send 'prepareToClose' before attempting to join
the worker. Otherwise, the worker could be stuck on a blocking
operation due to inactivity of the other party and join would never
happen.
Bug: 302132812
Test: atest VtsHalAudioCoreTargetTest --test-filter="*AudioModuleRemoteSubmix*"
Change-Id: Id8455eb12d1d2999dc0bc7b64f0d70a61a177598
** Partial upstream of ag/24854732. Only the interface part is
** included.
This should enable the sound dose gts on cuttlefish devices. The sound
dose HAL uses the internal MelProcessor to compute the MELs which are
reported to the framework.
Test: atest GtsAudioTestCases:SoundDoseTest
Bug: 301527435
Change-Id: Ifc505a0171bc8b4d3f5cf65d950fa5c0f812087f
Merged-In: Ifc505a0171bc8b4d3f5cf65d950fa5c0f812087f
Added test to verify increase in loudness with gains.
Added test to verify that outputs are 0 for INT_MIN gain value.
Bug: 305866207
Test: atest VtsHalLoudnessEnhancerTargetTest
Change-Id: I6e87f5bf6f268980b6cc9af4b7a191657f117eb5
Add Execution listener in VTS tests to get information
about test execution steps like, start, stop and failure messages
in logcat message.
Bug: 287168985
Test: run vts-hal-audio
Change-Id: Ie69a7bf78076c17d7b623d75748fa0fdbdba6b1e
There are several reasons why parsing the canonical XML
configuration for the remote submix module will not work
correctly (see the commend in the code).
Since de facto all vendors use the canonical configuration
XML for the remote submix, substitute parsing it with
a correct hardcoded version.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
(cherry picked from commit ea604d50de)
Change-Id: Ib9d9da25d315ff4ce36c1870241fb61d95fcca88
For external (non-attached) device ports that have dynamic
profiles, 'connectedProfiles' must be provided. They are
used when 'ModuleDebug.simulateDeviceConnections' is enabled.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
(cherry picked from commit a29393db39)
Change-Id: I69707d610c34f8f1eae9ef81768b76c40e985c0f
Added a virtual method Module::getMicrophoneInfos
so that vendor implementations can provide actual
data about device microphones. This information
is not part of the APM config file.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTestTest
(cherry picked from commit dc9d1a4b42)
Change-Id: I3ea9ba8da79fd29f8d69c5a575a57851d73df7b8
Since the parsed XML uses compliant separator for lists
in attribute values, there is no need to use legacy
'maskFromString' function.
Bug: 305281224
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ib257fd010b923ac651931e5976f9b1363d693f1b
The default implementation now loads the HAL configuration
from the legacy XML configuration file which was previously
consumed by the framework directly.
Note that errors in the config file will lead to crash
of the XML parser, pointing out to the source of the problem.
IMPORTANT NOTES:
- Never use untested legacy config files with production
devices.
- Make sure that all possible configurations (for example,
BT offload on/off) are tested.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
(cherry picked from commit 00a7307862)
Change-Id: Id1002cb065e7cc19bdd520aca15b3fe5d39e5853
There are several reasons why parsing the canonical XML
configuration for the remote submix module will not work
correctly (see the commend in the code).
Since de facto all vendors use the canonical configuration
XML for the remote submix, substitute parsing it with
a correct hardcoded version.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Iddebf9baa73e8dc90ada1c9b1783c513abb59420
For external (non-attached) device ports that have dynamic
profiles, 'connectedProfiles' must be provided. They are
used when 'ModuleDebug.simulateDeviceConnections' is enabled.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ic82e47abc50e2958ed93f5d4d18082b569ecb67b
Added a virtual method Module::getMicrophoneInfos
so that vendor implementations can provide actual
data about device microphones. This information
is not part of the APM config file.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTestTest
Change-Id: I4b650ae221ba866421bbf8500ad8c17f04bc4aa7
The default implementation now loads the HAL configuration
from the legacy XML configuration file which was previously
consumed by the framework directly.
Note that errors in the config file will lead to crash
of the XML parser, pointing out to the source of the problem.
IMPORTANT NOTES:
- Never use untested legacy config files with production
devices.
- Make sure that all possible configurations (for example,
BT offload on/off) are tested.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I01e4cd77a284d7df64ecb0c0b21cb16abfa0f6c5
Some device ports are connected via ADSP which takes care
of the actual audio configuration (format, channels, SR),
for example the built-in speaker and mic ports, as well
as some external devices like analog headsets.
In the legacy implementation, such device ports did not have
any profiles specified. Allow the same behavior in the AIDL
implementation. To ensure correctness, device ports with no
profiles must be routable to mix ports that have profiles
specified. This requirement is fulfilled in legacy configs.
Bug: 266124463
Test: atest VtsHalAudioCoreTargetTest
Test: atest audiosystem_tests audiorouting_tests
Test: atest CtsMediaAudioTestCases
Change-Id: Iaccd1e8ef2a5af9a5f8bae453905d01c6b7fdc28
Since libaudiohal@aidl reports that the most current legacy C API
version is supported by the HAL, the audio server uses a different
logic for telephony scenarios than for the HIDL HAL. This involves
opening more streams on the same mix port. Allow opening
an unlimited number of streams. However, keep the number of active
streams to be `1`.
Bug: 302132812
Test: atest CtsMediaAudioTestCases --test-filter=".*AudioNativeTest.*"
Test: atest CtsMediaAudioTestCases --test-filter=".*CallAudioInterceptionTest.*"
Change-Id: I896398fca73f28d28d9397d00751394c969531b4
Replace the incorrect logic which was considering each
port individually with the correct logic which considers
a connection of a mix port to device ports.
Bug: 302573756
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I7df6e32315945897d88923ea4d9744e590e85dfd
The code for updating the existing patch did not modify
the patch stored in the module's list of patches.
Added a test which switches the patch to another port
config and validates that 'Module.getAudioPatches' returns
the updated patch.
Bug: 302573756
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I0e3412b9387cd451436a48af116dc5a940d868cf
When there are no device ports supporting MMAP,
Module::getMmapPolicyInfos have to return 'Policy::NEVER'
so that the AAudio code does not attempt to use
the AAudio service. This aligns with the use of sysprops
by the HIDL implementation.
Update AudioCoreModule#GetMmapPolicyInfos test to use
the same logic for determining MMAP support as the framework
uses.
This makes CtsNativeMediaAAudioTest cases passing with
the AIDL HAL on Cuttlefish.
Bug: 302049825
Test: atest VtsHalAudioCoreTargetTest
Test: atest CtsNativeMediaAAudioTest [w/AIDL enabled on CF]
Change-Id: Ie58c408f6f648a8a03b6a5d92118b90061389c50