Commit Graph

622 Commits

Author SHA1 Message Date
Andreas Gampe
3f2cae78fa Merge "Audio: Do not sanitize android.hardware.audio@2.0-service" am: f06fb17cd7 am: 52be9f0549
am: a809e7a975

Change-Id: Idaccedb06611510a843819c6c139d4fcc24e0554
2018-10-11 18:31:55 -07:00
Andreas Gampe
52be9f0549 Merge "Audio: Do not sanitize android.hardware.audio@2.0-service"
am: f06fb17cd7

Change-Id: I743c1afaae84f560879cab6afba0fe31978ef871
2018-10-11 18:09:56 -07:00
Treehugger Robot
f06fb17cd7 Merge "Audio: Do not sanitize android.hardware.audio@2.0-service" 2018-10-12 00:56:46 +00:00
Mikhail Naganov
a48f128741 Merge "audio: Add a missing break to EffectsFactory::getAllDescriptors"
am: ef84854472

Change-Id: I47effe88ae8467f8570556ad56ced648abddc4d7
2018-10-11 15:27:22 -07:00
Mikhail Naganov
15eb7a6fa9 audio: Add a missing break to EffectsFactory::getAllDescriptors
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
2018-10-11 12:21:27 -07:00
Andreas Gampe
34e4fb2a84 Audio: Do not sanitize android.hardware.audio@2.0-service
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
2018-10-10 20:26:39 -07:00
Mikhail Naganov
40e36fac61 audio: Add a missing break to EffectsFactory::getAllDescriptors
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
2018-10-10 14:40:54 -07:00
Mikhail Naganov
cc3677997c audio: Add configuration for surround sound
Bug: 116356348
Test: xmllint --noout --xinclude --schema \
  hardware/interfaces/audio/4.1/config/audio_policy_configuration.xsd \
  frameworks/av/services/audiopolicy/config/audio_policy_configuration.xml

Change-Id: Ib8d84b950f439c2ebed181385b41a83556976e60
2018-10-04 15:59:37 -07:00
Mikhail Naganov
16e37eb7ca audio: Copy audio_policy_configuration.xsd for HAL V4.1
This only copies the file to simplify reviewing additons

Bug: 116356348
Test: N/A
Change-Id: Idbc1489163f0ea8938ff5c32499d22ddbf8fc12d
2018-10-04 15:56:22 -07:00
Kevin Rocard
4f62e23dd5 Audio VTS: Do not constrain implementation frameCount am: 069bc45044 am: b86e285537
am: e029bd11f8

Change-Id: Ia2c98e461ee7a39ef56e0f1b6e2dd85c446b6216
2018-10-03 16:28:44 -07:00
Kevin Rocard
c2e7ace98d Audio VTS: Do not constrain implementation frameCount am: 069bc45044
am: 5596e985d4

Change-Id: Idf051c458d74057425ec3c13227fa31190535e18
2018-10-03 16:23:21 -07:00
Kevin Rocard
e029bd11f8 Audio VTS: Do not constrain implementation frameCount am: 069bc45044
am: b86e285537

Change-Id: Id3c6275cdb5c9de079c425d8f252a6f3e9ac7b99
2018-10-03 16:22:39 -07:00
Kevin Rocard
b86e285537 Audio VTS: Do not constrain implementation frameCount
am: 069bc45044

Change-Id: I53dceebb8c48c1f67b6fdc6fa135be8f5222f823
2018-10-03 16:15:35 -07:00
Kevin Rocard
5596e985d4 Audio VTS: Do not constrain implementation frameCount
am: 069bc45044

Change-Id: I3ec1df7f581e5b11e0d394139c1421109c16fc19
2018-10-03 16:15:32 -07:00
Kevin Rocard
069bc45044 Audio VTS: Do not constrain implementation frameCount
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>
2018-10-02 22:07:39 +00:00
jiabin
5253af2570 Test getActiveMicrophones API when mic is found on the device. am: 497edcc026
am: c17b71ff83

Change-Id: I0b278f2a9d6c7df71c835c88f7d34bd98a540fb0
2018-09-27 12:00:40 -07:00
jiabin
798e34e901 Test getActiveMicrophones API when mic is found on the device. am: 497edcc026
am: b2925defca

