Commit graph

1169 commits

Author SHA1 Message Date
Jerry Wong
12b2c93b10 audio: Add AUDIO_FORMAT_DEFAULT to supported formats (V6) am: 50bf1116fc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2989191

Change-Id: Ifa60f56a93ed09f1a546989cd8231cb0df97ad4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-08 02:39:48 +00:00
Jerry Wong
50bf1116fc audio: Add AUDIO_FORMAT_DEFAULT to supported formats (V6)
Bug: 309625094
Test: atest VtsHalAudioV6_0TargetTest

Change-Id: I1f79d33fc05630392587d9a4fb2a3a20a98d6d14
2024-03-05 14:48:57 -08:00
François Gaffie
d2ab30cbe9 Audio: add system usage to audio policy engine schemas
Bug: 293917986
Test: m

Change-Id: I49a8d3cfeb45eddc95ad6ab4a33b0adf0585cde2
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
(cherry picked from commit acd4a677f0)
Merged-In: I49a8d3cfeb45eddc95ad6ab4a33b0adf0585cde2
2023-08-22 19:50:16 +00:00
Mikhail Naganov
55dd33f14f 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 e01186e117)
2023-04-18 17:36:06 +00:00
Mikhail Naganov
47365bb990 Sync audio_policy_engine_configuration.xsd with the SDK am: 7443e2f547
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2225423

Change-Id: I816fd76d13635b491c0911fe4ee6cd30a584bcd2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 16:38:42 +00:00
Mikhail Naganov
7443e2f547 Sync audio_policy_engine_configuration.xsd with the SDK
The audio_policy_engine_configuration.xsd schema was missing
four values for the usage enum. This was causing the VTS
test to fail. These usages must be specified in the audio
policy engine configuration file, otherwise a GTS test fails.

Bug: 245303963
Bug: 246231268
Bug: 246901091
Test: atest VtsHalAudioPolicyV1_0TargetTest
Change-Id: I0161ddb33e52cbca9b425c0cbb4f32f320c43af4
(cherry picked from commit 1cbe492d59)
Merged-In: I0161ddb33e52cbca9b425c0cbb4f32f320c43af4
2022-09-21 22:02:38 +00:00
Mikhail Naganov
2f7d57651a VTSHalAudio: Increase test timeout for V6 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
Change-Id: Id7fa8eaa98bf2437fd1f676b9e5a7290df260fbd
(cherry picked from commit 0b9b03eb71)
2022-04-22 01:06:09 +00:00
Mikhail Naganov
3664aad2ac 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
Change-Id: Id7fa8eaa98bf2437fd1f676b9e5a7290df260fbd
(cherry picked from commit 0b9b03eb71)
2022-04-22 01:04:23 +00:00
Mikhail Naganov
a84a1266bf 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
(cherry picked from commit 57633e5a78)
2022-01-24 18:21:02 +00:00
Mikhail Naganov
d2315fad1b audio VTS: Consider only attached devices for stream tests
V6 and V7 use the audio policy configuration file for generating
the set of test profiles. The generator must only take into
account profiles of mix ports that are routed to device ports of
attached devices. Otherwise the HAL can rightfully refuse
to create a stream for the profile when the device isn't attached.

Bug: 205808571
Test: atest HalAudioV6_0GeneratorTest
Test: atest HalAudioV7_0GeneratorTest
Test: atest VtsHalAudioV6_0TargetTest
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: I798f978c1c0bc32831c20e4b08338b462d8eea16
2021-11-24 19:01:11 +00:00
Mikhail Naganov
482a1366e9 audio: Fix handling of dynamic profiles in VtsHalAudioV7_0TargetTest
The profiles generator wasn't loading correctly from the Audio
Policy Manager config file profiles with unpopulated attributes,
which is typical for dynamic profiles.

