Commit graph

338 commits

Author SHA1 Message Date
Steven Moreland
35bcd1cd41 audio: save vndbinder threads
Bug: 264617136
Test: boot
Change-Id: Ife224bbcf43e4fead359982b44c80e58b5c20726
2023-02-14 19:21:18 +00:00
Andy Hung
61841ef947 Merge "audio HAL: Optimize for Spatial Audio" 2023-01-03 18:30:25 +00:00
Steven Moreland
2141a0639f audio: clean up OWNERS
I wrote a script to do this...

Bug: N/A
Test: N/A
Change-Id: I4542f9f5aa38dd94ef1d791719a27a645e7e3180
2022-12-29 23:22:02 +00:00
Andy Hung
9f788dbed8 audio HAL: Optimize for Spatial Audio
Add CAP_SYS_NICE.
Allow util_clamp_min for Spatializer Effect worker thread.
Reduce glitches caused by core migration.
Reduce power consumption as Spatializer Effect is DSP compute bound.
This change only affects Spatial Audio Effect processing.

Test: instrumented
Test: adb shell 'uclampset -a -p $(pgrep -of android.hardware.audio.service)'
Test: adb shell cat "/proc/$(adb shell pgrep -of android.hardware.audio.service)/status"
Test: adb shell 'ps -Tl -p $(pgrep -of android.hardware.audio.service)'
Bug: 181148259
Bug: 260918856
Bug: 261228892
Bug: 261686532
Bug: 262803152
Merged-In: I59ea99e8a1720f61954747f6c29e14cfea9a0f56
Change-Id: I59ea99e8a1720f61954747f6c29e14cfea9a0f56
2022-12-28 16:52:55 -08:00
Andy Hung
010aa99150 audio HAL: Enable RT priority inheritance
Test: instrumented
Bug: 181148259
Bug: 260918856
Merged-In: If56e449a9c6f1a49e372591893d8714534574e3a
Change-Id: If56e449a9c6f1a49e372591893d8714534574e3a
2022-12-27 17:38:38 -08:00
Vlad Popa
f4fe41c873 Audio HAL: Add new HAL for sound dose
The new HAL is running as part of the HIDL audio HAL process. It is
meant as a workaround for HAL implementors that can not switch to the
audio AIDL yet and need to certify with IEC62368-1 3rd edition or
EN50332-3. Note that this HAL will be deprecated in the future.

Test: atest VtsHalSoundDoseFactoryTargetTest & flash bluejay-userdebug
Bug: 257937004
Change-Id: Ifbbf235bab58c1ee2f1ea246cf98c9e8966893c0
2022-12-18 10:18:10 +01:00
Xin Li
c208de1713 Merge TP1A.221005.003
Merged-In: I1fcfa29d7841a1cb73bafb1ea92f3b1630992ae9
Change-Id: I56a99c984732258849fc58052c65371d5c31e6fc
2022-10-03 13:17:46 -07:00
Florian Mayer
4eeda58ce2 Merge "Revert "Disable FilterTest/1#FilterOutNonVendorTags on HWASan."" 2022-09-28 21:03:20 +00:00
Florian Mayer
0d8a45944f Revert "Disable FilterTest/1#FilterOutNonVendorTags on HWASan."
This reverts commit 40a4639e51.

Reason for revert: Speculative rollback after fix in b/248637663

Bug: 230535046
Change-Id: I72b5242dbc73587004e31305e3b25c13cc7b5827
2022-09-28 00:25:45 +00:00
Chih-Hung Hsieh
739fbefe2d Fix out-of-memory error.
Bug: 248637663
Test: atest android.hardware.audio.common@7.0-util_tests android.hardware.audio.common@7.1-util_tests
Change-Id: Ifb41ddc3fbfa8c9db7f3e10cede2155d28d3c8c4
2022-09-24 18:07:38 -07: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
jiabin
bbf8f4e998 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)
(cherry picked from commit f16c6d3a57)
Merged-In: I1fcfa29d7841a1cb73bafb1ea92f3b1630992ae9
2022-08-19 18:43:50 +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
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
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
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
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
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
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
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
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
Carter Hsu
76fe18d229 Merge "audio: Support 64bit configuration on 32+64bit compatible OS" am: f665b8fa86 am: 66cfe34ef4 am: 0e98137981 am: e3d00ca753
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1891181

Change-Id: Ib2580f903900723f4408ed59b4d08a4cad488c56
2021-11-17 06:13:09 +00:00
Carter Hsu
150dded787 audio: Support 64bit configuration on 32+64bit compatible OS
The default value is 'prefer32', in order to run the hardware audio
service as 64 bit on a 32+64bit OS, please add the content below
into 'device.mk':

SOONG_CONFIG_NAMESPACES += android_hardware_audio
SOONG_CONFIG_android_hardware_audio += \
	run_64bit
SOONG_CONFIG_android_hardware_audio_run_64bit := true

Bug: 205240941
Test: build pass
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: Ic7632a4f80298721512cd538ce93945b82a9981f
2021-11-16 00:44:36 +00:00
Treehugger Robot
16db22ab79 Merge "Fix the integration issue for HAL 2.2" am: c4718b793c am: 5e070c733a am: ee5538cb27 am: dda57e13d1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1881111

