Commit Graph

13276 Commits

Author SHA1 Message Date
Peiyong Lin
e84a7ff235 [Graphics] Add lpy@ and vhau@ to OWNER file.
BUG: N/A
Test: N/A
Change-Id: Ifca0bb859d7f2b970638627321921e1c439678bb
2018-12-05 18:52:48 -08:00
Xiangyu/Malcolm Chen
e665264cfd Merge "Define CBRS HAL interfaces in IRadio 1.3 and IRadioConfig 1.1." 2018-12-01 19:30:42 +00:00
TreeHugger Robot
3511294276 Merge "[Graphics] Introduce per display capability." 2018-12-01 00:32:44 +00:00
Kevin Rocard
b75130b680 Merge changes from topic "policy-xml-vts"
* changes:
  Audio VTS: Reset HAL after setConnectionState
  Audio HAL: do not test input stream if no Built-in mic on primary
2018-11-30 23:24:18 +00:00
Steven Moreland
31cc9a38d2 Merge "Set use_current for current.txt." am: 8f7b63db44 am: 00d5b62742
am: 36b163760a

Change-Id: I55ac2740e265a64f77662000c52dac2f8123b922
2018-11-30 14:58:41 -08:00
Steven Moreland
36b163760a Merge "Set use_current for current.txt." am: 8f7b63db44
am: 00d5b62742

Change-Id: Iaad56a99ebaf396b3056da772e73b7f152a36216
2018-11-30 14:47:56 -08:00
Steven Moreland
00d5b62742 Merge "Set use_current for current.txt."
am: 8f7b63db44

Change-Id: I1d52bd2da5397abe52353d498687cf8cb97eabb9
2018-11-30 14:37:11 -08:00
Steven Moreland
8f7b63db44 Merge "Set use_current for current.txt." 2018-11-30 22:23:33 +00:00
Kevin Rocard
96d47c886e Merge changes from topic "audio-pre-v5"
* changes:
  Audio VTS: Simplify sequential #if
  Audio VTS: Fix missing whitespace in error message
  Audio HAL: Factorize Android.bp
  Audio HAL: Update file tree documentation
  Audio HAL: Factorize V2 and V4 like libaudiohal
  Audio VTS: Move version specific code to its own file
  Audio HAL: Align V2 and V4 VTS
  Audio HAL: Cleanup implementation
  Audio: Run clang-format on all files
2018-11-30 22:20:41 +00:00
Malcolm Chen
e61e3b7c09 Define CBRS HAL interfaces in IRadio 1.3 and IRadioConfig 1.1.
Bug: 117805040
Test: build and telephony unittest
Change-Id: I79e188ef742c3d5167f32c359e86e435f55f4a75
2018-11-30 11:12:41 -08:00
Steven Moreland
4fb17ff880 Merge "Update makefiles." am: 2f3c139981 am: 464839dc43
am: a3beee1be9

Change-Id: I5ff7f3a71d3b2ae503f347ffd50b94797dc92a7e
2018-11-30 01:19:22 -08:00
Steven Moreland
a3beee1be9 Merge "Update makefiles." am: 2f3c139981
am: 464839dc43

Change-Id: I962799022b85fdfb7c5adef0c30ff5e2e74a3eaf
2018-11-30 01:02:29 -08:00
Alistair Strachan
0898d6dfbb Merge "Add 4.19 to compatibility_matrix.current.xml" am: 43ec700725 am: f1f3e0e45e
am: 3d4ee6288a

Change-Id: I1972ed02aef01de4df4c510f228973fc5a347ce6
2018-11-30 01:00:35 -08:00
Alistair Strachan
3d4ee6288a Merge "Add 4.19 to compatibility_matrix.current.xml" am: 43ec700725
am: f1f3e0e45e

Change-Id: I2faf9d87f08e8695ab7d6bae4fa66d571a57d98c
2018-11-30 00:47:00 -08:00
Steven Moreland
464839dc43 Merge "Update makefiles."
am: 2f3c139981

Change-Id: I2ad21e8fcf1f1914bb6e7d7b741e32552c69c246
2018-11-30 00:41:51 -08:00
Alistair Strachan
f1f3e0e45e Merge "Add 4.19 to compatibility_matrix.current.xml"
am: 43ec700725

