Commit graph

4036 commits

Author SHA1 Message Date
Chia-I Wu
15e33c6d17 Merge "graphics: set maxThreads to 4 for the composer" into oc-dev 2017-05-12 19:50:57 +00:00
Chia-I Wu
ec71f00148 graphics: set maxThreads to 4 for the composer
There are implmentations that can dead lock when calling certain
functions in certain states.  It works fine before HIDL because
SurfaceFlinger calls those functions in another thread.  We allow
for 4 hwbinder threads in this commit to simulate how SurfaceFlinger
calls hwcomposer.

Bug: 38183197
Test: camera, videos, multi windows, screencap, screenrecord
Change-Id: Ie05b2ca349b8c1ed9a3ac962981434f2efee92d9
2017-05-12 08:40:48 -07:00
Myles Watson
33f36706d0 Bluetooth: Add a second thread for the scheduler
Test: service call bluetooth_manager 6 # (Stop Bluetooth)
      /data/nativetest64/VtsHalBluetoothV1_0TargetTest/\
          VtsHalBluetoothV1_0TargetTest
Bug: 38178265, 34461621
Change-Id: Ia8f6683ca47c9deac43d1047846caee5688f1eca
(cherry picked from commit 74c601361c)
2017-05-11 17:28:06 -07:00
Kevin Rocard
257c2f1a43 Merge changes from topic 'audio-primary-hal-vts-fix' into oc-dev
* changes:
  Audio HAL: A volume/gain outside of [0,1] is an error
  Audio HAL VTS: Log test unexpected behaviour
  Audio HAL VTS: Improve ASSERT of Result and Return
  Audio HAL VTS: stopped stream state getters may return INVALID_STATE
  Audio HAL VTS: setGain allow -0.0
  Audio HAL VTS: Some methods are optional
  Audio HAL VTS: GetPresentationPosition may return 0 on stop stream
  Audio HAL VTS: getDevice() == NONE => not supported
  Audio HAL VTS: Getter test assert logic was incorrect
  Audio HAL VTS: debugDump can only test for crash
  Audio HAL VTS: Sanitize prepareFor{Writing,Reading} input size
  Audio HAL VTS: refactor prepareFor{Reading,Writing}
  Audio HAL VTS: Sanitize setMode input
  Audio HAL VTS: Allow OK when setting a non existing parameter
  Audio HAL VTS: differentiate getParam success/failure/not_implemented
  Audio HAL VTS: Fix style on modified files
2017-05-11 22:34:40 +00:00
Steven Moreland
4be51a8512 Merge changes from topic 'fix-hidl-generate' into oc-dev
* changes:
  Update makefiles for c++-sources and c++-headers.
  Update makefiles for c++-sources and c++-headers. (2/2)
2017-05-10 20:02:40 +00:00
Martijn Coenen
6c062f77c1 Merge "Start processes that need real-time with CAP_SYS_NICE." into oc-dev 2017-05-10 17:55:47 +00:00
Steven Moreland
8716f3063e Update makefiles for c++-sources and c++-headers.
Test: pass
Bug: 38174080
Merged-In: I683455736eed35e6ced24e2763c2bdb5fb6c9601
Change-Id: I683455736eed35e6ced24e2763c2bdb5fb6c9601
2017-05-09 19:58:45 -07:00
Steven Moreland
bc71124120 Update makefiles for c++-sources and c++-headers. (2/2)
Test: pass
Bug: 38174080
Change-Id: Icad451f9f9ad5f46412356a4171a8a1222f8e545
2017-05-09 19:58:43 -07:00
PO HUNG CHEN
c365952316 Merge "Bugfix: Add HIDL_FETCH_IScheduleTest declaration" into oc-dev 2017-05-10 02:28:11 +00:00
Sanket Padawe
41ea816c9d Merge "Update IRadioResponse.hal documentation to fix failing VTS" into oc-dev 2017-05-10 02:27:04 +00:00
Naina Nalluri
9cc29c8f57 Update IRadioResponse.hal documentation to fix failing VTS
update IRadioResponse.hal documentation with
nas/data error codes

Bug: 35671595
Test: Only doc update.
Change-Id: I5a106e05b487f7deecb208af6465e5ea5238b26e
2017-05-09 15:23:48 -07:00
Eino-Ville Talvala
71619beef7 Camera: Remove TODOs in interfaces
These are tracked elsewhere and won't be addresed for the initial
interface versions.

Update current.txt hashes; comment-only update