Change-Id: Idb9763abf1aa5c846cff4c109f122c040bb2988a
2021-11-12 13:41:43 +00:00
Alice Kuo
95ba6a2181 Fix the integration issue for HAL 2.2
Bug: 150670922
Bug: 197297498
Test: A2DP & LE aduio stream works well with HIDL 2.1/2.2
Change-Id: I64113dd4a229874b2d17ae71d088abafd8197cfd
2021-11-09 22:56:30 +08:00
Keun young Park
ab35e0a3d0 Expose HIDL HALs to car framework apex
- all HALs also get //apex_available:platform as HAL should
  be available for platform

Bug: 192665266
Test: build
Change-Id: Ic6781447628761a8e8a9aa31e473dfc340af9989
2021-10-07 23:05:53 +00:00
Mikhail Naganov
420a5407cd audio: Fix handling of relative XML include paths in VTS
Pass "no fixup base dirs" flag to the XInclude processor
to avoid modifications of the top-level elements from
included XML files as a result of "fixup."

Added tests to ensure that all relevant XInclude scenarios
work.

Bug: 192619060
Test: atest -host android.hardware.audio.common.test.utility_tests
Change-Id: Id595c9fd30be378d76387ee55a8937e0bf28d1cd
Merged-In: Id595c9fd30be378d76387ee55a8937e0bf28d1cd
2021-07-08 17:29:23 +00:00
TreeHugger Robot
55ffc45878 Merge "audio: Fix handling of relative XML include paths in VTS" into sc-dev am: 3456ce6816 am: 569611f123
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15193448

Change-Id: I0e71a9d93ff7153fa785f29e219f1b04421ddf8a
2021-07-08 16:58:22 +00:00
TreeHugger Robot
3456ce6816 Merge "audio: Fix handling of relative XML include paths in VTS" into sc-dev 2021-07-08 16:31:37 +00:00
Mikhail Naganov
13c6796528 audio: Fix handling of relative XML include paths in VTS
Pass "no fixup base dirs" flag to the XInclude processor
to avoid modifications of the top-level elements from
included XML files as a result of "fixup."

Added tests to ensure that all relevant XInclude scenarios
work.

Bug: 192619060
Test: atest -host android.hardware.audio.common.test.utility_tests
Change-Id: Id595c9fd30be378d76387ee55a8937e0bf28d1cd
2021-07-07 21:08:42 +00:00
TreeHugger Robot
f654cb4b80 Merge "Revert "audio: exclude the echo reference device in capture position test"" into sc-dev am: 8c5166b2f5 am: eb4b61958e
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15223272

Change-Id: Id48b51227ea17fea5c7921fc0e4925075e22e110
2021-07-07 18:57:31 +00:00
Mikhail Naganov
dd0e20eba3 Revert "audio: exclude the echo reference device in capture position test"
This reverts commit b22f307ccf.

Reason for revert: As explained in b/192307382#comment12, the HAL must provide capture positions for the echo reference input regardless of whether there is any actual output.

This should not affect O6/R4 as according to b/192307382#comment10, the VTS tests pass w/o this patch after the HAL has been fixed.

Bug: 192307382
Change-Id: I224bd9de1dcb2e2c8dc138dbfd85f848378aea4f
Test: VtsHalAudioV7_0TargetTest --gtest_filter=*PcmOnlyConfigInputStreamTest*
2021-07-07 17:07:15 +00:00
Carter Hsu
f03a36610c Merge "audio: exclude the echo reference device in capture position test" into sc-dev am: 0700d79feb am: ebd33b28a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15152137

Change-Id: Ia68bf040aa3b1876f60e085e07b33c28e3e8c012
2021-07-01 09:56:37 +00:00
Carter Hsu
b22f307ccf audio: exclude the echo reference device in capture position test
Bug: 192307382
Test:
VtsHalAudioV7_0TargetTest --gtest_filter=*PcmOnlyConfigInputStreamTest*
Signed-off-by: Carter Hsu <carterhsu@google.com>
Change-Id: I4e38e093bc3be7ee54c0c7cce4d1181e260a23bb
2021-06-30 06:55:24 +00:00
Mikhail Naganov
9a88b5b110 audio: Ignore SIGPIPE in the default audio HAL wrapper
It could happen that a service process receives a SIGPIPE
while providing a dump due unexpected pipe closure on
the other side. This should not lead to a service
termination. Ignoring SIGPIPE is a normal practice for
system services.

Bug: 191123848
Test: adb shell kill -s 13 <pid-of-audio-hal>
Change-Id: I9c1d170b76aa27203206e8fd2ce2fc3f5431baac
2021-06-17 19:55:16 +00:00
Andy Hung
1f90e1fbf8 audio: Add device constants for HDMI EARC
Implementation check by grep -E -r  "HDMI_ARC|HDMI_EARC" .

Test: atest AudioDeviceInfoTest
Bug: 131385398
Bug: 151781316
Merged-In: Idfe27b468a9f09770a31b6b58d83de77bebc6c80
Change-Id: Idfe27b468a9f09770a31b6b58d83de77bebc6c80
2021-04-29 18:49:43 -07:00