Bug: 204314749
Test: atest HalAudioV7_0GeneratorTest
Change-Id: I514a4e03da165cacb5dbaaa16470130895681484
Merged-In: I514a4e03da165cacb5dbaaa16470130895681484
(cherry picked from commit adf84c03b8)
2021-11-04 16:30:21 +00:00
The Android Open Source Project
bb90e848b9 Merge ab/7633965
Bug: 169893837
Merged-In: I07cf1825c23e2467852d5cd93436eb9dee23b408
Change-Id: Ie9a09f85d7b24b031cb6869429a33ff1eeb84687
2021-08-12 22:39:56 +00:00
Kuowei Li
9faa583bf3 audio: Allow SetAudioProperties to not be supported
The parameter of sample rate, channel mask and format is not
mandatory to support by Audio HAL. At meantime, there is no
corresponding handle in framework.
Hence, SetAudioProperties should allow reporting not supported.

Bug: 194368657

Test: run vts -m VtsHalAudioV7_0Target
Change-Id: Id0505bfb5d4812dd4c5d31a6e9d72c4c9c0cffa2
Merged-In: Id0505bfb5d4812dd4c5d31a6e9d72c4c9c0cffa2
2021-07-22 20:39:58 +00:00
Mikhail Naganov
d11628ec78 Audio VTS: Make the active microphone query test more robust in V7
Prior to V7 the test which exercises
IStreamIn.getActiveMicrophones was using a hardcoded
configuration for the input stream. This configuration no longer
works for some of new devices. To fix that, the part of the test
which calls getActiveMicrophones has been moved into a separate
test--a descendant of InputStreamTest which is parametrized
using the actual configuration of the DUT.

Tests for HAL versions prior to V7 are not affected
because they don't use a full parser for the DUT config.

Bug: 193849687
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: I00fe8fedb6bfc6e034387b35c88f954cb2638dfa
(cherry picked from commit e4ce86bfb7)
Merged-In: I00fe8fedb6bfc6e034387b35c88f954cb2638dfa
2021-07-20 17:01:15 +00:00
TreeHugger Robot
997554db63 Merge "Audio VTS: Make the active microphone query test more robust in V7" into sc-dev 2021-07-20 16:52:02 +00:00
David Li
183f6190a8 Merge "audio: make sure to set back to AudioMode::NORMAL after the test case" into sc-dev 2021-07-20 08:20:47 +00:00
Mikhail Naganov
e4ce86bfb7 Audio VTS: Make the active microphone query test more robust in V7
Prior to V7 the test which exercises
IStreamIn.getActiveMicrophones was using a hardcoded
configuration for the input stream. This configuration no longer
works for some of new devices. To fix that, the part of the test
which calls getActiveMicrophones has been moved into a separate
test--a descendant of InputStreamTest which is parametrized
using the actual configuration of the DUT.

Tests for HAL versions prior to V7 are not affected
because they don't use a full parser for the DUT config.

Bug: 193849687
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: I00fe8fedb6bfc6e034387b35c88f954cb2638dfa
2021-07-19 23:04:15 +00:00
David Li
238fbcc61a audio: make sure to set back to AudioMode::NORMAL after the test case
If the major version is greater than or equal to 6, the test tries
to set the mode to AudioMode::CALL_SCREEN. However, it doesn't set
back to AudioMode::NORMAL. Replace all ASSERT with EXPECT to ensure the
test can reach to the explicit call to reset to AudioMode::NORMAL.

Bug: 194022995
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: Ib9b6e310965a85b016853b72c60716fa054641c6
2021-07-19 16:26:42 +08:00
Mikhail Naganov
068de276f0 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
(cherry picked from commit 13c6796528)
Merged-In: Id595c9fd30be378d76387ee55a8937e0bf28d1cd
2021-07-08 18:45:45 +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
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
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
Andy Hung
bec76e8c9e Merge "StreamOut: Fix STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED" am: 66ffc5b99a am: 1e1514be04 am: 6660615822
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1692490

Change-Id: I5bd4d6fdea2c18c9822ad061cdc24a488b148fb6
2021-05-04 21:54:03 +00:00
Andy Hung
6660615822 Merge "StreamOut: Fix STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED" am: 66ffc5b99a am: 1e1514be04
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1692490