Test: Compiles
Bug: 34108979
Bug: 33269977
Bug: 33262893
Change-Id: I0c0521cf69649d871f64a67773ce822db2487044
2017-05-09 11:32:27 -07:00
TreeHugger Robot
0b3d86e05a Merge "Camera: Clean up TODOs that aren't going to be addressed." into oc-dev 2017-05-09 17:30:36 +00:00
TreeHugger Robot
c63bdfbd74 Merge "Add DOOR_LOCK to default config." into oc-dev 2017-05-09 17:21:14 +00:00
Martijn Coenen
f9b3fb49df Start processes that need real-time with CAP_SYS_NICE.
Bug: 37293077
Test: verified CAP_SYS_NICE granted in /proc/pid/status
Change-Id: If404450cbeb077d331b231bda1af2d6eae774b75
2017-05-09 09:57:00 -07:00
Kevin Rocard
4c030024df Audio HAL: A volume/gain outside of [0,1] is an error
Hals are supposed to received normalized volumes, between 0 and 1.
Previously volumes outside [0,1] were clamp to this range.
This clamping has the capability to hide bugs thus return an error if
such volume is received.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Ia4880bdff6111cbcdae6a4ebee921eddae141ee4
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 18:28:12 -07:00
Eino-Ville Talvala
e0a0a1c239 Camera: Clean up TODOs that aren't going to be addressed.
These TODOs aren't in scope for the wrapper libraries.

Leave the few TODOs that have bugs tracking them, and the ones that
are from autogenerated metadata.

Test: Builds
Bug: 34108979
Change-Id: Ib28467a4fbcfaab4a0809334bc62eabb9290797a
2017-05-08 15:29:28 -07:00
Kevin Rocard
96f46c4a23 Audio HAL VTS: Log test unexpected behaviour
Some test output infos that are useful to understand how they run.
Unfortunately the xml report does not seem to be saved by VTS tradefed.
Thus output them in logcat.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I9a2cc10160c3b1c8f81db0464efbc6b26600cadc
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:03 -07:00
Kevin Rocard
f26f67a16b Audio HAL VTS: Improve ASSERT of Result and Return
Previously tests on Result and Return were using ASSERT_NO_FATAL_FAILURE
and helper methods.
This leaded to complex error messages were the error did not pointed to
the helper methods instead of the ASSERT_RESULT call.
Additionally SCOPE_TRACE messages are repeated
for each ASSERT_NO_FATAL_FAILURE level.

Use ::testing::AssertionResult to improve drastically the error messages.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: If705502546606d678df3f1966b0cd9f3ef8c2529
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
304b6c810e Audio HAL VTS: stopped stream state getters may return INVALID_STATE
A never started stream should have its render position and next write
timestamp at 0 or indicate that the state is invalid.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I62e16066bb22101ee8f75154fc6c85a66be2f402
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
c4f1b2f86a Audio HAL VTS: setGain allow -0.0
Previously -0.0 was consider an invalid value as not in the range [0,1].
But it is quite difficult in C++ to differentiate -0.0 and 0.0 as -0.0 == 0.0
and such difference has no impact in practice.

Thus leave the implementation support or not -0.0.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Ia0ebcb325f77adcf8471620f418da1cbe8995e36
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
98390a6c2c Audio HAL VTS: Some methods are optional
Although the method documentation does not say it,
some HIDL interface methods are optional.

Update the tests to allow NOT_SUPPORTED to be returned.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: If31acc2dbdb6d1d563910e85c99401c48f4f3f86
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
476e38fd31 Audio HAL VTS: GetPresentationPosition may return 0 on stop stream
GetPresentationPosition returns the last time a sample was written to
the hardware.
Calling it on a stop stream should return 0 sample written, but the
timestamps of that measure is of little importance.
Thus allow this timestamp to be 0 indicating that the measure was never
actually made.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I3c33b60f98e8cbea269a7739cc1889af932dcff5
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
8f8730c762 Audio HAL VTS: getDevice() == NONE => not supported
getDevice does not return a Result, thus it can not return NOT_SUPPORTED.
Consider NONE as not supported.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I3b6f7a1fbc1d1535faf549f5b031461cb39d1722
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
4aefd1c1ff Audio HAL VTS: Getter test assert logic was incorrect
Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Iaf2d71829a15b12dcf56e825773c8a697896a264
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
5e5783daef Audio HAL VTS: debugDump can only test for crash
DebugDump does not return an error code, thus the implementation can not
return not implemented.

