Commit Graph

47365 Commits

Author SHA1 Message Date
Eric Biggers
47b145a0d8 Allow uninstantiated WeaverTest
Add back GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST, which I had
accidentally removed while merging the AIDL and HIDL tests.  I think
this is still needed on devices that don't support Weaver at all.

Bug: 291284381
Test: atest VtsHalWeaverTargetTest
Change-Id: Iac1b4476620e51c645e3ad57444ee386cb879029
2023-07-24 17:28:37 +00:00
Treehugger Robot
75275ce51e Merge "FCM: add c2 software, IConfigurable instances" into main 2023-07-21 20:46:08 +00:00
Treehugger Robot
299db35551 Merge "Fix a DimmingStage documentation typo by rewording the doc." into main 2023-07-21 03:44:41 +00:00
Treehugger Robot
12c4bf6ba1 Merge changes from topic "fix-b-264712385-primary-module" into main
* changes:
  audio: Move StreamContext ownership out from StreamCommonImpl
  audio: Use ChildInterface in StreamCommonImpl
  audio: Update StreamAlsa and alsa utils for built-in devices
  audio: Simplify and extend alsa::Mixer
2023-07-20 23:09:50 +00:00
Alec Mouri
cdcfd05736 Fix a DimmingStage documentation typo by rewording the doc.
Change-Id: I5a1b3a99630cfded4b34c74b020bb4df2ce12084
2023-07-20 23:07:17 +00:00
Eric Biggers
2a5366d850 Merge changes from topic "weaver-vts-fix" into main
* changes:
  Don't overwrite in-use Weaver slots during VTS
  Simplify Weaver VTS test
  Remove redundant HIDL Weaver VTS test
  Move VtsHalWeaverTargetTest to common directory
  Make VtsHalWeaverTargetTest test both HIDL and AIDL services
  Clarify the Weaver documentation
  Update weaver AIDL default to use V2
  Add WeaverReadStatus to WeaverReadResponse
2023-07-20 16:53:13 +00:00
Mikhail Naganov
6ddefdbcdf audio: Move StreamContext ownership out from StreamCommonImpl
Upcoming implementations of the streams of the primary module
will need to change the underlying stream type depending on
the current connected device. The stream context must persist,
thus its life time must be bound to the IStreamIn/Out implementation.
Move the StreamContext instance under ownership of StreamIn/Out.

Add StreamCommonImpl::onClose so that the owner of the context
may know when it is safe to reset it.

Re-arrange the order of the arguments when creating a stream
so that the context always comes first.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Iaf13d4bc3a53cbfc27264d3abd1f6c417ece3941
2023-07-19 17:49:28 -07:00
Mikhail Naganov
2eabaf995b audio: Use ChildInterface in StreamCommonImpl
Replace the pair of 'shared_ptr<>, Binder' with
the equivalent ChildInterface.

Fix logging of returned sub-objects to print their
Binder value instead of the local pointer.

Bug: 264712385
Test: m
Change-Id: I1350e7b3720c6244cd8527e1d021ee9577399291
2023-07-19 17:36:37 -07:00
Mikhail Naganov
422f7e6b1b audio: Update StreamAlsa and alsa utils for built-in devices
Use new functions added to alsa proxy layer for opening
attached (built-in) devices.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia2a47ff96fa62f99ce4ec4a0993ca3fd86f82c9d
2023-07-19 17:35:39 -07:00
Mikhail Naganov
f12d4a1ef8 audio: Simplify and extend alsa::Mixer
Remove alsa::MixerControl. tinyALSA contains utility
functions for setting values in percents, they use
the same logic as used to be there for handling
the "volume" control. Use access serialization at
the mixer level, rather than for each control.

Move the call to 'mixer_open' to alsa::Mixer.

Add controls for capture (mic) mute and gain. They
will be used by the primary HAL.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I0fad994153de96aceec3eb8f2fec19805ec912f8
2023-07-19 17:35:38 -07:00
Steven Moreland
72f588429a FCM: add c2 software, IConfigurable instances
These instances were previously added manually
on a device-by-device basis. Adding them explicitly
here now.

Bug: 290408770
Test: N/A
Change-Id: Ibc1470aae02d2b1172ea62efeb5af31224b80c45
2023-07-19 21:22:38 +00:00
Max Bires
fe9355f3c6 Merge "Slight documentation tweak" into main 2023-07-19 20:52:56 +00:00
Treehugger Robot
1da295ca82 Merge "Require mapper4" into main 2023-07-19 18:20:57 +00:00
Treehugger Robot
c081fa39df Merge changes I88ee8d2f,Id15ecc7f into main
* changes:
  Let the lazy CAS HAL to override the regular one
  Unmark executable bits from CAS AIDL HAL impl
