Commit graph

7647 commits

Author SHA1 Message Date
Kevin Rocard
574cc909d4 Audio: setParam improve status_t to Result consistency
The rest of the API (*::analyseStatus) returns NOT_SUPPORTED
when the legacy API returns -ENOSYS.

setParameter legacy -> treble shim did not follow this
conversion due to the legacy API stating that for get_paramers,
-ENOSYS should be returned if
"the implementation does not accept a parameter change while the
 output is active but the parameter is acceptable otherwise",
aka INVALID_STATE.

Thus setParameter shim used to return
 - OK for OK
 - INVALID_STATE for -ENOSYS
 - INVALID_ARGUMENTS for everything else

This leads to several problems:
 - an implementation of the legacy API can not report NOT_SUPPORTED
 - is inconsistent with the rest of the status_t conversion methods
 - shim methods implemented over getParameter can not distinguish
   failures error required by the .hal documentation

Most importantly, on the system side, the Result is transformed to a
status_t again but without any special logic for methods wrapping
getParameter in the shim.
See: analyzeResult in
     frameworks/av/media/libaudiohal/2.0/ConversionHelperHidl.cpp
This can not be changed as the system can not know which methods
are implemented with a legacy wrapper under the Treble API boundary.

This mean that if:
 - hal return -ENOSYS ()
 - shim converts it to INVALID_STATE
 - libaudiohal converts it to NOT_ENOUGH_DATA ()
Thus the checkForNewParameter_l's "status == INVALID_OPERATION"
test in frameworks/av/services/audioflinger/Threads.cpp
are now always false and broken.
This has been broken since the introduction of the Treble shim for O.

Thus setParam now converts status_t to Result in the same way
as all the other shim methods.

Bug: 72873273
Bug: 69811500
Bug: 69010523
Test: playback and record for media and voice call
Change-Id: I41204c0807d2bd4675e941771cbc9a43d7d14855
Merged-In: I41328afce56ce31d4a26159ca2d4b16d14cce05b
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-04-20 23:30:28 +00:00
Treehugger Robot
126e8f700d Merge "Update RegState for new CellIdentity types" 2018-04-10 19:32:23 +00:00
Ruchi Kandoi
382bbaef27 Add defaultSysCodePowerState in types.hal in NFC 1.1
Test: Nfc Enable/Disable; test if config is read in logcat
Bug: 77496460
Merged-In: I13e21ba18c03c3c7b9eff3aa67e843e7f063b233
Change-Id: I13e21ba18c03c3c7b9eff3aa67e843e7f063b233
(cherry picked from commit c200342182)
2018-04-04 23:11:42 +00:00
Treehugger Robot
2dc004c703 Merge "secure_element: VTS: Remove MANAGE_CHANNEL commands in transmit" 2018-03-30 23:23:04 +00:00
Eric Schwarzenbach
b004dbc19f Update RegState for new CellIdentity types
Bug: 74826109
Test: make, make vts
Change-Id: I6350e5da5bc064e665e54d161ee589c3eadf901a
Merged-In: I6350e5da5bc064e665e54d161ee589c3eadf901a
(cherry picked from commit 74befb69b9)
2018-03-30 15:57:24 -07:00
Yifan Hong
61cbaa8dd7 Merge changes from topic "check_unused_hals"
* changes:
  matrix: ENFORCE_NO_UNUSED_HALS
  matrix: generalize case for LOCAL_WARN_REQUIRED_HALS
  matrix: IGNORE_TARGET_FCM_VERSION -> VINTF_*
  matrix: define LOCAL_MODULE for all modules.
2018-03-30 17:26:14 +00:00
Ruchi Kandoi
c4352bdb21 secure_element: VTS: Remove MANAGE_CHANNEL commands in transmit
Use Dummy APDU and Android CTS AID for the test cases.

