Commit graph

17019 commits

Author SHA1 Message Date
Mikhail Naganov
384a44b838 Merge changes from topic "upstream-vts-v6"
am: 460be58661

Change-Id: I0be902d9c228cbcde9ffb130c899e72ea4ddccfe
2019-11-11 18:29:59 -08:00
Mikhail Naganov
936010d0b3 audio: Run VTS tests for non-primary modules for HAL V6
am: 686af1cc43

Change-Id: I5ab9eabab63dd19db68e143e337b765db937086f
2019-11-11 18:29:52 -08:00
Mikhail Naganov
51a1ee3c24 audio: Parametrize core VTS tests
am: ccd484bb80

Change-Id: I71b14a85ad85263bd232d43c3d9937d8169ae7b1
2019-11-11 18:29:41 -08:00
Mikhail Naganov
edd6a1b7dd audio: Parametrize effect VTS tests for V6.0
am: 315ce41a5d

Change-Id: Ia64ba59b97154fc09bc417bb496711fb282c367d
2019-11-11 18:29:27 -08:00
Treehugger Robot
460be58661 Merge changes from topic "upstream-vts-v6"
* changes:
  audio: Run VTS tests for streams of non-primary modules for HAL V6
  audio: Run VTS tests for non-primary modules for HAL V6
  audio: Parametrize core VTS tests
  audio: Parametrize effect VTS tests for V6.0
2019-11-12 02:20:38 +00: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
Steven Moreland
3f92e5526e Merge "vibrator: clarify behavior for repeated commands"
am: ea49733bb4

Change-Id: I6b2641fc78a086bb6d76ea6ce19f8dac436527f8
2019-11-10 23:07:50 -08:00
Steven Moreland
ea49733bb4 Merge "vibrator: clarify behavior for repeated commands" 2019-11-11 06:58:07 +00:00
Inseob Kim
5d5fee2ef2 Merge "Remove static vndk dep from vendor modules"
am: 437baabfde

Change-Id: I75a47428508efbaa060d9c72a51b3e5f47472ec5
2019-11-10 22:29:38 -08:00
Treehugger Robot
437baabfde Merge "Remove static vndk dep from vendor modules" 2019-11-11 06:15:14 +00:00
Steven Moreland
6dd798db7e Merge "vibrator: fix VTS for effects"
am: d13b7577e1

Change-Id: I5cc82d115c0e299f8f76f78ab5af0461be5e5d4b
2019-11-10 21:36:55 -08:00
Steven Moreland
d13b7577e1 Merge "vibrator: fix VTS for effects" 2019-11-11 05:28:38 +00:00
Steven Moreland
c02bc05977 vibrator: clarify behavior for repeated commands
Bug: 141828236
Test: VtsHalVibratorTargetTest
Change-Id: I4077ca34cb037198df16149f944beba3c5633175
2019-11-11 04:04:11 +00:00
Haibo Huang
2fa0ae67f8 Merge "Fix build with new googletest"
am: a7e5d5fd5b

Change-Id: Iabaa2f58c1274cf8c8f38c0ef8ab1c9438a5b7fc
2019-11-08 17:29:00 -08:00
Treehugger Robot
a7e5d5fd5b Merge "Fix build with new googletest" 2019-11-09 01:06:56 +00:00
Colin Cross
1ec7613f7f Merge "Replace -Weverything with -Wextra"
am: 8c63655c3d

Change-Id: Ib2d509d96e7edd40a54cbf16049bf4ebb3b3a469
2019-11-08 15:18:08 -08:00
Treehugger Robot
8c63655c3d Merge "Replace -Weverything with -Wextra" 2019-11-08 22:53:44 +00:00
Dan Shi
b392aa109f Merge "Convert VtsHalWifiHostapdV1_*TargetTest to be parameterized test"
am: 9361c70c9b

Change-Id: Iadff8983280b631f21bc5632cc16605ebe52a5a1
2019-11-08 14:30:16 -08:00
Dan Shi
9361c70c9b Merge "Convert VtsHalWifiHostapdV1_*TargetTest to be parameterized test" 2019-11-08 22:21:51 +00: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
Mikhail Naganov
ccd484bb80 audio: Parametrize core VTS tests
Parametrize tests to accept IDevicesFactory instance name
and IDevice instance name. For audio HAL versions 2..5
the factory instance name is taken from the VTS environment,
and the device is always "primary". For the next versions
the factories are discovered by the test, and the devices
are taken from the audio policy configuration
(to be implemented, see added FIXME comments).

Split the Environment class into two versions: for HAL 2..5
and for next versions. They use different base class.

Move device factories and device caching into dedicated
classes DevicesFactoryManager and DeviceManager. They deal
with instance caching and proper release of server resources.

Bug: 141847510
Bug: 141989952
Test: atest VtsHalAudioV5_0TargetTest
      atest VtsHalAudioV6_0TargetTest
