Commit graph

529 commits

Author SHA1 Message Date
Enrico Granata
1d2be904df Remove spurious cflags from AudioControl HAL 1.0
Nothing in the Android tree appears to reference AudCntrlDrv, and
there is no reason why we should ship a HAL implementation running
at O0

Test: build
Change-Id: I14a3d910d9654ce438930bfa83cec39a7ef99dc2
2020-01-21 16:08:23 -08:00
chrisweir
204b8f9206 Refactor baudrate to bitrate
Refactoring baudrate to bitrate to be consistent with terminology in
the broader literature.

Bug: 147448388
Test: Manual + VTS
Change-Id: I161b39727a3fd50ea5eddafed6fbd4924ccd149f
2020-01-11 01:05:59 +00:00
chrisweir
39187dbbff Add support for registering existing interfaces
This adds support for native and slcan interfaces which are already
configured up to be registered in the CAN bus HAL.

Bug: 142655647
Test: manual
Change-Id: Ifd129db14dbf473bb627ebc9b9d13f5cb945b611
2020-01-07 15:49:15 -08:00
TreeHugger Robot
1d0c4bbee9 Merge "Enable java backend for occupant awareness iface." 2020-01-06 20:19:32 +00:00
Chris Weir
d7e18f699d Merge "Add VTS tests for EFF/RTR" 2020-01-06 19:23:32 +00:00
chrisweir
f53a4e2ff3 Add VTS tests for EFF/RTR
Remote transmission request, and extended format id's require testing to
verify that the feature works correctly.

Also included is a fix which correctly sets the EFF and RTR flags of the
canfd_frame object based on the state of the CanMessage object.

A readability change is made to the types.hal which improves clarity of
the way filters are defined.

Bug: 146173498
Test: run the VTS tests in vts/functional - verify that they pass
Change-Id: I9892a2e2465b8c381774e7ee277bfa8660f25028
2020-01-06 10:05:25 -08:00
Changyeon Jo
6caf74b061 Implement getPhysicalCameraInfo() method
This change adds a new method, getPhysicalCameraInfo(), to IEvsCamera
interface, implements it in the default implementation, and update
corresponding VTS test cases.

Bug: 142275664
Test: VtsHalEvsV1_1TargetTest
Change-Id: Ic993d5670c34f05ef8d807708f27dec75008b04b
Signed-off-by: Changyeon Jo <changyeon@google.com>
2020-01-04 09:56:06 -08:00
Changyeon Jo
a203a13bf3 Update EVS VTS test cases
This change updates existing EVS VTS test cases to verify the logical
camera device.

Bug: 142275664
Test: VtsHalEvsV1_1TargetTest
Change-Id: Ieebb09a3bbf948ab60d0498a359be8f8c726735c
Signed-off-by: Changyeon Jo <changyeon@google.com>
2020-01-04 09:56:06 -08:00
Changyeon Jo
273c37d303 Fix EVS frame handler for VTS
This change updates FrameHandler to handle and count delivered EVS
frames correctly.

Bug: 142275664
Test: VtsHalEvsV1_1TargetTest
Change-Id: I098bcf8155c9e4211ec0152b2a828520b6c22dc2
Signed-off-by: Changyeon Jo <changyeon@google.com>
2020-01-04 09:56:06 -08:00
Changyeon Jo
3e80b3b528 Fix EVS VTS test cases
This change modifies logics to verify test results that need to parse
events from EVS manager.  Especially, test cases that run multiple
camera clients spawn threads to listen EVS events.

Also, this updates waitForEvent() method to return more precise results.

Bug: 142275664
Test: VtsHalEvsV1_1Target
Change-Id: Ic328217be1e49a3a862facf783a5356ac34ce9ed
Signed-off-by: Changyeon Jo <changyeon@google.com>
2020-01-04 09:56:06 -08:00
Changyeon Jo
56c9b37795 Prerequsite changes for EVS multi-camera support
This change modifies existing methods and data types for upcoming EVS
multi-camera support.
- deliverFrame_1_1() and doneWithFrame_1_1() are modified to take
  multiple buffer descriptors.
- setIntParameter() and getIntParameter() are changed to return multiple
  parameter values.
