Commit graph

416 commits

Author SHA1 Message Date
Kevin Rocard
c691e18332 Add the audio team as owner of the audio VTS
Change-Id: I7744929814e3e7ba99f1cb664153cdffac58f01e
Merged-In: I514c37b3c9da3df700fa208e79ff6597f8914092
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-11-29 12:41:25 -08:00
Mikhail Naganov
8c0c030ee9 Add OWNERS for audio-related HAL default implementations
Test: not needed
Change-Id: I2893c84ac2ac72095baac810947fac56235a9d79
Merged-In: Idefe7be10bde22866be82f87118b9b54e74c3f40
2017-11-29 12:39:55 -08:00
Treehugger Robot
ba3225718b Merge "Fix inequality typo in StreamIn::getCapturePosition" 2017-11-29 20:28:20 +00:00
Treehugger Robot
adf8208c52 Merge "Remove subdirs" 2017-11-29 17:53:33 +00:00
Daniel Van Veen
0c7d58b00a Fix inequality typo in StreamIn::getCapturePosition
This was preventing getCapturePosition() being called from
the default HIDL implementation.

Test: cts-tradefed run cts -m CtsMediaTestCases \
      -t android.media.cts.AudioRecordTest
Change-Id: I9c920108f68fb895a7f7a9d2ea27c291a91c1afb
2017-11-29 17:06:27 +00:00
Steven Moreland
7b9888217e Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 17:19:46 -08:00
Steven Moreland
e5c6548346 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:23:43 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
Chih-Hung Hsieh
dbd7e5f031 Merge "Use -Werror in hardware/interfaces/audio" am: 7a4422d2a5 am: ae9fb022a3
am: 5d8244ee3f

Change-Id: I0826ee82634360949a94b3ca51011fe52f9f8079
2017-11-28 19:18:04 +00:00
Chih-Hung Hsieh
ae9fb022a3 Merge "Use -Werror in hardware/interfaces/audio"
am: 7a4422d2a5

Change-Id: Ib0cf1e15856fd58f0f2ea726e3d5b94177ab33a1
2017-11-28 19:03:31 +00:00
Chih-Hung Hsieh
b38c1aebc1 Use -Werror in hardware/interfaces/audio
* Remove unused variables, lambda function parameters..

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I28e8eb1af434f62cab6f41285b9a400f7f57cd13
2017-11-28 17:11:33 +00:00
Xin Li
bb9e38fef9 Merge commit '1a06284b24f5eb7bb9c1fea0817da8898b3b1bff' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: I2a044eb8c9981d0a8198ffe2df55559afbd76341
Merged-In: I4fb9f18884f7ef21162015a0032c4431444f7025
2017-11-14 12:08:38 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Steven Moreland
a1169dd600 Update makefiles for hidl_interface.
Bug: 35570956
Test: manual
Change-Id: I7a220b78ee081240e1dc30ef5672ba39e3e98375
2017-11-10 09:06:55 -08:00
Steven Moreland
d28c1bdf62 Merge "Automatic mk -> bp." am: e5fd969f19 am: 72c720a4e3
am: 26013bf6ac

Change-Id: Id936fb4806d122045c771c951220361efeef10c6
2017-11-07 21:24:49 +00:00
Steven Moreland
26013bf6ac Merge "Automatic mk -> bp." am: e5fd969f19
am: 72c720a4e3

Change-Id: Icfc8b46117e94461906806023852836a0ace3a55
2017-11-07 21:21:40 +00:00
Steven Moreland
90e3a50f03 Automatic mk -> bp.
Automatic mk -> bp conversion for all modules here
which can be converted and built automatically.

Test: Soong resolves all dependencies
Bug: 37512442
Change-Id: Ib789212cb88d55731397c600d132e7c672c0d8be
2017-11-03 16:30:28 +00:00
TreeHugger Robot
2aa5fe9241 Merge "Audio VTS: improve audio policy validation error messages" 2017-10-28 07:11:23 +00:00
TreeHugger Robot
4c197ce183 Merge "Audio HIDL wrapper: Improve status_t to Return conversion for get_parameter" 2017-10-28 06:21:33 +00:00
TreeHugger Robot
7e156d1512 Merge "Add the audio team as owner of the audio VTS" 2017-10-24 02:31:10 +00:00
Kevin Rocard
f16fabef5d Add the audio team as owner of the audio VTS
Change-Id: I514c37b3c9da3df700fa208e79ff6597f8914092
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-10-23 21:26:16 +00:00
Kevin Rocard
1a7432375b Audio HIDL wrapper: Improve status_t to Return conversion for get_parameter
set_parameter wrapper was converting status_t as such:
OK -> OK
-ENOSYS -> INVALID_STATE
everything else -> INVALID_ARGUMENTS