Change-Id: I92c44e0c3f900164dded7e9c4bfc642ca2c335db
Merged-In: I92c44e0c3f900164dded7e9c4bfc642ca2c335db
2019-11-08 13:45:45 -08:00
Mikhail Naganov
315ce41a5d audio: Parametrize effect VTS tests for V6.0
Parametrize tests to accept IEffectsFactory instance name.
Discover the instances in the test.

Bug: 141847510
Bug: 141989952
Test: atest VtsHalAudioEffectV5_0TargetTest
      atest VtsHalAudioEffectV6_0TargetTest

Change-Id: Iaf19109fc77a93b211cc3da85c21c0584d4f2b88
Merged-In: Iaf19109fc77a93b211cc3da85c21c0584d4f2b88
2019-11-08 13:45:10 -08:00
Colin Cross
d180b2b83b Replace -Weverything with -Wextra
-Weverything is not recommended, use -Wextra.

Bug: 143713277
Test: mma
Change-Id: Ic5957015ebc0030b8339b263730c8d0540cf088a
2019-11-08 13:09:00 -08:00
Haibo Huang
83b4c1e3e1 Fix build with new googletest
The new googletest requires prefix to be non-empty.

Change-Id: I3ebd13861c4803b53dbeb4ac5f247984814bef45
2019-11-08 12:17:34 -08:00
Steven Moreland
f33538889f vibrator: fix VTS for effects
A few issues were causing effects tests to fail:
- invalid effects were not actually invalid
- test for invalid effects improved to consider invalid effects and
  strengths separately
- test sleeps for appropriate amount of time after requesting effect to
  be performed
- logging used to diagnose issues left in place for convenience

Bug: 141828236
Test: atest VtsHalVibratorTargetTest (on device which suffers from these
  issues that cf did not hit)

Change-Id: Id220d36c27d85f068dce6b8961f705eef8dc6a4f
2019-11-08 10:24:34 -08:00
Kevin Rocard
2af412f02f Merge changes from topic "upstream-hal-v6"
am: 9d11eca829

Change-Id: I4a90ea46617a17a3784bc70c46b0ec6effa03f91
2019-11-08 09:56:42 -08:00
Kevin Rocard
5c6e084156 Introduce Audio V6
am: 2a515e1c27

Change-Id: I7dee7c00a7fac7825d464214b02dcbd138b8579d
2019-11-08 09:56:06 -08:00
Kevin Rocard
0633232f33 Change some formatting for better script parsing
am: 55a451825c

Change-Id: If2fb912f8efacbb53f2d7e9ada0597c86b655a68
2019-11-08 09:55:45 -08:00
Kevin Rocard
c9cd501cb7 Script to generate new audio HAL version
am: 82d3a0b3c7

Change-Id: Ic21576fae1d657609b2e0e9ae946913afee40af8
2019-11-08 09:55:19 -08:00
Kevin Rocard
42f11a9468 Convert audio HAL service mk to bp and rename the service
am: ad17f58e50

Change-Id: I3eb65e5e98e94e5ecb6d8e9ee00836b9c03c069e
2019-11-08 09:54:32 -08:00
Kevin Rocard
c233ba068a Audio service: Refactor register interface
am: 350ce29826

Change-Id: I76caacc8c55b3b2f047232eb4db79619a3346df2
2019-11-08 09:53:35 -08:00
Kevin Rocard
376cfe4c59 Version dependant target should included version in name
am: c581b41569

Change-Id: I371a9f7b81e01b655e33b1d4a230381cc859aa3e
2019-11-08 09:52:26 -08:00
Treehugger Robot
9d11eca829 Merge changes from topic "upstream-hal-v6"
* changes:
  Allow device to have use Audio HAL V6
  Introduce Audio V6
  Change some formatting for better script parsing
  Script to generate new audio HAL version
  Convert audio HAL service mk to bp and rename the service
  Audio service: Refactor register interface
  Version dependant target should included version in name
2019-11-08 17:31:42 +00:00
Les Lee
6b93ab65e4 Merge "hostapd: Ignore ACS relate vts testcase for hostapd 1.0 and hostapd 1.1"
am: dab90bdb08

Change-Id: If2d5f24f0d12c9be098d76a1d195c37079b52fc4
2019-11-08 00:40:22 -08:00
Les Lee
dab90bdb08 Merge "hostapd: Ignore ACS relate vts testcase for hostapd 1.0 and hostapd 1.1" 2019-11-08 08:30:38 +00:00
lesl
c8a2e136ea hostapd: Ignore ACS relate vts testcase for hostapd 1.0 and hostapd 1.1
If driver doesn't support the hotspot ACS feature.
It will cause ACS relate vts testcase failure.
Temp disable the vts test case and file b/140172237 to fix in R.

Bug: 135975451
Test: build - make vts
Test: atest VtsHalWifiHostapdV1_1Target / atest VtsHalWifiHostapdV1_0Target
Test: vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check \
      --primary-abi-only --skip-preconditions --module \
      VtsHalWifiHostapdV1_0Target -l INFO
      vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check \
      --primary-abi-only --skip-preconditions --module \
      VtsHalWifiHostapdV1_1Target -l INFO

