From f996b7c87b8192f8dce9882433ad008c37a959cd Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Tue, 30 Nov 2021 10:53:29 -0800 Subject: [PATCH] uwb(hal): Add SET_APP_CONFIG params for interleaving ratio This is defined in the vendor space since it has not been defined in the FIRA standards yet (even though the AOA_RESULT_REQ = 0xF0 has been accepted into the specification). Bug: 205730040 Test: Compiles Change-Id: Ib4106f123a2edf6ed00128985914a5bd932e249e --- .../fira_android/UwbAndroidCapabilities.aidl | 1 + ...UwbVendorSessionSetAppConfigCmdParams.aidl | 3 +++ .../fira_android/UwbAndroidCapabilities.aidl | 2 +- ...UwbVendorSessionSetAppConfigCmdParams.aidl | 22 ++++++++++++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbAndroidCapabilities.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbAndroidCapabilities.aidl index 774133e3df..7e3be56d64 100644 --- a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbAndroidCapabilities.aidl +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbAndroidCapabilities.aidl @@ -35,4 +35,5 @@ package android.hardware.uwb.fira_android; @Backing(type="long") @VintfStability enum UwbAndroidCapabilities { POWER_STATS_QUERY = 1, + ANTENNAE_INTERLEAVING = 2, } diff --git a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl index 37b7efb321..f449c60212 100644 --- a/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl +++ b/uwb/aidl/aidl_api/android.hardware.uwb.fira_android/current/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl @@ -38,4 +38,7 @@ enum UwbVendorSessionSetAppConfigCmdParams { CCC_UWB_CONFIG_ID = 164, CCC_PULSESHAPE_COMBO = 165, CCC_URSK_TTL = 166, + NB_OF_RANGE_MEASUREMENTS = 227, + NB_OF_AZIMUTH_MEASUREMENTS = 228, + NB_OF_ELEVATION_MEASUREMENTS = 229, } diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbAndroidCapabilities.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbAndroidCapabilities.aidl index 3486d5a078..0af99e0f29 100644 --- a/uwb/aidl/android/hardware/uwb/fira_android/UwbAndroidCapabilities.aidl +++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbAndroidCapabilities.aidl @@ -26,6 +26,6 @@ package android.hardware.uwb.fira_android; @VintfStability @Backing(type="long") enum UwbAndroidCapabilities { - /** TODO: Change the name if necessary when the corresponding vendor commands are added */ POWER_STATS_QUERY = 0x1, + ANTENNAE_INTERLEAVING = 0x2, } diff --git a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl index 850e2da490..f5e02c07c1 100644 --- a/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl +++ b/uwb/aidl/android/hardware/uwb/fira_android/UwbVendorSessionSetAppConfigCmdParams.aidl @@ -29,9 +29,29 @@ package android.hardware.uwb.fira_android; enum UwbVendorSessionSetAppConfigCmdParams { /** CCC params for ranging start */ - /** Added in vendor version 0. */ + /** + * Added in vendor version 0. + * Range 0xA0 - 0xDF reserved for CCC use. + */ CCC_RANGING_PROTOCOL_VER = 0xA3, CCC_UWB_CONFIG_ID = 0xA4, CCC_PULSESHAPE_COMBO = 0xA5, CCC_URSK_TTL = 0xA6, + + /** + * Range 0xE3 - 0xFF is reserved for proprietary use in the FIRA spec. + * In Android, this range is reserved by the Android platform for Android-specific + * app config cmd params. + * Vendors must not define additional app config cmd params in this range. + */ + + /** + * Added in vendor version 0. + * Interleaving ratio if AOA_RESULT_REQ is set to 0xF0. + * Supported only if the value returned by getSupportedAndroidCapabilities() + * has the bit of UwbAndroidCapabilities.ANTENNAE_INTERLEAVING set to 1. + */ + NB_OF_RANGE_MEASUREMENTS = 0xE3, + NB_OF_AZIMUTH_MEASUREMENTS = 0xE4, + NB_OF_ELEVATION_MEASUREMENTS = 0xE5, }