Change-Id: I290751baf02aefdf7a1bac6ea12f489a1a368c84
2018-09-27 11:43:31 -07:00
jiabin
c17b71ff83 Test getActiveMicrophones API when mic is found on the device.
am: 497edcc026

Change-Id: I55a1ab98ef141b9834ec22491b31e09f581fca1a
2018-09-27 11:39:22 -07:00
jiabin
b2925defca Test getActiveMicrophones API when mic is found on the device.
am: 497edcc026

Change-Id: I459a73cb4bcda15964aa1f614066cb19e2a2424a
2018-09-27 11:36:13 -07:00
Mikhail Naganov
317a9ed5ba audio: Allow vendors to configure hwbinder RPC buffer size
If persist.vendor.audio.hw.binder.size_kbyte property is set, its
value is used to configure the size of hwbinder's MMap buffer.

Bug: 114776290
Test: set the property, check logcat
Change-Id: Icb6a4d0ebe98eb702201f8a9f0fed3a91a24f7ba
2018-09-26 10:11:26 -07:00
jiabin
497edcc026 Test getActiveMicrophones API when mic is found on the device.
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
2018-09-26 10:05:15 -07:00
Kevin Rocard
426bea313a resolve merge conflicts of 2e32d37877 to master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: I393be9e597ff1f72ec2c71efbbbc8e518398190a
2018-09-21 12:03:28 -07:00
Kevin Rocard
8fe2bf8075 Audio VTS: Workaround async HIDL destructor by sleeping am: d87a288e82
am: 921724c2c9

Change-Id: I9ab85b9f46cc7daf0a9414594654d0dded10307c
2018-09-20 23:14:18 -07:00
Kevin Rocard
2e32d37877 Audio VTS: Workaround async HIDL destructor by sleeping am: d87a288e82
am: 988c4a3f48

Change-Id: I86f1f3d76a79449eb87f4ea193cbb52f4a73768a
2018-09-20 17:55:26 -07:00
Kevin Rocard
988c4a3f48 Audio VTS: Workaround async HIDL destructor by sleeping
am: d87a288e82

Change-Id: Ic39282f908d2b73fb04f755264090e701cf4019f
2018-09-20 10:54:46 -07:00
Kevin Rocard
921724c2c9 Audio VTS: Workaround async HIDL destructor by sleeping
am: d87a288e82

Change-Id: I6af4b725b9917d99c450287ba4bfce864371a104
2018-09-20 10:48:42 -07:00
Kevin Rocard
d87a288e82 Audio VTS: Workaround async HIDL destructor by sleeping
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>
2018-09-19 18:27:15 +00:00
Kevin Rocard
47b05b57b4 Merge "Audio VTS: Always check for Result::isOk()" into pie-vts-dev am: 2070f8b0b8 am: 3af66411da
am: 1a684e29da

Change-Id: I4e62224eda7a1b824b54356a72f9be3d2c218c81
2018-09-18 11:22:27 -07:00
Kevin Rocard
89425b1e86 Merge "Audio VTS: Always check for Result::isOk()" into pie-vts-dev am: 2070f8b0b8
am: c23b3a5dda

Change-Id: I736d5d3749a57569cee362e1b627ad9ac695b5d0
2018-09-18 11:12:54 -07:00
Kevin Rocard
1a684e29da Merge "Audio VTS: Always check for Result::isOk()" into pie-vts-dev am: 2070f8b0b8
am: 3af66411da

Change-Id: I08841ccfa99aedec0de6aa1752f39cb5530b26c7
2018-09-18 11:06:53 -07:00
Kevin Rocard
3af66411da Merge "Audio VTS: Always check for Result::isOk()" into pie-vts-dev
am: 2070f8b0b8

Change-Id: Ibf74dbc43a0e91121752bc1fd2e48ee534cb7f4e
2018-09-18 11:01:56 -07:00
Kevin Rocard
c23b3a5dda Merge "Audio VTS: Always check for Result::isOk()" into pie-vts-dev
am: 2070f8b0b8