As a result, the test can not expect any output from the function.
Only test that the call does not crash and add a log if the function is
probably not implemented in the test.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I2c18958bceb1eb638491f9afce9d8e8025ccd3ec
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
195205b323 Audio HAL VTS: Sanitize prepareFor{Writing,Reading} input size
Return an error if framesCount or frameSize are null to avoid a division
by zero when calculating the buffer size.

The message queues are allocated with a buffer size but if two big they will
assert not return an error.
Thus take some margin on the buffer size check.

Note that both function should be refactored as 99% identical.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I0576e9016ef2e567c8d4e171c6237883d9865db9
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
c07df49e45 Audio HAL VTS: refactor prepareFor{Reading,Writing}
Those functions had lots of copy paste on errors and
the following patch will even add more error detections.
Refactor the hidl_cb call to avoid all duplication.
Note that both function should be refactored as 99% identical.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I40d6926b4f9f5e3aba51e878f55fb013f4ca09c1
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
04364edefc Audio HAL VTS: Sanitize setMode input
Some values of AudioMode are exposed although implementation detail.
Make sure the client can not use them.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: If513c2a06efa8a92459f0af80c63232fc63302b0
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:42:39 -07:00
Kevin Rocard
f8500dcb5a Audio HAL VTS: Allow OK when setting a non existing parameter
setHwAvSync and setParameters were implemented in the pre-hidl interface
as set_parameters.
Unfortunately set_parameters did not return an error if a key was not
implemented.

As most HIDL implementation will be a wrapper around the pre-hidl
interface, allow those functions to return OK on not implemented key.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Icfcaa02b7d63e03375fddc90dc5a803754c1874f
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:42:39 -07:00
Yifan Hong
b8e84d240f Merge "Revert "Set omx and configstore as optional."" into oc-dev 2017-05-08 21:10:56 +00:00
Kevin Rocard
fa3b4a9334 Audio HAL VTS: differentiate getParam success/failure/not_implemented
When sending parameters to the HAL (and some getters are implemented
with getParameters), the client expect a status consistent
with the other HIDL methods. Ie: not implemented or success and failure.

Unfortunately, the legacy get_parameter interface, which currently most
Audio HIDL implementation are a wrapper around, do not return such error
code.

Get parameters return a list of key values.
 - If a requested key does not return a key value pair, consider it not
   implemented
 - If a requested key returns a key not followed by a correct value,
   consider it a failure
 - otherwise it is a success

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Id6711e9c1974fe5a336b6de83a9b6d14f74437c9
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 12:42:14 -07:00
Kevin Rocard
72e50e2ef1 Audio HAL VTS: Fix style on modified files
In order to avoid style inconsistency as well as non functional
modification in following patches,
fix the style of all files modified for the fix of the VTS tests.

Patch generated with:
$ clang-format -i --style file -- <file list>

Bug: 36311550
Test: compile
Change-Id: I53dbcdabf959a6100e34a2ee4d0f951d525049cb
2017-05-08 12:41:57 -07:00
Ram Periathiruvadi
9e39f63fec Add DOOR_LOCK to default config.
One of the triggers for Bluetooth Auto connect is a door unlock signal.
Adding it to the list of default supported properties.

Bug: b/37674555
Test: Auto connect triggers on adb shell dumpsys activity service
com.android.car inject-event zoned-boolean 0x16200b02 1 false

Change-Id: Icfed9ea57239cd2397f3e71dcfaccd767a2e9739
(cherry picked from commit e17a009d5d)
2017-05-08 18:35:36 +00:00
Shuo Qian
79c636a4ff Merge "Add GENERIC_FAILURE error checks for some Radio BTSAP Apis which are failing" into oc-dev 2017-05-08 17:49:18 +00:00
Howard Chen
b71db8f2b4 Bugfix: Add HIDL_FETCH_IScheduleTest declaration
Fix the bug that makes the registerAsServer fails.
sp<IScheduleTest> server =
	IScheduleTest::getService(serviceName, true);
status_t status = server->registerAsService(serviceName);

Bug:38099333
Test: oc-dev on pixel sailfish with a vts test case
  "libhwbinder_latency -i 1"
Change-Id: I892835a25ef7df56a6424da41c0fc477b3a532d8
2017-05-08 15:36:11 +08:00
Yifan Hong
7d1236ae7b Revert "Set omx and configstore as optional."
Test: boots
Test: Youtube video works

