uwb(interface): Add a package for Android specific params in UCI

Along with the FIRA standard defined UCI specification, Android needs to
support some Android specific commands/params (uses vendor carve-outs in
the specifications). Use this new package to explicitly specify these
Android specific commands/params.

Note: This package is not tied to main UWB HAL interface and should be
updatable between dessert releases (infra changes needed to support
this still needs to be figured out).

Bug: 197886322
Test: Compiles
Change-Id: Id8b50a84cec40f80389cef3a7bfad920a3e07446
This commit is contained in:
Roshan Pius
2021-10-12 09:45:28 -07:00
parent 1b5669f763
commit f527f8f774
7 changed files with 193 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ bool ShouldCheckMissingHalsInFcm(const std::string& package) {
"android.hardware.graphics.common",
"android.hardware.keymaster",
"android.hardware.radio",
"android.hardware.uwb.fira_android",
// Fastboot HAL is only used by recovery. Recovery is owned by OEM. Framework
// does not depend on this HAL, hence it is not declared in any manifests or matrices.

View File

@@ -17,6 +17,7 @@ aidl_interface {
backend: {
java: {
sdk_version: "module_current",
enabled: false,
},
ndk: {
vndk: {
@@ -37,3 +38,29 @@ aidl_interface {
},
},
}
aidl_interface {
name: "android.hardware.uwb.fira_android",
vendor_available: true,
srcs: ["android/hardware/uwb/fira_android/*.aidl"],
stability: "vintf",
backend: {
java: {
sdk_version: "module_current",
enabled: true,
apex_available: [
"com.android.uwb",
],
},
ndk: {
vndk: {
enabled: true,
},
apex_available: [
"//apex_available:platform",
"com.android.uwb",
],
min_sdk_version: "current",
},
},
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.uwb.fira_android;
@Backing(type="byte") @VintfStability
enum UwbVendorGids {
ANDROID = 14,
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
///////////////////////////////////////////////////////////////////////////////
// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
// the interface (from the latest frozen version), the build system will
// prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.
package android.hardware.uwb.fira_android;
@Backing(type="int") @VintfStability
enum UwbVendorSessionSetAppConfigCmdParams {
CCC_RANGING_PROTOCOL_VER = 163,
CCC_UWB_CONFIG_ID = 164,
CCC_PULSESHAPE_COMBO = 165,
CCC_URSK_TTL = 166,
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.uwb.fira_android;
/**
* Android specific vendor command GIDs (Group ID) should be defined here.
*
* For each vendor GID defined here, also create a corresponding AIDL file enumerating the
* OIDs (Opcode Identifier) allowed within that GID.
* For ex: VENDOR_GID_XXX = 1110b -> UwbVendorGidXXXOids.aidl
*/
@VintfStability
@Backing(type="byte")
enum UwbVendorGids {
/**
* Use values from the Proprietary Group range: 1110b 1111b defined in Table 36 of
* UCI specification.
*/
/** All Android specific commands/response/notification should use this GID */
ANDROID = 0xE,
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.uwb.fira_android;
/**
* Android specific vendor app params set in UCI command:
* GID: 0001b (UWB Session config Group)
* OID: 000011b (SESSION_SET_APP_CONFIG_CMD)
*
* Note: Refer to Table 34 of the UCI specification for the other params
* expected in this command.
*/
@VintfStability
@Backing(type="int")
enum UwbVendorSessionSetAppConfigCmdParams {
/** CCC params for ranging start */
/** Added in vendor version 0. */
CCC_RANGING_PROTOCOL_VER = 0xA3,
CCC_UWB_CONFIG_ID = 0xA4,
CCC_PULSESHAPE_COMBO = 0xA5,
CCC_URSK_TTL = 0xA6,
}

View File

@@ -0,0 +1,13 @@
The android.hardware.uwb.fira_android package is used to add any Android specific
additions to the UCI specification defined by FIRA standards body. These
additions should be added to the vendor specific portions carved out in the UCI
specification.
These include:
- Android specific GIDs/OIDs for commands/responses/notifications.
- Andriod specific params in an existing UCI specified command/response/notification.
All other interactions sent/received over the HAL interface is expected to
comply with the UCI specification that can be found here:
https://groups.firaconsortium.org/wg/Technical/document/folder/127
(TODO(b/196004116): Link to the published specification)