2023-07-19 17:06:00 +00:00
Eric Biggers
31380e7bc9 Don't overwrite in-use Weaver slots during VTS
VtsHalWeaverTargetTest always overwrote the first and last Weaver slots.
Before Android 14, apparently this didn't cause problems because Android
didn't use Weaver for users that never had an LSKF set.  However, now
users get a Weaver slot right away.  That typically means that the first
Weaver slot will be used by user 0.

Fix the test to read /metadata/password_slots/slot_map to determine
which slots are in use by the system, and only write to unused slots.

Bug: 291284381
Test: 'atest -v VtsHalWeaverTargetTest'.  Checked for INFO messages
      showing that slots 1 and 63 were used by the test.  Then rebooted
      and verified that the device can still be unlocked.
Change-Id: Id2cce4240d68999471e7d1e8fc7a8449587eed97
2023-07-19 15:59:10 +00:00
John Reck
34412e26a6 Require mapper4
Bug: 280901110
Test: make

Change-Id: I49fa786957716d896b5476eac32b4c6d9077fe80
2023-07-19 11:29:56 -04:00
Shraddha Basantwani
7770c158a1 Audio : Fix minor comments in r_submix module
Add missing check for StandbyTransition variable
Add missing & in const arguments

Bug: 286914845
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Id7a30e0697da80a272768bbf2aa8e3ed748e93f4
2023-07-19 16:43:50 +05:30
Eric Biggers
961a138e47 Simplify Weaver VTS test
- Get the config in SetUp() so that it's easily available to test cases.
- Rename "weaver" class member to "weaver_" to match coding style.
- Eliminate unnecessary variables when checking WeaverReadResponse.
- Fix a typo.

Bug: 291284381
Test: 'atest VtsHalWeaverTargetTest' on bramble
Change-Id: Ia6dca996103057bfdc9002bc9ab2c039e2333ed9
2023-07-19 04:09:01 +00:00
Eric Biggers
e2e40d69a6 Remove redundant HIDL Weaver VTS test
Now that there is a single Weaver VTS test that covers both the HIDL and
AIDL services (weaver/vts/), the HIDL-specific test can be deleted.

Bug: 291284381
Test: 'atest VtsHalWeaverTargetTest' on bramble
Change-Id: Ie942825c154e6792e6ffdbf0c59248de9de10d92
2023-07-19 04:09:01 +00:00
Eric Biggers
f0d6907d20 Move VtsHalWeaverTargetTest to common directory
Since VtsHalWeaverTargetTest now handles both AIDL and HIDL, move it
from weaver/aidl/vts/ to weaver/vts/.

Bug: 291284381
Test: 'atest VtsHalWeaverTargetTest' on bramble
Change-Id: Icfa0ff3b22b036110df327674fda44820057aabd
2023-07-19 04:09:01 +00:00
Eric Biggers
b59654f239 Make VtsHalWeaverTargetTest test both HIDL and AIDL services
VtsHalWeaverTargetTest and VtsHalWeaverV1_0TargetTest are identical
except for whether they use AIDL or HIDL.  Unfortunately, the HIDL test
is needed for several more years.  For now, we have to make some
substantial fixes to both tests.  To make continued maintenance of this
test easier, update VtsHalWeaverTargetTest to handle both AIDL and HIDL.
The test cases are still written in terms of the AIDL API, so it should
still be straightforward to remove HIDL support when the time comes.

Bug: 291284381
Test: 'atest VtsHalWeaverTargetTest' on bramble
Change-Id: I6b760930146ad1b08f17ef810a86c0058601c3bf
2023-07-19 04:09:01 +00:00
Eric Biggers
a4742a0291 Clarify the Weaver documentation
- Explicitly mention that Weaver is for *persistent* storage
- Explicitly mention secure deletion requirement

Change-Id: I3eaf7408570ff20c69a21398e39e16be97d2a917
(cherry picked from commit acd066c614)
Merged-In: I3eaf7408570ff20c69a21398e39e16be97d2a917
2023-07-19 04:08:57 +00:00
Devin Moore
316cf58d49 Update weaver AIDL default to use V2
Test: VtsHalWeaverTargetTest
Bug: 259556049
Change-Id: Id6aa9316a20541bf2c9a7cc53345a5010a188d00
(cherry picked from commit daf12d9440)
Merged-In: Id6aa9316a20541bf2c9a7cc53345a5010a188d00
2023-07-19 04:08:53 +00:00
ChengYou Ho
20c47b4bae Add WeaverReadStatus to WeaverReadResponse
Bug: 259556049
Change-Id: I83897038eda59ed8cae1bdb0ae68828201615ebc
(cherry picked from commit 5c3a2b710e)
Merged-In: I83897038eda59ed8cae1bdb0ae68828201615ebc
2023-07-19 04:08:48 +00:00
Eric Biggers
ac5fe6e8e8 Merge "Update OWNERS for Weaver" into main 2023-07-19 03:39:02 +00:00
Eric Biggers
f4483a2ce9 Update OWNERS for Weaver
Weaver does not have a clear owner, but list the people who seem to be
most involved with it currently.