Which was inconsistent with the rest of the wrapper which was doing:
OK -> OK
-EINVAL -> INVALID_ARGUMENTS
-ENODATA -> INVALID_STATE
-ENODEV -> NOT_INITIALIZED
-ENOSYS -> NOT_SUPPORTED
everything else -> INVALID_STATE

Unfortunately, identical conversion can not be achieve as legacy
set_parameter specifically require
-ENOSYS -> INVALID_STATE
in `get_parameter` docstring:

     * If the implementation does not accept a parameter change while
     * the output is active but the parameter is acceptable otherwise, it must
     * return -ENOSYS.

As a result implement:
OK -> OK
-EINVAL -> INVALID_ARGUMENTS
-ENODATA -> INVALID_STATE
-ENODEV -> NOT_INITIALIZED
-ENOSYS -> INVALID_STATE              <--- unchanged
everything else -> INVALID_ARGUMENTS  <--- unchanged

Test: Playback and record over builtin & USB. Hangout call
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
Bug: 67030461
Change-Id: I13649eb00f8465921e5c718c5d5df120e1262ff7
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-10-20 05:13:28 +00:00
Tri Vo
71fae85bef Merge "Set pipe size to >1MB for debugDump test cases." am: d928053397 am: 04fcc83578 am: bd9b6d5c68
am: 976bfa63f8

Change-Id: I55a4c333ac6249d92f588e6c36c58590c01945ee
2017-10-18 03:30:27 +00:00
Tri Vo
976bfa63f8 Merge "Set pipe size to >1MB for debugDump test cases." am: d928053397 am: 04fcc83578
am: bd9b6d5c68

Change-Id: I0719153562f638d958f68f823bace7fb2dad3888
2017-10-18 02:56:55 +00:00
Tri Vo
bd9b6d5c68 Merge "Set pipe size to >1MB for debugDump test cases." am: d928053397
am: 04fcc83578

Change-Id: I268c1f1fd16732ffce1569a19d8efa47897fc329
2017-10-18 02:28:01 +00:00
Tri Vo
04fcc83578 Merge "Set pipe size to >1MB for debugDump test cases."
am: d928053397

Change-Id: If7cca83c1da491e5c399170e2669995e878fdc57
2017-10-18 02:21:29 +00:00
Tri Vo
7d35a3d0f2 Set pipe size to >1MB for debugDump test cases.
Test: VtsHalAudioV2_0Target
Change-Id: I2dd43851a43609ad2953030303edaeb684b63096
2017-10-17 16:51:33 -07:00
Tri Vo
1853d8b538 Merge "Use a pipe instead of tmp for debugDump tests." am: 458b8fa5bd am: c62e184a27 am: a56e32dca2
am: e9c924d756

Change-Id: Idfab4049352fa39ce52f712f95e1e98fa8fba5b7
2017-10-15 04:01:35 +00:00
Tri Vo
e9c924d756 Merge "Use a pipe instead of tmp for debugDump tests." am: 458b8fa5bd am: c62e184a27
am: a56e32dca2

Change-Id: I9f450d87bc7737e14ad4ed0bab9670c6765fd5e2
2017-10-15 03:44:38 +00:00
Tri Vo
a56e32dca2 Merge "Use a pipe instead of tmp for debugDump tests." am: 458b8fa5bd
am: c62e184a27

Change-Id: If0f38272ff7a4e7982ef9273ed09be7d70b9de16
2017-10-15 03:01:13 +00:00
Tri Vo
c62e184a27 Merge "Use a pipe instead of tmp for debugDump tests."
am: 458b8fa5bd

Change-Id: Ife2cfb8b89c0f550648ea28c339e7278015399c0
2017-10-15 02:56:25 +00:00
Tri Vo
6c00ac31bb Use a pipe instead of tmp for debugDump tests.
Audio hal does not have selinux permissions to files under
/data/locat/tmp. We pass an fd to a pipe to the HAL instead.

