Commit Graph

42566 Commits

Author SHA1 Message Date
Mikhail Naganov
48e2e8fe49 audio: Implement setting name and priority in StreamWorker
Audio threads need to be able to set their priority.
Also, traditionally these worker threads set a custom
thread name. Implement this functionality in StreamWorker.

Since initialization steps can fail, implement simple
error reporting via a string field `mError`. The state
of the string field replaces the dedicated `ERROR` worker
state.

Bug: 205884982
Test: atest libaudioaidlcommon_test --iterations
Merged-In: Ie9ab94922d47f277a4993a90b478a2fa76657923
Change-Id: Ie9ab94922d47f277a4993a90b478a2fa76657923
(cherry picked from commit e9e0f7c0f5)
2022-08-26 02:43:37 +00:00
Mikhail Naganov
0c174e9133 audio: Prevent priority inversions in aidl StreamWorker
Avoid taking a lock in high priority worker threads
without a real need.

Bug: 205884982
Test: atest libaudioaidlcommon_test --iterations
Merged-In: I8cc0f5cb58752b7b7d413a9f4e46093c39445892
Change-Id: I8cc0f5cb58752b7b7d413a9f4e46093c39445892
(cherry picked from commit d989a4b669)
2022-08-26 02:42:46 +00:00
Mikhail Naganov
614e4b5f16 audio: Add StreamWorker to aidl/common
This utility class has been copied from HIDL VTS.
It will be used both for the default implementation
and AIDL VTS, and might need modifications.

Bug: 205884982
Test: atest libaudioaidlcommon_test
Merged-In: I43b35b0c23ae45305dca66e15b60820cad19635e
Change-Id: I43b35b0c23ae45305dca66e15b60820cad19635e
(cherry picked from commit c17f0484bc)
2022-08-26 02:41:58 +00:00
Treehugger Robot
b4adbffdc4 Merge "Remove usb HIDL entry in compat matrix." 2022-08-25 20:14:47 +00:00
Treehugger Robot
870d2ac41a Merge "Remove nfc HIDL entry in compat matrix." 2022-08-25 19:43:28 +00:00
Treehugger Robot
a60aa56278 Merge "Remove gnss HIDL entry in compat matrix." 2022-08-25 19:17:27 +00:00
Treehugger Robot
856fced74a Merge "audio: Update README.md to add info about the AIDL version" 2022-08-25 17:59:25 +00:00
Mikhail Naganov
5aca7616f7 audio: Update README.md to add info about the AIDL version
This complements CL https://r.android.com/2169871.

Bug: 205884982
Test: N/A
Merged-In: Ia627e3845a078e6a4c545b13a723a6c5a038c53b
(cherry picked from commit bbf297804e)
Change-Id: I78696647e64ae1a5f216c3ab4f4a7194a5145072
2022-08-25 16:34:25 +00:00
Treehugger Robot
463d08394e Merge "Remove color format constraints" 2022-08-25 02:28:02 +00:00
Treehugger Robot
660e9a4c48 Merge changes I118b2c04,I111b72aa,Ia5d29126
* changes:
  audio: Add support for compressed offload
  audio: Improve debug logging in the AIDL version, fix bugs
  audio: Disable the C++ backend for android.hardware.audio.core
2022-08-25 02:24:01 +00:00
Treehugger Robot
2412da0826 Merge "[Bluetooth apex] Use new apex name" 2022-08-25 02:16:03 +00:00
Changyeon Jo
ec0d97c86b Remove color format constraints am: e6bb228dc6 am: 9b60ecd229
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2188343

Change-Id: Ife0695367cc56876e595275d26096cc329535c4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 00:39:27 +00:00
Mikhail Naganov
111e0ceab5 audio: Add support for compressed offload
- Add compressed offload mix port into default implementation.
- Require AudioOffloadInfo to be passed to IModule.openOutputStream
  for compressed offload port configs.
- Update VTS to handle compressed offload.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Merged-In: I118b2c04bff12b64a7cac4dc2c88217a6a270046
Change-Id: I118b2c04bff12b64a7cac4dc2c88217a6a270046
(cherry picked from commit 975ea3ae89)
2022-08-25 00:25:55 +00:00
Mikhail Naganov
16db9b7c97 audio: Improve debug logging in the AIDL version, fix bugs
- Make sure the AIDL default implementation has debug output enabled.
- Log additional info in the AIDL VTS to facilitate debugging.
- Make resource handler classes move-only types.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Merged-In: I111b72aaf12962f00b4d31b8ac87186bca5eb853
Change-Id: I111b72aaf12962f00b4d31b8ac87186bca5eb853
(cherry picked from commit f82fc6476d)
2022-08-25 00:25:25 +00:00
Mikhail Naganov
f84d640186 audio: Disable the C++ backend for android.hardware.audio.core
android.hardware.audio.core will need to use FMQ,
which does not support the C++ backend in the AIDL version.

