summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Ray <aray@google.com>2013-06-14 15:09:30 -0700
committerAlex Ray <aray@google.com>2013-06-20 18:28:57 -0700
commit2ce219a7464d05c55f95783c1a7d9d3328cb2930 (patch)
tree5f23e113285fbe074726680e86e1ddbc34b77af7
parentfbec86098615be134638900d03f3321a30a181d2 (diff)
downloadhardware_libhardware-2ce219a7464d05c55f95783c1a7d9d3328cb2930.zip
hardware_libhardware-2ce219a7464d05c55f95783c1a7d9d3328cb2930.tar.gz
hardware_libhardware-2ce219a7464d05c55f95783c1a7d9d3328cb2930.tar.bz2
camera3: Pass consumer information in configure_streams
HALs seem to need to know the gralloc usage flags of the opposite endpoint (producer/consumer) of a stream at configure time. Instead of adding another call to pass stream information, we just pass the usage flags in the existing usage field. Change-Id: I745baf2c4dd9123273d811b9bd52ae68c854b70c
-rw-r--r--include/hardware/camera3.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/hardware/camera3.h b/include/hardware/camera3.h
index 3a900fc..f9b63f4 100644
--- a/include/hardware/camera3.h
+++ b/include/hardware/camera3.h
@@ -82,6 +82,10 @@
* management. Bidirectional streams replace STREAM_FROM_STREAM construct.
*
* - Limited mode semantics for older/limited hardware devices.
+ *
+ * 3.1: Minor revision of expanded-capability HAL:
+ *
+ * - configure_streams passes consumer usage flags to the HAL.
*/
/**
@@ -1041,6 +1045,9 @@ typedef enum camera3_stream_type {
* remain valid as if configure_streams() had not been called.
*
* The endpoint of the stream is not visible to the camera HAL device.
+ * In DEVICE_API_VERSION_3_1, this was changed to share consumer usage flags
+ * on streams where the camera is a producer (OUTPUT and BIDIRECTIONAL stream
+ * types) see the usage field below.
*/
typedef struct camera3_stream {
@@ -1092,6 +1099,25 @@ typedef struct camera3_stream {
* the producer and the consumer will be combined together and then passed
* to the platform gralloc HAL module for allocating the gralloc buffers for
* each stream.
+ *
+ * Version information:
+ *
+ * == CAMERA_DEVICE_API_VERSION_3_0:
+ *
+ * No initial value guaranteed when passed via configure_streams().
+ * HAL may not use this field as input, and must write over this field
+ * with its usage flags.
+ *
+ * >= CAMERA_DEVICE_API_VERSION_3_1:
+ *
+ * For stream_type OUTPUT and BIDIRECTIONAL, when passed via
+ * configure_streams(), the initial value of this is the consumer's
+ * usage flags. The HAL may use these consumer flags to decide stream
+ * configuration.
+ * For stream_type INPUT, when passed via configure_streams(), the initial
+ * value of this is 0.
+ * For all streams passed via configure_streams(), the HAL must write
+ * over this field with its usage flags.
*/
uint32_t usage;