Test: Run VtsHalSecureElementV1_0TargetTest
Bug: 77296379
Change-Id: Id5397c9efb000a1737176ebacb6ded0837dc2d61
2018-03-29 18:19:30 -07:00
Tom Cherry
1965ea9282 Merge "Add BLOCK_SUSPEND capability for Bluetooth HAL service" 2018-03-29 19:51:20 +00:00
Yifan Hong
7d61a8d47b matrix: ENFORCE_NO_UNUSED_HALS
Enforce that all hals in the device manifest are
in framework compatibility matrix -- at build time.

Bug: 65028233
Test: build a phone without DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX.
Change-Id: Ibf220f80ca3621ddbf8288d372d5f40336e45248
2018-03-29 11:29:32 -07:00
Yifan Hong
3693fe4ab5 matrix: generalize case for LOCAL_WARN_REQUIRED_HALS
Add LOCAL_ASSEMBLE_VINTF_ENV_VARS_OVERRIDE and
LOCAL_ASSEMBLE_VINTF_ERROR_MESSAGE for a more generic case.

Test: m framework_compatibility_matrix.xml -j
Bug: 65028233
Change-Id: Iec142d161daa18122e7a6daebb82c7230cb98ba6
2018-03-29 11:29:32 -07:00
Yifan Hong
e0cad7a553 matrix: IGNORE_TARGET_FCM_VERSION -> VINTF_*
All "private" environment variables to assemble_vintf
(inserted by the build rules, not build system variables)
should have this prefix (to distinguish against,
e.g. PRODUCT_ENFORCE_VINTF_MANIFEST)

Test: m framework_compatibility_matrix -j

Bug: 65028233
Change-Id: Iaefa88cefc0918fb86235ea6fcd8e367cbd82788
2018-03-29 11:29:32 -07:00
Yifan Hong
7831d437d4 matrix: define LOCAL_MODULE for all modules.
Test: m framework_compatibility_matrix -j
Bug: 65028233
Change-Id: Iab61771b8ebe0e1b771404bb25a0a04caf399585
2018-03-29 11:29:32 -07:00
Tom Cherry
2d46875666 Add BLOCK_SUSPEND capability for Bluetooth HAL service
This is needed for some platforms

Bug: 74554159
Bug: 77213213
Test: walleye BT works
Change-Id: If0033c5a7fc09057415b27196fa4541e9aadfb4b
2018-03-29 10:17:07 -07:00
Yifan Hong
5b99454bc4 Merge "Build DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE" 2018-03-29 00:37:56 +00:00
Yifan Hong
fee9ea41cc Build DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE
... along with compatibility_matrix.device.xml.
The new module cm.device.xml contains the original content
of empty.xml (kernel configs, sepolicy, etc.) as well
as HALs from DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE.
This variable points to a framework compatibility matrix
that contains framework HALs as a vendor extension; all
HALs in this file must be optional.

Bug: 65028233
Test: m framework_compatibility_matrix.xml -j and manual inspection
Test: vts_treble_vintf_test

Change-Id: I94949f62f7f5b332d845f2e7fa4714df7c49ed3e
2018-03-27 16:28:51 -07:00
Yuexi Ma
fa7f2bc917 Merge "Update vts test module bp files to use VtsHalTargetTestDefaults" 2018-03-26 21:57:41 +00:00
Tom Cherry
22b042227b Merge "Add capabilities to wifi HAL service" 2018-03-26 17:30:28 +00:00
Tom Cherry
964fbf37a9 Add capabilities to wifi HAL service
Bug: 74554159
Test: wifi works on walleye
Merged-In: Ia6784e78a7faec914cbbecbe84800c4fbe46c00b
Change-Id: I8deb730bbd9cb473d68ffc696b31031abf617eec
2018-03-26 16:09:13 +00:00
Treehugger Robot
e4a97f23c2 Merge "Fix crash on hotplug disconnect" 2018-03-24 01:12:08 +00:00
Lloyd Pique
56375fda7c Fix crash on hotplug disconnect
ComposerClient destroys its internal model of the display while handling
the onHotPlug event from the Hwc. Subsequently SurfaceFlinger destroys
its model of the display, and destroys all Hwc layers associated with
the display.