Migrate VTS tests from the C++ backend to the NDK backend.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Merged-In: Ia5d29126afdb4bb97dd063a032b96ab83b9ce36e
Change-Id: Ia5d29126afdb4bb97dd063a032b96ab83b9ce36e
(cherry picked from commit 8fcc442416)
2022-08-25 00:24:53 +00:00
Changyeon Jo
9b60ecd229 Remove color format constraints am: e6bb228dc6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2188343

Change-Id: I4b4f0fa412a88763e506acb9d5f2ed83463ba1d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 00:19:38 +00:00
Treehugger Robot
eefac18b26 Merge "audio HAL: Support for external device connections" 2022-08-24 15:01:49 +00:00
Xin Li
056da74605 Merge "Merge android13-tests-dev" 2022-08-23 23:07:05 +00:00
Mikhail Naganov
00603d14b3 audio HAL: Support for external device connections
Add methods 'IModule.connect/disconnectExternalDevice' which inform
audio HAL about connection / disconnection of an external
non-attached device. Add method 'getAudioRoutesForPort' to
retrieve only routes that include the specified port.

Update the behavior of 'getAudioPorts' and 'getAudioRoutes'
indicating that the result may change due to instantiation
of new device ports for connected external devices.

Clarify behavior of 'IModule.setAudioPortConfig' that it can not
work with device ports with no profiles.

Add debug flags structure 'ModuleDebug' and method
'IModule.setModuleDebug' to control the debugging aspects. VTS
tests use these flags to test HAL behavior which would otherwise
require human intervention.

Update the default implementation and VTS for the AIDL changes.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Merged-In: Iad5f7009e283729206f88b6278c8992f7f8a92a2
Change-Id: Iad5f7009e283729206f88b6278c8992f7f8a92a2
2022-08-23 22:40:20 +00:00
Pawan
8e13f2ac2c Updating cc_fuzz with default config
Using service_fuzzer_defaults in
	- android.hardware.health-service.aidl_fuzzer
	- android.hardware.vibrator-service.example_fuzzer

Bug: 240318902
Test: m android.hardware.health-service.aidl_fuzzer
Test: m android.hardware.vibrator-service.example_fuzzer
Change-Id: I3fd1cf37a5835ebef14658ed40332132cec07e49
2022-08-22 22:16:41 +00:00
Treehugger Robot
2468ff5608 Merge changes from topic "upstream-audio-aidl-hal"
* changes:
  Explicitly depend on V1 of android.media.audio.common.types
  Explicitly depend on audio.common-V1
  audio HAL: initial VTS tests
  audio HAL: Minimal example implementation
  audio HAL: Initial AIDL interfaces
2022-08-22 20:25:37 +00:00
William Escande
2591c3d0cf [Bluetooth apex] Use new apex name
The Bluetooth apex name is now called com.android.btservices

Bug: 243054261
Test: Build
Change-Id: Ib63646722cbef948b5198fc5f2a9b5ac2ca52ae3
2022-08-22 11:27:58 -07:00
Treehugger Robot
08f3ea9e97 Merge changes from topic "cp-libwifihal-soong"
* changes:
  Build libwifi-hal-* modules only for the first arch
  android.hardware.wifi@1.0-service in soong
2022-08-22 02:30:56 +00:00
Donghong Weng
160a22f49e Merge "Explicit conversion" 2022-08-22 01:45:35 +00:00
Jiyong Park
f4b5e7b993 Explicitly depend on V1 of android.media.audio.common.types
... for the same reason as cc489264af

Bug: 225941299
Test: m
Merged-In: I269d61c8c441b3db0832f5450f5e5a84a5989a99
Change-Id: I269d61c8c441b3db0832f5450f5e5a84a5989a99
(cherry picked from commit 446519a370)
2022-08-20 00:14:53 +00:00
Jiyong Park
d25eddfd7d Explicitly depend on audio.common-V1
Background:

