Commit graph

2327 commits

Author SHA1 Message Date
Shunkai Yao
a8c5e014db Update effect AIDL state machine graph
Bug: 271500140
Test: dot -Tpng state.gv -o state.png
Change-Id: Icbabe75e24497594f8bc62985553c1c13d268dae
2023-07-18 21:22:15 +00:00
Treehugger Robot
cdac9b5064 Merge "Make EffectFactory implementation thread-safe" into main 2023-07-17 22:43:24 +00:00
Treehugger Robot
03a07174dd Merge "Support custom effect type UUID in audio effect AIDL example service" into main 2023-07-15 00:56:10 +00:00
Shunkai Yao
074cf23ff6 Make EffectFactory implementation thread-safe
Also adjust some log level as verbos

Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I04560c62bdbcfb85dbe223bec0149b112205a323
2023-07-14 23:57:32 +00:00
Shunkai Yao
80e5850d82 Support custom effect type UUID in audio effect AIDL example service
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
2023-07-14 23:57:21 +00:00
Peter Yoon
918a6a5ce9 audio: Allow Module subclasses to customize Configuration
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
2023-07-15 05:50:27 +09:00
Mikhail Naganov
f0ad731bb9 Merge changes I392933f8,I5e4da0c3,I2134b15e into main
* changes:
  audio: Add optional 'DriverInterface::getPosition' method.
  audio: Create ModulePrimary and ModuleStub
  audio: Move tinyALSA-specific code to Module/StreamAlsa
2023-07-13 20:10:10 +00:00
Mikhail Naganov
704aec434e audio: Add optional 'DriverInterface::getPosition' method.
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
2023-07-13 11:25:47 -07:00
Mikhail Naganov
521fc49fba audio: Create ModulePrimary and ModuleStub
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
2023-07-13 11:25:23 -07:00
Mikhail Naganov
c337a8799b audio: Move tinyALSA-specific code to Module/StreamAlsa
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
2023-07-13 11:24:52 -07:00
Mikhail Naganov
01fa9e8874 Merge "vts: getParameters only if parameters are supported" into main 2023-07-12 15:27:31 +00:00
Mikhail Naganov
8460fa1ff5 Fix audio/aidl/TEST_MAPPING
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
2023-07-11 16:56:59 -07:00
Jaideep Sharma
b985903e16 vts: getParameters only if parameters are supported
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
2023-07-10 13:13:42 +05:30
Mikhail Naganov
724b24f895 audio: Fix default surround sound config
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
2023-07-06 13:51:37 -07:00
Mikhail Naganov
49712b56d8 audio: Add DriverInterface::start method
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
2023-06-30 13:41:55 -07:00
Treehugger Robot
12e6f0c42e Merge "Audio : Add remote submix stream implementation" 2023-06-30 16:11:17 +00:00
Treehugger Robot
a2d5a26476 Merge "vts: Don't excercise data path for offloaded/bypass effects" 2023-06-30 12:55:47 +00:00
Shraddha Basantwani
6bb696370b Audio : Add remote submix stream implementation
Bug: 286914845
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia477458193ade9068eaf56e953ab670fee53cc7d
2023-06-30 09:05:50 +00:00
Shunkai Yao
beef909697 Support passing entire effect_param_t as vendor extension
Replace the UUID toString with hex version

Bug: 271500140
Test: Enable AIDL
Test: atest libAudioHalEffectParamTest
Change-Id: I79a5db25dc45774821a9a9a6bcda77c04e9da90d
2023-06-29 18:18:20 +00:00
Jaideep Sharma
cba428627a vts: Don't excercise data path for offloaded/bypass effects
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
2023-06-28 04:47:30 +00:00
Mikhail Naganov
9d16a6ac10 audio: Allow Module subclasses to customize stream creation
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
2023-06-26 17:32:01 -07:00
Mikhail Naganov
d5554cfae2 audio: Refactor streams implementation
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
2023-06-26 17:32:01 -07:00
Mikhail Naganov
75b59dfb4e audio: Propagate errors from Driver::setConnectedDevices
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
2023-06-26 17:32:01 -07:00
Mikhail Naganov
26dc9add8d audio: Enable use of 'expected_utils' for ScopedAStatus
Add necessary helper functions and use
RETURN_STATUS_IF_ERROR where possible.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If68c995da0e5e0cb2e9c142ba40af6503ff628b2
2023-06-26 17:32:01 -07:00
Mikhail Naganov
b42a69ef68 audio: Pass flags and I/O handle to StreamContext
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
2023-06-26 17:32:01 -07:00
Mikhail Naganov
57f0dcf78d audio: Facilitate extension of Module class by vendors
Make interface methods protected so that subclasses can
augment them.

