summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc3
-rw-r--r--boot/1.0/default/Android.mk30
-rw-r--r--boot/1.0/default/BootControl.cpp22
-rw-r--r--broadcastradio/common/utils2x/Android.bp1
-rw-r--r--broadcastradio/common/utils2x/Utils.cpp2
-rw-r--r--graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc1
-rw-r--r--graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp12
-rw-r--r--keymaster/4.0/support/Keymaster.cpp8
-rw-r--r--media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp1
-rw-r--r--neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.h4
-rw-r--r--neuralnetworks/1.2/Android.bp2
-rw-r--r--neuralnetworks/1.2/IDevice.hal30
-rw-r--r--neuralnetworks/1.2/types.hal123
-rw-r--r--neuralnetworks/1.2/vts/functional/BasicTests.cpp8
-rw-r--r--neuralnetworks/1.2/vts/functional/ValidateModel.cpp22
-rwxr-xr-xupdate-makefiles.sh13
-rw-r--r--wifi/1.2/default/Android.mk2
-rw-r--r--wifi/1.2/default/wifi_legacy_hal.cpp1
18 files changed, 264 insertions, 21 deletions
diff --git a/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc b/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc
index 8217b946..6e91bccb 100644
--- a/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc
+++ b/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc
@@ -2,7 +2,8 @@ service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service
2 class hal 2 class hal
3 user audioserver 3 user audioserver
4 # media gid needed for /dev/fm (radio) and for /data/misc/media (tee) 4 # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
5 group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct 5 group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock
6 capabilities BLOCK_SUSPEND
6 ioprio rt 4 7 ioprio rt 4
7 writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks 8 writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
8 # audioflinger restarts itself when it loses connection with the hal 9 # audioflinger restarts itself when it loses connection with the hal
diff --git a/boot/1.0/default/Android.mk b/boot/1.0/default/Android.mk
new file mode 100644
index 00000000..7ccc4c83
--- /dev/null
+++ b/boot/1.0/default/Android.mk
@@ -0,0 +1,30 @@
1# TODO(connoro): Remove this file once we eliminate existing usage of
2# PRODUCT_STATIC_BOOT_CONTROL_HAL
3
4LOCAL_PATH := $(call my-dir)
5
6ifneq ($(strip $(PRODUCT_STATIC_BOOT_CONTROL_HAL)),)
7include $(CLEAR_VARS)
8
9LOCAL_MODULE := android.hardware.boot@1.0-impl-wrapper.recovery
10LOCAL_MODULE_CLASS := SHARED_LIBRARIES
11LOCAL_MULTILIB := first
12ifeq ($(TARGET_IS_64_BIT),true)
13LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/hw
14else
15LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib/hw
16endif
17LOCAL_SRC_FILES := BootControl.cpp
18LOCAL_CFLAGS := -DBOOT_CONTROL_RECOVERY
19LOCAL_SHARED_LIBRARIES := \
20 libbase.recovery \
21 liblog.recovery \
22 libhidlbase.recovery \
23 libhidltransport.recovery \
24 libhardware.recovery \
25 libutils.recovery \
26 android.hardware.boot@1.0.recovery
27LOCAL_STATIC_LIBRARIES := $(PRODUCT_STATIC_BOOT_CONTROL_HAL)
28include $(BUILD_SHARED_LIBRARY)
29
30endif
diff --git a/boot/1.0/default/BootControl.cpp b/boot/1.0/default/BootControl.cpp
index 9a900767..e36407fe 100644
--- a/boot/1.0/default/BootControl.cpp
+++ b/boot/1.0/default/BootControl.cpp
@@ -21,6 +21,10 @@
21#include <hardware/boot_control.h> 21#include <hardware/boot_control.h>
22#include "BootControl.h" 22#include "BootControl.h"
23 23
24#ifdef BOOT_CONTROL_RECOVERY
25extern const hw_module_t HAL_MODULE_INFO_SYM;
26#endif
27
24namespace android { 28namespace android {
25namespace hardware { 29namespace hardware {
26namespace boot { 30namespace boot {
@@ -92,7 +96,23 @@ Return<void> BootControl::getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) {
92 return Void(); 96 return Void();
93} 97}
94 98
99#ifdef BOOT_CONTROL_RECOVERY
100IBootControl* HIDL_FETCH_IBootControl(const char * /* hal */) {
101 boot_control_module_t* module;
95 102
103 // For devices that don't build a standalone libhardware bootctrl impl for recovery,
104 // we simulate the hw_get_module() by accessing it from the current process directly.
105 const hw_module_t* hw_module = &HAL_MODULE_INFO_SYM;
106 if (!hw_module ||
107 strcmp(BOOT_CONTROL_HARDWARE_MODULE_ID, hw_module->id) != 0) {
108 ALOGE("Error loading boot_control HAL implementation: %d.", -EINVAL);
109 return nullptr;
110 }
111 module = reinterpret_cast<boot_control_module_t*>(const_cast<hw_module_t*>(hw_module));
112 module->init(module);
113 return new BootControl(module);
114}
115#else
96IBootControl* HIDL_FETCH_IBootControl(const char* /* hal */) { 116IBootControl* HIDL_FETCH_IBootControl(const char* /* hal */) {
97 int ret = 0; 117 int ret = 0;
98 boot_control_module_t* module = NULL; 118 boot_control_module_t* module = NULL;
@@ -106,7 +126,7 @@ IBootControl* HIDL_FETCH_IBootControl(const char* /* hal */) {
106 module->init(module); 126 module->init(module);
107 return new BootControl(module); 127 return new BootControl(module);
108} 128}
109 129#endif
110} // namespace implementation 130} // namespace implementation
111} // namespace V1_0 131} // namespace V1_0
112} // namespace boot 132} // namespace boot
diff --git a/broadcastradio/common/utils2x/Android.bp b/broadcastradio/common/utils2x/Android.bp
index aab94f2a..df2cefe3 100644
--- a/broadcastradio/common/utils2x/Android.bp
+++ b/broadcastradio/common/utils2x/Android.bp
@@ -22,6 +22,7 @@ cc_library_static {
22 "-Wall", 22 "-Wall",
23 "-Wextra", 23 "-Wextra",
24 "-Werror", 24 "-Werror",
25 "-Wno-error=implicit-fallthrough",
25 ], 26 ],
26 cppflags: [ 27 cppflags: [
27 "-std=c++1z", 28 "-std=c++1z",
diff --git a/broadcastradio/common/utils2x/Utils.cpp b/broadcastradio/common/utils2x/Utils.cpp
index 3e20b357..f292c085 100644
--- a/broadcastradio/common/utils2x/Utils.cpp
+++ b/broadcastradio/common/utils2x/Utils.cpp
@@ -215,7 +215,7 @@ bool isValid(const ProgramIdentifier& id) {
215 break; 215 break;
216 case IdentifierType::DAB_FREQUENCY: 216 case IdentifierType::DAB_FREQUENCY:
217 expect(val > 100000u, "f > 100MHz"); 217 expect(val > 100000u, "f > 100MHz");
218 // fallthrough 218 [[fallthrough]];
219 case IdentifierType::AMFM_FREQUENCY: 219 case IdentifierType::AMFM_FREQUENCY:
220 case IdentifierType::DRMO_FREQUENCY: 220 case IdentifierType::DRMO_FREQUENCY:
221 expect(val > 100u, "f > 100kHz"); 221 expect(val > 100u, "f > 100kHz");
diff --git a/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc b/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc
index a41d902c..efe6dadb 100644
--- a/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc
+++ b/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc
@@ -4,3 +4,4 @@ service vendor.hwcomposer-2-2 /vendor/bin/hw/android.hardware.graphics.composer@
4 group graphics drmrpc 4 group graphics drmrpc
5 capabilities SYS_NICE 5 capabilities SYS_NICE
6 onrestart restart surfaceflinger 6 onrestart restart surfaceflinger
7 writepid /dev/cpuset/system-background/tasks
diff --git a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp
index 23bf5583..951e874e 100644
--- a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp
+++ b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp
@@ -18,11 +18,11 @@
18 18
19#include <VtsHalHidlTargetTestBase.h> 19#include <VtsHalHidlTargetTestBase.h>
20#include <android-base/logging.h> 20#include <android-base/logging.h>
21#include <android/hardware/graphics/mapper/2.1/IMapper.h> 21#include <android/hardware/graphics/mapper/2.0/IMapper.h>
22#include <composer-vts/2.1/GraphicsComposerCallback.h> 22#include <composer-vts/2.1/GraphicsComposerCallback.h>
23#include <composer-vts/2.1/TestCommandReader.h> 23#include <composer-vts/2.1/TestCommandReader.h>
24#include <composer-vts/2.2/ComposerVts.h> 24#include <composer-vts/2.2/ComposerVts.h>
25#include <mapper-vts/2.1/MapperVts.h> 25#include <mapper-vts/2.0/MapperVts.h>
26 26
27namespace android { 27namespace android {
28namespace hardware { 28namespace hardware {
@@ -40,8 +40,8 @@ using android::hardware::graphics::common::V1_1::Dataspace;
40using android::hardware::graphics::common::V1_1::PixelFormat; 40using android::hardware::graphics::common::V1_1::PixelFormat;
41using android::hardware::graphics::common::V1_1::RenderIntent; 41using android::hardware::graphics::common::V1_1::RenderIntent;
42using android::hardware::graphics::composer::V2_2::IComposerClient; 42using android::hardware::graphics::composer::V2_2::IComposerClient;
43using android::hardware::graphics::mapper::V2_1::IMapper; 43using android::hardware::graphics::mapper::V2_0::IMapper;
44using android::hardware::graphics::mapper::V2_1::vts::Gralloc; 44using android::hardware::graphics::mapper::V2_0::vts::Gralloc;
45using GrallocError = android::hardware::graphics::mapper::V2_0::Error; 45using GrallocError = android::hardware::graphics::mapper::V2_0::Error;
46 46
47// Test environment for graphics.composer 47// Test environment for graphics.composer
@@ -136,7 +136,7 @@ class GraphicsComposerHidlCommandTest : public GraphicsComposerHidlTest {
136 info.width = 64; 136 info.width = 64;
137 info.height = 64; 137 info.height = 64;
138 info.layerCount = 1; 138 info.layerCount = 1;
139 info.format = PixelFormat::RGBA_8888; 139 info.format = static_cast<common::V1_0::PixelFormat>(PixelFormat::RGBA_8888);
140 info.usage = 140 info.usage =
141 static_cast<uint64_t>(BufferUsage::CPU_WRITE_OFTEN | BufferUsage::CPU_READ_OFTEN); 141 static_cast<uint64_t>(BufferUsage::CPU_WRITE_OFTEN | BufferUsage::CPU_READ_OFTEN);
142 142
@@ -280,7 +280,7 @@ TEST_F(GraphicsComposerHidlTest, setReadbackBuffer) {
280 info.height = mComposerClient->getDisplayAttribute(mPrimaryDisplay, config, 280 info.height = mComposerClient->getDisplayAttribute(mPrimaryDisplay, config,
281 IComposerClient::Attribute::HEIGHT); 281 IComposerClient::Attribute::HEIGHT);
282 info.layerCount = 1; 282 info.layerCount = 1;
283 info.format = pixelFormat; 283 info.format = static_cast<common::V1_0::PixelFormat>(pixelFormat);
284 // BufferUsage::COMPOSER_OUTPUT is missing 284 // BufferUsage::COMPOSER_OUTPUT is missing
285 info.usage = static_cast<uint64_t>(BufferUsage::COMPOSER_OVERLAY | BufferUsage::CPU_READ_OFTEN); 285 info.usage = static_cast<uint64_t>(BufferUsage::COMPOSER_OVERLAY | BufferUsage::CPU_READ_OFTEN);
286 286
diff --git a/keymaster/4.0/support/Keymaster.cpp b/keymaster/4.0/support/Keymaster.cpp
index 444298b5..9325cc06 100644
--- a/keymaster/4.0/support/Keymaster.cpp
+++ b/keymaster/4.0/support/Keymaster.cpp
@@ -164,10 +164,10 @@ static void computeHmac(const Keymaster::KeymasterSet& keymasters,
164 sharingCheck = curSharingCheck; 164 sharingCheck = curSharingCheck;
165 firstKeymaster = false; 165 firstKeymaster = false;
166 } 166 }
167 CHECK(curSharingCheck == sharingCheck) 167 if (curSharingCheck != sharingCheck)
168 << "HMAC computation failed for " << *keymaster // 168 LOG(WARNING) << "HMAC computation failed for " << *keymaster //
169 << " Expected: " << sharingCheck // 169 << " Expected: " << sharingCheck //
170 << " got: " << curSharingCheck; 170 << " got: " << curSharingCheck;
171 }); 171 });
172 CHECK(rc.isOk()) << "Failed to communicate with " << *keymaster 172 CHECK(rc.isOk()) << "Failed to communicate with " << *keymaster
173 << " error: " << rc.description(); 173 << " error: " << rc.description();
diff --git a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp
index e851a7c1..4543c012 100644
--- a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp
+++ b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp
@@ -297,6 +297,7 @@ void setDefaultPortParam(
297 setupAACPort(omxNode, portIndex, OMX_AUDIO_AACObjectNull, 297 setupAACPort(omxNode, portIndex, OMX_AUDIO_AACObjectNull,
298 OMX_AUDIO_AACStreamFormatMP4FF, nChannels, 0, 298 OMX_AUDIO_AACStreamFormatMP4FF, nChannels, 0,
299 nSampleRate); 299 nSampleRate);
300 break;
300 default: 301 default:
301 break; 302 break;
302 } 303 }
diff --git a/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.h b/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.h
index 0050e52d..a64268f4 100644
--- a/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.h
+++ b/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.h
@@ -34,9 +34,11 @@ namespace hardware {
34namespace neuralnetworks { 34namespace neuralnetworks {
35namespace V1_1 { 35namespace V1_1 {
36 36
37using V1_0::Request;
38using V1_0::DeviceStatus; 37using V1_0::DeviceStatus;
39using V1_0::ErrorStatus; 38using V1_0::ErrorStatus;
39using V1_0::Operand;
40using V1_0::OperandType;
41using V1_0::Request;
40 42
41namespace vts { 43namespace vts {
42namespace functional { 44namespace functional {
diff --git a/neuralnetworks/1.2/Android.bp b/neuralnetworks/1.2/Android.bp
index d5ef49d4..5a661e06 100644
--- a/neuralnetworks/1.2/Android.bp
+++ b/neuralnetworks/1.2/Android.bp
@@ -17,6 +17,8 @@ hidl_interface {
17 ], 17 ],
18 types: [ 18 types: [
19 "Model", 19 "Model",
20 "Operand",
21 "OperandType",
20 "Operation", 22 "Operation",
21 "OperationType", 23 "OperationType",
22 ], 24 ],
diff --git a/neuralnetworks/1.2/IDevice.hal b/neuralnetworks/1.2/IDevice.hal
index 9cc23a26..aff4cf30 100644
--- a/neuralnetworks/1.2/IDevice.hal
+++ b/neuralnetworks/1.2/IDevice.hal
@@ -26,6 +26,36 @@ import @1.1::IDevice;
26 */ 26 */
27interface IDevice extends @1.1::IDevice { 27interface IDevice extends @1.1::IDevice {
28 /** 28 /**
29 * Get the version string of the driver implementation.
30 *
31 * The version string must be a unique token among the set of version strings of
32 * drivers of a specific device. The token identifies the device driver's
33 * implementation. The token must not be confused with the feature level which is solely
34 * defined by the interface version. This API is opaque to the Android framework, but the
35 * Android framework may use the information for debugging or to pass on to NNAPI applications.
36 *
37 * Application developers sometimes have specific requirements to ensure good user experiences,
38 * and they need more information to make intelligent decisions when the Android framework cannot.
39 * For example, combined with the device name and other information, the token can help
40 * NNAPI applications filter devices based on their needs:
41 * - An application demands a certain level of performance, but a specific version of
42 * the driver cannot meet that requirement because of a performance regression.
43 * The application can blacklist the driver based on the version provided.
44 * - An application has a minimum precision requirement, but certain versions of
45 * the driver cannot meet that requirement because of bugs or certain optimizations.
46 * The application can filter out versions of these drivers.
47 *
48 * @return status Error status returned from querying the version string. Must be:
49 * - NONE if the query was successful
50 * - DEVICE_UNAVAILABLE if driver is offline or busy
51 * - GENERAL_FAILURE if the query resulted in an
52 * unspecified error
53 * @return version The version string of the device implementation.
54 * Must have nonzero length
55 */
56 getVersionString() generates (ErrorStatus status, string version);
57
58 /**
29 * Gets the supported operations in a model. 59 * Gets the supported operations in a model.
30 * 60 *
31 * getSupportedOperations indicates which operations of a model are fully 61 * getSupportedOperations indicates which operations of a model are fully
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index bed1d5ca..4a1e7a8a 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -16,10 +16,36 @@
16 16
17package android.hardware.neuralnetworks@1.2; 17package android.hardware.neuralnetworks@1.2;
18 18
19import @1.0::Operand; 19import @1.0::DataLocation;
20import @1.0::OperandLifeTime;
21import @1.0::OperandType;
20import @1.0::PerformanceInfo; 22import @1.0::PerformanceInfo;
21import @1.1::OperationType; 23import @1.1::OperationType;
22 24
25enum OperandType : @1.0::OperandType {
26 /**
27 * An 8 bit boolean scalar value.
28 *
29 * Values of this operand type are either true or false. A zero value
30 * represents false; any other value represents true.
31 */
32 BOOL = 6,
33 /**
34 * A tensor of 16 bit signed integers that represent real numbers.
35 *
36 * Attached to this tensor are two numbers that are used to convert the 16
37 * bit integer to the real value and vice versa. These two numbers are:
38 * - scale: a 32 bit floating point value greater than zero.
39 * - zeroPoint: a 32 bit integer, in range [-32768, 32767].
40 *
41 * The formula is:
42 * realValue = (integerValue - zeroPoint) * scale.
43 */
44 TENSOR_QUANT16_ASYMM = 7,
45 /** A tensor of 16 bit floating point values. */
46 TENSOR_FLOAT16 = 8,
47};
48
23/** 49/**
24 * Operation types. 50 * Operation types.
25 * 51 *
@@ -102,6 +128,101 @@ struct Operation {
102}; 128};
103 129
104/** 130/**
131 * Describes one operand of the model's graph.
132 */
133struct Operand {
134 /**
135 * Data type of the operand.
136 */
137 OperandType type;
138
139 /**
140 * Dimensions of the operand.
141 *
142 * For a scalar operand, dimensions.size() must be 0.
143 *
144 * For a tensor operand, dimensions.size() must be at least 1;
145 * however, any of the dimensions may be unspecified.
146 *
147 * A tensor operand with all dimensions specified has "fully
148 * specified" dimensions. Whenever possible (i.e., whenever the
149 * dimensions are known at model construction time), a tensor
150 * operand should have (but is not required to have) fully
151 * specified dimensions, in order to enable the best possible
152 * performance.
153 *
154 * If a tensor operand's dimensions are not fully specified, the
155 * dimensions of the operand are deduced from the operand
156 * dimensions and values of the operation for which that operand
157 * is an output.
158 *
159 * In the following situations, a tensor operand's dimensions must
160 * be fully specified:
161 *
162 * . The operand has lifetime CONSTANT_COPY or
163 * CONSTANT_REFERENCE.
164 *
165 * . The operand has lifetime MODEL_INPUT or MODEL_OUTPUT. Fully
166 * specified dimensions must either be present in the
167 * Operand or they must be provided in the corresponding
168 * RequestArgument.
169 * EXCEPTION: If the input or output is optional and omitted
170 * (by setting the hasNoValue field of the corresponding
171 * RequestArgument to true) then it need not have fully
172 * specified dimensions.
173 *
174 * A tensor operand with some number of unspecified dimensions is
175 * represented by setting each unspecified dimension to 0.
176 */
177 vec<uint32_t> dimensions;
178
179 /**
180 * The number of times this operand appears as an operation input.
181 *
182 * (For example, if this operand appears once in one operation's
183 * input list, and three times in another operation's input list,
184 * then numberOfConsumers = 4.)
185 */
186 uint32_t numberOfConsumers;
187
188 /**
189 * Quantized scale of the operand.
190 *
191 * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM or
192 * TENSOR_INT32.
193 */
194 float scale;
195
196 /**
197 * Quantized zero-point offset of the operand.
198 *
199 * Only applicable if the operand is of type TENSOR_QUANT8_ASYMM.
200 */
201 int32_t zeroPoint;
202
203 /**
204 * How the operand is used.
205 */
206 OperandLifeTime lifetime;
207
208 /**
209 * Where to find the data for this operand.
210 * If the lifetime is TEMPORARY_VARIABLE, MODEL_INPUT, MODEL_OUTPUT, or
211 * NO_VALUE:
212 * - All the fields must be 0.
213 * If the lifetime is CONSTANT_COPY:
214 * - location.poolIndex is 0.
215 * - location.offset is the offset in bytes into Model.operandValues.
216 * - location.length is set.
217 * If the lifetime is CONSTANT_REFERENCE:
218 * - location.poolIndex is set.
219 * - location.offset is the offset in bytes into the specified pool.
220 * - location.length is set.
221 */
222 DataLocation location;
223};
224
225/**
105 * A Neural Network Model. 226 * A Neural Network Model.
106 * 227 *
107 * This includes not only the execution graph, but also constant data such as 228 * This includes not only the execution graph, but also constant data such as
diff --git a/neuralnetworks/1.2/vts/functional/BasicTests.cpp b/neuralnetworks/1.2/vts/functional/BasicTests.cpp
index d2dea1dc..eb3ebd32 100644
--- a/neuralnetworks/1.2/vts/functional/BasicTests.cpp
+++ b/neuralnetworks/1.2/vts/functional/BasicTests.cpp
@@ -37,6 +37,14 @@ TEST_F(NeuralnetworksHidlTest, StatusTest) {
37 EXPECT_EQ(DeviceStatus::AVAILABLE, static_cast<DeviceStatus>(status)); 37 EXPECT_EQ(DeviceStatus::AVAILABLE, static_cast<DeviceStatus>(status));
38} 38}
39 39
40// device version test
41TEST_F(NeuralnetworksHidlTest, GetDeviceVersionStringTest) {
42 Return<void> ret = device->getVersionString([](ErrorStatus status, const hidl_string& version) {
43 EXPECT_EQ(ErrorStatus::NONE, status);
44 EXPECT_LT(0, version.size());
45 });
46 EXPECT_TRUE(ret.isOk());
47}
40} // namespace functional 48} // namespace functional
41} // namespace vts 49} // namespace vts
42} // namespace V1_2 50} // namespace V1_2
diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
index 7ec6ff18..b840199d 100644
--- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
+++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
@@ -26,9 +26,7 @@ namespace neuralnetworks {
26namespace V1_2 { 26namespace V1_2 {
27 27
28using V1_0::IPreparedModel; 28using V1_0::IPreparedModel;
29using V1_0::Operand;
30using V1_0::OperandLifeTime; 29using V1_0::OperandLifeTime;
31using V1_0::OperandType;
32using V1_1::ExecutionPreference; 30using V1_1::ExecutionPreference;
33 31
34namespace vts { 32namespace vts {
@@ -131,10 +129,10 @@ static uint32_t addOperand(Model* model, OperandLifeTime lifetime) {
131///////////////////////// VALIDATE MODEL OPERAND TYPE ///////////////////////// 129///////////////////////// VALIDATE MODEL OPERAND TYPE /////////////////////////
132 130
133static const int32_t invalidOperandTypes[] = { 131static const int32_t invalidOperandTypes[] = {
134 static_cast<int32_t>(OperandType::FLOAT32) - 1, // lower bound fundamental 132 static_cast<int32_t>(OperandType::FLOAT32) - 1, // lower bound fundamental
135 static_cast<int32_t>(OperandType::TENSOR_QUANT8_ASYMM) + 1, // upper bound fundamental 133 static_cast<int32_t>(OperandType::TENSOR_QUANT16_ASYMM) + 1, // upper bound fundamental
136 static_cast<int32_t>(OperandType::OEM) - 1, // lower bound OEM 134 static_cast<int32_t>(OperandType::OEM) - 1, // lower bound OEM
137 static_cast<int32_t>(OperandType::TENSOR_OEM_BYTE) + 1, // upper bound OEM 135 static_cast<int32_t>(OperandType::TENSOR_OEM_BYTE) + 1, // upper bound OEM
138}; 136};
139 137
140static void mutateOperandTypeTest(const sp<IDevice>& device, const Model& model) { 138static void mutateOperandTypeTest(const sp<IDevice>& device, const Model& model) {
@@ -157,10 +155,13 @@ static uint32_t getInvalidRank(OperandType type) {
157 case OperandType::FLOAT32: 155 case OperandType::FLOAT32:
158 case OperandType::INT32: 156 case OperandType::INT32:
159 case OperandType::UINT32: 157 case OperandType::UINT32:
158 case OperandType::BOOL:
160 return 1; 159 return 1;
160 case OperandType::TENSOR_FLOAT16:
161 case OperandType::TENSOR_FLOAT32: 161 case OperandType::TENSOR_FLOAT32:
162 case OperandType::TENSOR_INT32: 162 case OperandType::TENSOR_INT32:
163 case OperandType::TENSOR_QUANT8_ASYMM: 163 case OperandType::TENSOR_QUANT8_ASYMM:
164 case OperandType::TENSOR_QUANT16_ASYMM:
164 return 0; 165 return 0;
165 default: 166 default:
166 return 0; 167 return 0;
@@ -185,11 +186,14 @@ static float getInvalidScale(OperandType type) {
185 case OperandType::FLOAT32: 186 case OperandType::FLOAT32:
186 case OperandType::INT32: 187 case OperandType::INT32:
187 case OperandType::UINT32: 188 case OperandType::UINT32:
189 case OperandType::BOOL:
190 case OperandType::TENSOR_FLOAT16:
188 case OperandType::TENSOR_FLOAT32: 191 case OperandType::TENSOR_FLOAT32:
189 return 1.0f; 192 return 1.0f;
190 case OperandType::TENSOR_INT32: 193 case OperandType::TENSOR_INT32:
191 return -1.0f; 194 return -1.0f;
192 case OperandType::TENSOR_QUANT8_ASYMM: 195 case OperandType::TENSOR_QUANT8_ASYMM:
196 case OperandType::TENSOR_QUANT16_ASYMM:
193 return 0.0f; 197 return 0.0f;
194 default: 198 default:
195 return 0.0f; 199 return 0.0f;
@@ -214,10 +218,13 @@ static std::vector<int32_t> getInvalidZeroPoints(OperandType type) {
214 case OperandType::FLOAT32: 218 case OperandType::FLOAT32:
215 case OperandType::INT32: 219 case OperandType::INT32:
216 case OperandType::UINT32: 220 case OperandType::UINT32:
221 case OperandType::BOOL:
222 case OperandType::TENSOR_FLOAT16:
217 case OperandType::TENSOR_FLOAT32: 223 case OperandType::TENSOR_FLOAT32:
218 case OperandType::TENSOR_INT32: 224 case OperandType::TENSOR_INT32:
219 return {1}; 225 return {1};
220 case OperandType::TENSOR_QUANT8_ASYMM: 226 case OperandType::TENSOR_QUANT8_ASYMM:
227 case OperandType::TENSOR_QUANT16_ASYMM:
221 return {-1, 256}; 228 return {-1, 256};
222 default: 229 default:
223 return {}; 230 return {};
@@ -253,10 +260,12 @@ static void mutateOperand(Operand* operand, OperandType type) {
253 case OperandType::FLOAT32: 260 case OperandType::FLOAT32:
254 case OperandType::INT32: 261 case OperandType::INT32:
255 case OperandType::UINT32: 262 case OperandType::UINT32:
263 case OperandType::BOOL:
256 newOperand.dimensions = hidl_vec<uint32_t>(); 264 newOperand.dimensions = hidl_vec<uint32_t>();
257 newOperand.scale = 0.0f; 265 newOperand.scale = 0.0f;
258 newOperand.zeroPoint = 0; 266 newOperand.zeroPoint = 0;
259 break; 267 break;
268 case OperandType::TENSOR_FLOAT16:
260 case OperandType::TENSOR_FLOAT32: 269 case OperandType::TENSOR_FLOAT32:
261 newOperand.dimensions = 270 newOperand.dimensions =
262 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1}); 271 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
@@ -269,6 +278,7 @@ static void mutateOperand(Operand* operand, OperandType type) {
269 newOperand.zeroPoint = 0; 278 newOperand.zeroPoint = 0;
270 break; 279 break;
271 case OperandType::TENSOR_QUANT8_ASYMM: 280 case OperandType::TENSOR_QUANT8_ASYMM:
281 case OperandType::TENSOR_QUANT16_ASYMM:
272 newOperand.dimensions = 282 newOperand.dimensions =
273 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1}); 283 operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
274 newOperand.scale = operand->scale != 0.0f ? operand->scale : 1.0f; 284 newOperand.scale = operand->scale != 0.0f ? operand->scale : 1.0f;
diff --git a/update-makefiles.sh b/update-makefiles.sh
index b7e42355..14c5b01c 100755
--- a/update-makefiles.sh
+++ b/update-makefiles.sh
@@ -1,4 +1,12 @@
1#!/bin/bash 1#!/bin/bash
2# Script to update Android make-files for HAL and VTS modules.
3
4set -e
5
6if [ -z "$ANDROID_BUILD_TOP" ]; then
7 echo "Missing ANDROID_BUILD_TOP env variable. Run 'lunch' first."
8 exit 1
9fi
2 10
3source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh 11source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh
4 12
@@ -6,3 +14,8 @@ do_makefiles_update \
6 "android.hardware:hardware/interfaces" \ 14 "android.hardware:hardware/interfaces" \
7 "android.hidl:system/libhidl/transport" 15 "android.hidl:system/libhidl/transport"
8 16
17echo "Updating files at $ANDROID_BUILD_TOP/test/vts-testcase/hal"
18pushd $ANDROID_BUILD_TOP/test/vts-testcase/hal
19./script/update_makefiles.py
20popd
21
diff --git a/wifi/1.2/default/Android.mk b/wifi/1.2/default/Android.mk
index 39196901..3c26383a 100644
--- a/wifi/1.2/default/Android.mk
+++ b/wifi/1.2/default/Android.mk
@@ -30,6 +30,8 @@ endif
30ifdef WIFI_HIDL_FEATURE_DISABLE_AP 30ifdef WIFI_HIDL_FEATURE_DISABLE_AP
31LOCAL_CPPFLAGS += -DWIFI_HIDL_FEATURE_DISABLE_AP 31LOCAL_CPPFLAGS += -DWIFI_HIDL_FEATURE_DISABLE_AP
32endif 32endif
33# Allow implicit fallthroughs in wifi_legacy_hal.cpp until they are fixed.
34LOCAL_CFLAGS += -Wno-error=implicit-fallthrough
33LOCAL_SRC_FILES := \ 35LOCAL_SRC_FILES := \
34 hidl_struct_util.cpp \ 36 hidl_struct_util.cpp \
35 hidl_sync_util.cpp \ 37 hidl_sync_util.cpp \
diff --git a/wifi/1.2/default/wifi_legacy_hal.cpp b/wifi/1.2/default/wifi_legacy_hal.cpp
index 375204c7..55ec96dd 100644
--- a/wifi/1.2/default/wifi_legacy_hal.cpp
+++ b/wifi/1.2/default/wifi_legacy_hal.cpp
@@ -550,6 +550,7 @@ wifi_error WifiLegacyHal::startGscan(
550 } 550 }
551 // Fall through if failed. Failure to retrieve cached scan 551 // Fall through if failed. Failure to retrieve cached scan
552 // results should trigger a background scan failure. 552 // results should trigger a background scan failure.
553 [[fallthrough]];
553 case WIFI_SCAN_FAILED: 554 case WIFI_SCAN_FAILED:
554 on_failure_user_callback(id); 555 on_failure_user_callback(id);
555 on_gscan_event_internal_callback = nullptr; 556 on_gscan_event_internal_callback = nullptr;