summaryrefslogtreecommitdiff
path: root/audio/common/all-versions/default/tests
AgeCommit message (Collapse)Author
2022-08-19Fix array out of bound in audioTransportToHal.jiabin
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 0ee75ca925f6334741d3e34c5e1d1b0efae5943b) (cherry picked from commit f16c6d3a5741768356159f099d04bfe2219c81fe) Merged-In: I1fcfa29d7841a1cb73bafb1ea92f3b1630992ae9
2022-02-09audio: Add android.hardware.audio[.common]@7.1-util modulesMikhail Naganov
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-01-25Audio HAL V7.1: Update VTSMikhail Naganov
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
2021-03-23Add AudioTransport to replace AudioProfile in AudioPort.jiabin
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-02-19audio: Put stronger rules on vendor extension enumsMikhail Naganov
The namespace part has been made mandatory. The namespace must be at least 3 characters. Bug: 176144684 Test: atest android.hardware.audio.common@7.0-util_tests Test: atest android.hardware.audio@7.0-util_tests Test: atest android.hardware.audio.effect@7.0-util_tests Change-Id: If8578dfab80b51d9c30042e99bfbf70f40598afa
2021-02-16Merge "Fix HidlUtils::deviceAddressToHalImpl for HAL V4--6"Treehugger Robot
2021-02-12Fix HidlUtils::deviceAddressToHalImpl for HAL V4--6Mikhail Naganov
Ensure that the busAddress field is used as a fallback for types of devices that may not necessary have it, e.g. for built-in microphones. Add a subset of presubmit tests for HidlUtils of V6 similar to the tests for V7. Bug: 180143301 Test: atest android.hardware.audio.common@6.0-util_tests Change-Id: I61fca8bd4342fdf496d1ca5bf2d01399fd3d34c7
2021-02-09audio: Allow specifying "default" stream type in V7Mikhail Naganov
Despite that AUDIO_STREAM_DEFAULT value of audio_stream_type_t should only used by the framework, it can still end up being passed to the HAL in port configs and offload info structures. This happens in the cases when the stream type is not actually used by the HAL. It seems natural to use an empty string as the value of AudioStreamType field in this case. Bug: 179743630 Test: atest android.hardware.audio.common@7.0-util_tests Test: make a telephone call on a device with HAL V7 Change-Id: Ia330031fca9d081627746b4f6074162835c4c54b
2021-02-03audio: Create libraries for data types in core and effectMikhail Naganov
Add 'CoreUtils' library similar to 'HidlUtils' for the types specific to the core HAL. Add 'EffectUtils' library similar to 'HidlUtils' for the types specific to the effects HAL. Move into them and de-duplicate code previously scattered across the default HAL implementation and libaudiohal. Add unit tests. Removed 'AUDIO_{INPUT|OUTPUT}_FLAG_NONE' from the list of values in the XSD file to avoid additional complexity due to equivalence of this value to an empty list of flags. Bug: 142480271 Test: m android.hardware.audio@X.0-impl Test: m android.hardware.audio.effect@X.0-impl Test: atest android.hardware.audio@7.0-util_tests Test: atest android.hardware.audio.common@7.0-util_tests Test: atest android.hardware.audio.effect@7.0-util_tests Change-Id: I71a95cbe07fcc162dc6d74ff9665747a17ce5a80 Merged-In: I71a95cbe07fcc162dc6d74ff9665747a17ce5a80
2021-01-28audio: Update common types to better match legacy structsMikhail Naganov
HAL V7 types were updated to better match data structure definitions from the legacy HAL: - Added 'AudioConfigBaseOptional' struct to match legacy structs that have 'mask' field to specify initialized fields. - All fields in 'AudioConfigBase' made mandatory. - Removed 'EffectConfigParameters' in favor of 'AudioConfigBaseOptional' and safe_unions. - Added missing enum string values to ensure that round-trip conversions from the legacy HAL to HIDL and back to legacy preserve enum values. Bug: 142480271 Test: atest android.hardware.audio.common@7.0-util_tests Test: atest VtsHalAudioV6_0TargetTest Test: atest VtsHalAudioV7_0TargetTest Test: atest VtsHalAudioEffectV7_0TargetTest Change-Id: If02a81b3f6790a8eb315fa57123141aad2419132
2021-01-07Audio: Add VTS tests for invalid enum-strings, Part 1Mikhail Naganov
Add tests that try passing invalid enum-string values to HAL methods taking enum-strings. Fix issues found in the default wrapper. Interface updates: - Update AudioConfig structure to indicate whether AudioOffloadInfo is specified. - Add return value to IStreamIn.updateSinkMetadata and IStreamOut.updateSourceMetadata to provide indication of invalid arguments. - Specify the behavior of IDevice.open{Input|Output}Stream in the case of invalid arguments vs. rejected config. Bug: 142480271 Test: atest VtsHalAudioV6_0TargetTest Test: atest VtsHalAudioV7_0TargetTest with side-loaded V7 default wrapper Change-Id: I6bd7be3869cc7a8d5d00506565bbf0b3a050b630
2020-12-16audio: Extend HidlUtils for the default wrapper needsMikhail Naganov
Add conversions used by the default wrapper. Promote some conversions to pre-V7 interface to reduce version-based forking in the default wrapper code. Bug: 142480271 Test: atest android.hardware.audio.common@7.0-util_tests Change-Id: I93c482eeaf08442271be2656693be5395ca53762 Merged-In: I93c482eeaf08442271be2656693be5395ca53762
2020-12-11Implement a.h.audio.common@7.0-util moduleMikhail Naganov
This includes a rewrite of HidlUtils for V7. A unit test is added for its conversion functions. Made necessary minor adjustments to the HAL V7 types. Also, fixed definition of 'audioFormatsList' to allow for vendor extensions. Bug: 142480271 Bug: 173647783 Test: m && atest android.hardware.audio.common@7.0-util_tests Change-Id: Ib883f1c246fce78c004846516699aa724d4b5d44 Merged-In: Ib883f1c246fce78c004846516699aa724d4b5d44