msm: vidc: Add input buffer flushing support
Flushing the core is now done with the V4L2_DEC_QCOM_CMD_FLUSH ioctl
rather than V4L2_DEC_CMD_STOP. The latter is confusing and the
arguments specified by the V4L2 spec do not allow for flushing the input
and and output buffers seperately.
Change-Id: I53e18e06c4e09ee8496bdcc337b4798f22911708
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 42f7349..f5e1ffa 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -2047,6 +2047,7 @@
#define V4L2_DEC_CMD_STOP (1)
#define V4L2_DEC_CMD_PAUSE (2)
#define V4L2_DEC_CMD_RESUME (3)
+#define V4L2_DEC_QCOM_CMD_FLUSH (4)
/* Flags for V4L2_DEC_CMD_START */
#define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0)
@@ -2058,6 +2059,10 @@
#define V4L2_DEC_CMD_STOP_TO_BLACK (1 << 0)
#define V4L2_DEC_CMD_STOP_IMMEDIATELY (1 << 1)
+/* Flags for V4L2_DEC_QCOM_CMD_FLUSH */
+#define V4L2_DEC_QCOM_CMD_FLUSH_OUTPUT (1 << 0)
+#define V4L2_DEC_QCOM_CMD_FLUSH_CAPTURE (1 << 1)
+
/* Play format requirements (returned by the driver): */
/* The decoder has no special format requirements */