Commit graph

1303 commits

Author SHA1 Message Date
jiabin
315925d83b [automerge] Fix array out of bound in audioTransportToHal. 2p: f16c6d3a57 2p: 0d43585645 am: 3074154353
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/19214732

Change-Id: Id833d761f83192c1f6fe912318bde91bb7d42761
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 23:27:13 +00:00
jiabin
3074154353 [automerge] Fix array out of bound in audioTransportToHal. 2p: f16c6d3a57 2p: 0d43585645
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/19214732

Bug: 237288416
Bug: 237717857
Change-Id: I65135fa57c7ba449ad856ef5b4081c3580fb4c6f
Merged-In: I1fcfa29d7841a1cb73bafb1ea92f3b1630992ae9
2022-07-07 23:25:08 +00:00
jiabin
f16c6d3a57 Fix array out of bound in audioTransportToHal.
The number of audio profile and extra audio descriptor must not be
greater than the maximum value.

Bug: 237288416
Bug: 237717857
Test: repo step in bug
Test: atest android.hardware.audio.common@7.0-util_tests
Change-Id: I1fcfa29d7841a1cb73bafb1ea92f3b1630992ae9
Merged-In: I1fcfa29d7841a1cb73bafb1ea92f3b1630992ae9
(cherry picked from commit 0ee75ca925)
2022-07-07 23:24:30 +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
Mikhail Naganov
ceae2a604e Update VtsHalAudioPolicyV1_0TargetTest to match XML changes
There was a proposal for a backward-compatible XML schema change
(https://android-review.googlesource.com/q/I1bf31c6bf6c57c9b79f0d5751601aa77780f1f80)
which had a mistake. Express the change correctly to match
the implementation.

Bug: 231929160
Test: atest VtsHalAudioPolicyV1_0TargetTest
Change-Id: Id581e290740a3c00ba3719a339c9bc47d730f35c
(cherry picked from commit 356bb458dc)
Merged-In: Id581e290740a3c00ba3719a339c9bc47d730f35c
2022-05-19 16:48:47 +00:00
Mikhail Naganov
431154230c Update VtsHalAudioPolicyV1_0TargetTest to match XML changes
There was a proposal for a backward-compatible XML schema change
(https://android-review.googlesource.com/q/I1bf31c6bf6c57c9b79f0d5751601aa77780f1f80)
which had a mistake. Express the change correctly to match
the implementation.

Bug: 231929160
Test: atest VtsHalAudioPolicyV1_0TargetTest
Change-Id: Id581e290740a3c00ba3719a339c9bc47d730f35c
Merged-In: Id581e290740a3c00ba3719a339c9bc47d730f35c
(cherry picked from commit 356bb458dc)
2022-05-12 18:29:21 +00:00
Sadaf Ebrahimi
d10fba30be Merge "Track libxml2 API changes." am: 3096c58650 am: d21a771983
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2089706

Change-Id: I4bca5b13916b65bfd1681c5d9929daa606a33d6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 00:54:52 +00:00
Elliott Hughes
2aa03ce7bd Track libxml2 API changes.
This function is now deprecated upstream, and their advice is to just
not call it; xmlCleanupParser() will do this stuff anyway.

Test: treehugger
Change-Id: I38a80d1f77c1beb2c1c8088a9e0df3bb0cbd9496
2022-05-10 14:20:21 -07:00
Andy Hung
35d0cea7c1 Merge "Effect: benchmark the effect process" into tm-dev am: dc48405431
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/17976409

Change-Id: Idac90ac0925eec06807d36fa51318511e5f0c80c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 19:35:56 +00:00
Andy Hung
dc48405431 Merge "Effect: benchmark the effect process" into tm-dev 2022-05-06 19:14:19 +00:00
Mikhail Naganov
1fa5032290 audio VTS: Fix handling of ULTRASOUND sources am: 50ead27609 am: 7462ae59b9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2088105

Change-Id: Id38cfd10001babbb129adb32006171d1feebaaad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 19:52:03 +00:00
Mikhail Naganov
50ead27609 audio VTS: Fix handling of ULTRASOUND sources
When opening a stream on an ultrasound input
(AUDIO_INPUT_FLAG_ULTRASOUND), the source type
AUDIO_SOURCE_ULTRASOUND must be used.

Bug: 231275185
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Ib1fb5b8218eb0c52edf31789fa937c0a8b6c5082
Merged-In: Ib1fb5b8218eb0c52edf31789fa937c0a8b6c5082
(cherry picked from commit 1ce9d5488a)
2022-05-05 16:47:22 +00:00
Mikhail Naganov
abc4ffe565 audio VTS: Fix handling of ULTRASOUND sources
When opening a stream on an ultrasound input
(AUDIO_INPUT_FLAG_ULTRASOUND), the source type
AUDIO_SOURCE_ULTRASOUND must be used.

Bug: 231275185
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Ib1fb5b8218eb0c52edf31789fa937c0a8b6c5082
Merged-In: Ib1fb5b8218eb0c52edf31789fa937c0a8b6c5082
(cherry picked from commit 1ce9d5488a)
2022-05-05 16:33:12 +00:00
Andy Hung
502f9d017a Effect: benchmark the effect process
Required for Spatializer tuning.

Test: adb shell dumpsys media.audio_flinger
Bug: 228862341
Change-Id: I59f3b35c9cdd1e45e9afc79cbf9aac30a5decd67
2022-05-04 13:14:55 -07:00
Treehugger Robot
45759188e9 Merge "Disable FilterTest/1#FilterOutNonVendorTags on HWASan." am: e19d685e2f am: 3aded47933
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2076912

Change-Id: Id1d2f0cc9b92673b530a7e97200f381d251dd13f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:06:27 +00:00
Florian Mayer
40a4639e51 Disable FilterTest/1#FilterOutNonVendorTags on HWASan.
Bug: 230535046
Change-Id: I0f1d4ff10b98fe5311a3db785560b658133ed551
2022-04-26 17:37:35 -07:00
Mikhail Naganov
83cf51eb33 VTSHalAudio: Increase test timeout for V6, V7.x to 10 minutes
TV devices can list a lot of configurations and have low
performing CPUs which causes the test to run for a significant
amount of time. From b/229824670 it seems that 10 minutes
should be enough.

Bug: 229824670
Test: atest VtsHalAudioV6_0TargetTest
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Id7fa8eaa98bf2437fd1f676b9e5a7290df260fbd
(cherry picked from commit 0b9b03eb71)
Merged-In: Id7fa8eaa98bf2437fd1f676b9e5a7290df260fbd
2022-04-23 01:11:16 +00:00
Mikhail Naganov
58cbc578c8 VTSHalAudio: Increase test timeout for V6, V7.x to 10 minutes am: 0b9b03eb71 am: c798728d4e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2072327

Change-Id: I8e6cac78432c5b0939d8743c7bffbbed73871db2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 02:18:48 +00:00
Mikhail Naganov
0b9b03eb71 VTSHalAudio: Increase test timeout for V6, V7.x to 10 minutes
TV devices can list a lot of configurations and have low
performing CPUs which causes the test to run for a significant
amount of time. From b/229824670 it seems that 10 minutes
should be enough.

Bug: 229824670
Test: atest VtsHalAudioV6_0TargetTest
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Id7fa8eaa98bf2437fd1f676b9e5a7290df260fbd
2022-04-21 18:52:32 +00: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
Mikhail Naganov
d6191e1899 audio: Require exact implementation version match am: 7c92256c1a am: 541eb4099c am: 5571021c52
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2058922

Change-Id: I230abccbbd62b6dbb3cafead89ddfea5ff050154
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 17:20:10 +00:00
Mikhail Naganov
7c92256c1a audio: Require exact implementation version match
Align the behavior of minor version mismatch with the behavior
of major version mismatch. For example, trying to run VTS test
intended for V7.0 on a device with V7.1 yields no results,
similar to what happens when running a V6.0 test on V7.0 device.
This is done to avoid test failures when the device uses
features added by V7.1 in the APM XML config.

Bug: 227150535
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: I8ad6595a221f0bc9aedea057f27a75c172954da5
2022-04-12 00:06:09 +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
William Escande
d9d513fd47 Clear apex.go entries for bluetooth libs
Test: Build + TH + boot phone & use bluetooth
Bug: 216433795
Change-Id: Ib1f9fee90006c73e5726a208e6cba8647967f5f4
2022-03-02 20:27:06 +01:00
Chih-hung Hsieh
34593d4e2a Merge "Add timed out test files to tidy_timeout_srcs" am: ff54f73b4f am: fa83970b3a am: 581616e658
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1992232

Change-Id: I2eac13fe3b5ab0b4f15d6ceadf376e5e74124a81
2022-02-24 01:32:09 +00:00
Chih-Hung Hsieh
ad1bf31b78 Add timed out test files to tidy_timeout_srcs
* Timed out runs do not show any warning messages.
* These test files cannot finish clang-tidy runs with
  the following settings:
    TIDY_TIMEOUT=90
    WITH_TIDY=1
    CLANG_ANALYZER_CHECKS=1
* When TIDY_TIMEOUT is set, in Android continuous builds,
  tidy_timeout_srcs files will not be compiled by clang-tidy.
  When developers build locally without TIDY_TIMEOUT,
  tidy_timeout_srcs files will be compiled.
* Some of these test modules may be split into smaller ones,
  or disable some time consuming checks, and then
  enable clang-tidy to run within limited time.

Bug: 201099167
Test: make droid tidy-hardware-interfaces_subset
Change-Id: I1de28f1572fff368f67eab512fffec9f2e5c2a9b
2022-02-18 17:25:41 -08:00
Treehugger Robot
4f4c01be3a Merge "Audio: Load Bluetooth AIDL HAL" am: 9938caf08b am: ea8522964b am: c43c0bcbf8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1942860

Change-Id: Ia88c5a97417146792a10632300939c943a28f001
2022-02-17 01:37:01 +00:00
Josh Wu
3f8f5997ad Audio: Load Bluetooth AIDL HAL
Test: m android.hardware.audio.service
Bug: 203490261
Change-Id: If518ed69331489bd9aeb2a0c58e17c2917e3c0cf
2022-02-16 12:01:59 -08:00
Jasmine Cha
b0a67561e6 audio: use binder threadpool am: d90c47420a am: 142ba0857b am: cc75285f2e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1986309

Change-Id: I77d258201a43d69555e6ac4bbba2831674f40958
2022-02-16 05:44:50 +00:00
Jasmine Cha
d90c47420a audio: use binder threadpool
Support to communicate with other service with AIDL interface.

Bug: 215463744
Test: build pass

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I13da2121623779b0ba21d29cf39c11abc7b96dd9
2022-02-16 10:07:57 +08:00
Mikhail Naganov
872beb16ee Make AUDIO_USAGE_NOTIFICATION_EVENT available to HALs am: a85cebb63e am: 783f8f14e2 am: 6ae5c189c2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1983828

Change-Id: Ibb5768f2e6ad8d7d2eba6caece5f7a495d7d2bd6
2022-02-14 18:34:05 +00:00
Mikhail Naganov
e6214078ba audio VTS: Fix HAL device management
Straighten out logic in DeviceManager for proper handling
of IPrimaryDevice and IDevice instances across all supported
HAL versions.

This fixes a recently introduced bug which was causing
the same HAL device to be opened twice in a row, and then closed
twice.

Bug: 218610286
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: I415cbadae9d325ac63160e49e5e638906c8c63fd
(cherry picked from commit 285c0a041c)
Merged-In: I415cbadae9d325ac63160e49e5e638906c8c63fd
2022-02-12 00:35:19 +00:00
Mikhail Naganov
a85cebb63e Make AUDIO_USAGE_NOTIFICATION_EVENT available to HALs
This aligns the list of usages between the framework
and HALs

Bug: 199193042
Test: atest android.hardware.audio@7.1-util_tests
Test: atest android.hardware.audio.common@7.1-util_tests
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: I4d7fdbacff87eebcbc8d68dd6ed8cefdd52aa84e
2022-02-12 00:03:49 +00:00
Mikhail Naganov
ec8ef38ad9 audio: Add android.hardware.audio[.common]@7.1-util modules
android.hardware.audio.common@7.1-util and
android.hardware.audio@7.1-util utilize the 7.1 XSD enums
conversion library and thus can work with the new
enum strings added in 7.1

Bug: 218504031
Test: atest VtsHalAudioV7_1TargetTest
Test: atest android.hardware.audio.common@7.0-util_tests
Test: atest android.hardware.audio.common@7.1-util_tests
Test: atest android.hardware.audio@7.0-util_tests
Test: atest android.hardware.audio@7.1-util_tests
Change-Id: Icc5a354cdc2e377a2a2424c28377bcb0ba05bf4e
(cherry picked from commit fa4a4f8da7)
Merged-In: Icc5a354cdc2e377a2a2424c28377bcb0ba05bf4e
2022-02-12 00:03:49 +00:00
Carter Hsu
ff62b259f8 audio: add Ultrasound materials to 7.1
Bug: 200256985
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I50ba1272c0b29e482532010f1aca0b6ec83e925c
(cherry picked from commit bb2fe3f4d5)
Merged-In: I50ba1272c0b29e482532010f1aca0b6ec83e925c
2022-02-11 23:16:53 +00:00
Mikhail Naganov
4a016add95 audio: Remove IStreamIn@7.1
This has turned out to be an empty interface. By removing
it we save about 100 kB in the interface code.

Bug: 217752112
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: I2522653600a254ddcf2c4eac8bed1df69ac11d3d
(cherry picked from commit 893ea21681)
Merged-In: I2522653600a254ddcf2c4eac8bed1df69ac11d3d
2022-02-10 17:45:31 +00:00
Mikhail Naganov
9307992466 audio: Add IDevice.setConnectedState_7_1 method
This is an updated version of IDevice.setConnectedState which
accepts a full AudioPort so that additional data like extra
audio descriptors can be passed to the audio HAL.

Bug: 211601178
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Id746caa32122dabfb83feb5b515bed7717bcb67c
(cherry picked from commit 533f78f411)
Merged-In: Id746caa32122dabfb83feb5b515bed7717bcb67c
2022-02-10 17:45:21 +00:00
Mikhail Naganov
22dc9b9aa4 audio: Add recommended mute duration attribute to APM XSD
Add 'recommendedMuteDurationMs' optional attribute to 'mixPort'
element. This attribute specifies customized mute duration while
switching device's audio path to avoid truncated sound at the
beginning.

The framework is already aware of this attribute, only need
to allow it in the XSD.

Bug: 183344508
Bug: 197823000
Test: m
CTS-Coverage-bug: 215647214
Change-Id: I3be36009d1b5db218c846efe96f078e858283992
(cherry picked from commit b6800fc715)
Merged-In: I3be36009d1b5db218c846efe96f078e858283992
2022-02-10 17:45:13 +00:00
Andy Hung
87edc66e1f Audio: Add memory leak checking for HAL
$ adb shell setprop libc.debug.malloc.program android.hardware.audio.service
$ adb shell setprop libc.debug.malloc.options backtrace=8
$ adb shell setenforce 0
$ adb shell pkill audioserver
$ adb shell dumpsys media.audio_flinger

Test: Check the audio flinger dumpsys as above.
Bug: 186054996
Bug: 187462632
Change-Id: I2e8db14b816cc4cd7e1420c538505bf71fa58c97
(cherry picked from commit 8f836b9499)
Merged-In: I2e8db14b816cc4cd7e1420c538505bf71fa58c97
2022-02-10 17:44:56 +00:00
TreeHugger Robot
b2a9e07272 Merge "audio VTS: Fix HAL device management" 2022-02-10 17:24:22 +00:00
Keun-young Park
eeb724982d Merge "Adding AIDL version 2 of AudioControl HAL" 2022-02-10 05:01:57 +00:00
Mikhail Naganov
285c0a041c audio VTS: Fix HAL device management
Straighten out logic in DeviceManager for proper handling
of IPrimaryDevice and IDevice instances across all supported
HAL versions.

This fixes a recently introduced bug which was causing
the same HAL device to be opened twice in a row, and then closed
twice.

Bug: 218610286
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: I415cbadae9d325ac63160e49e5e638906c8c63fd
2022-02-10 04:31:15 +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
Mikhail Naganov
fa4a4f8da7 audio: Add android.hardware.audio[.common]@7.1-util modules
android.hardware.audio.common@7.1-util and
android.hardware.audio@7.1-util utilize the 7.1 XSD enums
conversion library and thus can work with the new
enum strings added in 7.1

Bug: 218504031
Test: atest VtsHalAudioV7_1TargetTest
Test: atest android.hardware.audio.common@7.0-util_tests
Test: atest android.hardware.audio.common@7.1-util_tests
Test: atest android.hardware.audio@7.0-util_tests
Test: atest android.hardware.audio@7.1-util_tests
Change-Id: Icc5a354cdc2e377a2a2424c28377bcb0ba05bf4e
2022-02-09 00:26:44 +00:00
Mikhail Naganov
9a30ec87a3 audio VTS: A follow-up to latency mode APIs tests
Provide instantiation statements for the new tests.

Bug: 210803914
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: I4ed95be6e50a9dcd1362a87ec120e66abea659b6
2022-02-08 23:57:00 +00:00
Eric Laurent
16894f0e06 audio: add new enums for 7.1 HAL
Add the following enums to 7.1 audio HAL:
- Spatial audio:
   spatializer output flag
   front wide channel masks

- Bluetooth LE
 broadcast audio device

Bug: 187446271
Test: m android.hardware.audio.common@7.1-enums
Change-Id: I9bfb937ece3a07a7844877de5f355ece1141f92d
(cherry picked from commit 5b8529a1da)
Merged-In: I9bfb937ece3a07a7844877de5f355ece1141f92d
2022-02-07 19:55:51 +00:00
Eric Laurent
ed7dfd5f35 Audio HAL V7.1: Add latency mode APIs
Add APis for controlling the latency mode on an output stream.
Latency mode control is optional but mandated if spatial audio with
head tracking is supported over Bluetooth classic audio link.

Bug: 187446271
Test: m android.hardware.audio@7.1-impl
Change-Id: I363db3bf7f7b6439e326d0f6f4becc10b3947e7d
(cherry picked from commit 040984fd44)
Merged-In: I363db3bf7f7b6439e326d0f6f4becc10b3947e7d
2022-02-07 19:54:41 +00:00
Carter Hsu
c588601a15 Merge "audio: add Ultrasound materials to 7.1" 2022-02-07 02:49:05 +00:00