Change-Id: I97c94630cd48b9a0354c9b76e593ea0205a633b4
2021-05-04 21:37:16 +00:00
Andy Hung
e6e3a17126 StreamOut: Fix STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED
Use audio_metadata_byte_string_len method in asyncEventCallback.

Test: atest metadata_tests
Bug: 186894288
Change-Id: I04914bc5b2c778002b53b8f8da5bf29fff5c80f8
2021-04-30 21:07:33 -07:00
Andy Hung
dd1756f22b Merge changes from topics "dra", "dts_uhd", "earc" am: b76d8e27fb am: 0b58fe1496
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1692146

Change-Id: Ia8f84c5c03dbf91fafc822ce2b1ef8480f104b7d
2021-04-30 21:28:36 +00:00
Andy Hung
ebb8be17c4 audio: Add device constants for HDMI EARC am: 1f90e1fbf8 am: a21b9b5d4e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1690703

Change-Id: I3b2bc500ca14d75ba1d0a6cc04ae6dc8784ae241
2021-04-30 21:28:35 +00:00
Andy Hung
6edb870022 Audio: Add AUDIO_FORMAT_DTS_UHD am: 3c5fcc51f5 am: 24556f0dfe
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1692125

Change-Id: Iee1f48feeb4e067daef3e46a94145c60a34a33af
2021-04-30 21:28:33 +00:00
Andy Hung
6ce19700eb Audio: Add AUDIO_FORMAT_DRA
China DTMB digital TV.
See SJ/T11368-2006
“Specification for multichannel digital audio coding technology”.

Test: atest AudioFormatTest
Bug: 185950819
Merged-In: I941c4991e598e864babfb888a8827d1625d95990
Change-Id: I941c4991e598e864babfb888a8827d1625d95990
2021-04-29 19:07:10 -07: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
Andy Hung
3c5fcc51f5 Audio: Add AUDIO_FORMAT_DTS_UHD
See ETSI TS 103 491 V1.2.1 (2019-05)
DTS-UHD Audio Format; Delivery of Channels,
Objects and Ambisonic Sound Fields

Test: atest AudioFormatTest
Bug: 184538197
Merged-In: I4123efb29a95a599982af85068f8e4468ff15159
Change-Id: I4123efb29a95a599982af85068f8e4468ff15159
2021-04-29 17:55:16 -07:00
Steven Moreland
f07b44c1f9 audio HAL - fix UAFs am: 7283cbe8cb am: e227bfd15c am: facfee6382 am: da947d5127
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/14212414

Change-Id: I7c4ba7e1ed4e7c71e10332ce986bbc7b6aba8f40
2021-04-26 23:10:51 +00:00
Steven Moreland
da947d5127 audio HAL - fix UAFs am: 7283cbe8cb am: e227bfd15c am: facfee6382
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/14212414

Change-Id: I50df59e828d44606c2fca8dc44830b5def4f9670
2021-04-26 22:46:24 +00:00
Steven Moreland
facfee6382 audio HAL - fix UAFs am: 7283cbe8cb am: e227bfd15c
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/14212414

Change-Id: I5b80e2810ef7c4010496687934d93685057d4c82
2021-04-26 22:31:02 +00:00
Andy Hung
9072e5f0db Audio: Add AUDIO_FORMAT_DRA
China DTMB digital TV.
See SJ/T11368-2006
“Specification for multichannel digital audio coding technology”.

Test: atest AudioFormatTest
Bug: 185950819
Change-Id: I941c4991e598e864babfb888a8827d1625d95990
2021-04-20 19:22:22 -07:00
Andy Hung
67047d5a03 Merge changes from topics "24ch Audio HAL", "360RA HAL" am: 2092162bc3 am: a3bba5eb95 am: 24b2eac13a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1677774

Change-Id: I88962b3c79f6a9c056bb0aefb54094d817dba109
2021-04-17 03:54:58 +00:00
Steven Moreland
7283cbe8cb audio HAL - fix UAFs
Bug: 185259758
Test: N/A
Change-Id: I5ec70b098a00746108e10ab39e966607d78c84ae
Merged-In: I5ec70b098a00746108e10ab39e966607d78c84ae
(cherry picked from commit a8ac7cf706)
2021-04-16 18:36:09 +00:00
Andy Hung
3cc6843bd5 audio: Add AUDIO_CHANNEL_OUT_22POINT2 constant
24 channel configuration for immersive audio

