Merge changes from topics "replace_asymm", "fp16-op-add"
* changes:
Replace TENSOR_QUANT16_ASYMM with TENSOR_QUANT16_SYMM
Fix VTS ValidationTest for 1.2 ops.
Adds float16 support to generated tests.
Autogenerates VTS ValidationTest tests.
Fix VTS ValidationTest for 1.2 ops.
Separates VTS tests by HAL version.
diff --git a/Android.bp b/Android.bp
index 05ca928..1c6e1b2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,6 @@
hidl_package_root {
name: "android.hardware",
+ use_current: true,
}
cc_defaults {
diff --git a/cas/1.0/default/Android.bp b/cas/1.0/default/Android.bp
index a80c47f..debb3e5 100644
--- a/cas/1.0/default/Android.bp
+++ b/cas/1.0/default/Android.bp
@@ -1,6 +1,5 @@
-cc_binary {
- name: "android.hardware.cas@1.0-service",
- vintf_fragments: ["android.hardware.cas@1.0-service.xml"],
+cc_defaults {
+ name: "cas_service_defaults",
defaults: ["hidl_defaults"],
vendor: true,
relative_install_path: "hw",
@@ -14,7 +13,6 @@
],
compile_multilib: "32",
- init_rc: ["android.hardware.cas@1.0-service.rc"],
shared_libs: [
"android.hardware.cas@1.0",
@@ -32,3 +30,19 @@
"media_plugin_headers",
],
}
+
+cc_binary {
+ name: "android.hardware.cas@1.0-service",
+ vintf_fragments: ["android.hardware.cas@1.0-service.xml"],
+ defaults: ["cas_service_defaults"],
+ init_rc: ["android.hardware.cas@1.0-service.rc"],
+}
+
+cc_binary {
+ name: "android.hardware.cas@1.0-service-lazy",
+ vintf_fragments: ["android.hardware.cas@1.0-service-lazy.xml"],
+ overrides: ["android.hardware.cas@1.0-service"],
+ defaults: ["cas_service_defaults"],
+ init_rc: ["android.hardware.cas@1.0-service-lazy.rc"],
+ cflags: ["-DLAZY_SERVICE"],
+}
diff --git a/cas/1.0/default/android.hardware.cas@1.0-service-lazy.rc b/cas/1.0/default/android.hardware.cas@1.0-service-lazy.rc
new file mode 100644
index 0000000..735cfbc
--- /dev/null
+++ b/cas/1.0/default/android.hardware.cas@1.0-service-lazy.rc
@@ -0,0 +1,9 @@
+service vendor.cas-hal-1-0 /vendor/bin/hw/android.hardware.cas@1.0-service
+ interface android.hardware.cas@1.0::IMediaCasService default
+ oneshot
+ disabled
+ class hal
+ user media
+ group mediadrm drmrpc
+ ioprio rt 4
+ writepid /dev/cpuset/foreground/tasks
diff --git a/cas/1.0/default/android.hardware.cas@1.0-service-lazy.xml b/cas/1.0/default/android.hardware.cas@1.0-service-lazy.xml
new file mode 100644
index 0000000..9b55370
--- /dev/null
+++ b/cas/1.0/default/android.hardware.cas@1.0-service-lazy.xml
@@ -0,0 +1,11 @@
+<manifest version="1.0" type="device">
+ <hal format="hidl">
+ <name>android.hardware.cas</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IMediaCasService</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/cas/1.0/default/service.cpp b/cas/1.0/default/service.cpp
index 04a8ad9..2e6e55d 100644
--- a/cas/1.0/default/service.cpp
+++ b/cas/1.0/default/service.cpp
@@ -15,7 +15,11 @@
*/
//#define LOG_NDEBUG 0
+#ifdef LAZY_SERVICE
+#define LOG_TAG "android.hardware.cas@1.0-service-lazy"
+#else
#define LOG_TAG "android.hardware.cas@1.0-service"
+#endif
#include <binder/ProcessState.h>
#include <hidl/HidlTransportSupport.h>
@@ -25,24 +29,30 @@
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
-using android::hardware::cas::V1_0::implementation::MediaCasService;
+using android::hardware::LazyServiceRegistrar;
using android::hardware::cas::V1_0::IMediaCasService;
+using android::hardware::cas::V1_0::implementation::MediaCasService;
+
+#ifdef LAZY_SERVICE
+const bool kLazyService = true;
+#else
+const bool kLazyService = false;
+#endif
int main() {
- ALOGD("android.hardware.cas@1.0-service starting...");
-
- // The CAS HAL may communicate to other vendor components via
- // /dev/vndbinder
- android::ProcessState::initWithDriver("/dev/vndbinder");
-
configureRpcThreadpool(8, true /* callerWillJoin */);
// Setup hwbinder service
android::sp<IMediaCasService> service = new MediaCasService();
- android::status_t status = service->registerAsService();
- LOG_ALWAYS_FATAL_IF(
- status != android::OK,
- "Error while registering cas service: %d", status);
+ android::status_t status;
+ if (kLazyService) {
+ auto serviceRegistrar = std::make_shared<LazyServiceRegistrar>();
+ status = serviceRegistrar->registerServiceWithCallback(service);
+ } else {
+ status = service->registerAsService();
+ }
+ LOG_ALWAYS_FATAL_IF(status != android::OK, "Error while registering cas service: %d", status);
+
joinRpcThreadpool();
return 0;
}
diff --git a/compatibility_matrices/Android.bp b/compatibility_matrices/Android.bp
index 49674e3..b88d88f 100644
--- a/compatibility_matrices/Android.bp
+++ b/compatibility_matrices/Android.bp
@@ -73,5 +73,6 @@
"kernel_config_current_4.4",
"kernel_config_current_4.9",
"kernel_config_current_4.14",
+ "kernel_config_current_4.19",
]
}
diff --git a/neuralnetworks/1.2/Android.bp b/neuralnetworks/1.2/Android.bp
index 5a661e0..e155bbd 100644
--- a/neuralnetworks/1.2/Android.bp
+++ b/neuralnetworks/1.2/Android.bp
@@ -19,8 +19,10 @@
"Model",
"Operand",
"OperandType",
+ "OperandTypeRange",
"Operation",
"OperationType",
+ "OperationTypeRange",
],
gen_java: false,
}
diff --git a/radio/1.4/Android.bp b/radio/1.4/Android.bp
index 02c6cad..a450f20 100644
--- a/radio/1.4/Android.bp
+++ b/radio/1.4/Android.bp
@@ -22,21 +22,21 @@
],
types: [
"AccessNetwork",
+ "CardStatus",
"CellConfigLte",
"CellInfo",
"CellInfoLte",
- "CardStatus",
"DataProfileInfo",
"DataRegStateResult",
"EmergencyNumber",
"EmergencyNumberSource",
"EmergencyServiceCategory",
"FrequencyRange",
- "RadioFrequencyInfo",
- "RadioTechnology",
- "PhysicalChannelConfig",
"LteVopsInfo",
"NetworkScanResult",
+ "PhysicalChannelConfig",
+ "RadioFrequencyInfo",
+ "RadioTechnology",
],
gen_java: true,
}
diff --git a/radio/config/1.1/Android.bp b/radio/config/1.1/Android.bp
index f228704..10c4c98 100644
--- a/radio/config/1.1/Android.bp
+++ b/radio/config/1.1/Android.bp
@@ -11,9 +11,10 @@
"IRadioConfigResponse.hal",
],
interfaces: [
- "android.hardware.radio@1.0",
"android.hardware.radio.config@1.0",
+ "android.hardware.radio@1.0",
"android.hidl.base@1.0",
],
gen_java: true,
}
+
diff --git a/radio/config/1.2/Android.bp b/radio/config/1.2/Android.bp
index c1eeb35..3e6a425 100644
--- a/radio/config/1.2/Android.bp
+++ b/radio/config/1.2/Android.bp
@@ -12,9 +12,9 @@
"IRadioConfigResponse.hal",
],
interfaces: [
- "android.hardware.radio@1.0",
"android.hardware.radio.config@1.0",
"android.hardware.radio.config@1.1",
+ "android.hardware.radio@1.0",
"android.hidl.base@1.0",
],
types: [
@@ -22,3 +22,4 @@
],
gen_java: true,
}
+