Add a method to IDevice interface allowing the attachement of an
audio effect to an audio device.
This is used when an audio effect is implemented below the HAL (e.g by an audio DSP)
and is attached/enabled when a particular sink(e.g speaker) or source(e.g mic) device
is selected.
Bug: 136294538
Test: make
Change-Id: I73d78c4f234fd80443a1cb3772c2d65457968652
add support for model parameter control APIs with THRESHOLD_FACTOR
as the first supported parameter
Bug: 141929369
Test: Tested manually with test app, GTS test
gts-tradefed run gts-dev -m GtsAssistIntentTestCases
and VTS test
vts-tradefed run vts-hal -m VtsHalSoundtriggerV2_3Target
Change-Id: I79d2b6365cc63fbdfe06fa94f1d0878903cbf554
Some methods of legacy HALs are optional. The legacy HAL
can avoid implementing them either by setting the function
entry in the interface table to NULL or by setting it
to a stub function returning -ENOSYS. In the latter case
the default implementation was spamming syslog with
warnings. Specify that ENOSYS returned from optional legacy
HAL methods must be ignored.
Bug: 141989952
Test: check logcat
Change-Id: Idbdff8d88e3303a0181cb5629ab82485148e6d8e
Add documentation and check that 'minSizeFrames' parameter
is a positive value. Previously a similar check was added
to Pixel HAL.
Bug: 141989952
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: I526431fc214f7f5bc424f0c9e4c890cf918ca2b2
The result of RPC calls of HAL methods must be checked.
Added a check of result of calling IDevice::close added
for V6.
Bug: 114451103
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: Ib6276382f15f122b43f314cf64cac2c3242bb76c
Add audio usage for call assistant use cases.
Used by apps playing over call uplink path for call
screening or other in call assitant features.
Bug: 135213843
Test: make
Change-Id: I7eeea676fe188946ff86f1e11e8e00a624a4ec5c
This flag used to be framework only. To simplify constants
management it's better to have it defined at all layers.
Currently it is only used for MSD module but potentially
can be used for HDMI inputs.
Bug: 141273649
Test: use AOSP MSD on Pixel
atest VtsHalAudioV6_0TargetTest
Change-Id: I3b853d5d0a05cc4d4bacd0a9ae432099bb47fad9
Add the possibility to specify a target audio device when
creating an audio effect by passing its audio port handle
to createEffect API.
To attach an effect to a device, the framework will use
session ID AudioSessionConsts.DEVICE and provide a valid
AudioPortHandle as device ID.
Bug: 136294538
Test: make
Change-Id: Ic697eeafbd5df6800ad4c7fd9e0698e3d8e3beae
Add specific audio session ID for effects applied to a
particular audio device.
Bug: 136294538
Test: make
Change-Id: Iea3e3a07f404e1075844422c740d2dc4d5163598
As audio device type can not be used as bit mask any more, refactoring
audio device type usages in conversion from/to HAL. Use a set of audio
device types instead of bit mask.
Bug: 135621476
Test: atest VtsHalAudioV5_0TargetTest
Change-Id: I1a0f574744f855bb1684cd28613571399781abbc
Merged-In: I1a0f574744f855bb1684cd28613571399781abbc
Effect::close in V6 releases the underlying HAL effect.
It was not removing the effect entry from the effects
map, thus a call to Stream::removeEffect was retrieving
a stale handle.
Bug: 145656878
Test: start and stop recording for VOICE_COMMUNICATION
Change-Id: I47f486d3b6b4b0dc29acd1e3a2093e421b28d90b
Compressed formats should not be opened with DIRECT flag
only, as this will result in playing out compressed data.
Bug: 141989952
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: I873f9a25d5109fb9f5d56f5f748d1348dc12d416
It is suggested to do so according to Vector.h and SortedVector.h.
At framework side, there are audio containers such as FormatVector,
ChannelMaskSet, SampleRateSet to replace the usage of Vector
SortedVector for audio stuff. In default hal implementation, we can
use these audio containers to replace Vector and SortedVector.
Bug: 135621476
Test: play/record audio
Change-Id: I4d985327fb76cd06afe241860d8b592abcbfe4f2
Merged-In: I4d985327fb76cd06afe241860d8b592abcbfe4f2
Some classes, e.g. AudioGain, in libaudiofoundation, which are used by
libaudiopolicycomponent, will require libaudiofoundation as a shared
library to avoid link error when building.
Bug: 135621476
Test: make
Change-Id: I8732bdab37d8afd866fe03a74db3dc564fea1ad2
Merged-In: I8732bdab37d8afd866fe03a74db3dc564fea1ad2
As audio device type can not be used as bit mask any more, refactoring
audio device type usages in conversion from/to HAL. Use a set of audio
device types instead of bit mask.
Bug: 135621476
Test: atest VtsHalAudioV5_0TargetTest
Change-Id: I1a0f574744f855bb1684cd28613571399781abbc
This is to prevent OOB write in case when a sufficiently
large HIDL vector is provided via a HwBinder call.
Bug: 143787559
Test: atest VtsHalAudioEffectV5_0TargetTest
Change-Id: I6ea78804a5a3ed7a245929d3de47580b12c0da9a
IDevice.close must not proceed if there are streams
that are currently opened on this device.
Bug: 114451103
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: I61d81bc0333098c341d5d551bf59331e49fcf682
Remove getSupported*AudioConfig methods as they were always
returning empty vector, and for V6 test parameter generation
has been changed.
Test: atest VtsHalAudioV5_0TargetTest
Change-Id: Ib6f53c52b3ee2769cb02730d02decd97390fe091
Fixed behavior of IStream|IEffect.close to release the underlying
HAL resource synchronously. This is to avoid adding artificial
delays in VTS that become totally unpractical in V6.
Added clarification about expected client behavior for
IStream|IEffect.close w.r.t. audio data transfer.
Added IDevice.close method which releases HAL device resource.
Updated VTS tests to remove delays in V6.
Bug: 114451103
Bug: 141989952
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: I439f0f923c091af2ab234d15ca847cfade341f25
Merged-In: I439f0f923c091af2ab234d15ca847cfade341f25
hidl-gen now generates them for use by all Google Tests, calling
toString().
The local audio PrintTo definitions in PrettyPrintAudioTypes.h are now
redundant with the generated versions, and the entire header can be
removed.
Test: Verified the generated PrintTo functions work in a different GTest
Change-Id: I80d100907e3c6c638608b0b8b34232b02decac19
Fixed behavior of IStream|IEffect.close to release the underlying
HAL resource synchronously. This is to avoid adding artificial
delays in VTS that become totally unpractical in V6.
Added clarification about expected client behavior for
IStream|IEffect.close w.r.t. audio data transfer.
Added IDevice.close method which releases HAL device resource.
Updated VTS tests to remove delays in V6.
Bug: 114451103
Bug: 141989952
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: I439f0f923c091af2ab234d15ca847cfade341f25
Implement parsing of AudioPolicyManager config for finding
out supported format configurations of streams. This only applies
when running tests for HAL V6. Previously format configurations
mandated by CDD were used for testing, this does not work well
for non-primary modules.
Fix the following issues found while running the tests
for "r_submix" and "msd" modules:
- IStream::getSupportedFormats must return a status
to indicate that this capability is not supported by HAL;
- it is allowed for IStream::setDevices to return
NOT_SUPPORTED status.
Other changes:
- Factor out helper functions for generating format
configurations;
- Fix generation of the channel mask component in the names
of tests that use AudioConfig, add sampling rate to test
names.
Squashed with the following commit to avoid breaking compilation:
audio vts: Remove explicit dependency on the new types
Avoid using the new ChannelMaskSet and SampleRateSet types
directly to simplify upstreaming.
Bug: 141989952
Bug: 141847510
Test: atest VtsHalAudioV5_0TargetTest
atest VtsHalAudioV6_0TargetTest
also, run modified V5_0 test using generators for V6_0
Change-Id: If0d330881901908e546baab89f63d3333003e355
Merged-In: If0d330881901908e546baab89f63d3333003e355