See new value in system/media/audio/audio-hal-enums.h.
Define the same enum to HALv7 and update getChannelCount().

Test: atest android.hardware.audio.common@7.0-util_tests
Bug: 185530406
Change-Id: I8dc5e6c504049908fef157b11ffa043ecaeacaf9
2021-04-15 18:22:42 -07:00
Kei Murayama
91ef183cf7 audio: Add AUDIO_CHANNEL_OUT_13POINT_360RA constant
13ch audio constant for 360 Reality Audio.

The enum value is added in system/media/audio/audio-hal-enums.h.
 - Define the same enum to HALv7.
 - Set 13 for the layout from getChannelCount().

Bug: 185100731
Test: Use the value on audio hal and build.
Test: Use the value on audio_policy_configuration.xml and build.
Test: atest android.hardware.audio.common@7.0-util_tests
Change-Id: Ifa37f9be96a94c623e5d4164774c39d05efbbb8b
2021-04-15 17:49:25 -07:00
TreeHugger Robot
1cabad5e1e Merge "audio HAL - fix UAFs" into sc-dev 2021-04-14 00:24:26 +00:00
Steven Moreland
a8ac7cf706 audio HAL - fix UAFs
Bug: 185259758
Test: N/A
Change-Id: I5ec70b098a00746108e10ab39e966607d78c84ae
2021-04-13 20:15:40 +00:00
Andy Hung
cf2ae43ec3 Merge "audio: Add device constants for HDMI EARC" into sc-dev 2021-04-13 00:01:50 +00:00
Jiabin Huang
9898f37ee8 Merge "Count channel mapping number from the back." into sc-dev 2021-04-12 20:16:05 +00:00
jiabin
5f82f49d4f Count channel mapping number from the back.
The channel mapping array may have leading UNUSED value. In that case,
count the channel mapping number from the back to avoid lost channel
mapping information.

Bug: 183558363
Test: repo steps in the bug
Test: atest android.hardware.audio@7.0-util_tests
Change-Id: Ic4238e520c16eb1daad7c9e92555e92637f8e7c9
2021-04-12 18:47:52 +00:00
Andy Hung
4da4945039 audio: Add device constants for HDMI EARC
Implementation check by grep -E -r  "HDMI_ARC|HDMI_EARC" .

Test: atest AudioDeviceInfoTest
Bug: 131385398
Bug: 151781316
Change-Id: Idfe27b468a9f09770a31b6b58d83de77bebc6c80
2021-04-08 21:02:25 -07:00
Andy Hung
a468cac258 Audio: Add AUDIO_FORMAT_DTS_UHD
See ETSI TS 103 491 V1.2.1 (2019-05)
DTS-UHD Audio Format; Delivery of Channels,
Objects and Ambisonic Sound Fields

Test: atest AudioFormatTest
Bug: 184538197
Change-Id: I4123efb29a95a599982af85068f8e4468ff15159
2021-04-06 10:30:36 -07:00
Mikhail Naganov
cb766d2517 audio: Use get_audio_port_v7 in the default wrapper
get_audio_port_v7 interface method was added in aosp/1518624
but wasn't used in the default wrapper due to the refactoring
ongoing at that time. Fixing this omission.

Bug: 160352965
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: I1e3594f30fe8fa319d0b5b4244531c9142870503
Merged-In: I1e3594f30fe8fa319d0b5b4244531c9142870503
2021-03-31 18:24:11 +00:00
Treehugger Robot
bfd278b89d Merge "audio: Fix fixed size char array conversions" am: ebe635f8da am: f1be92463d am: 999aa1342b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1659438

Change-Id: Ie6e0080ddd46d602b01a7521dfa452efbeff5d3f
2021-03-31 02:03:25 +00:00
Treehugger Robot
ebe635f8da Merge "audio: Fix fixed size char array conversions" 2021-03-31 00:25:55 +00:00