- Device ID and timestamp fields are added to BufferDesc.
- EvsEvent is renamed as EvsEventDesc and Device Id is added.

Bug: 142275664
Test: VtsHalEvsV1_1TargetTest
Change-Id: I0415b2cb0642d1377f4d23a4e154080a66c81187
Signed-off-by: Changyeon Jo <changyeon@google.com>
2020-01-04 09:56:06 -08:00
Tomasz Wasilczyk
f9e869e277 CAN bus HAL VTS: read interface names from device manifest
Bug: 143635976
Test: VTS
Change-Id: I99dc0de992dff8ffef03572fd38f57f38b7975ab
2020-01-02 14:31:29 -08:00
Kathan Shukla
ce00636ce5 Enable java backend for occupant awareness iface.
This change also enables VNDK libbraries to use occupant awareness NDK.

Test: Build test.
Change-Id: Ib85ca91252b9b96b53d886ad85f723b1d1f6178e
2019-12-26 03:22:55 -08:00
Hao Chen
bae27ff8c1 Merge changes I6686a15d,I6c561d51
* changes:
  Set Timestamp By the Server when the client called 'set'
  Simplify Connector class APIs and hierachy
2019-12-20 18:50:36 +00:00
Hao Chen
0885f9b10a Set Timestamp By the Server when the client called 'set'
Test: Build; unit tests `atest packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/CarPropertyTest.java`

Bug: b/141493212

Change-Id: I6686a15d6e9fa483d9b361acfe88001b7497b937
2019-12-20 10:48:45 -08:00
Hao Chen
de6835be3e Simplify Connector class APIs and hierachy
Test: Build; unit tests `atest
 packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/CarPropertyTest.java`

Bug: b/141493212

Change-Id: I6c561d517646760dfff63cb6c6b50c3c5994098a
2019-12-20 10:48:15 -08:00
TreeHugger Robot
00df3442e4 Merge "Migrate CAN bus HAL to nested namespaces" 2019-12-20 18:46:49 +00:00
Tomasz Wasilczyk
55f21936e9 Migrate CAN bus HAL to nested namespaces
Test: it builds
Change-Id: I83d9ef4f1fff1585e6487c95f09b55b1aa5b3e63
2019-12-20 09:20:24 -08:00
Hao Chen
5f82b989bb Merge changes from topic "proto_package_name"
* changes:
  A more generalized package name for VHal proto IDLs
  Protobuf message converter should be a public utility library
2019-12-19 21:30:40 +00:00
Chris Weir
d65c829d30 Merge "Add support for error, RTR, and EFF frames" 2019-12-13 22:47:56 +00:00
chrisweir
bee3d2c3c9 Add support for error, RTR, and EFF frames
Error frames, remote transmission request, and extended format frames
require some changes to the way that we set up our sockets.

Bug: 142655821
Bug: 144774939
Test: manual
Change-Id: I06212cb852d480c1c7093e8c509ca8aa9f85f81f
2019-12-12 14:21:38 -08:00
Zhaoming Yin
497cc64544 Add fuzzer for FormatConvert
Bug: 146086281
Test: Follow go/android-fuzzing to build and test

Change-Id: Id94c57ba1b327cd4af2ae72fb0259953fa941d45
2019-12-12 13:09:57 -08:00
Hao Chen
5deac06ad9 A more generalized package name for VHal proto IDLs
Test: build; test (and submit) with ag/9868729

Change-Id: Iacdf518d8c90485430a009e341dd1fd705b7ee83
2019-12-06 16:01:28 -08:00
Hao Chen
1c1fdca026 Protobuf message converter should be a public utility library
Test: Built, and flashed to Osprey (go/enable-google-vhal-on-osprey)

```
# See value changed in Vehicle HAL tab, KitchenSink app:
$ python packages/services/Car/tools/emulator/prop_event_simulator.py
--property
VEHICLEPROPERTY_HVAC_AC_ON --area 0 --value 1

# unit tests
$ atest android.hardware.automotive.vehicle@2.0-default-impl-unit-tests
```