Change-Id: Iafa9118d0df9acd8c65c78ca0e3ed3c215e27c8b
2018-11-30 00:31:47 -08:00
Jimmy Chen
ee8663de0e Merge "p2p: add groupAdd method accepts the group configuration" 2018-11-30 06:19:22 +00:00
Treehugger Robot
2f3c139981 Merge "Update makefiles." 2018-11-30 04:39:23 +00:00
Treehugger Robot
43ec700725 Merge "Add 4.19 to compatibility_matrix.current.xml" 2018-11-30 04:30:20 +00:00
Steven Moreland
6b110994d2 Update makefiles.
Bug: N/A
Test: N/A
Change-Id: Ie4ccc7f7638e9eca3bcd43c36c16f2f0053ac596
2018-11-29 18:05:35 -08:00
Yu-Han Yang
b0469ebebd Merge "Add GNSS HAL v2.0" 2018-11-30 01:34:33 +00:00
Steven Moreland
0a28e1cf83 Set use_current for current.txt.
This option is being added in order to add current.txt into the build
graph.

Bug: 119117395
Test: m nothing (checks the build graph)
Change-Id: I98490d70ad297e1628ed95fbebd082c03b287d63
2018-11-29 17:13:58 -08:00
Peter Kalauskas
8dc5ab28b4 Add separate lazy service target to cas am: f646be06ed am: 17763ce064
am: 6cef60283a

Change-Id: Ic1d12f6ffbf56e1baaa3aeea2db8243f26256fbd
2018-11-29 09:58:58 -08:00
Peter Kalauskas
6cef60283a Add separate lazy service target to cas am: f646be06ed
am: 17763ce064

Change-Id: I5ebb2e87b91bb831e59db870f9b794113f05c3b2
2018-11-29 09:55:10 -08:00
Peter Kalauskas
17763ce064 Add separate lazy service target to cas
am: f646be06ed

Change-Id: I9638b4d94cc4d472d54def6b657eea520fc7c8a0
2018-11-29 09:47:00 -08:00
TreeHugger Robot
ee0ba36773 Merge "Camera: update VTS for new useHalBufManager feature" 2018-11-29 13:08:24 +00:00
Peiyong Lin
55d50d6b77 [Graphics] Introduce per display capability.
Previously, the capability of skipping client color transform is global that
will apply on all displays. However, some hardwares are not capable of managing
it for all displays. This patch introduced a per display capability.

BUG: 69911676
Test: Build with mmma hardware/interfaces
Change-Id: I4a143ea89d06bd30ad2bf3f5307c8af9b17f0890
2018-11-29 00:23:44 -08:00
TreeHugger Robot
0396331a72 Merge "Camera: Fix MONO and NIR enumeration version" 2018-11-29 06:38:47 +00:00
Kevin Rocard
681846f009 Audio VTS: Reset HAL after setConnectionState
There is no way of restoring the HAL state without restarting it.

Bug: 111681420
Test: atest VtsHalAudioV4_0TargetTest
      Check that the HAL is restarting after the test in the logcat
Change-Id: I9e3d9da08ed9e8dc25c7fc05c2bafa5455727508
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00
Kevin Rocard
55a5b8b482 Audio VTS: Simplify sequential #if
Test: compile
Change-Id: Ie30b0df64d122a8cac0a5fc8b2ebc5255fccbc24
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00
Kevin Rocard
575c63f7f0 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: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00
Kevin Rocard
a497499c4a Audio VTS: Fix missing whitespace in error message
Test: outpout the error
Change-Id: Ibba04f12e489e3b526ae9fe4758e2ae540095d89
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00
Kevin Rocard
1108d4a9db Audio HAL: Factorize Android.bp
Lots of Android.bp content was duplicated per version.

Bug: 118203066
Test: compile
Change-Id: I4072314f1e1278c6d876fc681ba20363728f151b
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00
Kevin Rocard
d10247b7f2 Audio HAL: Update file tree documentation
Test: none, its doc
Change-Id: Ifc97425ca3bdc41d61c986e4e59b8b2733f3da9c
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00
Kevin Rocard
96d2cd9d5c Audio HAL: Factorize V2 and V4 like libaudiohal
Use the same technique developed for the simpler libaudiohal to
factorize the audio HAL impl.

Generated with script:

set -euo pipefail

cd hardware/interfaces/audio

# Make 2.0 and 4.0 files mostly identical by removing all 2.0, V4.0...
# and replacing it by CPP_VERSION and FILE_VERSION
# This allow both implementation to be mostly identical, except for code difference
# Also remove IncludeGuard.h as it will be included from compiler flag
# Also update license to 2018
find -name *.cpp -o -name *h |
    grep -v -e service.cpp |
    xargs sed -Ei \
        -e 's/(#.*)V[42]_0_(.*_H_?)$/\1\2/' \
        -e 's/(LOG_TAG.*)[24]_0/\1/' \
        -e '/#ifndef AUDIO_HAL_VERSION/,/#endif/d' \
        -e '/^#.*def.*AUDIO_HAL_VERSION\b/d' \
        -e's/V[42]_0/CPP_VERSION/' \
        -e 's/(#include ).(android.*)[24].0(.*).$/\1PATH(\2FILE_VERSION\3)/' \
        -e 's|(#include) .(.*)[24].0/(default/.*).$|\1 "\2\3"|' \
        -e 's/\bAUDIO_HAL_VERSION\b/CPP_VERSION/' \
        -e '/IncludeGuard.h/d' \
        -e 's/(Copyright .C. 201)./\18/'