Bug: 67665722
Test: VtsHalAudioV2_0Target
Change-Id: I695917be1816ba007f48afab5e978ab31024ffba
2017-10-12 15:47:34 -07:00
Steven Moreland
1d7374c5e1 Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1 am: 6c811964a1
am: 116161d94e

Change-Id: I33643636e2511de77fdf7de57777eb67edee2e52
2017-10-11 16:39:21 +00:00
Steven Moreland
116161d94e Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1
am: 6c811964a1

Change-Id: I85ccbb4a15cd18938607f5bca4e065b9d7e0182b
2017-10-11 16:31:07 +00:00
Steven Moreland
6c811964a1 Update for Soong java makefiles. am: c3e80fa01e
am: 0fff75dee1

Change-Id: I5b524ccf13233f3696881a2a670b5d2134fd5f15
2017-10-11 16:27:24 +00:00
Steven Moreland
0fff75dee1 Update for Soong java makefiles.
am: c3e80fa01e

Change-Id: Ia8835f9c95bd98a96f5fd3aff11191e7d3726fb9
2017-10-11 16:23:54 +00:00
Mikhail Naganov
d4cb163f12 Audio VTS: Allow 4GB buffer prepareToWrite/Read to succeed on 64 bits am: ce607879ba
am: 5b122a7408

Change-Id: Ifd8600fd7d24657dff4ed5b6f563806509c8029b
2017-10-11 01:35:41 +00:00
Mikhail Naganov
5b122a7408 Audio VTS: Allow 4GB buffer prepareToWrite/Read to succeed on 64 bits
am: ce607879ba

Change-Id: I6869d49ab5ceb12e1b0d3e50e0952094c34b3c07
2017-10-11 01:33:25 +00:00
Kevin Rocard
4c30b8b117 Merge "Legacy wrapper: Use arbitrary limit on buffer size" into oc-mr1-dev am: 0f65d6e38a
am: 0534965a28

Change-Id: I46a57ba6be7b9e132728f31d616b65aea812645d
2017-10-11 01:20:53 +00:00
Kevin Rocard
0534965a28 Merge "Legacy wrapper: Use arbitrary limit on buffer size" into oc-mr1-dev
am: 0f65d6e38a

Change-Id: I08d5eb2a782cb5fc60f6e297282ff179e6098ff0
2017-10-11 00:17:36 +00:00
Steven Moreland
c3e80fa01e Update for Soong java makefiles.
Test: pass
Bug: 33420795
Change-Id: Id9b1919a19b8ff682738cfb0869a479b4dbb4293
2017-10-10 23:07:20 +00:00
Mikhail Naganov
ce607879ba Audio VTS: Allow 4GB buffer prepareToWrite/Read to succeed on 64 bits
Because on oc-dev the runtime image can not be modified and that this is
not a bug but a test and implementation misalignment,
allow prepareForWrite/Read(UINT32_MAX, UINT32_MAX) to succeed on oc-dev.

MR1 will have a better fix where the HAL will always reject > 1GiB
buffers independently of the architecture.

Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
Bug: 67030516
Change-Id: I10a5ee3868c67c45ed5297d9c5c89129d762c7cd
Merged-In: I4cc3efda9bb66e6dae8b4e6785f52d9e51440aee
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-10-10 14:30:00 -07:00
Kevin Rocard
46cba442d2 Legacy wrapper: Use arbitrary limit on buffer size
The legacy HAL wrapper prepareForWrite and prepareForRead used
to return INVALID_ARGUMENTS if the computed buffer size just
under SIZE_MAX.

This meant that the limitation depended on the architecture (32 vs 64
bit size_t). This caused VTS test failure on 64 bits.

Instead of dynamically calculating an arbitrary max size,
choose a fixed one. This max buffer size has been chosen at 1GiB.
It should be enough for the foreseeable future and not too close
from the 4GiB max on 32 bit.

Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
Bug: 67030516
Change-Id: I4cc3efda9bb66e6dae8b4e6785f52d9e51440aee
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-10-10 09:22:02 -07:00
Steven Moreland
9b019ac4fe Merge "Remove useless Android.mk files." am: 75d5cf515a am: f27cfa15d7 am: 33dc30ce49
am: 0653f3b212

Change-Id: I7c2da3cf30da7b4a1eda7e5369e9caa5ebab2462
2017-10-05 21:52:50 +00:00
Steven Moreland
0653f3b212 Merge "Remove useless Android.mk files." am: 75d5cf515a am: f27cfa15d7
am: 33dc30ce49

