Commit graph

1271 commits

Author SHA1 Message Date
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
Mikhail Naganov
563238913b Audio HAL V7.1: Update VTS
Mechanical updates from global greps. Updated test code
to use new methods from V7.1.

Added missing checks for null pointers in
PcmOnlyConfig...StreamTest::releasePatchIfNeeded for V7.

Bug: 214426419
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Id3a99993bf2ee0c87d44f668d759f7c10db9a435
(cherry picked from commit 40fde0bc07)
Merged-In: Id3a99993bf2ee0c87d44f668d759f7c10db9a435
2022-02-05 00:44:59 +00:00
Mikhail Naganov
8140f5660a Audio HAL V7.1: Update the default implementation
Split versions of "common" and "core" types from
the version of the interfaces. "Common" and "core"
versions are set to 7.0.

Implemented new methods of V7.1 interfaces.

Bug: 214426419
Test: m android.hardware.audio@7.1-impl
Test: m android.hardware.audio@7.0-impl
Test: m android.hardware.audio.effect@7.0-impl
Test: m android.hardware.audio@6.0-impl
Change-Id: Ic4c44d4ac9bbfa7b62695866b9aa7473658390b2
(cherry picked from commit 7d01538eec)
Merged-In: Ic4c44d4ac9bbfa7b62695866b9aa7473658390b2
2022-02-05 00:44:17 +00:00
Mikhail Naganov
51a7e13849 Audio HAL V7.1: Interfaces & types
Introduced V7.1 of the core HAL. The only added methods of
the interfaces are those for creating objects implementing
the new version. HIDL types are from V7.0.

APM XSD is cloned for adding new enums. Provided the minor
update for the enums utility library.

CTS-Coverage-Bug: 215647214
Bug: 214426419
Test: m
Change-Id: I3caa2fda2fb5d7d8e8292e23fb2cf0e32e05c146
(cherry picked from commit a0cd944914)
Merged-In: I3caa2fda2fb5d7d8e8292e23fb2cf0e32e05c146
2022-02-05 00:43:27 +00:00
TreeHugger Robot
9290c6f326 Merge "audio: Remove IStreamIn@7.1" 2022-02-04 20:25:14 +00:00
Eric Laurent
7fc5feab4f Merge "audio VTS: add tests for latency mode APIs" 2022-02-04 19:04:05 +00:00
Eric Laurent
bcfa0f45b9 audio VTS: add tests for latency mode APIs
Add test cases for latency mode control APIs in V7.1 VTS.

Bug: 210803914
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: I22691f97a5c9b54f4fdec0c5cd2bd64486d0dd76
2022-02-04 11:27:16 +01:00
Carter Hsu
bb2fe3f4d5 audio: add Ultrasound materials to 7.1
Bug: 200256985
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I50ba1272c0b29e482532010f1aca0b6ec83e925c
2022-02-04 10:08:07 +00: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
9b8d57f1b8 Merge "Adding bluetooth apex and min_sdk_version" am: 85d3fae9c5 am: 9793b79ce7 am: 08e6905ff5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1971382

Change-Id: I185aa635544c1c90584e9279923a6541a56f2f5c
2022-02-04 02:57:20 +00:00
Mikhail Naganov
893ea21681 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
2022-02-04 00:49:19 +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
Mikhail Naganov
7a8e9ac343 Merge "audio: Add IDevice.setConnectedState_7_1 method" 2022-02-01 20:52:49 +00:00
Mikhail Naganov
533f78f411 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
2022-01-31 22:43:51 +00:00
Eric Laurent
2553bd829b Merge "audio: add new enums for 7.1 HAL" 2022-01-31 21:01:59 +00:00
Mikhail Naganov
a792d555b2 Merge "audio: Add recommended mute duration attribute to APM XSD" 2022-01-31 19:49:30 +00:00
Mikhail Naganov
b6800fc715 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
2022-01-29 00:44:50 +00:00
Eric Laurent
040984fd44 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
2022-01-27 21:05:47 +01:00
Eric Laurent
5b8529a1da 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
2022-01-27 21:05:04 +01:00
Mikhail Naganov
9b5dcd32aa Merge changes from topic "b-214426419-hal-v7_1"
* changes:
  Audio HAL V7.1: Update VTS
  Audio HAL V7.1: Update the default implementation
  Audio HAL V7.1: Interfaces & types
