Specifies how HAL needs to handle the frame counter
for input and output streams on standby and flush.
Also add whitespaces before "Optional method" spec
for better readability.
Bug: 161253754
Test: in progress
Change-Id: I357739a2382f9425da74fcddbe7ab720be1f0e18
Update IStreamOutEventCallback.hal interface with respective keys for
audio presentation, which are defined as part of AudioMetadata
interface.
Change-Id: I8941e71c682408cb36d0e3725df093f50a4d5fcb
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
The default implementation switched to use the "enums"
module generated from the audio_policy_configuration.xsd schema.
This drops the dependency on libxml2 library and reduces
PSS and private dirty memory usage.
Bug: 180413957
Test: atest VtsHalAudioV7_0TargetTest
Change-Id: If7c110cd2bd2698923957b39906a0896d18065dd
This format refers to the IEC 60958 specification. It can be used when
patching HDMI inputs. IEC 60958 can transport PCM and compressed audio.
Test: m
Change-Id: Idfafb3e2dc73ffb26529d797dce86f8419e5f75d
HAL V7 uses spaces instead of ',' and '|' for delimiting
elements in channel masks, sample rates, and flags lists
in the Audio Policy Manager configuration XML.
The version specified in the APM XML has been updated
from '1.0' to '7.0' in order to reflect this.
The migration script has been updated to change the
version in the XML on update.
Bug: 142480271
Test: m
Change-Id: I92c206dddee6964fc2019fed80435cb8d69dbfe9
MPEG-H is a new surround audio codec. Add new enum format for MPEG-H in
the HIDL interface. Though MPEG-H has different profiles and audio
levels, only low complexity and baseline with audio level as 3 and 4 is
defined in this CL as they are relevant for the current and upcoming
commercial services.
Bug: 178619392
Test: make
Change-Id: I5672f3874f6cffe31a83b6d7e351d0bf56bfd038
Merged-In: I5672f3874f6cffe31a83b6d7e351d0bf56bfd038
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
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
Add checks for rejection of invalid port configs.
Fix the default implementation to pass the tests.
Clarified that patch-related operations in IDevice
are optional.
Bug: 142480271
Test: atest VtsHalAudioV6_0TargetTest
Test: atest VtsHalAudioV7_0TargetTest
with side-loaded V7 default wrapper
Change-Id: I08e85d4883938b4d8f3c411be9fb1bd597eea0c2
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
During this conversion, the functionality of the V7 wrapper
hasn't been tested yet. This will be done in a separate CL
that will also include required updates to the VTS tests.
Since the changes were made to the code shared with pre-V7
versions, verified that V6 HAL didn't regress.
Bug: 142480271
Test: atest VtsHalAudioV6_0TargetTest
Test: m VtsHalAudioV7_0TargetTest
Change-Id: I0e42fe1279912ffa78ce40c69f6aa2054e84d385
Merged-In: I0e42fe1279912ffa78ce40c69f6aa2054e84d385
Converted comments into docstrings for enums and structures
in Audio HAL V7 definition.
Bug: 142480271
Test: m
Change-Id: Id5e36e7a42e2600ab69612819f8260110871c711
Merged-In: Id5e36e7a42e2600ab69612819f8260110871c711
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
This addresses long-standing TODOs in system/audio.h.
Annotated the following enums:
- AudioMicrophoneChannelMapping;
- AudioMicrophoneLocation;
- AudioMicrophoneDirectionality.
This allows removing hand-written conversion functions
since the values are guaranteed to match between HIDL and
system/audio.h.
Bug: 122858783
Test: m
Change-Id: I2bf250ef9154a7ae86679afa566c80dfd01f1d5b
Merged-In: I2bf250ef9154a7ae86679afa566c80dfd01f1d5b
Major change: audio-base.h is generated from "core" types.hal,
new file audio_common-base.h is generated from "common" types.hal.
In order to be able to add system-only constants to generated
enums, the latter are made anonymous, values got "HAL_" prefix.
Then in system/audio.h a full enum is constructed.
Removed audio_drain_type_t from exported, as it belongs to
libhardware only.
Added missing enums that were introduced at the system side
only in Android R.
Bug: 122858783
Test: m
Change-Id: I8c017912395a03beacea077fd562fae2329ad975
Merged-In: I8c017912395a03beacea077fd562fae2329ad975
- Changed package to use android. prefix
- Added nullability flag to xsd_config
Bug: 171572311
Test: built and atest VtsHalAudioEffectV7_0TargetTest
VtsHalAudioEffectV7_0TargetTest VtsHalAudioEffectV4_0TargetTest
VtsAidlHalAudioControlTest
Change-Id: I9ac83a98256404313b5efef17c0a164d2ee72136
Merged-In: I9ac83a98256404313b5efef17c0a164d2ee72136
Enum values defined in the XSD now correspond to the
"no system definitions" lists of enums in
system/media/audio/audio-hal-enums.h.
Added channel masks that used to be in s/m/a/audio-base-utils.h.
Removed use of "vectors of vectors" for channel masks
since individual channels are not allowed to be used
in the APM config and at the HAL transport level.
Fixed definition of the gain mode of audio ports:
1. Since it's a bit mask in the framework, it must be a list in
the audio policy configuration XML file. Note that the old
definition is compatible with the new one as one element is a
valid list.
2. As gain mode is defined in the XSD file, it shouldn't be
defined again in types.hal.
Bug: 122858783
Bug: 142480271
Test: audio smoke tests
Change-Id: I2df5eb4bc4a393611d3adb0ee30583767197591b
Merged-In: I2df5eb4bc4a393611d3adb0ee30583767197591b
- rename AudioBasicConfig -> AudioConfigBase to better
match a similar structure in audio.h;
- define AudioProfile structure for defining an I/O profile;
- use AudioProfile to replace IStream.getSupported* methods
with a single IStream.getSupportedProfiles method;
- define AudioDevice type for convenience and clarity;
- move enums definition for AudioInputFlags and AudioOutputFlags
into XSD. This allows parsing APM config w/o depending on
the framework code.
Bug: 142480271
Test: m
Change-Id: I1951b2de383751fe53b96954dfd02cdd1ab6cc8f
Merged-In: I1951b2de383751fe53b96954dfd02cdd1ab6cc8f
Update channel mask and SR lists to conform to XSD.
Added a script for converting existing APM XML files.
Bug: 142480271
Test: m
Change-Id: I986b9bccdade5fa850b06b033143388715a656af
Merged-In: I986b9bccdade5fa850b06b033143388715a656af
This is an automated copy performed using copyHAL.sh script.
Bug: 142480271
Test: m
Change-Id: Ifd91cc0bb59608cd92d1d8e4e76c3abea0a8da5e
Merged-In: Ifd91cc0bb59608cd92d1d8e4e76c3abea0a8da5e