Change-Id: Icf4a294d1fef7626b8248500dffc6bcd0189571e
2018-09-18 10:57:50 -07:00
Kevin Rocard
e8957a35ea Audio VTS: Always check for Result::isOk()
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
2018-09-06 18:22:23 +00:00
Kevin Rocard
30c2361ad4 Merge "Allow getCapturePosition to return 0 frames for unprepared streams" into pie-vts-dev
am: 137194ef5e

Change-Id: Ibef9acb447f71a94c27ad62ffd93b87126637143
2018-08-30 10:22:35 -07:00
Kevin Rocard
eb2b0093cf Allow getCapturePosition to return 0 frames for unprepared streams
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)
2018-08-29 10:29:07 -07:00
Kevin Rocard
c7f433314a Merge "VTS: Do not require XML for Audio effect V2" into pie-vts-dev am: 5e6dd1288e
am: 2642ddb86f

Change-Id: I3716d72d762fe481eae9c82f8123ef45b5053768
2018-08-28 13:09:25 -07:00
Kevin Rocard
2642ddb86f Merge "VTS: Do not require XML for Audio effect V2" into pie-vts-dev
am: 5e6dd1288e

Change-Id: If389674923030e041dfdb95cd99cd0316603c917
2018-08-28 12:25:23 -07:00
Treehugger Robot
5e6dd1288e Merge "VTS: Do not require XML for Audio effect V2" into pie-vts-dev 2018-08-28 19:13:44 +00:00
Kevin Rocard
94b543c03c Merge "Audio VTS was testing wrong uninitialized variable due to typo" into pie-vts-dev
am: b3e86d489a

Change-Id: I13b546ec0e8785040e4096a7658474f2eff6c90e
2018-08-28 12:03:40 -07:00
Kevin Rocard
8ca56c3dee VTS: Do not require XML for Audio effect V2
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)
2018-08-28 18:18:21 +00:00
Kevin Rocard
8073d8e41c Audio VTS was testing wrong uninitialized variable due to typo
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)
2018-08-28 17:46:41 +00:00
Kevin Rocard
8a452029f9 Effect VTS: Allow an effect proxy as pre/post processing am: 0f0328fc4e
am: a3268e954d

Change-Id: Ic9afa418ca68ed98368ab4696c4d3a3e5e8ccbdb
2018-08-20 11:21:39 -07:00
Kevin Rocard
a3268e954d Effect VTS: Allow an effect proxy as pre/post processing
am: 0f0328fc4e

Change-Id: I570e2a73de01900cf39b5d08cfed370ee17a0e38
2018-08-20 11:13:35 -07:00
Kevin Rocard
7a25163fff Merge changes from topic "share-buffer" am: 54c3572e99 am: 0005ac0e55
am: f09c8e2d49

Change-Id: Ia853174e0443417ec6406a8a03a551e3e86c7ddd
2018-08-17 18:43:28 -07:00
Kevin Rocard
f09c8e2d49 Merge changes from topic "share-buffer" am: 54c3572e99
am: 0005ac0e55

Change-Id: I143d8e7a6bb7896641d50e336885523219da254f
2018-08-17 17:58:04 -07:00
Kevin Rocard
a0b6b5d066 Aaudio: Implement app shareable flag instead of -size hack am: 51cdd13351
am: 616d82ddc6

Change-Id: Iaff977fb8cbd4fdf720bec18b16bee8addc45f74
2018-08-17 17:57:50 -07:00
Kevin Rocard
0005ac0e55 Merge changes from topic "share-buffer"
am: 54c3572e99

Change-Id: I4a8bb74e3dee81cdd0fc478c49acd0771467f227
2018-08-17 17:13:35 -07:00
Kevin Rocard
616d82ddc6 Aaudio: Implement app shareable flag instead of -size hack
am: 51cdd13351

Change-Id: Ifbf493566c45e003ddba23996c8722f3f4c74d4f
2018-08-17 17:13:19 -07:00
Treehugger Robot
54c3572e99 Merge changes from topic "share-buffer"
* changes:
  Audio default HAL: hidl_memory size must be positive
  Aaudio: Implement app shareable flag instead of -size hack
2018-08-17 23:03:44 +00:00
jiabin
d03e8f0848 Test getActiveMicrophones API when mic is found on the device.
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
2018-08-16 13:34:36 -07:00