2022-01-26 18:57:31 +00:00
Treehugger Robot
0e19cd154f Merge "audio VTS: Update SetConnectedStateInvalidDeviceAddress" am: 3812519bc1 am: 9f7d0a7f55 am: f0f4df7c2c am: b79dbd949e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1959939

Change-Id: I68d653ddce2cb901742fb01dc206b41b4ea8f5b7
2022-01-25 21:18:28 +00:00
Treehugger Robot
b79dbd949e Merge "audio VTS: Update SetConnectedStateInvalidDeviceAddress" am: 3812519bc1 am: 9f7d0a7f55 am: f0f4df7c2c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1959939

Change-Id: I812ee096e0800c16901c7b5577376f7b5e48e959
2022-01-25 21:06:36 +00:00
Mikhail Naganov
4993240b9c audio VTS: Update SetConnectedStateInvalidDeviceAddress
Allow IDevice.setConnectedState to return NOT_SUPPORTED
when invalid device address is passed in.

Bug: 214426419
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: I5084cbeedc10696e215c8decc235433849c3bfce
2022-01-25 02:29:15 +00:00
Mikhail Naganov
40fde0bc07 Audio HAL V7.1: Update VTS
Mechanical updates from global greps. Updated test code
to use new methods from V7.1.

Added missing checks for null pointers in
PcmOnlyConfig...StreamTest::releasePatchIfNeeded for V7.

Bug: 214426419
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Id3a99993bf2ee0c87d44f668d759f7c10db9a435
2022-01-25 01:24:52 +00:00
Mikhail Naganov
7d01538eec Audio HAL V7.1: Update the default implementation
Split versions of "common" and "core" types from
the version of the interfaces. "Common" and "core"
versions are set to 7.0.

Implemented new methods of V7.1 interfaces.

Bug: 214426419
Test: m android.hardware.audio@7.1-impl
Test: m android.hardware.audio@7.0-impl
Test: m android.hardware.audio.effect@7.0-impl
Test: m android.hardware.audio@6.0-impl
Change-Id: Ic4c44d4ac9bbfa7b62695866b9aa7473658390b2
2022-01-25 01:24:52 +00:00
Mikhail Naganov
a0cd944914 Audio HAL V7.1: Interfaces & types
Introduced V7.1 of the core HAL. The only added methods of
the interfaces are those for creating objects implementing
the new version. HIDL types are from V7.0.

APM XSD is cloned for adding new enums. Provided the minor
update for the enums utility library.

CTS-Coverage-Bug: 215647214
Bug: 214426419
Test: m
Change-Id: I3caa2fda2fb5d7d8e8292e23fb2cf0e32e05c146
2022-01-25 01:24:52 +00:00
Treehugger Robot
395e94b74b Merge "VTSHalAudio: Increase test timeout for V6 and V7" am: 11a4d832fe am: d968376429 am: e37cf3e025 am: cb4870847d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1957459

Change-Id: I89f90463debc6d77053f0ad5ace5ebd7d6596399
2022-01-24 19:01:41 +00:00
Treehugger Robot
cb4870847d Merge "VTSHalAudio: Increase test timeout for V6 and V7" am: 11a4d832fe am: d968376429 am: e37cf3e025
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1957459

Change-Id: I5024d838f690668faa54d551b300156994437811
2022-01-24 18:41:24 +00:00
Mikhail Naganov
57633e5a78 VTSHalAudio: Increase test timeout for V6 and V7
V6 and V7 use actual device audio configuration
when testing I/O streams functionality. On low-end
TV devices this can cause the test to run for
significant time due to lower CPU speed and the
amount of multichannel configurations.

From testing on real devices, the timeout value
of 5 minutes seems to be adequate.

Bug: 211945822
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: Ie233e014f9f3650f58319c4d5f5a836cfdea87ba
2022-01-21 21:27:34 +00:00