{
return hal_api_backend_service_get_stub_proc_name(module, stub_proc_name);
}
+
+EXPORT
+int hal_common_get_backend_transport(enum hal_module module,
+ enum hal_common_transport *backend_transport)
+{
+ /**
+ * If you get to here searching for backend transport, you can use this function.
+ * But before using it, you should exactly know about difference between platform
+ * transport and backend transport. And you need to distinguish the difference of
+ * hal_common_get_transport() and hal_common_get_backend_transport(). If you don't,
+ * we discourage to use it.
+ *
+ * We exported the function but didn't include it in the header out of concern
+ * that such subtle differences in behavior might lead to incorrect usage.
+ */
+ return hal_api_cc_get_backend_transport(module, backend_transport);
+}
\ No newline at end of file
return 0;
}
+
+int hal_api_cc_get_backend_transport(enum hal_module module,
+ enum hal_common_transport *backend_transport)
+{
+ int ret;
+ struct compatibility_info info = { 0 , };
+
+ if (!backend_transport)
+ return -EINVAL;
+
+ ret = load_module_compatibility_info(module, &info);
+ if (ret < 0) {
+ ret = load_module_compatibility_info_fallback(module, &info, false);
+ if (ret < 0)
+ return ret;
+ }
+
+ *backend_transport = info.backend_transport;
+
+ return 0;
+}
uint32_t **transports, enum hal_common_transport **default_transport,
int *num_versions);
int hal_api_cc_get_transport(enum hal_module module, enum hal_common_transport *transport);
+int hal_api_cc_get_backend_transport(enum hal_module module,
+ enum hal_common_transport *backend_transport);
#ifdef HAL_API_COMMON_UNITTEST /* For test use only */
void hal_api_cc_set_compatibility_result_path(const char *path);
void *unused_buffer[10000];
} *backend_module_data;
+extern int hal_common_get_backend_transport(enum hal_module module,
+ enum hal_common_transport *backend_transport);
+
static void lshal_print_border(void) {
for (int i = 0; i < 287; i++)
printf("-");
char str[BUFF_MAX];
lshal_print_border();
- printf(" %-38s | | %-55s | %-10s | %-45s | %-25s | %-25s | %-25s | %-15s | %-15s |\n",
+ printf(" %-38s | | %-55s | %-10s | %-45s | %-25s | %-25s | %-25s | %-20s | %-15s |\n",
"",
"",
"Backend",
"Backend",
"");
- printf(" %-38s | ID | %-55s | %-10s | %-45s | %-25s | %-25s | %-25s | %-15s | %-15s |\n",
+ printf(" %-38s | ID | %-55s | %-10s | %-45s | %-25s | %-25s | %-25s | %-20s | %-15s |\n",
"HAL Module Name",
"Backend Library Name",
"Open Count",
"(Written by Developer)",
"(Written by Developer)",
"Versions(Transport)",
- "Version",
+ "Version(Transport)",
"Compatibility");
lshal_print_border();
ret = hal_common_get_backend_version(module, &major, &minor);
if (ret < 0) {
- printf(" %-15s |", "");
+ printf(" %-20s |", "");
} else if (major == 0 && minor == 0) {
- printf(" %-15s |", "");
+ printf(" %-20s |", "");
} else {
- snprintf(str, BUFF_MAX - 1, "%u.%u", major, minor);
- printf(" %-15s |", str);
+ enum hal_common_transport backend_transport
+ = HAL_COMMON_TRANSPORT_UNKNOWN;
+ hal_common_get_backend_transport(module, &backend_transport);
+ snprintf(str, BUFF_MAX - 1, "%u.%u%s", major, minor,
+ (backend_transport == HAL_COMMON_TRANSPORT_IPC) ? "(ipc)"
+ : (backend_transport == HAL_COMMON_TRANSPORT_PASSTHROUGH) ? "(passthrough)"
+ : "");
+ printf(" %-20s |", str);
}
}
}
lshal_print_border();
- printf(" %-38s | %-2d | %-55s | %-10s | %-45s | %-25s | %-25s | %-25s | %-15s | %-15s |\n",
+ printf(" %-38s | %-2d | %-55s | %-10s | %-45s | %-25s | %-25s | %-25s | %-20s | %-15s |\n",
"TOTAL",
HAL_MODULE_END - 1,
"",