From 1adb2f7631c896f381ea39ec9dfdc9fe5242ef04 Mon Sep 17 00:00:00 2001 From: Alexander Koskovich Date: Sat, 10 Jul 2021 19:47:56 -0700 Subject: [PATCH] interfaces: Introduce the QTI FM HAL. * Based on observing FM HCI expectations. Change-Id: I54685ff840e8c4c4e5b0de3cc1bec3eb1ed29579 --- interfaces/qcom/Android.bp | 5 +++++ interfaces/qcom/fm/1.0/Android.bp | 16 ++++++++++++++++ interfaces/qcom/fm/1.0/IFmHci.hal | 13 +++++++++++++ interfaces/qcom/fm/1.0/IFmHciCallbacks.hal | 6 ++++++ interfaces/qcom/fm/1.0/types.hal | 10 ++++++++++ 5 files changed, 50 insertions(+) create mode 100644 interfaces/qcom/fm/1.0/Android.bp create mode 100644 interfaces/qcom/fm/1.0/IFmHci.hal create mode 100644 interfaces/qcom/fm/1.0/IFmHciCallbacks.hal create mode 100644 interfaces/qcom/fm/1.0/types.hal diff --git a/interfaces/qcom/Android.bp b/interfaces/qcom/Android.bp index a27e4ebd..7e2e7ea7 100644 --- a/interfaces/qcom/Android.bp +++ b/interfaces/qcom/Android.bp @@ -31,3 +31,8 @@ hidl_package_root { name: "vendor.qti.hardware.cryptfshw", path: "vendor/aospa/interfaces/qcom/cryptfshw", } + +hidl_package_root { + name: "vendor.qti.hardware.fm", + path: "vendor/aospa/interfaces/qcom/fm", +} diff --git a/interfaces/qcom/fm/1.0/Android.bp b/interfaces/qcom/fm/1.0/Android.bp new file mode 100644 index 00000000..7f1935b6 --- /dev/null +++ b/interfaces/qcom/fm/1.0/Android.bp @@ -0,0 +1,16 @@ +// This file is autogenerated by hidl-gen -Landroidbp. + +hidl_interface { + name: "vendor.qti.hardware.fm@1.0", + root: "vendor.qti.hardware.fm", + system_ext_specific: true, + srcs: [ + "types.hal", + "IFmHci.hal", + "IFmHciCallbacks.hal", + ], + interfaces: [ + "android.hidl.base@1.0", + ], + gen_java: true, +} diff --git a/interfaces/qcom/fm/1.0/IFmHci.hal b/interfaces/qcom/fm/1.0/IFmHci.hal new file mode 100644 index 00000000..4d6df1d5 --- /dev/null +++ b/interfaces/qcom/fm/1.0/IFmHci.hal @@ -0,0 +1,13 @@ +package vendor.qti.hardware.fm@1.0; + +import IFmHciCallbacks; + +interface IFmHci { + @entry + @callflow(next={"sendHciCommand", "close"}) + initialize(IFmHciCallbacks callback); + @callflow(next={"sendHciCommand", "close"}) + sendHciCommand(HciPacket command); + @exit + close(); +}; diff --git a/interfaces/qcom/fm/1.0/IFmHciCallbacks.hal b/interfaces/qcom/fm/1.0/IFmHciCallbacks.hal new file mode 100644 index 00000000..58db0dfc --- /dev/null +++ b/interfaces/qcom/fm/1.0/IFmHciCallbacks.hal @@ -0,0 +1,6 @@ +package vendor.qti.hardware.fm@1.0; + +interface IFmHciCallbacks { + initializationComplete(Status status); + hciEventReceived(HciPacket event); +}; diff --git a/interfaces/qcom/fm/1.0/types.hal b/interfaces/qcom/fm/1.0/types.hal new file mode 100644 index 00000000..b15f7b04 --- /dev/null +++ b/interfaces/qcom/fm/1.0/types.hal @@ -0,0 +1,10 @@ +package vendor.qti.hardware.fm@1.0; + +enum Status : int32_t { + SUCCESS, + TRANSPORT_ERROR, + INITIALIZATION_ERROR, + UNKNOWN +}; + +typedef vec HciPacket;