Bug: 291284381
Test: N/A
Change-Id: I69de46f8154bf91272a7197ce71c13c745a7208e
2023-07-19 03:30:56 +00:00
Max Bires
5c0f7234b6 Slight documentation tweak
Specify that DICE-based RKP implementations may also allow a ROM
extension to manage the UDS public key.

Test: The words are semantically parseable
Change-Id: I8f9c6efb01fc76318220cf1bc4a0eb3a3ad42f87
2023-07-18 20:26:33 -07:00
Jin Chen
886eb1f6ef Merge "[uwb](hal) Add radar data packet format" into main 2023-07-18 23:27:39 +00:00
Treehugger Robot
1829d2133f Merge "audio: Fix state machine initial and final state symbols" into main 2023-07-18 22:59:06 +00:00
Mikhail Naganov
f082902b41 audio: Fix state machine initial and final state symbols
In UML, the initial state is a solid circle, the final
state is a double circle. In the Core HAL diagrams it
was the opposite.

Test: dot -Tpng stream-{in|out}-[async-]sm.gv -o ...
Change-Id: Id69f17d0a47227e744eb6dadcb5fee08c07bb0bd
2023-07-18 14:46:18 -07:00
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
98e165d1f6 Merge "Fix vts sco test fail for usb interface" into main 2023-07-18 17:46:54 +00:00
Treehugger Robot
03b140d2fb Merge "Enabled attest-id tests to run on GSI builds as well." into main 2023-07-18 16:39:32 +00:00
xiaoshun.xu
4e85c09959 Fix vts sco test fail for usb interface
[Description]
If bt controller device is usb interface,
sco loopback single pkt and bandwidth test can not pass
because pkt size is limited accroding to core spec

[Root Cause]
USB sco packet size is limited in spec

[Solution]
If is bt usb chip, continuous receive sco packets
  from controller until size is enough

[Test Report]
Test Pass

Bug: 286355871
Change-Id: Idb150d8a72149f7e1dfaccfd7bc82a91710da59c
2023-07-18 09:34:08 +08:00
Steven Moreland
031aeee88c Merge "compat matrix: add ISap slot2" into main 2023-07-17 23:42:51 +00:00
Treehugger Robot
cdac9b5064 Merge "Make EffectFactory implementation thread-safe" into main 2023-07-17 22:43:24 +00:00
Garfield Tan
a68b2696e8 Let the lazy CAS HAL to override the regular one
Some devices may choose to use the lazy version of CAS HAL than the
regular one, but the default one is added to pretty much all devices in
the commit 4f5534b0d381a0968e81ee20e81b791aebe5493d in the
platform/build project. Adding the lazy version will duplicate the
implementation of CAS HAL.

This is what is done in the 1.2 HIDL implementation.

Bug: 291344726
Test: Only the lazy implementation is installed to devices that require
the lazy version.

Change-Id: I88ee8d2fa4c27720817e65e5c41ffc74d6b2d61f
2023-07-17 14:58:48 -07:00
Garfield Tan
7777a4be12 Unmark executable bits from CAS AIDL HAL impl
None of these files are executable. The .rc and .xml files shouldn't be
installed to the device image as executables either.

Bug: None
Test: Files installed on the device aren't executables anymore.
Change-Id: Id15ecc7febb56ea108155fcbd338efeb8885709a
2023-07-17 14:58:47 -07: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
Mikhail Naganov
00a7a24e0a Merge "audio: Allow Module subclasses to customize Configuration" into main 2023-07-14 23:46:52 +00:00
Treehugger Robot
00e273d023 Merge "compatibility_matrices: Only allow core HALs for system FCMs." into main 2023-07-14 21:21:23 +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
Yifan Hong
7066d3369a Merge "compatibility_matrices: add vintf_compatibility_matrix.core_hals." into main 2023-07-13 19:29:48 +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
Jin Chen
1b1aa3bb9a [uwb](hal) Add radar data packet format
* Update based on Android UWB radar UCI spec v1.1 (go/uwb-radar-uci).

Test: Compile
Bug: 237097302
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:86974637e8e2a447a527ac828bf27958c008b339)
Merged-In: I8e8de979ea2f69396b049c2107cba16e71793cb0
Change-Id: I8e8de979ea2f69396b049c2107cba16e71793cb0
2023-07-13 18:09:02 +00:00