summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongwon Kang <dwkang@google.com>2016-05-03 23:37:18 +0000
committerDongwon Kang <dwkang@google.com>2016-05-03 23:44:53 +0000
commitda941d8f1c26b4e513e35c27eafce452a14de4e9 (patch)
tree34eaac8ebd845c7b38fb105cb9964c76daa336ba
parentd6c2deb560a13a5161742b1cc7026926c03f97bb (diff)
downloadlibhardware-da941d8f1c26b4e513e35c27eafce452a14de4e9.tar.gz
Revert "tv_input: add signal detection flag to stream config"
This reverts commit d15399e13d219c26d68cfe65a24eaf8788503f6b. Change-Id: I02ef4ac7b796f3380616c08a42ecc4ad2d5e3474
-rw-r--r--include/hardware/tv_input.h55
-rw-r--r--modules/tv_input/tv_input.cpp30
2 files changed, 14 insertions, 71 deletions
diff --git a/include/hardware/tv_input.h b/include/hardware/tv_input.h
index 3bb98626..ed3fafb1 100644
--- a/include/hardware/tv_input.h
+++ b/include/hardware/tv_input.h
@@ -33,18 +33,14 @@ __BEGIN_DECLS
*
* Version History:
*
- * TV_INPUT_DEVICE_API_VERSION_0_1:
- * Initial TV input hardware device API.
- *
- * TV_INPUT_DEVICE_API_VERSION_0_2:
- * Minor revision --- add video detection flag in stream configs.
+ * TV_INPUT_MODULE_API_VERSION_0_1:
+ * Initial TV input hardware module API.
*
*/
#define TV_INPUT_MODULE_API_VERSION_0_1 HARDWARE_MODULE_API_VERSION(0, 1)
#define TV_INPUT_DEVICE_API_VERSION_0_1 HARDWARE_DEVICE_API_VERSION(0, 1)
-#define TV_INPUT_DEVICE_API_VERSION_0_2 HARDWARE_DEVICE_API_VERSION(0, 2)
/*
* The id of this module
@@ -168,8 +164,7 @@ enum {
* port. the framework regards input devices with no available streams as
* disconnected, so the implementation can generate this event with no
* available streams to indicate that this device is disconnected, and vice
- * versa. In addition, streams have signal detection flag to denote if
- * signal is detected for sure.
+ * versa.
*/
TV_INPUT_EVENT_STREAM_CONFIGURATIONS_CHANGED = 3,
/*
@@ -269,33 +264,6 @@ typedef struct tv_stream_config {
uint32_t max_video_height;
} tv_stream_config_t;
-enum {
- /*
- * Set if signal is detected on this stream. Note that even if this mask is
- * unset it does not necessarily mean no signal --- it denotes that HAL is
- * unsure of the signal status.
- */
- TV_STREAM_FLAG_MASK_SIGNAL_DETECTION = 0x1,
-};
-
-/*
- * >= TV_INPUT_DEVICE_API_VERSION_0_2
- *
- * tv_stream_config_t extended in a way that allows extension without breaking
- * binary compatibility
- */
-typedef struct tv_stream_config_ext {
- tv_stream_config_t config;
-
- /*
- * Flags to show the status of this stream. See TV_STREAM_FLAG_* for
- * details.
- */
- uint32_t flags;
-
- int32_t reserved[16 - 1];
-} tv_stream_config_ext_t;
-
typedef struct buffer_producer_stream {
/*
* IN/OUT: Width / height of the stream. Client may request for specific
@@ -429,22 +397,7 @@ typedef struct tv_input_device {
int (*cancel_capture)(struct tv_input_device* dev, int device_id,
int stream_id, uint32_t seq);
- /*
- * get_stream_configurations_ext:
- *
- * Get stream configurations for a specific device. An input device may have
- * multiple configurations.
- *
- * The configs object is guaranteed to be valid only until the next call to
- * get_stream_configurations_ext() or STREAM_CONFIGURATIONS_CHANGED event.
- *
- * Return 0 on success.
- */
- int (*get_stream_configurations_ext)(const struct tv_input_device* dev,
- int device_id, int* num_configurations,
- const tv_stream_config_ext_t** configs);
-
- void* reserved[16 - 1];
+ void* reserved[16];
} tv_input_device_t;
__END_DECLS
diff --git a/modules/tv_input/tv_input.cpp b/modules/tv_input/tv_input.cpp
index 45e8388e..114e80ed 100644
--- a/modules/tv_input/tv_input.cpp
+++ b/modules/tv_input/tv_input.cpp
@@ -37,18 +37,18 @@ static int tv_input_device_open(const struct hw_module_t* module,
const char* name, struct hw_device_t** device);
static struct hw_module_methods_t tv_input_module_methods = {
- .open = tv_input_device_open
+ open: tv_input_device_open
};
tv_input_module_t HAL_MODULE_INFO_SYM = {
- .common = {
- .tag = HARDWARE_MODULE_TAG,
- .version_major = 0,
- .version_minor = 1,
- .id = TV_INPUT_HARDWARE_MODULE_ID,
- .name = "Sample TV input module",
- .author = "The Android Open Source Project",
- .methods = &tv_input_module_methods,
+ common: {
+ tag: HARDWARE_MODULE_TAG,
+ version_major: 0,
+ version_minor: 1,
+ id: TV_INPUT_HARDWARE_MODULE_ID,
+ name: "Sample TV input module",
+ author: "The Android Open Source Project",
+ methods: &tv_input_module_methods,
}
};
@@ -72,8 +72,7 @@ static int tv_input_initialize(struct tv_input_device* dev,
}
static int tv_input_get_stream_configurations(
- const struct tv_input_device*, int, int*,
- const tv_stream_config_t**)
+ const struct tv_input_device*, int, int*, const tv_stream_config_t**)
{
return -EINVAL;
}
@@ -99,13 +98,6 @@ static int tv_input_cancel_capture(struct tv_input_device*, int, int, uint32_t)
return -EINVAL;
}
-static int tv_input_get_stream_configurations_ext(
- const struct tv_input_device*, int, int*,
- const tv_stream_config_ext_t**)
-{
- return -EINVAL;
-}
-
/*****************************************************************************/
static int tv_input_device_close(struct hw_device_t *dev)
@@ -142,8 +134,6 @@ static int tv_input_device_open(const struct hw_module_t* module,
dev->device.close_stream = tv_input_close_stream;
dev->device.request_capture = tv_input_request_capture;
dev->device.cancel_capture = tv_input_cancel_capture;
- dev->device.get_stream_configurations_ext =
- tv_input_get_stream_configurations_ext;
*device = &dev->device.common;
status = 0;