Also adjust some log level as verbos
Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I04560c62bdbcfb85dbe223bec0149b112205a323
Parse custom effect type uuid in audio_effects_config.xml, so OEM can
add effect types without changing code
Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I558958cc42c6c4a304e0ab1239ddefec9575a5af
When a vendor HAL reuses libaudioserviceexampleimpl,
a subclass of Module cannot change Configuration.
This change adds virtual method Module::initializeConfig(),
then a vendor HAL can override it to load custom Configuration.
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I63fa8d70f3c4e13c8938070ee5431ebefd36bb58
This is a method which can be optionally implemented
by a stream in case it can provide more exact position,
for example by taking into account data in intermediate
buffers.
Implemented this method for StreamAlsa and StreamRemoteSubmix.
Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I392933f8f6b22d784726925199db00dcb0313648
Make 'Module' more abstract by moving stream creation
methods to more concrete 'ModulePrimary' and 'ModuleStub'.
'ModulePrimary' is now closer to the CF primary module:
it was stripped off USB devices from its configuration,
these got moved to 'ModuleUsb', and got rid of BT A2DP
and LE interfaces, these will be on 'ModuleBluetooth'.
Note that 'ModulePrimary' still uses stub streams, this
will be changed in subsequent patches.
'ModuleStub' is what 'Module' used to be, just a module
for improving test coverage. It includes simulation of
offload streams and dummy BT objects.
Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I5e4da0c32c00d65688f2eda78b2c79594e4e4671
Extract code interacting with tinyALSA which is not
specific to USB into "abstract" module and stream
implementations ModuleAlsa and StreamAlsa. Also, move
utility code which does not need module or stream
context into Utils.
This facilitates implementation of the CF core HAL which
also uses tinyALSA, allowing to share common code.
Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I2134b15e970c78e8a48b254e15199b8207a8ab34
A non-existent test module VtsHalAudioCoreConfigTargetTest
was added by accident. This is a test class, not a module.
Bug: 290793450
Test: atest com.android.tradefed.presubmit.TestMappingsValidation
Change-Id: Icc40ec7fb956dcb85342266540ce8f17240da36b
1) Validate specific parameters before open call,
send only if parameters are supported.
2) GetParameters only if parameters are in range.
Bug: 288510312
Test: run vts VtsHalNSTargetTest, VtsHalAECTargetTest
Change-Id: Idb20d819b3eb8a4ba56b4d50311c1aa7659f3616
Ensure that all formats returned by
AudioPolicyConfigXmlConverter::getDefaultSurroundSoundConfig
can be converted into legacy values.
Bug: 290116634
Test: atest audio_policy_config_xml_converter_tests
Change-Id: I3a46ea5ee4805f719c8977064c9d8d681a75cff2
This method is used to bring out the hardware from standby.
It replaces the ad hoc 'exitStandby' method in StreamUsb.
Streamlined StreamUsb code to avoid locking during transfers.
Updated StreamRemoteSubmix to use 'start'.
Added extra checks to StreamStub to ensure that 'init/shutdown'
and 'standby/start' methods are called as expected. This allows
removing extra checks from non-stub stream implementations.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3615a7ca99cb4f1e149dcbfbc912f2ed58fb033f
Incase of offload effects or effects running in bypass mode
data is not handled by effect module, in those cases skip the
testcases to excercise data path.
Bug: 287590880
Test: run vts -m VtsHalAudioEffectTargetTest
Change-Id: I76155f8997b415bc96242f995ccc2e33c8989dc5
Since specializations of the 'Module' class likely need
to provide their own specializations for streams, provide
virtual methods for them.
Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Iddb1bff9f11bc867aba61897ea2f8b9bc3c27544
Simplify the experience of implementing stream variants.
Stream class now exposes two interfaces: DriverInterface
and StreamCommonInterface, which represent the two
aspects of its usage: via the FMQ on the worker thread,
and via IStreamCommon Binder interface.
Input/output streams now inherit the concrete stream
variant, and implement interface methods specific for
IStreamIn and IStreamOut.
Added DriverInterface::shutdown method which is called
on the worker thread prior to the exit.
Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I5bf8da2f22b27f0e284a41fc30b920d87ac2936c
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
Change-Id: I62a422d95c37a672fce4ad221bea435cc7b4ebfa
Vendor implementations may need to see the value of flags
and the I/O handle of the mix port used to open the stream.
Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If1f346793f3b3a725bc19358909f5b461cb159c1
Make interface methods protected so that subclasses can
augment them.
Provide getters for private fields.
Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I0e4810f8a4c816c4f673139816e9768f6dc8da7c
This is in order to achieve a better parity both with
legacy output channel masks and AIDL channel layouts.
The change only affects the XSD schema used to generate
a parser for legacy configuration files.
Bug: 283542128
Test: atest audio_aidl_conversion_tests
Change-Id: Ic69b94f6ec650e0814f0200dbef219567eac9fe2
This reduces the code size by not generating unnecessary code for
non-root elements.
Bug: 283700992
Test: m
Change-Id: I23bd5c2a0ccc40fded3ca08155ead5f4680c2ed9
'DriverInterface::init' is called on the same thread as other
interface methods (the worker thread), except
for 'setConnectedDevices'. Update the comment to reflect this,
and rearrange the methods order in the interface.
Bug: 283463913
Test: m
Change-Id: I8937506d20ff8233b4b934c421173ce2bec9d43e
The main change is to convert the result of parsing from XSDC
types to AIDL, and add a VTS test for IConfig.getSurroundSoundConfig.
Extra changes:
- add 'Unchecked' suffix to conversion functions that do not
wrap the result into ConversionResult;
- enable more compile-time checks for the default AIDL service,
fix issues found.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Icf578b8d28647e6355ed5328599c77d2ca1234f9
Fill in address for remote submix devices. Specify correct
connection type for the remote submix output.
Avoid logging entire HAL Engine Config.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I246435e4d3b848b5d0ad9810d13f650603eac76d
The call to instantiate PolicyConfig was updated
in Iced9d665d018853c4b2a50f4471a545af7bf60bb, however
the version of PolicyConfig class for HIDL HAL 7.x
was not updated accordingly
Bug: 205884982
Bug: 281450557
Test: atest VtsHalAudioV7_0TargetTest
Test: atest HalAudioV7_0GeneratorTest
(cherry picked from https://android-review.googlesource.com/q/commit:a273cdde847a627465458f971f88fa9ce07d4731)
Merged-In: Ic7ed6b186e1d0f1ff853f84ad962c1e4acf17a68
Change-Id: Ic7ed6b186e1d0f1ff853f84ad962c1e4acf17a68
The call to instantiate PolicyConfig was updated
in Iced9d665d018853c4b2a50f4471a545af7bf60bb, however
the version of PolicyConfig class for HIDL HAL 7.x
was not updated accordingly
Bug: 205884982
Bug: 281450557
Test: atest VtsHalAudioV7_0TargetTest
Test: atest HalAudioV7_0GeneratorTest
Change-Id: Ic7ed6b186e1d0f1ff853f84ad962c1e4acf17a68
This field should be filled by IFactory implementation
Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I96203b8cd037fd81b0b1d88fc5ca9915df02a919
Merged-In: I96203b8cd037fd81b0b1d88fc5ca9915df02a919
Make necessary changes to use updated AudioPolicyConfig class.
Bug: 205884982
Test: m VtsHalAudioV6_0TargetTest
Test: atest HalAudioV6_0GeneratorTest
(cherry picked from https://android-review.googlesource.com/q/commit:33a35b5ffbbcbcf8a41d70a8af807d6c16f332c9)
Merged-In: Iced9d665d018853c4b2a50f4471a545af7bf60bb
Change-Id: Iced9d665d018853c4b2a50f4471a545af7bf60bb
Instead of relying on the device type, use the 'AudioPort.flags'
field to determine the device direction.
Remove 'isUsbInputDeviceType' and 'isUsbOutputtDeviceType'
as they are too specific to particular device type and just
add a maintenance burden.
Bug: 266216550
Test: m
Change-Id: Ia1b9330c2b419a1a4048ed78d914d05c1caf523f
Make necessary changes to use updated AudioPolicyConfig class.
Bug: 205884982
Test: m VtsHalAudioV6_0TargetTest
Test: atest HalAudioV6_0GeneratorTest
Change-Id: Iced9d665d018853c4b2a50f4471a545af7bf60bb
This field should be filled by IFactory implementation
Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I96203b8cd037fd81b0b1d88fc5ca9915df02a919
Also removed the default implementation of the ISoundDoseFactory which
only provides a dummy SoundDose object. It is better to fall back to the
framework MEL.
Test: manual, logs
Bug: 272260521
Change-Id: I3b49c9ae4af7c4eafaef46de3fc90aa05bd819c4
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
Merged-In: I3381dd29c5922bf31fa3a8ae6fa273597e8333a1
Add 'isDefaultAudioFormat' to Utils.h.
Print the module type in 'setModuleDebug'.
Align 'suggestDeviceAddressTag' with framework code.
Bug: 273252382
Test: m
Change-Id: I0248d2e866522a63a745d4af6132b7d2b6a01564
Merged-In: I0248d2e866522a63a745d4af6132b7d2b6a01564
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
Effect Helper should not try to access min/max values of a tag
when it is not defined.
Bug: 271912230
Test: atest VtsHalAECTargetTest.cpp (with ASAN enabled)
Change-Id: Idf47a521fbd594c83ab0fc21f2750673652b3aee
1. By default, the DriverUsb should be standby. When there is data
transfer request, it will exit standby.
2. Initialize alsa device profile before reading device info.
3. Open the alsa device proxy after the preparation succeed.
Bug: 266216550
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I1f0425036df176c52220320135079e7c98daa2d0
1. The card and device must be specified before reading device info.
2. Map PcmType::FIXED_Q_8_24 to PCM_FORMAT_S24_LE.
Map PcmType::INT_24_BIT to PCM_FORMAT_S24_3LE.
Bug: 266216550
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ib48538d01bc980524e2c4c5b221f6d7e479beba6
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
Merged-In: If4e065deeedb32c3e5e81caf4cd6924fb5815dc0
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
In order for vendors to be able to use this library
it needs to have public visibility.
Bug: 205884982
Test: m
Change-Id: Idd47c942ee1e97372047ec1b44bcd996d454e3e2
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
Vendor tags are used in audio attributes and in
source/sink metadata. The definition for vendor tag
syntax is the same as it used to be in HIDL.
Bug: 205884982
Bug: 272188499
Test: m
Change-Id: Iffab15edaec10f0dfccff2512bbff9dff557725a
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
Effect factory have the knowledge of all effect configurations, in the
default implementation, this configuration defined in
audio_effects_config.xml.
Bug: 261129656
Test: Enable AIDL, atest
CtsMediaAudioTestCases: android.media.audio.cts.BassBoostTest
Test: atest VtsHalAudioEffectTargetTest
Change-Id: Ie9bd4070acdca53c4236bae533957b8fde6e9183
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
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
1. Increase the minimum buffer size to 256 frames. This is
more realistic than 16 frames: 256 frames is ~5ms @ 48 kHz.
2. Make transfer delay in the stub module dependent on the frame
count for synchronous transfers.
Bug: 270154517
Test: atest VtsHalAudioCoreTargetTest
Test: atest android.media.audio.cts.LoudnessEnhancerTest (w/AIDL enabled)
Change-Id: If968e30d145b52220f4dc3c33af48dbc163c78cd
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
The logs in this service and others disappear sometimes.
Bug: 210919187
Test: logd_integration_test
Change-Id: I63b88ec4b88048ed64907df21d5a049a3abda2ec
Update Parameter.id from int to ParcelableHolder
Bug: 271601435
Test: Build, atest VtsHalAudioEffectTargetTest
Change-Id: I5450fa90e95bdebe931c222f6bb177dbdef35c69
Only the headers gtest.h and gtest-spi.h are public. This
inclusion is causing a build break when upgrading googletest
to version 1.13.0.
Bug: 271622675
Test: local build, presubmit
Change-Id: I698e4d4464c131e9dad73a23a6f65908a07e9f60