android.hardware.audio.common was frozen in the upstream tm-dev.
Previously, the interface had only V1 (as the in-development version)
and it was in the VNDK. However, after the freeze, it will have V1 and
V2, and only V1 will remain in the VNDK, because we can't have multiple
versions of the same AIDL interface in VNDK (it's just waste of memory).

android.hardware.audio.core is a new AIDL interface that doesn't exist
in TM. It is also a member of VNDK and imports the audio.common
interface. So far, the import has been done without an explicit version
number (i.e. `imports: ["android.hardware.audio.common"]`). As a result,
V1 was imported before the freeze, and V2 (the latest) will be imported
after the freeze.

Problem:

audio.core depending on audio.common-V2 is NOT allowed since the former
is a member of VNDK, but the latter isn't. VNDK should form a closure.
We are actually hitting this:

```
> error: hardware/interfaces/audio/aidl/Android.bp:71:1: module
"android.hardware.audio.core-V1-ndk" variant
"android_vendor.Tiramisu_arm64_armv8-a_static" (created by module
"android.hardware.audio.core-V1-ndk-generator" (created by module
"android.hardware.audio.core_interface")): (native:vendor:vndk) should
not link to "android.hardware.audio.common-V2-ndk" (native:vendor):
VNDK-core must only depend on VNDK-core or VNDK-SP
```

To fix this, make the dependency to audio.common to be explicit about
the version. This change can't be uploaded to tm-dev as audio.core
doesn't exist there, and must be submitted before the AIDL APIs are
frozen there.

Bug: 225941299
Test: m

Merged-In: Iadc96d558d5c7431b0a2b0cbd28b99319a24ee44
Change-Id: Iadc96d558d5c7431b0a2b0cbd28b99319a24ee44
(cherry picked from commit cc489264af)
2022-08-20 00:14:53 +00:00
Mikhail Naganov
e5d747e908 audio HAL: initial VTS tests
Tests basic functionality for enumerating
capabilities of an audio module, audio patches
creation, and opening of I/O streams.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Merged-In: I7c7c3c7008f2fc43db1542455c74444a08e55534
Change-Id: I7c7c3c7008f2fc43db1542455c74444a08e55534
(cherry picked from commit 7abc70f908)
2022-08-20 00:14:53 +00:00
Mikhail Naganov
df5adfde15 audio HAL: Minimal example implementation
Implements basic functionality for enumerating
capabilities of an audio module, audio patches
creation, and opening of I/O streams.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Merged-In: Ie5d67e9192a598260e762ae9368f99592c8ad97e
Change-Id: Ie5d67e9192a598260e762ae9368f99592c8ad97e
(cherry picked from commit ecdc6ca8e8)
2022-08-20 00:14:53 +00:00
Mikhail Naganov
bd4013f179 audio HAL: Initial AIDL interfaces
This adds basic support for enumerating capabilities
of an audio module, creation of patches, and opening of
I/O streams.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Merged-In: Ib1ef13c95d338b6ef1bde7d87dcd675fc1d35e85
Change-Id: Ib1ef13c95d338b6ef1bde7d87dcd675fc1d35e85
(cherry picked from commit ee27478264)
2022-08-20 00:14:53 +00:00
Treehugger Robot
a3fe17250d Merge "Release the memory allocated in the algorithm to prevent memory leaks" 2022-08-19 22:09:37 +00:00
Changyeon Jo
849d0f370c Remove color format constraints
VtsHalEvsTargetTest does not verify any behavior depending on
a frame buffer's color format.

Bug: 240685726
Test: atest VtsHalEvsTargetTest
Change-Id: If8b8c595cfc7404a8122728593f778528b45af15
2022-08-18 04:49:39 +00:00
Liening.Liu
1aa1cf155e Release the memory allocated in the algorithm to prevent memory leaks
In the reference implementation of the identity function, there are two places where the memory requested in the openssl algorithm is not released. This memory should be freed.

Test: Vts/Cts

Bug: 242927524
Change-Id: I88ffba39cb6ec887f395122e4670bf9f1a2d8e12
2022-08-18 02:38:04 +00:00
Xin Li
7406132b49 Merge android13-tests-dev
Merged-In: Ie372f74f3a52decce592181c7d65624f8ec03ed1
Change-Id: Ia81e24391de0d26737a5d65fbc5c8bb86bf03d5b
2022-08-17 16:37:46 -07:00
donghongweng
f533ccb14e Fix unqualified-std-cast-call compiler warning
Test: m
Change-Id: I403ce701846a3d3582e1dfa5557fe981e86f2140
2022-08-17 15:49:59 +08:00
Jiyong Park
46afe63eaf Build libwifi-hal-* modules only for the first arch
Previously, the build rules assumed that the target supports both 64 and
32 bit architectures, which isn't true for 32-bit-only targets. That
caused build breakage on such targets. Fixing that by building the
modules only for the first architecture (64 on 64-only or 64/32 target,
and 32 on 32-only target).

Bug: 241916304
Test: build the 32-bit-only target
Merged-In: I5353ab1561622eae12e2dff87eb0f17b47c3773d
Change-Id: I5353ab1561622eae12e2dff87eb0f17b47c3773d
(cherry picked from commit 3ab5c90104)
2022-08-17 16:41:19 +09:00
Jooyung Han
1e6cdac0bc android.hardware.wifi@1.0-service in soong
As libwifi-hal is migrated to soong, the service is migrated to soong as
well.

Bug: 240099735
Test: CtsWifiTestCases
Merged-In: Ie5a4ec6658d5f6aa3d4902c9c3c4b3bef9ff1cde
Change-Id: Ie5a4ec6658d5f6aa3d4902c9c3c4b3bef9ff1cde
(cherry picked from commit c4ac3355a6)
2022-08-17 16:41:10 +09:00
donghongweng
af442b177f Explicit conversion
Test: m tests
Change-Id: Ie0c00a51dee1d97239b0ef6f29334d176ddec32a
2022-08-17 06:59:51 +00:00
Changyeon Jo
e6bb228dc6 Remove color format constraints
VtsHalEvsV1_1TargetTest does not verify any behavior depending on
a frame buffer's color format.

Bug: 240685726
Test: atest VtsHalEvsV1_1TargetTest
Change-Id: I592a0a8de5fffd98178d624ee5aac4c28245d056
2022-08-17 01:03:20 +00:00
Treehugger Robot
17ca272c5b Merge "Remove keymaster HIDL entry in compat matrix." 2022-08-16 22:32:29 +00:00
Devin Moore
46c44709b7 Remove usb HIDL entry in compat matrix.
This interface has been converted to AIDL.
Test: TH
Bug: 218588089

Merged-In: Ibe2139b352ebb6bda141f227c1329c3625cc060f
Change-Id: Ibe2139b352ebb6bda141f227c1329c3625cc060f
(cherry picked from commit e3aaf55b87)
2022-08-16 20:00:03 +00:00
Devin Moore
c84280bcef Remove gnss HIDL entry in compat matrix.
This interface has been converted to AIDL.
Test: TH
Bug: 218588089

Merged-In: Ie50d679d770e56162cd4835ccdd02eda6a4cf7df
Change-Id: Ie50d679d770e56162cd4835ccdd02eda6a4cf7df
2022-08-16 19:53:17 +00:00
Xin Li
28cde8fd22 Merge "DO NOT MERGE - Merge Android 13" 2022-08-16 19:11:03 +00:00
Devin Moore
1795df99db Remove keymaster HIDL entry in compat matrix.
This interface has been converted to AIDL.
Test: TH
Bug: 218588089

Merged-In: Ibd115673d6776c94150dd57afe3e20718bc2ed8f
Change-Id: Ibd115673d6776c94150dd57afe3e20718bc2ed8f
2022-08-16 16:30:48 +00:00
Changyeon Jo
5f7a17c115 Corrects color format requirements am: bfbbba6300 am: 217a6ff310
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2182380

Change-Id: I01aaf515ad8614791deed186589074079165615a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 11:12:29 +00:00
Changyeon Jo
217a6ff310 Corrects color format requirements am: bfbbba6300
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2182380

Change-Id: I8f3a94e1872975c82432a7484aeb45db5557a0c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 10:53:54 +00:00
David Drysdale
565a883bf1 Merge "KeyMint VTS: use SCOPED_TRACE on all loops" 2022-08-16 06:03:14 +00:00
Xin Li
65270bbaae DO NOT MERGE - Merge Android 13
Bug: 242648940
Merged-In: I3ad2e2000fb0db6a62835e621bc81d77308db140
Change-Id: Iadf3ec80d74817da96c5bb6b1a139be56bcd79c0
2022-08-15 22:03:50 -07:00
Sahil Somani
590b6758c1 Merge "Updated Light HAL default implementation comment." am: 082748dd87
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2184726

Change-Id: I28a1a5751f9c677bd0658f518d532532f5db0022
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-15 19:51:55 +00:00
Sahil Somani
082748dd87 Merge "Updated Light HAL default implementation comment." 2022-08-15 19:23:56 +00:00
Sahil Somani
e08d14104c Updated Light HAL default implementation comment.
In aosp/2167085, a few placeholder lights were added to the Light
HAL default implementation. However, the comment describing
this class still said that no lights would be reported. This
has been fixed.

Test: VtsHalLightTargetTest
Bug: 240485903
Change-Id: I3ad2e2000fb0db6a62835e621bc81d77308db140
2022-08-15 17:39:28 +00:00