Change-Id: I3841870614f316f2f0e2f54283674223a0b036f4
2019-12-06 15:58:20 -08:00
TreeHugger Robot
46966c824f Merge "Fix sp<> crash on stack-allocated service object." 2019-12-06 17:55:16 +00:00
Kathan Shukla
d37e5c122a Add VTS tests for Occupant Awareness HIDL.
Test: VTS tests

Change-Id: Ib278986334439d181348800c01332606f9d36a89
2019-12-05 18:31:03 -08:00
Tomasz Wasilczyk
201734e551 Fix sp<> crash on stack-allocated service object.
Bug: 145609858
Test: build, boot
Change-Id: Ia705750c77ee8ba950d19eae9bbd208b0dac2310
2019-12-05 13:54:50 -08:00
Kathan Shukla
56c98e4cf1 Mock hal for Occupant Awareness interface.
Mock hal has limited capability - driver and front passenger presence
detection and driver monitoring detection.

Bug: 142383127
Test: VTS tests
Change-Id: I72e4b443a0d8063288e14333bd9ebbb1f2c19720
2019-12-05 11:19:47 -08:00
Kathan Shukla
88d63ccbd7 Fix spelling of presence in Occupant Awareness.
Test: Build test
Change-Id: I1961c54cafd343acd75fac04535e952000dbdb99
2019-12-04 15:55:15 -08:00
Kathan Shukla
b6261cb2ae Default hal for Occupant Awareness.
Bug: 142383127
Test: Verified that the system starts the default hal automatically.
Change-Id: I851f85bc283165891943b82c6c07f3273847b032
2019-11-26 14:54:35 -08:00
Kathan Shukla
382ed1d65d Occupant Awareness HAL definitions.
Occupant awareness default HAL and VTS tests will be added as part of a
separate commit / CL.

Bug: 142383127
Test: Verified that system starts default hal.
Change-Id: I24e1c52c9873fc4e0fc09db24d0def9a04175120
2019-11-26 14:54:32 -08:00
Keun-young Park
f3b8f482be Merge "Add DISABLED_OPTIONAL_FEATURES property" 2019-11-25 17:58:41 +00:00
Hao Chen
ad1222486d Merge "Add GRPC Server as a Library to VHal Build File" 2019-11-22 22:37:18 +00:00
Hao Chen
744fe1a75b Merge changes Iab77a0ae,Ibf525ffe
* changes:
  Applying the vehicle connector to the VHAL
  Implement the connector for emulated vehicles
2019-11-22 19:03:40 +00:00
Hao Chen
fba3ac86cc Applying the vehicle connector to the VHAL
Make VHAL to use the connector/server interfaces instead of talking to
the (faked) vehicle directly. Use passthrough connector for now since we
have not moved to the virtualized scenario yet (but soon :)

Bug: b/141493212

Test: On both Osprey and Hawk. Build and flash the image. If on Osprey, see
go/enable-google-vhal-on-osprey; if on hawk, `aae app vhal apply google`
to enable Google VHAL

```
# no VHAL crash
$ adb logcat

$ vts-tradefed
> run vts-hal-auto -m VtsHalAutomotiveVehicleV2_0Host
# 30 passed, 2 failed, the same as the result before this patch

# See value changed in Vehicle HAL tab, KitchenSink app:
$ python packages/services/Car/tools/emulator/prop_event_simulator.py --property
VEHICLEPROPERTY_HVAC_AC_ON --area 0 --value 1

# unit tests
$ atest packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/CarPropertyTest.java
```

Change-Id: Iab77a0ae32db2c55b4c65aa8f3e4f73ec9ef2644
2019-11-21 16:57:31 -08:00
Hao Chen
3ebbb8273f Add GRPC Server as a Library to VHal Build File
Bug: b/141493212

Test: Tested with ag/9775633, successfully compiled, also tested with ag/9775563

Change-Id: Icf046aafe3d5794a8b79183baa370bdbbcdb796a
2019-11-21 14:51:04 -08:00
Hao Chen
cda8e6e03a Implement the connector for emulated vehicles
Some functions are copyed from the original VHAL implementation. The
ones left in the old implementation will be removed after enabling the
Vehicle Connector. Keeping them right now because otherwise it will
break the build.

Bug: b/141493212