Bug: 35356977
Fixes: 38001671

This reverts commit 49a6654ccf.

Change-Id: I7b04aa62e248c7fae0307229d07ffa174109ff05
2017-05-05 23:11:43 +00:00
sqian
153a84ef11 Add GENERIC_FAILURE error checks for some Radio BTSAP Apis which are
failing

Test: Vts
Bug: 35671595
Change-Id: Ie2ca86437283ce2f8e4b5cad21454a8d201e53ad
2017-05-05 15:58:28 -07:00
Jayachandran Chinnakkannu
eca8d114bf Merge "VTS: Fix IRadio.setAllowedCarriers and IRadio.nvResetConfig" into oc-dev 2017-05-05 22:22:34 +00:00
Yu Liu
216b87090d Renamed enums in IGnssNavigationMessageCallback.hal from GNSS prefix to
GPS prefix; also made some comment fixes in IGnssMeasurementCallback.hal

BUG: 37946308
Test: Existing tests still pass.

Change-Id: Ia29c3f3943f0373e18634ddeede2ff5eb8998050
2017-05-05 20:08:47 +00:00
Ningyuan Wang
525e0ecb1a Merge "Expect SUCCESS for tdls vts tests" into oc-dev 2017-05-05 17:34:37 +00:00
TreeHugger Robot
585acc6778 Merge "Add missing application ID tag to AES/HMAC attestation calls" into oc-dev 2017-05-05 17:29:21 +00:00
TreeHugger Robot
65f7dbc9a9 Merge "audiohal: Add diagnostics to investigate HAL call crashes" into oc-dev 2017-05-05 00:02:39 +00:00
Jayachandran C
21e28b71da VTS: Fix IRadio.setAllowedCarriers and IRadio.nvResetConfig
1) IRadio.setAllowedCarriers
Fix IRadio.setAllowedCarriers to pass no restrictions.
Passing restrictions will block all other SIM cards until
a new IRadio.setAllowedCarriers with no restriction is
invoked. Even factory reset will not recover.

2) IRadio.nvResetConfig
IRadio.nvResetConfig with ResetNvType RELOAD causes radio restart.
All subsuquent scripts fail with cause RADIO_NOT_AVAILABLE.
Fix to use ResetNvType ERASE which does not restart the radio.

Test: VTS
Bug: 37946160

Change-Id: Ib671758414cc97e1a596358306f89eed13918c48
2017-05-04 17:01:27 -07:00
Yifan Hong
17a0193835 Merge "Set omx and configstore as optional." into oc-dev 2017-05-04 21:53:15 +00:00
Yifan Hong
49a6654ccf Set omx and configstore as optional.
To fix the build for new devices.

Bug: 36097717
Bug: 35356977

Test: on master, m system_compatibility_matrix.xml -j

Change-Id: Ie7a3da46930b3627f4eb6b77c3ba8e50fa2b21ed
2017-05-04 14:49:12 -07:00
Mikhail Naganov
6c0f76a684 audiohal: Add diagnostics to investigate HAL call crashes
This is intended to clarify whether surprising zeroing out of HAL
control structures happens to a particular HAL module, or to any
HAL module at random.

Unfortunately, the crash itself can't be prevented as
audioflinger can't work around a HAL outage, and needs to be
restarted anyway.

Bug: 36225019
Test: verified that the logged string contains the information
Change-Id: I5843d89b4e5385b4ce269f72b5891ccb646daeba
2017-05-04 14:34:37 -07:00
TreeHugger Robot
f66f505bc6 Merge "audiohal: Fix incorrect parameter handling in IDevicesFactory::openDevice" into oc-dev 2017-05-04 21:26:26 +00:00
Mikhail Naganov
8604a738a7 audiohal: Fix incorrect parameter handling in IDevicesFactory::openDevice
Check for possibly invalid values of IDevicesFactory::Device enum.

Bug: 37592306
Change-Id: I4a2300d3be9ab38e6c51ba8a3b5bbbb606a11c2b
Test: VTS
(cherry picked from commit 8c16d85122)
2017-05-04 18:30:31 +00:00
Yifan Hong
c6cba90b96 add more hals to framework compatibility matrix
Bug: 37321309

Test: marlin builds (PRODUCT_FULL_TREBLE=true)
Test: bullhead builds (PRODUCT_FULL_TREBLE=false)

Change-Id: Ib92183a0749d972d9e89f38e158d32080c8023c6
2017-05-04 10:24:59 -07:00