Change-Id: Ia35d20e0fc1df6f7c46b5581537d7ed387965899
2017-10-05 21:51:13 +00:00
Steven Moreland
33dc30ce49 Merge "Remove useless Android.mk files." am: 75d5cf515a
am: f27cfa15d7

Change-Id: I2c554896e817483493faa5bbe54746d4f1c8b8da
2017-10-05 21:46:16 +00:00
Steven Moreland
f27cfa15d7 Merge "Remove useless Android.mk files."
am: 75d5cf515a

Change-Id: I8c0918c4a787cc3f4c7c69f52737d3a0d9d64426
2017-10-05 21:44:26 +00:00
Treehugger Robot
75d5cf515a Merge "Remove useless Android.mk files." 2017-10-05 21:40:27 +00:00
Steven Moreland
4b60470f1a Remove useless Android.mk files.
These have been c/p'd all over the place.

Test: m -j nothing
Bug: 33420795
Change-Id: I77979866dbb2345a41a873c84ec3fccd7b127510
2017-10-04 15:52:40 -07:00
Steven Moreland
70bfb9d250 Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f am: b53e6ad535
am: 9a17f41f6f

Change-Id: I78d9292068b372238554fd9d35128e69f5b5f9d2
2017-10-04 21:54:11 +00:00
Steven Moreland
9a17f41f6f Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f
am: b53e6ad535

Change-Id: I23269fb7a9bdd352e670a80f390527d9eef31412
2017-10-04 21:51:00 +00:00
Steven Moreland
b53e6ad535 Merge "Update for hidl adapter module defaults." am: 988c977079
am: 861651985f

Change-Id: Ifdb878720d42120e7309dd2a49e5a91059ff4b72
2017-10-04 21:48:04 +00:00
Steven Moreland
861651985f Merge "Update for hidl adapter module defaults."
am: 988c977079

Change-Id: I289818be1b30397391847ba1c532d1014fdbed27
2017-10-04 21:45:09 +00:00
Treehugger Robot
988c977079 Merge "Update for hidl adapter module defaults." 2017-10-04 21:36:25 +00:00
Chih-hung Hsieh
bf5e381a8b Merge "Use -Werror in hardware/interfaces" am: 85bb01dd6b am: 3ed04cd35d am: baf19e17b3
am: 9890348480

Change-Id: Iadec8caae33b04a8cef45532fc2c940a8be23cea
2017-10-04 21:23:09 +00:00
Chih-hung Hsieh
9890348480 Merge "Use -Werror in hardware/interfaces" am: 85bb01dd6b am: 3ed04cd35d
am: baf19e17b3

Change-Id: I8806a9887178a7f778cc556c804a5b7a05d59836
2017-10-04 21:04:44 +00:00
Chih-hung Hsieh
baf19e17b3 Merge "Use -Werror in hardware/interfaces" am: 85bb01dd6b
am: 3ed04cd35d

Change-Id: I66c74139be9c7736beb354b5da0381668f4e68c5
2017-10-04 20:49:30 +00:00
Chih-hung Hsieh
3ed04cd35d Merge "Use -Werror in hardware/interfaces"
am: 85bb01dd6b

Change-Id: I9169eb99a256f3a1db9e6f82e11fd96228d9558a
2017-10-04 20:40:30 +00:00
Steven Moreland
527fd76a0e Update for hidl adapter module defaults.
Test: pass
Change-Id: Idc6a943149a279bf17cfcfd0f2571473e53bbbbf
2017-10-04 12:47:03 -07:00
Chih-Hung Hsieh
3da5b01946 Use -Werror in hardware/interfaces
* Remove unused local variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I48dbbf670cc9eeff2391983788983420f8547cc9
2017-10-04 11:16:31 -07:00
Steven Moreland
91799c6cc7 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3 am: 71a193a425
am: 9fdd241905

Change-Id: I1c852fa6600fecc44d5afd1a65a5f51c43ecf71c
2017-09-27 00:02:52 +00:00
Steven Moreland
9fdd241905 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3
am: 71a193a425

Change-Id: I45ae43f07323254212532acbf0f891d11143b05f
2017-09-26 23:58:51 +00:00
Steven Moreland
71a193a425 Merge "Fix typo in update makefiles." am: 9960148420
am: f07e364ce3

