Commit graph

23 commits

Author SHA1 Message Date
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
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
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
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
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
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
Jooyung Han
c0b24f4f13 Remove AIDL-libs from VNDK
Some are still in VNDK because they are used in other VNDK libs.

Ignore-AOSP-First: some libs are still in internal master only.

Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
(cherry picked from commit 5527adfd7f)
2022-06-14 14:08:59 +09:00
Jiyong Park
0c7505f89d V1 is the latest version of android.media.audio.common.types
As part of the AIDL API freeze for TM, the V1 of
android.media.autio.common.types was frozen. As a result,
unversioned reference to the interface now refers to the V2
of the interface, yet to be frozen. This causes ODR violation
where V1 and V2 of the interfaces are both used in the
platform.

To fix that, replaced the unversioned reference explicitly
with the reference to V1.
Bug: 225941299
Test: m
Change-Id: I8c57c730bebfe88b182d42a4bb8acea32ac4aee8
2022-04-18 18:34:32 +00:00
Jiyong Park
703e97920e Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
2022-03-31 12:01:39 +09:00
Mikhail Naganov
c39d8bffb9 Merge "audio: Add OWNERS to aidl folder" am: f325a1756c am: 508ef6caa5 am: c39ae7b60b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2025328

Change-Id: Idaf88f9cd251aaa053db4fa88b389518d94530bf
2022-03-15 01:40:45 +00:00
Mikhail Naganov
b62f1ebb19 audio: Add OWNERS to aidl folder
Bug: 205884982
Test: N/A
Change-Id: I9f49d2a9c670c7bbf45dd00d262eff6d445679ea
2022-03-14 22:10:48 +00:00
Francois Gaffie
5d7af1e971 Adding AIDL version 2 of AudioControl HAL
- Updated APIs to use PlaybackTrackMetadata (aka AudioAttributes)
instead of usage to get rid of usages list limitation.

- Add Gain Callback to notify unexpected gain changed from HAL
(as currently done for Audio Focus).

- Aggregate Callbacks within a unique IAudioControlCallback interface

Bug: b/218682011
Test: build

Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Change-Id: If74d575fad3888b698250a8ec9a6918f7cb294d7
2022-02-09 08:17:14 -08:00
Roopa Sattiraju
d1e638a312 Merge "Adding bluetooth apex and min_sdk_version" am: 85d3fae9c5 am: 9793b79ce7 am: 08e6905ff5 am: 9b8d57f1b8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1971382

Change-Id: Ie0f0b8ce5b58f0a569bd8c1a080b021be627a15a
2022-02-04 03:10:44 +00:00
Roopa Sattiraju
7455efc39a Adding bluetooth apex and min_sdk_version
Bug: 206121418
Test: Compile
Change-Id: I59dbd7a2b4758be4b90acfd419112e8b9e259219
2022-02-03 14:15:22 -08:00
Josh Wu
73cddd17b5 audio: Add AIDL definitions for Playback/RecordTrackMetadata
This is a temporary change for unblocking Bluetooth
audio AIDL development. When Audio AIDL gets
released officially, it should be overwritten.

Bug: 198812639
Test: m android.hardware.audio.common
Test: m check-vintf-all
Change-Id: Ia63135da4af4682e471e7de6b191b19e7a326a1e
Merged-In: I7064c3819d4c8e61981542ca2ccc52ca992a4ef8
2022-01-06 06:32:36 +00:00
Mikhail Naganov
32a8ef3d8e audio: Add AIDL definitions for Playback/RecordTrackMetadata
These types are used by I/O streams of the Audio HAL and
also by other HALs, so they are placed into 'a.h.audio.common'
types-only package.

Bug: 198812639
Test: m android.hardware.audio.common
Test: m check-vintf-all
Change-Id: I7064c3819d4c8e61981542ca2ccc52ca992a4ef8
2021-10-27 14:10:37 -07:00