Commit graph

10 commits

Author SHA1 Message Date
François Gaffie
f282171776 audio: update XSD for dynamic engine loading support config
Bug: 141989952
Test: atest VtsHalAudioV6_0TargetTest

Change-Id: Ic0afc27f09d8387236444901dfddc5f0f074ba1b
Merged-In: Ic0afc27f09d8387236444901dfddc5f0f074ba1b
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
2020-01-17 21:33:17 -08:00
Eric Laurent
2c75ca6b27 Audio HAL: Add API to attach an effect to a device
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
Merged-In: I73d78c4f234fd80443a1cb3772c2d65457968652
2020-01-10 11:16:42 -08:00
Baekgyeong Kim
09e665e61c Add audio stream and usage for virtual assistant
New stream type: AUDIO_STREAM_ASSISTANT
This is intended to be used by a virtual assistant like
Google Assistant, Bixby, etc.

The audio stream has own volume alias and the volume
does not change by volume changes of other streams.

Bug: 123745215
Test: make
Change-Id: I3696d8fba32070954cc6a330574af8507fea7a74
Merged-In: I3696d8fba32070954cc6a330574af8507fea7a74
2020-01-08 11:53:59 -08:00
Mikhail Naganov
ed261bbfb1 audio: Add check to IDevice.close for currently opened streams
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
2019-11-21 12:32:09 -08:00
Mikhail Naganov
a4b693f5da Audio VTS: Fix MMAP tests
Ensure stream test runs for output MMAP profiles.

Enhance checks for MMAP buffer size.

Bug: 144575694
Test: atest VtsHalAudioV6_0TargetTest
Change-Id: I93e66b12c93c466d661e65c4dbbb5deb32772848
Merged-In: I93e66b12c93c466d661e65c4dbbb5deb32772848
2019-11-21 10:57:19 -08:00
Mikhail Naganov
d041930df9 Audio V6 wrapper: IDevice|IStream|IEffect.close releases HAL resource
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
2019-11-21 10:56:25 -08:00
chenhg
a53c280301 audio: add 'useForVolume' field to 'gain'.
BUG: 144081761
Test: xmllint --noout --xinclude --schema \
      hardware/interfaces/audio/5.0/config/audio_policy_configuration.xsd \
      frameworks/av/services/audiopolicy/config/audio_policy_configuration*.xml
      xmllint --noout --schema \
      hardware/interfaces/audio/5.0/config/audio_policy_configuration.xsd \
      --xinclude out/target/product/*/vendor/etc/audio_policy_configuration.xml

Change-Id: I0ee9114f750186b479a2ebee5dfcd946d9ef3196
2019-11-15 10:39:58 -08:00
Mikhail Naganov
60bd3ecc5d audio: Run VTS tests for streams of non-primary modules for HAL V6
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
2019-11-11 10:29:06 -08:00
Mikhail Naganov
686af1cc43 audio: Run VTS tests for non-primary modules for HAL V6
Implement parsing of AudioPolicyManager config for finding
out declared modules (IDevice instances) with permanently
attached devices and run tests for them. This only applies
when running tests for HAL V6.

Change class hierarchy to use IDevice interface as much as
possible, only use IPrimaryDevice for its specific methods.

Fix the following issues found while running the tests
for "r_submix" and "msd" modules:

- IDevice::getMicrophones can return NOT_SUPPORTED status;

- IDevice::get/setParameters can return NOT_SUPPORTED.

Other changes:

- Factor out common code for getting devices via DeviceManager;

- Factor out AudioPolicyConfigTest.HasPrimaryModule test from
  SetUp code;

- Add device parameter generator for primary device only.

Bug: 141989952
Bug: 141847510
Test: atest VtsHalAudioV5_0TargetTest
      atest VtsHalAudioV6_0TargetTest
      also, run modified V5_0 test using generators for V6_0

Change-Id: I51cec21670120d8dce75609954a18b886cc0c18d
Merged-In: I51cec21670120d8dce75609954a18b886cc0c18d
2019-11-08 13:49:47 -08:00
Kevin Rocard
2a515e1c27 Introduce Audio V6
Generate with ./newHal.sh 5.0

+ some typo fix in the .hal
+ some clang-tidy run

This new HAL is an exact copy of the V5.
It will be modified in following patches while R is developed.

Test: push V6 to device and check audio works fine
Bug: 134940862
Change-Id: Ic25d30175032e76e0d3208fb876451de9ae6b7b4
Merged-In: Ic25d30175032e76e0d3208fb876451de9ae6b7b4
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:19:12 -08:00