Change-Id: I489d5f5c54f37f3603128e127a6c8b1ee62390d3
2019-11-08 11:49:55 +08:00
Dan Shi
3d4d496078 Convert VtsHalWifiHostapdV1_*TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalWifiHostapdV1_0TargetTest \
VtsHalWifiHostapdV1_1TargetTest
Change-Id: I37ae0369daf145731eb6b00078b396e1a4415d3f
2019-11-07 14:41:16 -08:00
Kevin Rocard
4b99dc65e3 Allow device to have use Audio HAL V6
This HAL is optional for now as breaking changed are planned.
It might get required for new device before R release.

Test: push V6 to device and check audio works fine
Bug: 134940862
Change-Id: Ib4a906da1c1d3d489003a6642bfc55b142424155
Merged-In: Ib4a906da1c1d3d489003a6642bfc55b142424155
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:19:48 -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
Kevin Rocard
55a451825c Change some formatting for better script parsing
Test: Compile
Bug: 134940862
Change-Id: Ibbafdcaa6e0bfa8fd2b80f4a6c9ac6ac95058f93
Merged-In: Ibbafdcaa6e0bfa8fd2b80f4a6c9ac6ac95058f93
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:18:45 -08:00
Kevin Rocard
82d3a0b3c7 Script to generate new audio HAL version
Mostly automated script to generate a new Audio HAL major version.

Test: push V6 to device and check audio works fine
Bug: 134940862
Change-Id: I0da621e747eb48e75901a2a10cfc224f33864c3b
Merged-In: I0da621e747eb48e75901a2a10cfc224f33864c3b
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:12:52 -08:00
Kevin Rocard
ad17f58e50 Convert audio HAL service mk to bp and rename the service
The service supports multiple versions and its name should not be
version dependant.

For backward compatibility, keep the target name
android.hardware.audio@2.0-service (32bit only), existing
PRODUCT_PACKAGES do not have to be updated.
New products should depend on android.hardware.audio.service:32.

Additionally migrate to Android.bp, dropping support for
AUDIOSERVER_MULTILIB. Previously the HAL service architecture (32 vs 64)
would be the same as the audio server. This in not wanted as all android
audio HAL are 32 bits.

Bug: 121208203
Test: # Compare following commands before and after patch:
      find $ANDROID_PRODUCT_OUT/vendor -name 'android.hardware.audio*'|xargs file
            adb shell reboot # check device boots to UI and
      # check the HAL restarts after the audioserver is killed
      adb shell ps |grep audio; adb shell killall audioserver; adb shell ps
Change-Id: I25f41735175a6687a051ca1e5a7fee670eb8115e
Merged-In: I25f41735175a6687a051ca1e5a7fee670eb8115e
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:12:30 -08:00
Kevin Rocard
350ce29826 Audio service: Refactor register interface
Remove all per interface version boilerplate.
Adding a new version now requires only including the file
and adding the version name to the list.

Bug: 134940862
Test: adb shell lshal
Change-Id: Ib6b99d7a2c2079d914970fbe804aaf3c78c143ce
Merged-In: Ib6b99d7a2c2079d914970fbe804aaf3c78c143ce
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:11:45 -08:00
Kevin Rocard
c581b41569 Version dependant target should included version in name
As a V6.0 version needs to be created.

Note that this target is not used anywhere explicitly.
There seem to be some magic to "xsd_config", probably has to do with the
package_name.

Bug: 134940862
Test: build
Change-Id: Id6935c5458294981cb778f3647ec01ee34a34e2f
Merged-In: Id6935c5458294981cb778f3647ec01ee34a34e2f
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:11:07 -08:00
zhibo.chang
3a8199998c Merge "Fix the failed case for the VtsHalWifiSupplicantV1_2Host#SupplicantStaIfaceHidlTest.RegisterCallback_1_2"
am: 528f91b055

Change-Id: I802c059e8eb67ca01d90eeb6ade427c7559ebced
2019-11-07 13:06:39 -08:00
Treehugger Robot
528f91b055 Merge "Fix the failed case for the VtsHalWifiSupplicantV1_2Host#SupplicantStaIfaceHidlTest.RegisterCallback_1_2" 2019-11-07 20:47:29 +00:00
Henry Fang
f437124480 Merge "Update cas@1.1 hal to cas@1.2."
am: f8d76bd144

Change-Id: I6ffee9cb3a937c5b16b42c33b7ce2d4f4cc5e3a8
2019-11-07 11:46:30 -08:00
Steven Moreland
38a7fd810f Merge "vibrator: add CAP_EXTERNAL_AMPLITUDE_CONTROL"
am: 00fab92a7f

Change-Id: I90cb13116aa47243d39212f4d178824c3d436280
2019-11-07 11:42:14 -08:00
Henry Fang
f8d76bd144 Merge "Update cas@1.1 hal to cas@1.2." 2019-11-07 19:33:33 +00:00
Steven Moreland
00fab92a7f Merge "vibrator: add CAP_EXTERNAL_AMPLITUDE_CONTROL" 2019-11-07 19:18:08 +00:00