This module is for API check of java file generated from
audio_policy_configuration.xsd.
audio_policy_configuration.docs is added to required in
impl library because API check whenever building impl
library.
Bug: 80453829
Test: m -j && make update-api && make check-api
Change-Id: I49499ec244c390ed1e6e9e8ca77d08d7da69ac59
Without this patch vendors can not do any vendor extension extending
the audio enums as it would fails the XSD validation.
Long term, the config xml parsing should be moved in the HAL, until then
allow extension if they are prefixed with EX_.
Test: xmllint --noout --schema hardware/interfaces/audio/5.0/config/audio_policy_configuration.xsd --xinclude out/target/product/*/vendor/etc/audio_policy_configuration.xml
Bug: 117967786
Change-Id: Ie44490824b5b50fdebb50a82299ea348d2a34b84
Signed-off-by: Kevin Rocard <krocard@google.com>
So that it can be used by the Bluetooth HAL.
Test: compile
Change-Id: I2e2b1e12e1f837183c4edbd1d330a13a67d1ecae
Merged-In: I2e2b1e12e1f837183c4edbd1d330a13a67d1ecaf
Signed-off-by: Kevin Rocard <krocard@google.com>
Port audio HAL V5 to AOSP for BT HAL.
The implementation is not ported as that would require to port an
additional ~30 patches and is not needed by the BT team.
Bug: 118203066
Test: Compile
Change-Id: If99a5645d19c9780019704ea4f51f8114d83ee8e
Merged-In: If99a5645d19c9780019704ea4f51f8114d83ee8f
Signed-off-by: Kevin Rocard <krocard@google.com>
This reverts commit 34e4fb2a84.
Reason for revert: b/117506164 is fixed and we no longer suppress ASAN
Bug: 117580200
Change-Id: Ib981bddaa4e218cd13b274db5444f585f3487327
Without this patch vendors can not do any vendor extension extending
the audio enums as it would fails the XSD validation.
Long term, the config xml parsing should be moved in the HAL, until then
allow extension if they are prefixed with EX_.
Test: xmllint --noout --schema hardware/interfaces/audio/4.0/config/audio_policy_configuration.xsd --xinclude out/target/product/*/vendor/etc/audio_policy_configuration.xml
Bug: 117967786
Change-Id: Ie44490824b5b50fdebb50a82299ea348d2a34b84
Signed-off-by: Kevin Rocard <krocard@google.com>
Would the legacy HAL return -ENOENT while retrieving an effect,
the enumeration has to be aborted, and the effects queried so far
need to be returned. A missing 'break' was causing returning
no effects at all.
Bug: 117567478
Test: make
Change-Id: I7cc05004f88b39272d06d2ed33a0693f8e1e3d04
Merged-In: I7cc05004f88b39272d06d2ed33a0693f8e1e3d04
Until the underlying bug is fixed, do not produce a sanitized
binary.
Bug: 117506164
Bug: 117580200
Test: m && SANITIZE_TARGET=address m
Change-Id: I4e6d1206512513c687f7ae065d2974c55c617b61
The test was assuming Stream::getFrameCount() would return the
AudioConfig::frameCount used to create the stream, similarly
to the sampleRate or the channelMask.
Nevertheless this is not the case as the AudioConfig::frameCount
field is not to used by Stream::openOutputStream (nor Input) as
the buffer size is chosen by the HAL, not the framework.
Thus the test can not assume the frameCount chosen by the HAL and
must not test for a particular value.
Test: atest VtsHalAudioV4_0TargetTest
Bug: 116169974
Change-Id: Ibbf0825f540957e01e7c512d851cb9628991f4c4
Signed-off-by: Kevin Rocard <krocard@google.com>
Before this patch the default microphone was required to have characteristics
although it is not always an attached device, thus its characteristics can not
be known by the HAL. Additionally, the HAL might not know the active
microphone info of a input stream if it has not been started yet.
This patch only tests microphones which characteristics are reported by the HAL
and start the input stream before requesting active microphones.
Bug: 109787938
Test: vts-tradefed run vts --module VtsHalAudioV4_0Target
Change-Id: If55bfc8210d4f9443d34951f717c6772b46dde04
Merged-In: If55bfc8210d4f9443d34951f717c6772b46dde04
The test creates an instance of the Audio HAL then destroys it and create it again.
The test assumed that the destruction was synchronous when in fact it is async with
no way of knowing when the object has been destroyed.
As a result, until a better solution is found, sleep for 100ms to hopefully let enouth
time for the HAL destructor to return.
Bug: 112566489
Test: adb shell /data/nativetest64/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest --gtest_filter=*OpenPrimaryDeviceUsingGetDevice
atest VtsHalAudioV4_0TargetTest
Change-Id: I0ec75c12007d39060232632708722df5bf0f99d7
Signed-off-by: Kevin Rocard <krocard@google.com>
A test was not checking for the Result::isOk() resulting
in an assert being triggered in HIDL code if the HAL crashed.
Test: (sleep 0.3; adb shell pkill audio) &
adb shell /data/nativetest64/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest
# Test finishes in failure but does not crash
Signed-off-by: Kevin Rocard <krocard@google.com>
Change-Id: I97a6213fe82a5e9a6eb333dc1dc2476102610b58
For device supporting getCapturePosition,
VTS only allowed unprepared stream to return INVALID_STATE.
Now also allow for the stream to return 0 frames similarly to the other
non started states.
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
Bug: 110367728
Cherry-piked from: d01dc3edac9e92981e7ae419d0e7622f753acf94
Merged-In: Ibdf8df8cb8809e98c40a50035371df6893fe4da4
Change-Id: Ibdf8df8cb8809e98c40a50035371df6893fe4da4
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 6c9c6e62c1)
In O, the Audio effect V2 HAL allows not to have an audio effect XML
configuration but to use a .conf format.
In P, before this patch, the Audio effect V2 HAL _requires_ to have an
audio effect XML configuration and forbids the use of a .conf format.
This is discouraged by Treble as it means that an unchanged HAL V2
implementation that was compatible with O VTS will not be with P VTS.
As a result, revert to the Oreo behavior for Audio Effect V2 VTS.
Note that the audio effect V4 VTS is not changed by this patch and
still requires an audio effect XML configuration.
Aka device _updating_ to P will not have to upgrade to XML but new
devices lunching on P are still required to have an audio effect
XML configuration.
This commit only changes VTS code.
Test: cd hardware/interfaces/audio/effect/
mmm 2.0/vts/functional 4.0/vts/functional && adb sync data
adb push *.0/xml/audio_effects_conf_V*.xsd /data/local/tmp/
adb shell
cd /data/nativetest64
OPS=--gtest_filter=CheckConfig.audioEffectsConfigurationValidation
VtsHalAudioEffectV2_0TargetTest/VtsHalAudioEffectV2_0TargetTest $OPS
VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest $OPS
rm /{odm,vendor,system}/etc/audio_effects.xml || true
VtsHalAudioEffectV2_0TargetTest/VtsHalAudioEffectV2_0TargetTest $OPS
! VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest $OPS
Bug: 111421676
Change-Id: Ifb15d65ae4aa65759c8ebaa91cbc8c02234030dc
Merged-In: Ifb15d65ae4aa65759c8ebaa91cbc8c02234030dc
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit b41b575475)
The test was testing a uninitialized variable instead of testing
the result of the tested method.
Bug: 110963314
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
Merged-In: I9a212eef690ae627fd7f7dbfaf4a0b4047c491b3
Change-Id: I9a212eef690ae627fd7f7dbfaf4a0b4047c491b3
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 72641e7ad0)
hidl_memory size is not used on the framework side but is checked by the
hidl framework to be a sensible value.
Due to a hack in O and P, the value can be negative, this leads to
errors in HIDL.
This patch make sure the hidl_memory size is always positive and thus
not affected by the hack.
Test: adb shell data/nativetest64/write_sine/write_sine -pl -m3 -x
Bug: 38118159
Change-Id: Ie53c46c558e8042d74ee32b55219195da82e4bcc
Signed-off-by: Kevin Rocard <krocard@google.com>
Effect proxy were previously mistakenly forbidden as post
or pre processing effects.
An effect being a proxy or not should not affect where
it can be use in the effect framework.
Bug: 111421676
Test: xmllint --noout --schema hardware/interfaces/audio/effect/2.0/xml/audio_effects_conf_V2_0.xsd $(find -name audio_effects.xml)
Change-Id: Iad1c1467226b86a2935a36dd90cf2e32f7f753b0
Signed-off-by: Kevin Rocard <krocard@google.com>