Change-Id: If5bbf259458363b755989578c2f3828cbcb3d07c
2017-09-26 23:55:59 +00:00
Steven Moreland
f07e364ce3 Merge "Fix typo in update makefiles."
am: 9960148420

Change-Id: I949634e72f817f3a5411130e968acd8efd1d7725
2017-09-26 23:51:07 +00:00
Steven Moreland
a5299ee739 Fix typo in update makefiles.
Bug: 37518178
Test: pass
Change-Id: Ic401b3a473f15ca4c01e58b3072e19db7c31b653
2017-09-26 21:59:43 +00:00
Kevin Rocard
69a76b1dfa Audio VTS: improve audio policy validation error messages
If multiple config are found, each will be validated before failing the
test.
Also add a missing new line before dumping libxml2 errors.

Test: run the following script to check for regressions and test that
      invalid config make the test fail.

    runTest() {(
      set -xu
      local readonly MODULE=$1
      local readonly TEST=$2
      local readonly XML=$3
      runVTS() { vts-tradefed run commandAndExit vts \
            --skip-all-system-status-check --primary-abi-only \
            --skip-preconditions --module $MODULE -t $TEST |
                 awk '/FAILED: 0/{e=1} {print} END {exit !e}'; }

      local FAIL=0 # used instead of return if clean up is needed

      echo "# Test valid config"
      runVTS || return 1

      echo "# Test multiple invalid match"
      adb shell touch /system/etc/$XML
      runVTS && FAIL=2
      adb shell rm /system/etc/$XML

      echo "# Test multiple valid match (not supported if xinclude)"
      if !adb shell grep -q xi:include /vendor/etc/$XML; then
        adb shell cp /{vendor,system}/etc/$XML
        runVTS || FAIL=3
        adb shell rm /system/etc/$XML
      fi

      echo "# Test invalid config"
      adb shell sed -i "'2i<fuu/>'" /vendor/etc/$XML
      runVTS && FAIL=4
      adb shell sed -i 2d /vendor/etc/$XML

      echo "#Test no config"
      adb shell mv /vendor/etc/$XML{,.hide}
      runVTS && FAIL=5
      adb shell mv /vendor/etc/$XML{.hide,}

      echo "# Test that the test did not break the config"
      runVTS || FAIL=6

      return $FAIL
    )}
    runTest VtsHalAudioV2_0Target CheckConfig.audioPolicyConfigurationValidation audio_policy_configuration.xml &&
    runTest VtsHalAudioEffectV2_0Target CheckConfig.audioEffectsConfigurationValidation audio_effects.xml &&
    echo TEST PASSED

Bug: 64881365
Change-Id: If0443f85e0d687eed04819337519e4d9f09f5ca9
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-09-26 17:15:59 +00:00
Steven Moreland
7741c0e17b Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e am: b94d0c7290
am: 97228c0b7d

Change-Id: Ic4b459b7c1a4325453945b0b00db8f44e4e77c26
2017-09-26 13:36:09 +00:00
Steven Moreland
97228c0b7d Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e
am: b94d0c7290

Change-Id: If766cffbcc003cc0cc5eb98969b924aa918fff44
2017-09-26 12:53:13 +00:00
Steven Moreland
b94d0c7290 Update makefiles for hidl adapter. am: 26a0bb2762
am: 73949c1d7e

Change-Id: I9af2df255ccdac36c8c11bbca973c42ea2e758fe
2017-09-26 12:48:40 +00:00
Steven Moreland
73949c1d7e Update makefiles for hidl adapter.
am: 26a0bb2762

Change-Id: I3a811f5cd49bd4e81e8fcd5c8e88922115812539
2017-09-25 23:14:44 +00:00
Steven Moreland
26a0bb2762 Update makefiles for hidl adapter.
Bug: 37518178
Test: manual
Change-Id: I50e999907d3c64d2b039272b823971998da64d1b
2017-09-25 18:35:56 +00:00
Kevin Rocard
2cf5bc8db5 Audio VTS: do not test duplicate policy configuration file am: ff7dcd7e4d am: ecf7848f67 am: bda21c95d3
am: 0059d60973

Change-Id: Ic3ada96d0379140ae564f690d01a9085ce7f1940
2017-09-14 17:00:27 +00:00
Kevin Rocard
bda21c95d3 Audio VTS: do not test duplicate policy configuration file am: ff7dcd7e4d
am: ecf7848f67

