Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 575c63f7 authored by Kevin Rocard's avatar Kevin Rocard
Browse files

Audio HAL: do not test input stream if no Built-in mic on primary



The test use to always test input stream, assuming that all devices had
built-in device on the primary Module.

Nevertheless, although uncommon, the mic could be on any module or even
not exist.

This patch makes sure that the input stream tests are only run if there
is a Built-in mic on the primary module.

As the policy config is now imported, it will be easy for the next HAL
version to add tests to test all supported audio config for each device.

Test: adb shell
      cd /data/nativetest64/VtsHalAudioV4_0TargetTest
      VtsHalAudioV4_0TargetTest --gtest_list_tests | grep Input
      VtsHalAudioV4_0TargetTest
      // Remove Mic from the available devices, the input tests should be skipped
      sed -i /item.*Built-In.Mic/d /vendor/etc/audio_policy_configuration.xml
      ! VtsHalAudioV4_0TargetTest --gtest_list_tests | grep Input
      VtsHalAudioV4_0TargetTest
      // Remove the primary hal, test should fail
      sed -i 's/"primary"/"notPrimary"/' /vendor/etc/audio_policy_configuration.xml
      ! VtsHalAudioV4_0TargetTest

Bug: 114303641
Bug: 111681420
Change-Id: Ibc1c1dadd6bcad18f184ab8c3bc75216c9f66adb
Signed-off-by: default avatarKevin Rocard <krocard@google.com>
parent 55a5b8b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment