summaryrefslogtreecommitdiff
path: root/audio/common/all-versions/default/7.0
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-12Make AUDIO_USAGE_NOTIFICATION_EVENT available to HALsMikhail Naganov
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-05Audio HAL V7.1: Update the default implementationMikhail Naganov
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 7d01538eeccf81aa57da61b4abba830d34582195) Merged-In: Ic4c44d4ac9bbfa7b62695866b9aa7473658390b2
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-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