This fixes the code for destroying layers to not dereference an invalid
iterator if the display does not exist, allowing destruction to
continue.

It also fixes a similar issue which could occur if a HWC layer is being
created for a display at around the same time as the disconnect event.

Test: hotplug disconnect no longer crashes
Bug: 38464421
Change-Id: I0f2d28fe89fccf997b4bbb9fa6b5c0e6a6e49b93
Merged-In: I0f2d28fe89fccf997b4bbb9fa6b5c0e6a6e49b93
(cherry picked from commit 2765f9d406)
2018-03-23 22:30:46 +00:00
Tom Cherry
f292d276c5 Merge "Add capabilities to bluetooth HAL service" 2018-03-23 19:57:40 +00:00
Tom Cherry
f03dbc6924 Add capabilities to bluetooth HAL service
Bug: 74554159
Test: BT works on walleye
Change-Id: Ib2e1be66ae92ce742540a50cffc8c675db945655
2018-03-23 19:45:56 +00:00
Yuexi Ma
d56539e62a Update vts test module bp files to use VtsHalTargetTestDefaults
Test: make vts
Change-Id: I3c0dab52dc894e1a1fc9b99be1351ed7bd380502
Merged-In: I3c0dab52dc894e1a1fc9b99be1351ed7bd380502
2018-03-22 23:36:10 +00:00
Yuexi Ma
5ca4ebe0dc rename VtsHalEvsV1_0Target module to VtsHalEvsV1_0TargetTest
Test: run vts-selftest
Change-Id: Ib413d3ee2bffbb98489a5e787b83014c3b2e3af9
Merged-In: Ib413d3ee2bffbb98489a5e787b83014c3b2e3af9
(cherry picked from commit c446be1563)
2018-03-22 12:15:54 -07:00
Jeff Vander Stoep
0979cc5dd9 configstore: whitelist getpid call for arm64
Addresses:
01-01 00:00:03.416   964   964 E /vendor/bin/hw/android.hardware.configstore@1.0-service:
libminijail[964]: blocked syscall: getpid

Bug: 74394073
Test: weipingliao@ to test
Change-Id: Iaa836d1f0b3595a66dfb6af2dd78fdddb9d7272e
2018-03-19 18:12:21 +00:00
Steven Moreland
b944d69508 blank_screen: shut off all lights
This is used to make the phone appear off by init
during late boot (e.x. fsck for disk health), so
it should shut off all lights (not just the screen).

Bug: 74976325
Test: blank_screen
Change-Id: I790cc3dd856c2c2095fa3cf82519fd30834304ca
Merged-In: I790cc3dd856c2c2095fa3cf82519fd30834304ca
2018-03-16 13:04:53 -07:00
Steven Moreland
b25202527e light service: mark as shutdown critical
Required because the lights need to be turned off late in boot
(e.x. during fsck for disk health), and before, blank_screen
accessing light encountered a race condition where if it didn't
get scheduled before all of the processes which were getting
shutdown were getting killed, the screen wouldn't blank.

Bug: 74976325
Test: adjusting brightness continues to work
Test: screen blanks during shutdown at the correct time
    including when an artificial 5s delay is inserted when
    the phone normally fscks (which can also be quick)

Change-Id: I57ebc11d7ecf57ee327c681455712f4b53de6fd3
Merged-In: I57ebc11d7ecf57ee327c681455712f4b53de6fd3
2018-03-16 13:04:53 -07:00
Aniket Kumar Lata
8a7e77e7b9 audio: Register Bluetooth service with audio HAL
Register Bluetooth audio library with audio HIDL service.
Changes required for A2DP offload implementation.

Bug: 68824150
Test: A2DP offload verified on supported codecs
Change-Id: Idd89f0d28903579d42bd0f33b0194fb8dc2ceaaa
Merged-In: Idd89f0d28903579d42bd0f33b0194fb8dc2ceaaa
(cherry picked from commit c5a5203114)
2018-03-12 13:44:16 -07:00
Sunny Kapdi
9526c2ff73 Bluetooth: A2DP offload HIDL
Interface for Bluetooth A2DP offload feature.