Change-Id: I79f97fb002e036c17b7ab42f1af00ed2b17e60fd
2017-09-14 16:52:54 +00:00
Kevin Rocard
6e72cba5c3 Audio VTS: do not test duplicate policy configuration file am: ff7dcd7e4d
am: ecf7848f67

Change-Id: I781f6eeeb75f3a0d6feed1278a49699e024c2128
2017-09-14 16:52:54 +00:00
Kevin Rocard
ecf7848f67 Audio VTS: do not test duplicate policy configuration file
am: ff7dcd7e4d

Change-Id: Ice54f75c307f9f25e210b1382554dc24162b9ace
2017-09-14 16:48:56 +00:00
Kevin Rocard
ff7dcd7e4d Audio VTS: do not test duplicate policy configuration file
This patch only modifies the VTS tests.

O generic policy configuration fallback is incorrect
(see I2a39606cd820b5cd27a640248bf692204ec2cd71 for the fix).
Nevertheless, has no impact on products because this fallback
is only used in aosp builds and GSI.

Unfortunatly, this break the VTS test when run agains GSI.
Because it is too late to change GSI for Oc and DR,
relax the test to support current O GSI.

For P, ihis patch will not be part of VTS
and the fallback config will be fixed.

Bug: 65535343
Merged-In: I2a39606cd820b5cd27a640248bf692204ec2cd71
Test: Following script:

setup() {
    BUILD_ID=$1
    TARGET_PRODUCT=$2
    TARGET_BUILD_TYPE=${3:-userdebug}
    TARGET_ARCH=${4:-arm64}
    set +x

    echo "The following three variables can be overridden" \
         "by setting the corresponding environment variable"
    set -x
    TEST_SUITES_TARGET=${VTS_TEST_SUITES_TARGET:-test_suites_${TARGET_ARCH}}
    BASE_TARGET=${VTS_BASE_TARGET:-${TARGET_PRODUCT}-${TARGET_BUILD_TYPE}}
    AOSP_TARGET=${VTS_AOSP_TARGET:-aosp_${TARGET_ARCH}_ab-${TARGET_BUILD_TYPE}}
    set +x

    download() {
        local target=$1
        local file=$2
        test -f $file ||
            /google/data/ro/projects/android/fetch_artifact --bid $BUILD_ID --target $target $file ||
            { local r=$?; rm $file; return $r; }
    }

    echo "Downloading"
    download $TEST_SUITES_TARGET 'android-vts.zip'
    download $BASE_TARGET "${TARGET_PRODUCT}-img-${BUILD_ID}.zip"
    download $AOSP_TARGET "aosp_${TARGET_ARCH}_ab-img-${BUILD_ID}.zip"

    echo "Unzipping"
    rm -r system.img android-vts
    unzip aosp_${TARGET_ARCH}_ab-img-$BUILD_ID.zip system.img
    unzip android-vts.zip

    echo "Building vbmeta without verity"
    avbtool make_vbmeta_image --flag 2 --output vbmeta.img

    set -x
    adb reboot bootloader
    fastboot update ${TARGET_PRODUCT}-img-$BUILD_ID.zip --skip-reboot
    fastboot flash vbmeta vbmeta.img || echo "Warning: Device does not support vbmeta"
    fastboot erase system
    fastboot flash system system.img
    fastboot erase metadata
    fastboot -w
    fastboot reboot
    
    echo "Board setup"
    echo "You may now start vts-tradefed with:"
    echo '$ ANDROID_BUILD_TOP= PATH="$PWD:$PATH" vts-tradefed'
}
VTS_TEST_SUITES_TARGET=test_suites_arm64_fastbuild3d_linux setup 4327646 sailfish
 vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation

Change-Id: Ibe1feed41325a3e4fb25e959bd254156348aa584
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-09-14 07:39:25 +00:00
Jaekyun Seok
81104ae5ef Add 'vendor.' prefix to a vendor HAL service name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I4e8fbee791ec917a8f627a1366f4d44ec7e6febc
2017-09-12 08:01:42 +09:00
Kevin Rocard
5b54e5b25f Audio VTS: remove expectation of policy configuration unicity am: 76efe01bbd am: 6b51d9a855
am: 12c64f9ea2