Provide getters for private fields.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I0e4810f8a4c816c4f673139816e9768f6dc8da7c
2023-06-26 17:32:01 -07:00
Shunkai Yao
9e60e635bf Format VTS test code
Bug: 287430121
Test: atest VtsHalAudioEffectTargetTest
Change-Id: Iecc0c9388c6596cf5a25918f8f0af0495b2133a6
2023-06-23 04:34:50 +00:00
Jaideep Sharma
e4c7a96789 aidl: Improve Effect VTS naming
Use uuid in hexadecimal format in testcase name.

Change-Id: Ib687b6617060e4400a767f23ca0b26cece4005f1
2023-06-16 05:58:43 +00:00
Yu Liu
eea9728bee Merge "Remove duplcated static libgtest" am: b06d1aeb9f am: 5a04a3a70b am: bb9d3e8211
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2615812

Change-Id: Ib2dc7daa24cdeb5b024517542bf8a4020b2d89c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-06 19:52:45 +00:00
Yu Liu
e989964b89 Remove duplcated static libgtest
Bug: 284287101
Test: locally build
Change-Id: Ia7fbf101eff850a2d128f17ad3fdefe6da99a987
2023-06-05 12:47:39 -07:00
Jooyung Han
13f58a77f3 Merge "Set root elements for xsd_config modules" am: ee8374606a am: 5a73645eb0 am: f371c2e7bc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2596609

Change-Id: Idb0d2297407a5708a8e21362ef39c7a32c371dfd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 06:16:20 +00:00
Jooyung Han
ee8374606a Merge "Set root elements for xsd_config modules" 2023-05-30 03:58:25 +00:00
Mikhail Naganov
6723ed8292 audio: Add more legacy channel masks for the input direction am: 310b1c6e7e am: 1b18653358 am: 1ba447bbba
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2599107

Change-Id: Idef166bd1a1546ab11c920081716ace2e72ab2f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 02:27:17 +00:00
Mikhail Naganov
310b1c6e7e audio: Add more legacy channel masks for the input direction
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
2023-05-22 13:52:50 -07:00
Mikhail Naganov
c4d15dc1e2 audio: Fix the comment about threading of DriverInterface::init am: 3755134720 am: 1d0e427c27 am: 44ee5be311
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2597780

Change-Id: I54855c70dbc949c327bd737a11b31c23e56cf893
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 20:24:11 +00:00
Jooyung Han
16d5af6755 Set root elements for xsd_config modules
This reduces the code size by not generating unnecessary code for
non-root elements.

Bug: 283700992
Test: m
Change-Id: I23bd5c2a0ccc40fded3ca08155ead5f4680c2ed9
2023-05-22 16:43:12 +09:00
Mikhail Naganov
3755134720 audio: Fix the comment about threading of DriverInterface::init
'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
2023-05-19 20:08:53 -07:00
Lorena Torres-Huerta
1016c689c9 audio: Provide code for parsing surround sound config from XML am: aa8f76af92 am: 373c6167f0 am: 628e53a343
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2593365

Change-Id: I94ec749365efc3901dd8f298cb6cefe64fd7a41c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 19:54:58 +00:00
Mikhail Naganov
d24fc51e0c audio: Enable more compile time checks in the default impl am: b511b8aa21 am: 796d7846db am: 7daa2861c5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2592261

Change-Id: I58a138b32c11796cea34491c1bd7477991bb62ee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 19:54:54 +00:00
Lorena Torres-Huerta
aa8f76af92 audio: Provide code for parsing surround sound config from XML
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
2023-05-16 18:00:14 -07:00
Mikhail Naganov
b511b8aa21 audio: Enable more compile time checks in the default impl
Enable "-Wall, Wextra, Werror, Wthread-safety",
fix discovered issues.