Bug: 72242910
Test: Manual; TestTracker/148125
Change-Id: I3649800dfe3e1a2d66b76859be87e01ee58d2de0
(cherry picked from commit 4e95d81ef0)
2018-03-12 13:41:04 -07:00
Ruchi Kandoi
4cd374a6c4 Add VTS Test for getConfig() in NFC 1.1
Test: run VtsHalNfcV1_1TargetTest
Bug: 72080121
Merged-In: I89600b54d64d4f274647ab4426faf5e05b2f3d34
Change-Id: I89600b54d64d4f274647ab4426faf5e05b2f3d34
2018-03-09 23:47:27 +00:00
Ruchi Kandoi
d128c87f70 NFC 1.1: Add getConfigs() method
Test: Boot and check Nfc configs initialized
Bug: 72080121
Merged-In: I000cea4491b2bd136b9ece232b9d73293804c733
Change-Id: I000cea4491b2bd136b9ece232b9d73293804c733
2018-03-09 23:47:18 +00:00
Treehugger Robot
7df64ea2fd Merge changes from topic "cp_nnapi"
* changes:
  Relax NeuralNetwork's VTS positive and negative base tests
  Add Capabilities::relaxedFloat32toFloat16Performance for 1.1.
  Minor modification to allow relaxed precision test
  NNAPI narrow evaluation for P -- HAL
  Refactor NN API VTS tests and add v1.1 tests
  Add README to NeuralNetworks HAL
2018-03-05 22:50:15 +00:00
Michael Butler
1ae02d63df Relax NeuralNetwork's VTS positive and negative base tests
There are some NN VTS tests that assume a service is able to generate a
model consisting only of a floating point add operation. However, some
drivers do not support floating point operations. This CL relaxes the
test requirements to allow a test to be skipped if the service does not
support floating point add.

Bug: 72764145
Test: mma
Test: VtsHalNeuralnetworksV1_0TargetTest

Merged-In: I6b0644432680fc2f8098b5187795dc2953df03f9
Change-Id: I6b0644432680fc2f8098b5187795dc2953df03f9
(cherry picked from commit 4d5bb1097a)
2018-03-05 13:01:00 -08:00
David Gross
a8cd639dc0 Add Capabilities::relaxedFloat32toFloat16Performance for 1.1.
Test: VtsHalNeuralnetworksV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.0::IDevice/sample-all
Test: VtsHalNeuralnetworksV1_0TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.0::IDevice/hvx
Test: VtsHalNeuralnetworksV1_1TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.1::IDevice/sample-all
Test: NeuralNetworksTest_static

Bug: 63911257

Merged-In: I040b68d84504180ba3039e4690d0cd43c2c2649f
Change-Id: I040b68d84504180ba3039e4690d0cd43c2c2649f
(cherry picked from commit 4b458caa4e)
2018-03-05 13:00:46 -08:00
Miao Wang
7578e51fda Minor modification to allow relaxed precision test
Bug: 63911257
Test: mm
Test: VTS test pass on walleye

Merged-In: I41d9ea782262a894e7dbd00b782803c40b31c430
Change-Id: I41d9ea782262a894e7dbd00b782803c40b31c430
(cherry picked from commit 842e1a0331)
2018-03-05 13:00:27 -08:00
Michael Butler
e0d9b167a6 NNAPI narrow evaluation for P -- HAL
We have determined that for Android P it is sufficient to have a
mechanism for a developer to specify on a per-model basis that it is
acceptable for FLOAT32 operations to be carried out as if they were
FLOAT16 operations. This CL extends the model to include information on
these precision requirements.

Bug: 63911257
Test: mm
Test: NeuralNetworksTest
Test: VtsHalNeuralnetworksV1_0TargetTest