Change-Id: I864ec4f565fd440affc83738d3ccb0cc2221fb0b
2017-09-08 22:15:44 +00:00
Kevin Rocard
12c64f9ea2 Audio VTS: remove expectation of policy configuration unicity am: 76efe01bbd
am: 6b51d9a855

Change-Id: I6a6987ed0155788a211b2cc2f86ec8c9f338165c
2017-09-08 22:14:14 +00:00
Kevin Rocard
81c04d9510 Audio VTS: remove expectation of policy configuration unicity am: 76efe01bbd
am: 6b51d9a855

Change-Id: I59bb70fbc000f424beeb938a08c1fcb24dc08037
2017-09-08 22:14:14 +00:00
Kevin Rocard
6b51d9a855 Audio VTS: remove expectation of policy configuration unicity
am: 76efe01bbd

Change-Id: I23948718eaed0a687cc7dbd6b4940fc8514fbe1b
2017-09-08 22:12:14 +00:00
Kevin Rocard
76efe01bbd Audio VTS: remove expectation of policy configuration unicity
The XML audio policy configuration is expected to be located in /vendor.
Additionally for AOSP builds (no vendor) and as a fallback in case of
missing vendor configuration, the system supports loading the XML from
/system.
This fallback config is not guaranty to be compatible with the phone HAL,
but probably does for a wide range of android phones
(at least for basic use cases).

In each of those cases, there is only one configuration file, either in
/vendor or /system.
As a result, the audio policy configuration VTS test was asserting that
only one audio_policy_configuration.xml could be found.
If multiple were found, one was useless and the platform integrator
should remove it.

But VTS are now run on phone with a /system partition from an AOSP
build and a /vendor partition from a device build.
In such scenario two audio policy config are now present on the device,
thus breaking the VTS expectation.

This is not a problem for the framework because it does not look for a /system
config if one was found in /vendor.

In the future, the /system XML might be removed as boards
specific config should be found in /vendor only as per treble
requirements.

Test: Compile
Bug: 65482614
Change-Id: I7cd7eb7284c0aa52782aa591411f8a9bf2a87a76
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-09-08 11:29:32 -07:00
Kevin Rocard
5f891e4ee0 Allow partially dynamic profile in the audio policy config am: 3092b31b14
am: 0aaff8bead

Change-Id: I5d4389a49ee33a9c2607e1252a456855f2a3a761
2017-09-06 23:44:16 +00:00
Kevin Rocard
0aaff8bead Allow partially dynamic profile in the audio policy config
am: 3092b31b14

Change-Id: Ibafc8f571bdc32353bd974a7fce6e3fd84238711
2017-09-06 23:35:24 +00:00
Kevin Rocard
3092b31b14 Allow partially dynamic profile in the audio policy config
The audio policy configuration deserializer supports fully dynamic
profiles by not setting a profile in a port.
It also supports partially dynamic profile by
not setting @format, @samplingRates or @channelMasks

Nevertheless this last feature of partial dynamic profile
was mistakenly not allowed by the configuration xsd.

Bug: 63541622
Change-Id: I78f77a77a3c62bba28a7da5a0e3c8c608b5a01d9
Merged-In: I78f77a77a3c62bba28a7da5a0e3c8c608b5a01d9
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 43d25f2f26)
2017-09-06 21:16:51 +00:00
Kevin Rocard
43d25f2f26 Allow partially dynamic profile in the audio policy config
The audio policy configuration deserializer supports fully dynamic
profiles by not setting a profile in a port.
It also supports partially dynamic profile by
not setting @format, @samplingRates or @channelMasks

Nevertheless this last feature of partial dynamic profile
was mistakenly not allowed by the configuration xsd.

Bug: 63541622
Change-Id: I78f77a77a3c62bba28a7da5a0e3c8c608b5a01d9
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-09-02 02:37:50 +00:00
Tomasz Wasilczyk
02537a6bcc Merge "Move Broadcast Radio HAL to a separate binary." into oc-mr1-dev 2017-08-29 14:03:01 +00:00
Kevin Rocard
dbe51bced7 Merge "Audio VTS: Look for Audio policy config in all supported folders" into oc-dev am: 4f3c28ad7a
am: b06f544d22

Change-Id: Ia2dda3abb97742f7fcb6a98568c2e095944c38a6
2017-08-29 00:49:16 +00:00
Kevin Rocard
ab19e162ec Merge "Audio VTS: Look for Audio policy config in all supported folders" into oc-dev am: 4f3c28ad7a
am: b06f544d22