Bug: 205884982
Test: m
Change-Id: I0a8d3095dd24dbb3bc7cf6569c1f71945cd55168
2023-05-16 17:54:30 -07:00
Shunkai Yao
492dc40711 Merge "Implement AIDL effect IFacotry::queryProcessing" 2023-05-16 22:38:43 +00:00
Mikhail Naganov
5777253dc1 Merge "audio: Update hardwired configuration" am: cd0609de1e am: 8d5d162c75 am: 787cf6274b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2588185

Change-Id: I37a8f51979da0a50f2aa323f7934469fc88349ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 02:51:20 +00:00
Shunkai Yao
5824efbe84 Implement AIDL effect IFacotry::queryProcessing
Bug: 281572768
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I0166786d531437ef52690b92067766879b043a1d
Merged-In: I0166786d531437ef52690b92067766879b043a1d
2023-05-15 23:13:07 +00:00
Mikhail Naganov
26526f15e3 audio: Update hardwired configuration
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
2023-05-12 19:44:26 -07:00
Shunkai Yao
1c30c9fbb6 Merge "Implement AIDL effect IFacotry::queryProcessing" into udc-dev am: 686183ef3d
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23088664

Change-Id: Ib049ed3dce867dbc09006a4459bfbdbfd82179ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 17:35:25 +00:00
Shunkai Yao
89ec63ed09 Implement AIDL effect IFacotry::queryProcessing
Bug: 281572768
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I0166786d531437ef52690b92067766879b043a1d
2023-05-12 14:36:23 +00:00
Treehugger Robot
2ba43ea9f3 Merge "Remove Descriptor proxy field from individual effect" 2023-05-10 17:37:29 +00:00
Mikhail Naganov
ba65d8a948 audio VTS: Update 7.0/PolicyConfig
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
2023-05-09 16:00:54 +00:00
Treehugger Robot
13ec38a16d Merge "audio VTS: Update 7.0/PolicyConfig" am: 9470948681 am: f29fb96f32 am: 331361212e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2582357

Change-Id: I05c469434ec8a9241c904c7665bdb0ace9e3fc49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 11:09:09 +00:00
Mikhail Naganov
a273cdde84 audio VTS: Update 7.0/PolicyConfig
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
2023-05-08 13:17:08 -07:00
Shunkai Yao
e0f32c1dd7 Remove Descriptor proxy field from individual effect
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
2023-05-03 23:58:29 +00:00
Treehugger Robot
8182edb4ff Merge "Freeze Audio AIDL interfaces" 2023-05-02 23:28:26 +00:00
Treehugger Robot
d58b27177e Merge "audio: Use the canonical direction port direction in ModuleUsb" am: 5a9edcec4c am: bf373e3e72 am: cfa69a37fc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2574275

Change-Id: I46331a449ed7debd9f053e51f7553810cb5791fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 20:16:30 +00:00
Shunkai Yao
2d4ca11e22 Merge "Remove Descriptor proxy field from individual effect" into udc-dev am: 51fd9e9e7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/22954886

Change-Id: I9efce61560559bbc2c17984ce1d1b92770dd7d28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 18:29:23 +00:00
Mikhail Naganov
85da71a9b5 audio VTS: Update PolicyConfig after AudioPolicyConfig
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
2023-05-02 18:14:43 +00:00
Shunkai Yao
51fd9e9e7d Merge "Remove Descriptor proxy field from individual effect" into udc-dev 2023-05-02 17:55:58 +00:00
Mikhail Naganov
376b9bbeeb Merge "audio VTS: Update PolicyConfig after AudioPolicyConfig" am: 9be1cde261 am: 5be609a7f2 am: 3e26e4bdab
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2574777