# set MAJOR_VERSION instead of having a different macro for each version
# this allow to do preprocessor arithmetic (eg: MAJOR_VERSION >= 4)
for v in 2 4; do
    find -ipath '*/'$v'.0/*/Android.bp' |
        xargs sed -i -e '/cflags:/,/^$/d' -e '/vndk/{:a;/}/!{N;ba};d}' -e '$i\
    cflags: [\
        "-DMAJOR_VERSION='$v'",\
        "-DMINOR_VERSION=0",\
        "-include common/all-versions/VersionMacro.h",\
    ]'; done

# replace# ifdef VERSION_X by #if MAJOR_VERSION == X
find -path *all-versions/*.h |
    xargs sed -Ei -e 's/def.*AUDIO_HAL_VERSION_([24])_0.*/ MAJOR_VERSION == \1/' \
                  -e 'T;s/ +/ /'

# copy all-versions impl in each version impl
find -path '*/[24].0/*.[hc]*' |
    grep -ve all-versions -e test |
    xargs -P99 -n4 sed -i -Ee '/include <.*all-versions.default/!b' \
        -e 's#.*<#find -path */#' -e 's/>$/|xargs tail -n +16/' -e e

# remove all-versions impl
rm -r {core,effect}/all-versions/

# merge version impl into a single all-version
for dir in core/*.0/vts/functional/*.0/ ;do
    dest=$(echo $dir | sed 's#/..0/#/all-versions/#')
    mkdir -p $dest
    mv -T $dir $dest
done

find -mindepth 3 -path '*/2.0/*' -a \( -name '*cpp' -o -name '*h' \) |
    grep -v 'all-versions' |
    sed -E 'h;s/2/4/g;H;s/4.0/all-versions/;s/4.0//;H;g;s/\n/ /g;'|
    xargs -P99 -L1 sh -c '
        set -euo pipefail
        mkdir -p $(dirname $2);
        diff --old-group-format="#if MAJOR_VERSION == 2
%<#endif
" \
             --new-group-format="#if MAJOR_VERSION == 4
%>#endif
"       $0 $1 > $2 || true;
        rm $0 $1'

# merge the X.0 Android.bp & OWNERS in the all-versions
for dir in common effect core; do
    for sub in default vts/functional; do
        test -f $dir/2.0/$sub/Android.bp || continue
        awk 1 $dir/*.0/$sub/Android.bp >> $dir/all-versions/$sub/Android.bp
        # delete licenses except for the first one and add whitelines
        sed -i -e '/^}$/{N;/^}\n$/!s/\n/&\n/}' $dir/all-versions/$sub/Android.bp
        sed -i -e '1,17b;/^\/\//,/^$/{d}' $dir/all-versions/$sub/Android.bp
    done
    for sub in default vts; do
        test -d $dir/2.0/$sub || continue
        test -f $dir/2.0/$sub/OWNERS &&
            awk 1 $dir/*.0/$sub/OWNERS | sort -u > $dir/all-versions/$sub/OWNERS ||
            true
        rm -r $dir/*.0/$sub
    done
done

# delete all-versions-impl dependencies
find -name 'Android.bp' | xargs sed -i -e '/all-versions-impl/d'

# cleanup unused files
rm common/all-versions/default/include/common/all-versions/default/HidlUtils*
rm common/all-versions/util/include/common/all-versions/IncludeGuard.h
find -depth -type d -empty -delete

# Clamp consecutive number of empty lines to 2
find -name *.cpp -o -name *h | xargs sed -Ei ':a;/^\n*$/{N;ba};s/\n\n+/\n\n/'

# transform #endif\n#if to #elif
find -name *.cpp -o -name *h | xargs sed -i '/^#endif/{N;s/.*\n#if/#elif/}'

# remove leftover include guard in cpp
find -name *.cpp |xargs sed -Ei '/^#.*_H_?$/d'

# apply clang-format
find -name *cpp -o -name *h |
    xargs ../../../prebuilts/clang/host/linux-x86/clang-stable/bin/clang-format --style file -i
# clang format breaks PATH(a/b) to PATH(a / b), remove the space surrounding /
find -name *cpp -o -name *h | xargs sed -i "/#include PATH/s# / #/#g"

Test: compile
Bug: 118203066
Change-Id: I3692a444307afc5f71064fe0b9e6b8af3c9ff1dd
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00
Kevin Rocard
6166ef40f9 Audio VTS: Move version specific code to its own file
Move most version specific VTS in their own files.
Keeping the mostly common code in a header.

Bug: 118203066
Test: compile
Change-Id: I458e120c702cc0199104ec13244752d5587686bd
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00
Kevin Rocard
f5305b3615 Audio HAL: Align V2 and V4 VTS
It was thought that the V2 VTS were not going to be supported after V4
VTS were created. Thus a large portion of the code was copy paste and
modified.

That assumption ended up wrong as a lot of OEM reported bugs that needed
to be fixed in both versions.

As a result align the code of both version VTS as much as possible.
The code will be merged in a follow up patch.

Bug: 118203066
Test: compile
Change-Id: I994232db237b5d7c52e7d796f199ab3c6eec21f4
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 17:56:19 -08:00
Kevin Rocard
1770b3b44a Audio HAL: Cleanup implementation
Rename files so that, if they are in a X.0 folder, their name does
not contain that version number. That allows for easier copy paste
when creating a new version.

Conversion.h was included from the all-versions instead of the X.0
headers. This in incoherent with the other headers.

Add VersionMacro.h that will be used in the follow up patch.

Also remove shim from VNDK as only stable ABI&API libraries should be
part of it.

Test: Compile
Bug: 118203066
Change-Id: I9cd77b3df5ccede5ae51c3cc94fab5939c51d9ef
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 17:54:35 -08:00
Kevin Rocard
55b1061d9c Audio: Run clang-format on all files
That will permit minimal change on future refactors.

Bug: 118203066
Test: compile
Change-Id: Ibed095d3821e2f7b6177faa07775bde9821459c7
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 17:54:35 -08:00
Yu-Han Yang
9c6c20b506 Add GNSS HAL v2.0
- Add GnssMeasurementCodeType in IGnssMeasurementCallback.
- Add VTS tests.
- Add default implementation.

Bug: 112260995
Change-Id: Ie319cc793e9b23e86d672c826c4f5fd6a0f90d04
Fixes: 112260995
Test: atest VtsHalGnssV2_0TargetTest
2018-11-28 15:17:28 -08:00
Keun Soo Yim
868c0694bb Merge "pack VTS cc_test binaries as general-tests" 2018-11-28 21:20:36 +00:00
Yin-Chia Yeh
4d25042aef Camera: update VTS for new useHalBufManager feature
Test: updated vts pass on B1 internal/external camera HAL
Bug: 109829698
Change-Id: I09de76b93e88e88a7b67df0b22dda7f19596c8e4
2018-11-28 11:59:53 -08:00
Peter Kalauskas
f646be06ed Add separate lazy service target to cas
Test: Run cts test android.media.cts.MediaCasTest
Bug: 119050069
Change-Id: I5117e4d10931affe85f2a0bb437d2fefb291e18f
2018-11-28 11:56:04 -08:00
Shuzhen Wang
a5504b86ec Camera: Fix MONO and NIR enumeration version
Test: VTS test passes
Bug: 70216652
Change-Id: I33bdc849e6655285b76a20d697fdab31cbea260d
2018-11-28 19:52:53 +00:00
Elliott Hughes
8009b3ccce Merge "C++17 compatibility: add a non-const char* overload." am: f919d0a0b8 am: 9ef0004adc
am: 6464114f34

Change-Id: If291303fec3c252f90a119431c6124d81ec46b2d
2018-11-27 17:15:05 -08:00
Elliott Hughes
6464114f34 Merge "C++17 compatibility: add a non-const char* overload." am: f919d0a0b8
am: 9ef0004adc

Change-Id: Id01cceb75b1f4f1ff98b0550b089d93c56da9849
2018-11-27 17:10:54 -08:00
Elliott Hughes
9ef0004adc Merge "C++17 compatibility: add a non-const char* overload."
am: f919d0a0b8

Change-Id: If7e1734510436b2434663122b7a79a00b0ec03a7
2018-11-27 17:00:38 -08:00
Elliott Hughes
f919d0a0b8 Merge "C++17 compatibility: add a non-const char* overload." 2018-11-28 00:43:14 +00:00
Keun Soo YIM
ff84c37bc1 pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-11-27 16:11:41 -08:00
Malcolm Chen
a7e8579626 [automerger skipped] Migration of IRadioConfig 1.1 types to 1.2. am: fd5aca9399 am: f5a7671b65
am: 5efa682e8d  -s ours

Change-Id: Ib06255ff2ccbe740d575d1ec1a861cd4f17a3092
2018-11-27 13:59:04 -08:00