Merged-In: I5331e69c05c20c588035897322a6c7dceca374a0
Change-Id: I5331e69c05c20c588035897322a6c7dceca374a0
(cherry picked from commit 7ffe78ba76)
2018-03-05 13:00:14 -08:00
Miao Wang
4862d612ad Refactor NN API VTS tests and add v1.1 tests
- Create VtsHalNeuralnetworksTest_utils module to be shared between
    v1.x tests.
  - Split the existing tests into two categories: basic, and generated.
  - Created v1.1 VTS tests ensuring no regression in existing ML models.

Bug: 63911257
Test: mm
Test: NNAPI VTS tests pass on v1.0 and v1.1 sample drivers

Merged-In: Ic77c90a3a5bbd96b0ce2acd03764dde4b3034cc9
Change-Id: Ic77c90a3a5bbd96b0ce2acd03764dde4b3034cc9
(cherry picked from commit a2d04c828e)
2018-03-05 12:59:55 -08:00
Michael Butler
5f57913184 Add README to NeuralNetworks HAL
Adds README explaining where to find the NeuralNetworks sample driver.

Test: N/A

Merged-In: Ifbbbbb3801176da27fb03bbed0b0d739031a195b
Change-Id: Ifbbbbb3801176da27fb03bbed0b0d739031a195b
(cherry picked from commit 3530f9ef0d)
2018-03-05 12:59:35 -08:00
Treehugger Robot
6a83645f64 Merge "Add VTS test for getCellInfoList_1_2" 2018-03-02 07:42:33 +00:00
Treehugger Robot
cd712b0e8f Merge "configstore: allow to USE_CONTEXT_PRIORITY by device." 2018-03-02 02:15:46 +00:00
Cassie
65a3ad31b8 Add VTS test for getCellInfoList_1_2
Bug: 63984327
Test: VTS test
Change-Id: Ie6987f885dfe34c94b30370e1d4853084ee4030b
2018-03-01 15:49:51 -08:00
chenhg
a491908fe9 configstore: allow to USE_CONTEXT_PRIORITY by device.
Fixes: 72007412
Test: manual

Change-Id: Id6135347ef699b27ab708d387261bc031996a476
2018-03-01 22:51:02 +00:00
yinxu
2e6ed18055 Add vts response functions for Radio Response 1.2
Bug: 67750232
Test: Compile and Run VTS
Change-Id: I866cea94b1505b05dee336a53ab72ab685c8f441
2018-03-01 14:15:32 -08:00
Myles Watson
72382e3014 Bluetooth: Relax NO_OP and SCO checks
Ignore NO_OP complete events.
Ignore ordering for Loopback Mode Connection/Command Complete.
Only check for SCO buffer size when SCO connections are made.

Bug: 69785298
Test: VtsHalBluetoothV1_0TargetTest
Change-Id: Ia1ead7ff942ffa369f88f61bcaaa8e03d7973179
2018-03-01 20:25:15 +00:00
Jack Yu
ac1844fac4 Added new VTS test cases for v1.2 data call APIs
Test: VtsHalRadioV1_2Target
Bug: 64132030
Change-Id: I3b9d94985f42a5dd9b9a24e0592cf1657da237d5
2018-03-01 04:31:11 +00:00
Treehugger Robot
196fbbc1a6 Merge "Add init() as a part of Secure Element VTS test" 2018-02-28 18:44:44 +00:00
Eric Schwarzenbach
8bdc4e04e2 Add VTS tests for 1.2 reporting criteria
Bug: 72115876
Test: make
Change-Id: I7a7633994888d2f1781ac7d5730727112eb0c86d
2018-02-27 17:29:40 -08:00
Ruchi Kandoi
fbcbc01d9c Add init() as a part of Secure Element VTS test
Test: run vts -m VtsHalSecureElementV1_0Target
Bug: 64881253
Change-Id: Ic93efdd3633f0dd3a5625e617dac0243d934ca77
2018-02-26 14:02:51 -08:00
Zhuoyao Zhang
184eb86ca0 Merge "Convert tv input hal test to use VtsHalHidlTargetTestEnvBase" 2018-02-24 18:41:05 +00:00
Treehugger Robot
5cd16a71f5 Merge "Fix boot VTS GetSuffix test" 2018-02-24 18:16:14 +00:00