Change-Id: Id525d075289896bb5cb708aa104eef0ee622d61c
2017-08-29 00:49:09 +00:00
Kevin Rocard
b06f544d22 Merge "Audio VTS: Look for Audio policy config in all supported folders" into oc-dev
am: 4f3c28ad7a

Change-Id: I43a48595607a1c38475aec81232008ac76cdd5b1
2017-08-29 00:34:29 +00:00
Tomasz Wasilczyk
f4bae95eab Move Broadcast Radio HAL to a separate binary.
Bug: 63600413
Test: VTS, instrumentation
Change-Id: I34a779a6608f52bcadaca1dc159bcee02186b49f
2017-08-28 09:45:40 -07:00
Kevin Rocard
6dcc713281 Audio VTS: Look for Audio policy config in all supported folders
audio_policy_configuration.xml can be loaded from the following places:
 - /system/etc/
 - /vendor/etc
 - /odm/etc
Nevertheless the config validation test was expecting it to be in
/vendor/etc exclusively.

This patch changes the test logic to:
 - look for the config files in all 3 folders
 - make sure the config is unique

Test: run the following script to check for regressions and test that
      invalid config make the test fail.
  (
  set -xe
  runVTS() { vts-tradefed run commandAndExit vts \
        --skip-all-system-status-check --primary-abi-only \
        --skip-preconditions --module VtsHalAudioV2_0Target \
        -t CheckConfig.audioPolicyConfigurationValidation; }

  echo "# Test valid config"
  runVTS

  echo "# Test multiple invalid match"
  adb shell touch /system/etc/audio_policy_configuration.xml
  ! runVTS
  adb shell rm /system/etc/audio_policy_configuration.xml

  echo "# Test multiple valid match"
  adb shell cp /{vendor,system}/etc/audio_policy_configuration.xml
  ! runVTS
  adb shell rm /system/etc/audio_policy_configuration.xml

  echo "# Test invalid config"
  adb shell sed -i /defaultOutputDevice/p /vendor/etc/audio_policy_configuration.xml
  ! runVTS
  adb shell sed -i '"/defaultOutputDevice/{p;N;d}"' /vendor/etc/audio_policy_configuration.xml

  echo "# Test that the test did not break the config"
  runVTS
  )

Bug: 64881365
Change-Id: I9db5e6f727d19fd654a3cc543a2aaab196682001
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-08-23 01:24:44 +00:00
Tri Vo
c619cac2be Merge "Audio test statically links to dependencies." into oc-mr1-dev 2017-08-16 17:33:24 +00:00
Tri Vo
eb8dfd8c01 Audio test statically links to dependencies.
This test now statically links to libs not guaranteed to be on the
device.

Bug: 64040096
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check 
--primary-abi-only --skip-preconditions 
--module VtsHalAudioEffectV2_0Target
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check 
--primary-abi-only --skip-preconditions 
--module VtsHalAudioV2_0Target

Change-Id: I331d7e4abdf7e520df6d508a8059b6358ad4398f
2017-08-15 17:38:58 +00:00
Steven Moreland
dfd8287506 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Merged-In: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
Change-Id: I170fa1c4fe39f8109b1670db58ef99bb11afc0be
2017-08-14 20:25:09 +00:00
Steven Moreland
ff308ea6ba Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Change-Id: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
2017-08-11 22:58:47 +00:00
Justin Yun
eff28dc3ba Mark hidl utils as vndk
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
    enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Change-Id: If0eb0c1bddfa5bdc7ea0ca4635d4e53b59836582
2017-08-04 15:25:13 +09:00
Justin Yun
608d773ef8 Update make file for vndk enabled.
Update the Android.bp generated with hidl-gen.

Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
2017-08-04 14:12:23 +09:00
Tri Vo
f5d136c231 Update Android.bp HIDL makefiles
Allow HAL definition libs to be static.

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
2017-08-03 00:30:01 +00:00
Kevin Rocard
f088e57008 Merge "Audio policy config xsd: add missing gains and address in ports" into oc-dev am: 90e68d31cf
am: e93e38a91d

Change-Id: I9c1c4929b4edeebd8e3d1173312e07f62ad29fc0
2017-08-01 00:08:46 +00:00