mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge changes from topic "aoa_interleaving"
* changes: uwb(hal): Remove getAndroidCapabilities HAL API uwb(hal): Add an android specifci aoa_result_req value
This commit is contained in:
committed by
Android (Google) Code Review
commit
04621a3e16
@@ -34,6 +34,7 @@
|
||||
package android.hardware.uwb.fira_android;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum UwbVendorCapabilityTlvTypes {
|
||||
SUPPORTED_POWER_STATS_QUERY = 192,
|
||||
CCC_SUPPORTED_VERSIONS = 160,
|
||||
CCC_SUPPORTED_UWB_CONFIGS = 161,
|
||||
CCC_SUPPORTED_PULSE_SHAPE_COMBOS = 162,
|
||||
@@ -43,4 +44,5 @@ enum UwbVendorCapabilityTlvTypes {
|
||||
CCC_SUPPORTED_CHANNELS = 166,
|
||||
CCC_SUPPORTED_HOPPING_SEQUENCES = 167,
|
||||
CCC_SUPPORTED_HOPPING_CONFIG_MODES = 168,
|
||||
SUPPORTED_AOA_RESULT_REQ_ANTENNA_INTERLEAVING = 227,
|
||||
}
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.uwb.fira_android;
|
||||
@Backing(type="long") @VintfStability
|
||||
enum UwbAndroidCapabilities {
|
||||
POWER_STATS_QUERY = 1,
|
||||
ANTENNAE_INTERLEAVING = 2,
|
||||
@Backing(type="int") @VintfStability
|
||||
enum UwbVendorSessionAppConfigTlvValues {
|
||||
AOA_RESULT_REQ_ANTENNA_INTERLEAVING = 240,
|
||||
}
|
||||
@@ -42,6 +42,5 @@ interface IUwbChip {
|
||||
void coreInit();
|
||||
void sessionInit(int sessionId);
|
||||
int getSupportedAndroidUciVersion();
|
||||
long getSupportedAndroidCapabilities();
|
||||
int sendUciMessage(in byte[] data);
|
||||
}
|
||||
|
||||
@@ -66,16 +66,6 @@ interface IUwbChip {
|
||||
*/
|
||||
int getSupportedAndroidUciVersion();
|
||||
|
||||
/**
|
||||
* Mechanism to allow HAL implementation to optionally expose features that are defined
|
||||
* in the "android.hardware.uwb.fira_android" types-only package.
|
||||
*
|
||||
* @return Returns the bitmask of capabilities
|
||||
* (android.hardware.uwb.fira_android.UwbAndroidCapabilities) that is supported by the
|
||||
* HAL implementation.
|
||||
*/
|
||||
long getSupportedAndroidCapabilities();
|
||||
|
||||
/**
|
||||
* Write the UCI message to the UWB Subsystem.
|
||||
* The UCI message format is as per UCI protocol and it is
|
||||
|
||||
@@ -29,6 +29,18 @@ package android.hardware.uwb.fira_android;
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum UwbVendorCapabilityTlvTypes {
|
||||
|
||||
/*********************************************
|
||||
* Protocol agnostic
|
||||
********************************************/
|
||||
/**
|
||||
* 1 byte value to indicate support for power stats query
|
||||
* Values:
|
||||
* 1 - Feature supported.
|
||||
* 0 - Feature not supported.
|
||||
*/
|
||||
SUPPORTED_POWER_STATS_QUERY = 0xC0,
|
||||
|
||||
/*********************************************
|
||||
* CCC specific
|
||||
********************************************/
|
||||
@@ -91,4 +103,16 @@ enum UwbVendorCapabilityTlvTypes {
|
||||
* HOPPING_CONFIG_MODE_ADAPTIVE = 2
|
||||
*/
|
||||
CCC_SUPPORTED_HOPPING_CONFIG_MODES = 0xA8,
|
||||
|
||||
/*********************************************
|
||||
* FIRA specific
|
||||
********************************************/
|
||||
/**
|
||||
* 1 byte value to indicate support for antenna interleaving
|
||||
* feature.
|
||||
* Values:
|
||||
* 1 - Feature supported.
|
||||
* 0 - Feature not supported.
|
||||
*/
|
||||
SUPPORTED_AOA_RESULT_REQ_ANTENNA_INTERLEAVING = 0xE3,
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ package android.hardware.uwb.fira_android;
|
||||
@Backing(type="byte")
|
||||
enum UwbVendorGidAndroidOids {
|
||||
// Used by the command and response to get UWB power related stats.
|
||||
// Supported only if the value returned by getSupportedAndroidCapabilities()
|
||||
// has the bit of UwbAndroidCapabilities.POWER_STATS_QUERY set to 1.
|
||||
// Supported only if the UwbVendorCapabilityTlvTypes.SUPPORTED_POWER_STATS_QUERY
|
||||
// set to 1.
|
||||
ANDROID_GET_POWER_STATS = 0x0,
|
||||
// Used to set the current regulatory country code (determined usinag
|
||||
// SIM or hardcoded by OEM).
|
||||
|
||||
@@ -57,8 +57,8 @@ enum UwbVendorSessionAppConfigTlvTypes {
|
||||
/**
|
||||
* 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.
|
||||
* Supported only if the UwbVendorCapabilityTlvTypes
|
||||
* .SUPPORTED_AOA_RESULT_REQ_ANTENNA_INTERLEAVING set to 1.
|
||||
*/
|
||||
/** 2 byte data */
|
||||
NB_OF_RANGE_MEASUREMENTS = 0xE3,
|
||||
|
||||
@@ -17,15 +17,23 @@
|
||||
package android.hardware.uwb.fira_android;
|
||||
|
||||
/**
|
||||
* Android specific capabilities should be defined here.
|
||||
*
|
||||
* For any features enabled via the FIRA vendor commands for Android, use this bitmask
|
||||
* to allow devices to expose the features supported by the HAL implementation.
|
||||
* Android specific vendor app config values set/expected in UCI command:
|
||||
* GID: 0001b (UWB Session config Group)
|
||||
* OID: 000011b (SESSION_SET_APP_CONFIG_CMD)
|
||||
* OID: 000100b (SESSION_GET_APP_CONFIG_CMD)
|
||||
*
|
||||
* Note: Refer to Table 34 of the UCI specification for the other values
|
||||
* expected in this command.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="long")
|
||||
enum UwbAndroidCapabilities {
|
||||
POWER_STATS_QUERY = 0x1,
|
||||
ANTENNAE_INTERLEAVING = 0x2,
|
||||
@Backing(type="int")
|
||||
enum UwbVendorSessionAppConfigTlvValues {
|
||||
/**
|
||||
* Added in vendor version 0.
|
||||
* Supported only if the UwbVendorCapabilityTlvTypes
|
||||
* .SUPPORTED_AOA_RESULT_REQ_ANTENNA_INTERLEAVING set to 1.
|
||||
* Set AOA_RESULT_REQ (Config ID - 0x0D) to this value to turn on antenna
|
||||
* interleaving feature.
|
||||
*/
|
||||
AOA_RESULT_REQ_ANTENNA_INTERLEAVING = 0xF0,
|
||||
}
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
namespace {
|
||||
constexpr static int32_t kAndroidUciVersion = 1;
|
||||
constexpr static int64_t kAndroidCapabilities = 0;
|
||||
}
|
||||
|
||||
namespace android {
|
||||
@@ -60,11 +59,6 @@ UwbChip::~UwbChip() {}
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
::ndk::ScopedAStatus UwbChip::getSupportedAndroidCapabilities(int64_t* capabilities) {
|
||||
*capabilities = kAndroidCapabilities;
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
::ndk::ScopedAStatus UwbChip::sendUciMessage(const std::vector<uint8_t>& /* data */,
|
||||
int32_t* /* bytes_written */) {
|
||||
// TODO(b/195992658): Need emulator support for UCI stack.
|
||||
|
||||
@@ -39,7 +39,6 @@ class UwbChip : public BnUwbChip {
|
||||
::ndk::ScopedAStatus coreInit() override;
|
||||
::ndk::ScopedAStatus sessionInit(int sesionId) override;
|
||||
::ndk::ScopedAStatus getSupportedAndroidUciVersion(int32_t* version) override;
|
||||
::ndk::ScopedAStatus getSupportedAndroidCapabilities(int64_t* capabilities) override;
|
||||
::ndk::ScopedAStatus sendUciMessage(const std::vector<uint8_t>& data,
|
||||
int32_t* bytes_written) override;
|
||||
|
||||
|
||||
@@ -180,14 +180,6 @@ TEST_P(UwbAidl, ChipGetSupportedAndroidUciVersion) {
|
||||
EXPECT_GT(version, 0);
|
||||
}
|
||||
|
||||
TEST_P(UwbAidl, ChipGetSupportedAndroidCapabilities) {
|
||||
const auto iuwb_chip = getAnyChipAndOpen();
|
||||
EXPECT_TRUE(iuwb_chip->coreInit().isOk());
|
||||
|
||||
int64_t capabilities;
|
||||
EXPECT_TRUE(iuwb_chip->getSupportedAndroidCapabilities(&capabilities).isOk());
|
||||
}
|
||||
|
||||
TEST_P(UwbAidl, ChipGetName) {
|
||||
std::string chip_name = getAnyChipName();
|
||||
std::shared_ptr<IUwbChip> iuwb_chip;
|
||||
|
||||
Reference in New Issue
Block a user