Test: since nothing changed in the "active" code, just compiled by `mm`

Change-Id: Ibf525ffe056d6a4c789a7a407eb0b54f61858041
2019-11-21 13:21:49 -08:00
Keun young Park
697cb33c45 Add DISABLED_OPTIONAL_FEATURES property
- This allows disabling specific optional features in car service from
  vehicle hal layer.

Bug: 144504820
Test: run with car service

Change-Id: I419ad86b75151aba129730bdc75c9bc1e47333cf
2019-11-20 18:29:35 -08:00
Prachi Hande
8068753e78 Merge "VmsUtils: Add new methods to parse availability state messages" into qt-qpr1-dev am: 0d1d5a0697
am: 6533853937

Change-Id: I1380935021936bb530ddeeaad3b76e00664d0a1f
2019-11-19 13:07:56 -08:00
Prachi Hande
6533853937 Merge "VmsUtils: Add new methods to parse availability state messages" into qt-qpr1-dev
am: 0d1d5a0697

Change-Id: Id96237e0638dad9fa3d6edcba768c8a5606e5ee4
2019-11-19 13:04:33 -08:00
Zhaoming Yin
5bfecf49a7 Make HAL default service run on crosshatch_car (VINTF registration)
Bug: 144734708
Test: manually, once compiled and flashed, the service will be in the
      VINTF service list.

Change-Id: I92d05557ddc7c95f697d2f5a88ab8f481c4d0e5b
2019-11-19 19:35:40 +00:00
Kai Wang
683ad9fa44 Merge "Support chose permissions for vendor property" 2019-11-19 19:02:47 +00:00
Prachi Hande
dbce8697bd VmsUtils: Add new methods to parse availability state messages
These methods are needed in the HAL client to parse sequence number and
associated layers when the availablity of the VMS layers change.
HAL client relies on these messages by either explicitly requesting the
availability or through availability change message sent by the Car
service.

Bug: 144434783
Fixes: 144434783

Test: Added new tests for the new methods. Ran the tests on Hawk.
Change-Id: I09497640367a894e1dfb6143ac3bbdb63d64b53e
2019-11-19 10:40:20 -08:00
TreeHugger Robot
2098b9e370 Merge "Interface Definition of Vehicle HAL Connector/Vehicle Server Pair" 2019-11-15 19:46:35 +00:00
Hao Chen
b9fb7e58fc Interface Definition of Vehicle HAL Connector/Vehicle Server Pair
Test: compiled by `mm`

Change-Id: I0616e9abfca28656242a82e6ca6addad9b9b812c
2019-11-14 18:03:00 -08:00
Kai
7ba4cf867c Support chose permissions for vendor property
Add property SUPPORT_CUSTOMIZE_VENDOR_PERMISSION.
Add enum VehicleVendorPermission.
The configArray of new property indicate vendor property Id and
the permission selected by vendor.
Update google VHAL as an example how to use it.

Bug: 109950289
Test: build and flash with google HAL
      check permission via property test in KitchenSink

Change-Id: Ic8dcb661ce69bfb82ebc00781426dfbb98fb393d
2019-11-13 17:59:58 -08:00
TreeHugger Robot
234d8f806c Merge "Log and return error if failed to listen to a socket" 2019-11-13 21:39:05 +00:00
chrisweir
cf36cea092 Add support for SLCAN
* Adding support for SLCAN type interfaces
* Made some of the formatting more consistent

Bug: 142656299
Test: Manually with canhalctrl, canhaldump, and canhalsend
Change-Id: Ifa4c234beb75f8a0ea93bfd75555c5ed8d68dca4
2019-11-13 09:42:27 -08:00
Hao Chen
86e5880d82 Log and return error if failed to listen to a socket
Test: build by `mm`

Change-Id: I5cf38c4011274ff70a02ac7472a10670b779aa85
2019-11-11 22:51:03 -08:00
Inseob Kim
d86992f29a Merge "Remove static vndk dep from vendor modules" am: 437baabfde am: 5d5fee2ef2
am: 936efb8177

Change-Id: Ifb7b89378fd22a8c8cf8a89b41845339c3e0c60f
2019-11-10 22:37:37 -08:00