Change-Id: I5d8d4c5bae4d8a309fbed3a8b24a381447e87d09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 17:48:46 +00:00
Treehugger Robot
5a9edcec4c Merge "audio: Use the canonical direction port direction in ModuleUsb" 2023-05-02 17:43:28 +00:00
Mikhail Naganov
9be1cde261 Merge "audio VTS: Update PolicyConfig after AudioPolicyConfig" 2023-05-02 16:34:46 +00:00
Shunkai Yao
dd6ec5291a Freeze Audio AIDL interfaces
Fix Visualizer and Volume type UUID

Bug: 279432911
Test: m
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I3e7d145aa37fb67d78cf05c06da22f74c0ea07ad
Merged-In: I3e7d145aa37fb67d78cf05c06da22f74c0ea07ad
2023-05-02 00:55:22 +00:00
Mikhail Naganov
64fd6bd779 audio: Use the canonical direction port direction in ModuleUsb
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
2023-05-01 13:34:51 -07:00
Mikhail Naganov
33a35b5ffb audio VTS: Update PolicyConfig after AudioPolicyConfig
Make necessary changes to use updated AudioPolicyConfig class.

Bug: 205884982
Test: m VtsHalAudioV6_0TargetTest
Test: atest HalAudioV6_0GeneratorTest
Change-Id: Iced9d665d018853c4b2a50f4471a545af7bf60bb
2023-05-01 13:24:05 -07:00
Shunkai Yao
db026a8ca0 Remove Descriptor proxy field from individual effect
This field should be filled by IFactory implementation

Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I96203b8cd037fd81b0b1d88fc5ca9915df02a919
2023-05-01 19:07:05 +00:00
Jiabin Huang
b811015579 AHAL: add more comment for IModule.disconnectExternalDevice
Bug: 277955540
Test: TH
(cherry picked from https://android-review.googlesource.com/q/commit:cf210c83b2d29882aa0144a8e52af0d460628b6e)
Merged-In: I0d6a73884ab4bcfec62da45124024e8680155144
Change-Id: I0d6a73884ab4bcfec62da45124024e8680155144
2023-04-28 17:10:05 +00:00
Jiabin Huang
52b3a84ad9 AHAL: add more comment for IModule.disconnectExternalDevice am: cf210c83b2 am: 9d4c534842 am: 4dc9970230
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2569670

Change-Id: Ie305e2bb4ad01b935f2b051a37ea225afc94f19f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-28 03:46:34 +00:00
Jiabin Huang
cf210c83b2 AHAL: add more comment for IModule.disconnectExternalDevice
Bug: 277955540
Change-Id: I0d6a73884ab4bcfec62da45124024e8680155144
Test: TH
2023-04-27 23:06:57 +00:00
Vlad Popa
91dc5573f2 Merge "CSD: Load the ISoundDoseFactory dynamically" into udc-dev 2023-04-27 19:01:49 +00:00
Vlad Popa
b742cdf2a0 CSD: Load the ISoundDoseFactory dynamically
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
2023-04-27 10:58:46 +02:00
Shunkai Yao
57f771d49d Fix Visualizer and Volume type UUID
Bug: b/279432911
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I3e7d145aa37fb67d78cf05c06da22f74c0ea07ad
2023-04-26 18:49:51 +00:00
Treehugger Robot
43a6934217 Merge "Add EventFlag for effect HAL thread processing" am: fe4b88ab73 am: b91c54705b am: 9bab6aa527
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2529223

Change-Id: Iae1fb8b92e5336073cf00df4b74c7d4b6a0c516d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 18:02:47 +00:00
Treehugger Robot
2e10b87f4a Merge "AHAL: use PCM_FORMAT_INVALID as the termination of format array." am: d10869b255 am: 3c7da0cf68 am: ff4d1519d2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2534999

Change-Id: I23f3ae5779ccd75a1ab0d47129d64945f99d5f3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-13 17:59:49 +00:00
Treehugger Robot
fe4b88ab73 Merge "Add EventFlag for effect HAL thread processing" 2023-04-13 16:57:44 +00:00
jiabin
768c6f94d6 AHAL: use PCM_FORMAT_INVALID as the termination of format array.
Bug: 266216550
Test: make
Change-Id: Ibe2056eb4fdecb14c3e25daa3dbdd769d6433136
2023-04-12 23:46:55 +00:00
Shunkai Yao
41888a2f07 Add EventFlag for effect HAL thread processing
Bug: 261129656
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit

Change-Id: Ibe6052a8c2a182b33e6fe727b8606431dd2f5355
2023-04-11 00:10:50 +00:00
Alex Buynytskyy
ec1198d941 UpsideDownCake is now 34
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: I832ab7a8b5445ba85e27bbcf5be64906bfa0e5be
2023-04-07 23:41:20 +00:00
Mikhail Naganov
7b2d12b1f7 audio: Clarify profiles management for external devices
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
2023-03-30 20:32:00 -07:00
Mikhail Naganov
d5536d9ac6 audio: Add some utility methods, improve logging
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
2023-03-30 20:32:00 -07:00
Mikhail Naganov
fe09942d2a audio: Clarify profiles management for external devices
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
2023-03-30 12:25:49 -07:00
Mikhail Naganov
04b2cdba73 audio: Add some utility methods, improve logging
Add 'isDefaultAudioFormat' to Utils.h.

Print the module type in 'setModuleDebug'.

Align 'suggestDeviceAddressTag' with framework code.

Bug: 273252382
Test: m
Change-Id: I0248d2e866522a63a745d4af6132b7d2b6a01564
2023-03-30 12:25:49 -07:00
Treehugger Robot
014a8dd2c5 Merge "DynamicsProcessing: Validate config params based on ranges advertised" am: d14815472d am: 7449c3da5b am: 30366e7ad9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2499516

Change-Id: I02504abb71fe25f621d81976934c090211c33c39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-30 17:29:42 +00:00
Treehugger Robot
d14815472d Merge "DynamicsProcessing: Validate config params based on ranges advertised" 2023-03-30 04:03:07 +00:00
Treehugger Robot
5f6d8f92df Merge "Add utils for checking range limits of effect config params" am: a4ccb03efd am: a24d05e852 am: 2b4c953fae
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2510455

Change-Id: Iee8727075768543788569babffcf0a8158ee4975
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 05:05:19 +00:00
Treehugger Robot
a4ccb03efd Merge "Add utils for checking range limits of effect config params" 2023-03-29 03:38:28 +00:00
Ram Mohan
afdf90b679 DynamicsProcessing: Validate config params based on ranges advertised
Bug: 272195502
Test: atest VtsHalDynamicsProcessingTargetTest

Change-Id: I05233c1e56cc35c4936f0a36e92aaf7a12dda49f
2023-03-28 21:08:51 +05:30
Ram Mohan
9c47719bf7 Add utils for checking range limits of effect config params
Bug: 272195502
Test: Build

Change-Id: I1ff5af7d25e9410c58f323b6d12dbe6764e40073
2023-03-28 20:28:04 +05:30
Treehugger Robot
e1c6db15dc Merge "Audio : Fix ASAN crash in VTS test cases" am: 5e311b67f4 am: 5a3a0907ef am: 6a67f3ab6c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2508735

Change-Id: Ia8795292500e706da3bb61bdb089227909802dff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-28 07:18:07 +00:00
Shraddha Basantwani
b76f5abdcb Audio : Fix ASAN crash in VTS test cases
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
2023-03-27 17:18:18 +05:30
Shunkai Yao
c23af93d56 Merge "AIDL effect: Effect factory add EffectProxy information in proxy" am: ff16dd1f7b am: a3e89e9f4e am: 7b7a074c16
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2459230

Change-Id: I5fc72bfd25e0d8b13c8f2c1b4c5f9f91dacc7cf8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-25 01:46:56 +00:00
Shunkai Yao
ff16dd1f7b Merge "AIDL effect: Effect factory add EffectProxy information in proxy" 2023-03-24 22:54:11 +00:00
Vlad Popa
ba2e505f40 CSD: Add VSR test annotation
Test: m
Bug: 248567177
Change-Id: Ie81669e87e8f7c4898d0ed02477d6661bc4676c5
2023-03-24 16:59:01 +00:00
jiabin
29e72cf30c AHAL: fix StreamUsb crash. am: fdee322c96 am: 1befadd762 am: 99e1788db0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2504016

Change-Id: Ia2af7dc363ab89f52eb7a25488678e16b8ffd98b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 02:36:53 +00:00
jiabin
fdee322c96 AHAL: fix StreamUsb crash.
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
2023-03-22 22:16:13 +00:00
Jiabin Huang
91687e88b5 Merge "AHAL: fix USB HAL issues with reporting device capabilities." am: b3602ca092 am: abf4b3becc am: ada4a74c2c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2501017

Change-Id: I1bb0ad29b7c221d26115421aad8842cb6a8919ca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 17:43:05 +00:00
Jiabin Huang
b3602ca092 Merge "AHAL: fix USB HAL issues with reporting device capabilities." 2023-03-22 16:18:49 +00:00
jiabin
118c261010 AHAL: fix USB HAL issues with reporting device capabilities.
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
2023-03-21 23:07:40 +00:00
Shunkai Yao
4b3434f96e Update EffectUUID initialization
Avoid dynamic initialization global UUID variables

Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I7574c1fe1ba0aaff1d9d29a9eed10de1aef33806
2023-03-20 01:48:10 +00:00
Shunkai Yao
b1b8b68316 Merge "Update EffectUUID initialization" 2023-03-18 23:36:42 +00:00
Vlad Popa
429e51f4e7 Merge "CSD: rename get/setOutputRs2 to include upper bound" 2023-03-17 19:12:45 +00:00
Mikhail Naganov
fd0e4b68d5 Merge "Update visibility of libaudioserviceexampleimpl" am: 1120ee5603 am: f9199100ac am: 93c8497361
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2490615

Change-Id: Icddae265b5c7e8b634079501bd1e8bc49e0caf91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 18:45:14 +00:00
Shunkai Yao
f8be1acde7 Update EffectUUID initialization
Avoid dynamic initialization global UUID variables

Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I7574c1fe1ba0aaff1d9d29a9eed10de1aef33806
2023-03-17 18:16:22 +00:00
Mikhail Naganov
1120ee5603 Merge "Update visibility of libaudioserviceexampleimpl" 2023-03-17 16:55:05 +00:00
Vlad Popa
4d7aa9279b CSD: rename get/setOutputRs2 to include upper bound
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
2023-03-17 02:57:47 +01:00
Vlad Popa
34f4c1d5d7 CSD: rename get/setOutputRs2 to include upper bound
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
2023-03-16 19:37:18 +01:00
Mikhail Naganov
776e65e35f Update visibility of libaudioserviceexampleimpl
In order for vendors to be able to use this library
it needs to have public visibility.

Bug: 205884982
Test: m
Change-Id: Idd47c942ee1e97372047ec1b44bcd996d454e3e2
2023-03-15 09:29:16 -07:00
Xin Li
82e0eca1c4 Merge "Merge Android 13 QPR2" 2023-03-14 21:40:25 +00:00
Shunkai Yao
9dcf22d093 Merge "Add some Effect type UUID and offload indicater in common parameter" am: 54cec778ee am: 7062a4849b am: 3c7c189ae4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2485228

Change-Id: I2908c76ca911dbd985f0cbfba7d5116c6c938638
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 21:23:13 +00:00
Shunkai Yao
7062a4849b Merge "Add some Effect type UUID and offload indicater in common parameter" am: 54cec778ee
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2485228

Change-Id: I830289ce7701f73956dad7f7b66440dcc8974a55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 19:44:10 +00:00
Shunkai Yao
d30ff8fb80 Add some Effect type UUID and offload indicater in common parameter
Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I61ebf268600564cb5abddc90979070b675a85541
2023-03-14 16:07:25 +00:00
Treehugger Robot
b003b30bda Merge "audio: Put audio/aidl/common/include/Utils.h into 'aidl' NS" am: 7260130baf am: 99e5af4b2f am: 881ed49811
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2480537

Change-Id: Icdfb08048b1a56772b14d88e090e1e57f2d36a00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-13 12:31:38 +00:00
Treehugger Robot
99e5af4b2f Merge "audio: Put audio/aidl/common/include/Utils.h into 'aidl' NS" am: 7260130baf
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2480537

Change-Id: If989453ea55808d193adca90d73b779605376831
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 23:08:37 +00:00
Mikhail Naganov
866765cd38 Merge "audio: Add offload reconfiguration event to IBluetoothLe" am: b708d292d3 am: 104c4286f5 am: 8a4322c223
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2480536

Change-Id: Iedde53678fb2f1652673ff85ad33726b3ad63a0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 22:50:26 +00:00
Treehugger Robot
669161cd04 Merge "audio test service guaranteed log" am: 6b466603c6 am: 0f3597e7d5 am: d12b7385ce
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2472165

Change-Id: I6c283d308071b3b67a3f5bfdd234b92a09289c69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 22:50:08 +00:00
Treehugger Robot
7260130baf Merge "audio: Put audio/aidl/common/include/Utils.h into 'aidl' NS" 2023-03-10 22:31:37 +00:00
Mikhail Naganov
104c4286f5 Merge "audio: Add offload reconfiguration event to IBluetoothLe" am: b708d292d3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2480536

Change-Id: I9494995912345c8ad775ecb477a271f254b64d6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 22:14:47 +00:00
Mikhail Naganov
b708d292d3 Merge "audio: Add offload reconfiguration event to IBluetoothLe" 2023-03-10 22:06:22 +00:00
Treehugger Robot
0f3597e7d5 Merge "audio test service guaranteed log" am: 6b466603c6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2472165

Change-Id: I841237e0eac97aed4cd05cfac5d5005ea947b27d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 21:41:21 +00:00
Treehugger Robot
6b466603c6 Merge "audio test service guaranteed log" 2023-03-10 21:30:14 +00:00
Mikhail Naganov
b4f8e67e1c audio: Add offload reconfiguration event to IBluetoothLe
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
2023-03-10 12:44:52 -08:00
Mikhail Naganov
872d4a6518 audio: Put audio/aidl/common/include/Utils.h into 'aidl' NS
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
2023-03-10 11:34:31 -08:00
Shunkai Yao
3b05ed321c Merge "Add sleep in EffectThread to avoid busy wait" am: ac46ddb969 am: 94c87272b2 am: 8252228622
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2478089

Change-Id: I35bee72d9964e5da0ce23e7c7785c2465b756b3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 03:24:55 +00:00
Shunkai Yao
94c87272b2 Merge "Add sleep in EffectThread to avoid busy wait" am: ac46ddb969
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2478089

Change-Id: Ia72d2a551b6875f7f41128432405015857f2fc5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 02:47:03 +00:00
Shunkai Yao
ac46ddb969 Merge "Add sleep in EffectThread to avoid busy wait" 2023-03-10 02:18:30 +00:00
Treehugger Robot
201e28a80b Merge "audio: Add vendor tags handling for AIDL" am: a3a1c665fb am: 431c0d4dff am: 22524f5863
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2479295

Change-Id: I95ecf848c34686c81b766dc9ba6d0e46b60db23f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 20:13:52 +00:00
Treehugger Robot
431c0d4dff Merge "audio: Add vendor tags handling for AIDL" am: a3a1c665fb
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2479295

Change-Id: Ib4dfa979c57815a0cf203c6362492f5c5b44a4d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 18:54:21 +00:00
Treehugger Robot
a3a1c665fb Merge "audio: Add vendor tags handling for AIDL" 2023-03-09 18:22:51 +00:00
Shunkai Yao
eae5c56fb4 Add sleep in EffectThread to avoid busy wait
Bug: 261129656
Test: Enable AIDL and run YTM on pixel phone
Change-Id: If7ea5324b8a884e8f07b6855b70cb33b4c7868e4
2023-03-09 02:30:15 +00:00
Mikhail Naganov
817da7d0be audio: Add vendor tags handling for AIDL
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
2023-03-08 17:40:35 -08:00
Mikhail Naganov
1202d57e63 audio: Add IBluetoothLe am: b5647da1ad
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2477536

Change-Id: I00c7d4d4114acd560ce77f302142aabf9e9ed426
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 19:09:25 +00:00
Mikhail Naganov
b5647da1ad audio: Add IBluetoothLe
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
2023-03-08 09:28:00 -08:00
Shunkai Yao
4c4f3cd153 AIDL effect: Effect factory add EffectProxy information in proxy
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
2023-03-08 01:53:05 +00:00
Mikhail Naganov
4fae319d0a audio: Add IBluetoothLe
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
2023-03-07 15:17:59 -08:00
Treehugger Robot
1dbc39ea23 Merge "audio: Add IStreamCommon.prepareToClose method" am: 940ca8996a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2475087

Change-Id: Ie919fad86d8da35b0fa297bcf66e4322d0ae0611
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 21:15:55 +00:00
Mikhail Naganov
a2145b3994 Merge "audio: Make I/O operations in default stub more realistic" am: b862e6e20b am: 7c0a635b6d am: b91c536372
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2473366

Change-Id: Id9488d2642f7303211cf2fa108ac694a7c393b6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 20:44:21 +00:00
Mikhail Naganov
7c0a635b6d Merge "audio: Make I/O operations in default stub more realistic" am: b862e6e20b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2473366

Change-Id: Ife2fe1318f7603d61b7ff0d5e22a69a9348f7341
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 17:42:13 +00:00
Mikhail Naganov
6f3474a98e audio: Add IStreamCommon.prepareToClose method
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
2023-03-07 09:41:08 -08:00
Mikhail Naganov
389ba3fa57 Merge "audio: Add IStreamCommon.prepareToClose method" into udc-dev 2023-03-07 17:12:16 +00:00
Mikhail Naganov
b862e6e20b Merge "audio: Make I/O operations in default stub more realistic" 2023-03-07 17:11:05 +00:00
Treehugger Robot
7bda5e0fc8 Merge "Add vendor extension effect example" am: 9e741d67b5 am: 449402300f am: 6e7b5f0698
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2470400

Change-Id: Ib8423d2dbe8162f7d4d014fda0877832419128c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 04:20:38 +00:00
Treehugger Robot
449402300f Merge "Add vendor extension effect example" am: 9e741d67b5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2470400

Change-Id: Ie55eb219b4e204fca769f46ac5a33d871047ce57
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 03:06:24 +00:00
Mikhail Naganov
e48e5737f3 audio: Make I/O operations in default stub more realistic
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
2023-03-06 18:51:03 -08:00
Treehugger Robot
9e741d67b5 Merge "Add vendor extension effect example" 2023-03-07 02:22:08 +00:00
Mikhail Naganov
d0641b0d5a audio: Add IStreamCommon.prepareToClose method
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
2023-03-06 15:44:05 -08:00
Steven Moreland
705c39b274 audio test service guaranteed log
The logs in this service and others disappear sometimes.

Bug: 210919187
Test: logd_integration_test
Change-Id: I63b88ec4b88048ed64907df21d5a049a3abda2ec
2023-03-06 14:30:49 +00:00
Treehugger Robot
b3a5c66d4c Merge "Do not include internal GTest header." am: 1a6e2031fc am: 453240f61f am: da5022e6f5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2469730

Change-Id: I36f5c75a6e053144acceabb88da92b135c9bdef4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-04 08:27:11 +00:00
Treehugger Robot
453240f61f Merge "Do not include internal GTest header." am: 1a6e2031fc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2469730

Change-Id: I5d2cfbee355fd2e11a81cd0825a91634f815704f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-04 06:45:25 +00:00
Treehugger Robot
1a6e2031fc Merge "Do not include internal GTest header." 2023-03-04 02:14:36 +00:00
Shunkai Yao
b2325e55e9 Add vendor extension effect example
Update Parameter.id from int to ParcelableHolder

Bug: 271601435
Test: Build, atest VtsHalAudioEffectTargetTest
Change-Id: I5450fa90e95bdebe931c222f6bb177dbdef35c69
2023-03-04 02:01:33 +00:00
Krzysztof Kosiński
a3a78a688d Do not include internal GTest header.
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
2023-03-04 00:58:52 +00:00
Mikhail Naganov
93a950ecd1 Merge "audio: Make libaudioserviceexampleimpl just 'library'" am: 79cb295819 am: 95ba30ccbb am: bc6c55f5a0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2464079

Change-Id: I03db50ce15077d031d7d26e7bfcf23989c663f18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-03 17:31:23 +00:00