Commit Graph

1138 Commits

Author SHA1 Message Date
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
Mikhail Naganov
8fca300256 audio: Fix fixed size char array conversions
For legacy HAL strings that are fixed size arrays
the conversion code was using the array size for
the HIDL string size. This lead to logging of error
messages during reverse conversion.

Fixed issue and refactored code to avoid duplication.

Bug: 181269159
Test: atest android.hardware.audio.effect@7.0-util_tests
      also, verify that no error messages from EffectUtil
      appear during boot and audio playback
Change-Id: Iac36ff33e65c502966ac2b7a4870cb5830545b23
2021-03-30 15:53:00 -07:00
TreeHugger Robot
457837f6b2 Merge "audio: Use get_audio_port_v7 in the default wrapper" into sc-dev 2021-03-30 20:00:55 +00:00
Mikhail Naganov
5a9c80205e Merge "audio: Fix flakiness of HalAudioStreamWorkerTest" am: f6a701efeb am: 4ccb4f9642 am: a88897bc20
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1656759

Change-Id: Ife3f922719b54be78e896f8c133cbc2c350c9bc7
2021-03-30 19:33:22 +00:00
Mikhail Naganov
f6a701efeb Merge "audio: Fix flakiness of HalAudioStreamWorkerTest" 2021-03-30 17:58:01 +00:00
Mikhail Naganov
aa3c9d5444 audio: Fix VTS PCM Input tests for certain h/w platforms am: a620ab760b am: e4804a0711 am: ad2f832b37
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1652995

Change-Id: I6a04fddeb61093f1ba0252d4cbf520f47a1b0728
2021-03-29 22:07:17 +00:00
Mikhail Naganov
baf159701d audio: Fix flakiness of HalAudioStreamWorkerTest
Instead of relying on an atomic counter, use CV-based
synchronous switching.

Bug: 183713893
Test: atest --host --iterations 1000 HalAudioStreamWorkerTest
Change-Id: I586c3b8ec8b280cf68b97d3878627eb5a2bf9567
2021-03-29 18:37:39 +00:00
Mikhail Naganov
a620ab760b audio: Fix VTS PCM Input tests for certain h/w platforms
Some h/w platforms require more metadata to be provided
for input streams. Otherwise, opening of a stream was
failing internally in the vendor HAL code and capture
position queries were not succeeding.

Bug: 183688436
Test: atest VtsHalAudioV7_0TargetTest
  on C1, C2, R3, S4, B5
Change-Id: Icb6d2cdb9150eb65281df2a4bea6dbe1fc6034c2
2021-03-29 10:29:58 -07:00
Mikhail Naganov
3a11427073 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
2021-03-24 20:46:10 -07:00
Jiabin Huang
e565a9967d Merge "Add AudioTransport to replace AudioProfile in AudioPort." am: 5bbfdbfbeb am: 3225bc292a am: 40d8d1eac6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1650659

Change-Id: I685be54e0baf5bf6e55a026378c00ce05b949ca0
2021-03-24 20:39:38 +00:00
jiabin
574a86fa36 Add AudioTransport to replace AudioProfile in AudioPort.
An AudioTransport contains AudioProfile or hardware descriptor to
describe the audio capabilities for an AudioPort and the encapsulation
type to represent the encapsualtion format that must be used when
sending the audio data with the format associated the AudioTransport to
Android.

The hardware descriptor will be used when the format is not recognized
by the platform.

Currently, the short audio descriptor is added as one of the hardware
descriptors. Short audio descriptor is reported from EDID for HDMI.

Bug: 131736540
Bug: 178619392
Test: atest android.hardware.audio.common@7.0-util_tests
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: Ic5ed9ff9b694511fdd7e90cdcda2777bdfa74f65
2021-03-23 17:22:38 -07:00
Treehugger Robot
9f51a855cf Merge "audio: Add VTS tests for reads and writes" am: bbc243fd44 am: 9624f020b3 am: 96d57f0d81
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1642746

Change-Id: Id827cb29db3c5095c22d0d8b0d7b014825a65462
2021-03-22 10:44:23 +00:00
Treehugger Robot
bbc243fd44 Merge "audio: Add VTS tests for reads and writes" 2021-03-22 08:40:25 +00:00
Mikhail Naganov
5a78d9c221 audio: Add VTS tests for reads and writes
Tests verify actual reading / writing from input and output
streams and the capture / presentation position reporting.
Tests use audio policy manager configuration.

Bug: 161253754
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: I408f7ee8df8671b7496040fe5ddd8a380672c21d
2021-03-19 13:33:26 -07:00
Mikhail Naganov
ef152f274b Merge "audio: Update OWNERS" am: 2ad6484fc7 am: c5fb904fb7 am: 73bf722993
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1646456

Change-Id: Ide8d35721fd9f9cbb90c243759648b30b262db78
2021-03-19 18:43:42 +00:00
Mikhail Naganov
c12d5adea8 audio: Update OWNERS
Add missing OWNERS files for default implementation and
utilities code.

Remove krocard@, add ytai@ to ST HAL default implementations.

Test: N/A
Change-Id: I22734cd7382c0988d0c6001164deb775e9ae55c0
2021-03-18 23:28:58 +00:00
Mikhail Naganov
561b36e2fd Merge "audio: Use strings for EffectDescriptor.{name|implementor}" am: f1fa44dd91 am: 760ee4248d am: f953ef463a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1634059

Change-Id: I27f9457162ae9bf753cde529eaef1ddfd5c2cbc6
2021-03-16 01:54:57 +00:00
Mikhail Naganov
660a86de6a audio: Use strings for EffectDescriptor.{name|implementor}
The use of fixed size char arrays was a direct copy
of the C structure approach. In HIDL, the canonical approach
is to use strings.

Bug: 181883090
Test: atest android.hardware.audio.effect@7.0-util_tests
Change-Id: I468810e07e5ba8b3bd6f03c5acfa24009ef2e48a
2021-03-13 00:07:59 +00:00
Treehugger Robot
35d476c020 Merge "audio: Fix comment on RecordTrackMetadata.tags" am: 673b2f10fc am: 82041c6982 am: fd77f2df9d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1626961

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5130ddb938659cb57ef2d144e047bf74ce79214b
2021-03-11 10:08:47 +00:00
Treehugger Robot
673b2f10fc Merge "audio: Fix comment on RecordTrackMetadata.tags" 2021-03-11 07:55:00 +00:00