Merge changes from topic 'vts files for radio hal'
* changes:
Use a new lib to generate a struct argument message musing a Py dict
vts files for radio hal
diff --git a/contexthub/1.0/types.hal b/contexthub/1.0/types.hal
index 043bb39..c8ea623 100644
--- a/contexthub/1.0/types.hal
+++ b/contexthub/1.0/types.hal
@@ -20,12 +20,11 @@
OK, // Success
UNKNOWN_FAILURE, // Failure, unknown reason
BAD_PARAMS, // Parameters not sane
- NOT_INIT, // not initialized
- TRANSACTION_FAILED, // transaction failed
+ NOT_INIT, // Not initialized
+ TRANSACTION_FAILED, // Transaction failed
TRANSACTION_PENDING, // Pending transaction, cannot accept a new request
};
-
enum NanoAppFlags : uint32_t {
SIGNED = (1<<0), // Signed nanoapp
ENCRYPTED = (1<<1),// Encrypted nanoapp
@@ -34,11 +33,12 @@
struct NanoAppBinary {
uint32_t headerVersion; // 0x1 for this version
uint32_t magic; // "NANO"
- uint64_t appId; // App Id contains vendor id
+ uint64_t appId; // App ID (contains vendor ID in most significant
+ // 5 bytes)
uint32_t appVersion; // Version of the app
- uint32_t flags; // mask of NanoAppFlags
- uint64_t hwHubType; // which hub type is this compiled for
- // a unique UUID for each h/w + toolchain
+ uint32_t flags; // Mask of NanoAppFlags
+ uint64_t hwHubType; // Which hub type is this app is compiled for. A
+ // unique ID for each h/w + toolchain
// combination.
vec<uint8_t> customBinary; // start of custom binary data
};
@@ -82,38 +82,38 @@
// definition may be different from say the
// number advertised in the sensors HAL
// which allows for batching in a hub.
- uint32_t fifoMaxCount; // maximum number of batchable events.
- uint64_t minDelayMs; // in milliseconds, corresponding to highest
+ uint32_t fifoMaxCount; // Maximum number of batchable events.
+ uint64_t minDelayMs; // In milliseconds, corresponding to highest
// sampling freq.
- uint64_t maxDelayMs; // in milliseconds, corresponds to minimum
+ uint64_t maxDelayMs; // In milliseconds, corresponds to minimum
// sampling frequency
float peakPowerMw; // At max frequency & no batching, power
// in milliwatts
};
struct ContextHub {
- string name; // descriptive name eg: "Awesome Hub #1"
- string vendor; // hub hardware vendor eg: "Qualcomm"
- string toolchain; // toolchain to make binaries eg: "gcc ARM"
+ string name; // Descriptive name eg: "Awesome Hub #1"
+ string vendor; // Hub hardware vendor eg: "Qualcomm"
+ string toolchain; // Toolchain to make binaries eg: "gcc ARM"
uint32_t platformVersion; // Version of the hardware : eg 0x20
uint32_t toolchainVersion; // Version of the toolchain : eg: 0x484
- uint32_t hubId; // a device unique id for this hub
+ uint32_t hubId; // A device unique ID for this hub
float peakMips; // Peak MIPS platform can deliver
- float stoppedPowerDrawMw; // if stopped, retention power, milliwatts
- float sleepPowerDrawMw; // if sleeping, retention power, milliwatts
- float peakPowerDrawMw; // for a busy CPUm power in milliwatts
+ float stoppedPowerDrawMw; // If stopped, retention power, milliwatts
+ float sleepPowerDrawMw; // If sleeping, retention power, milliwatts
+ float peakPowerDrawMw; // For a busy CPU, power in milliwatts
- vec<PhysicalSensor> connectedSensors; // array of connected sensors
+ vec<PhysicalSensor> connectedSensors; // Array of connected sensors
uint32_t maxSupportedMsgLen;// This is the maximum size of the message that can
// be sent to the hub in one chunk (in bytes)
};
struct ContextHubMsg {
- uint64_t appName; // intended recipient
- uint32_t msgType; // identifier for message
- vec<uint8_t> msg; // message body
+ uint64_t appName; // Intended recipient (appId)
+ uint32_t msgType; // Identifier for message
+ vec<uint8_t> msg; // Message body
};
enum HubMemoryType : uint32_t {
@@ -129,24 +129,26 @@
};
struct MemRange {
- uint32_t totalBytes; // total capacity in bytes
- uint32_t freeBytes; // free capacity in bytes
- HubMemoryType type; // type of memory, see HubMemoryType
- uint32_t flags; // mask of HubMemoryFlag
+ uint32_t totalBytes; // Total capacity in bytes
+ uint32_t freeBytes; // Free capacity in bytes
+ HubMemoryType type; // Type of memory, see HubMemoryType
+ uint32_t flags; // Mask of HubMemoryFlag
};
enum AsyncEventType : uint32_t {
- RESTARTED = 1, // Hub restarted unexpectedly
+ RESTARTED = 1, // Hub restarted unexpectedly
};
enum TransactionResult : int32_t {
- SUCCESS, // successful completion of transaction
- FAILURE, // failed transaction
+ SUCCESS, // Successful completion of transaction
+ FAILURE, // Failed transaction
};
struct HubAppInfo {
uint64_t appId; // Identifier of the app
- uint32_t version; // version of the app
+ uint32_t version; // Version of the app
vec<MemRange> memUsage; // Memory used by this app
+ bool enabled; // true if the app is currently enabled and running,
+ // or false if in the loaded but disabled state
};
diff --git a/graphics/common/1.0/types.hal b/graphics/common/1.0/types.hal
index e20fedc..ebdba77 100644
--- a/graphics/common/1.0/types.hal
+++ b/graphics/common/1.0/types.hal
@@ -928,10 +928,6 @@
* A pixel value of 1.0, 1.0, 1.0 corresponds to sRGB white (D65) at 80 nits.
* Values beyond the range [0.0 - 1.0] would correspond to other colors
* spaces and/or HDR content.
- *
- * TODO (courtneygo): Will we actually use this? We intend to use FP16
- * storage for data using scRGB so we can do all work in linear space
- * and don't have to worry as much about limited precision.
*/
V0_SCRGB = STANDARD_BT709 | TRANSFER_SRGB | RANGE_EXTENDED,
@@ -1015,6 +1011,24 @@
/*
+ * Display P3
+ *
+ * Display P3 uses same primaries and white-point as DCI-P3
+ * linear transfer function makes this the same as DCI_P3_LINEAR.
+ */
+ DISPLAY_P3_LINEAR = STANDARD_DCI_P3 | TRANSFER_LINEAR | RANGE_FULL,
+
+
+ /*
+ * Display P3
+ *
+ * Use same primaries and white-point as DCI-P3
+ * but sRGB transfer function.
+ */
+ DISPLAY_P3 = STANDARD_DCI_P3 | TRANSFER_SRGB | RANGE_FULL,
+
+
+ /*
* Adobe RGB
*
* Use full range, gamma 2.2 transfer and Adobe RGB primaries
diff --git a/graphics/mapper/2.0/vts/functional/Android.bp b/graphics/mapper/2.0/vts/functional/Android.bp
index 53e6d16..27ea350 100644
--- a/graphics/mapper/2.0/vts/functional/Android.bp
+++ b/graphics/mapper/2.0/vts/functional/Android.bp
@@ -30,6 +30,7 @@
"libutils",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.mapper@2.0",
+ "android.hardware.graphics.common@1.0",
],
static_libs: ["libgtest"],
cflags: [
diff --git a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp b/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
index 8e85b23..17c439e 100644
--- a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
+++ b/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
@@ -84,6 +84,10 @@
collectionEnabled = false;
startPollingThread();
+
+ // In case framework just stopped for test and there is sensor events in the pipe,
+ // wait some time for those events to be cleared to avoid them messing up the test.
+ std::this_thread::sleep_for(std::chrono::seconds(3));
}
void SensorsHidlEnvironment::TearDown() {
diff --git a/tests/foo/1.0/IFoo.hal b/tests/foo/1.0/IFoo.hal
index fc76c1c..76aefcf 100644
--- a/tests/foo/1.0/IFoo.hal
+++ b/tests/foo/1.0/IFoo.hal
@@ -98,6 +98,29 @@
typedef bitfield<BitField> Mask;
+ struct Everything {
+ union U {
+ int8_t number;
+ int8_t[1][2] multidimArray;
+ pointer p;
+ Fumble anotherStruct;
+ bitfield<BitField> bf;
+ } u;
+
+ int8_t number;
+ handle h;
+ fmq_sync<uint8_t> descSync;
+ fmq_unsync<uint8_t> descUnsync;
+ memory mem;
+ pointer p;
+ string s;
+ vec<string> vs;
+ string[2][2] multidimArray;
+ string[3] sArray;
+ Quux anotherStruct;
+ bitfield<BitField> bf;
+ };
+
doThis(float param);
doThatAndReturnSomething(int64_t param) generates (int32_t result);
doQuiteABit(int32_t a, int64_t b, float c, double d) generates (double something);
diff --git a/vehicle/2.0/types.hal b/vehicle/2.0/types.hal
index 52a6ace..bb83c8a 100644
--- a/vehicle/2.0/types.hal
+++ b/vehicle/2.0/types.hal
@@ -2745,7 +2745,7 @@
* tests are available and whether they are complete. The semantics of the individual
* bits in this value are given by, respectively, SparkIgnitionMonitors and
* CompressionIgnitionMonitors depending on the value of IGNITION_MONITORS_SUPPORTED.
- /*
+ */
IGNITION_SPECIFIC_MONITORS = 3,
INTAKE_AIR_TEMPERATURE = 4,