diff options
author | Antti Palosaari <crope@iki.fi> | 2013-12-12 11:34:30 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-05 12:15:12 -0500 |
commit | 6f3073b8dcdcf7a0eabbdd60ec3706bb9d4a131c (patch) | |
tree | aa10bf29fde4e13219e676dbd20acbbfe02318ca | |
parent | 67f9a11759d7d382d79774cf16c0bf6cb87dc4f0 (diff) |
[media] v4l: add stream format for SDR receiver
Add new V4L2 stream format definition, V4L2_BUF_TYPE_SDR_CAPTURE,
for SDR receiver.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 1 | ||||
-rw-r--r-- | include/trace/events/v4l2.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/videodev2.h | 11 |
3 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 15ab34968fb0..9a2acaf75426 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c | |||
@@ -152,6 +152,7 @@ const char *v4l2_type_names[] = { | |||
152 | [V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY] = "vid-out-overlay", | 152 | [V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY] = "vid-out-overlay", |
153 | [V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE] = "vid-cap-mplane", | 153 | [V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE] = "vid-cap-mplane", |
154 | [V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE] = "vid-out-mplane", | 154 | [V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE] = "vid-out-mplane", |
155 | [V4L2_BUF_TYPE_SDR_CAPTURE] = "sdr-cap", | ||
155 | }; | 156 | }; |
156 | EXPORT_SYMBOL(v4l2_type_names); | 157 | EXPORT_SYMBOL(v4l2_type_names); |
157 | 158 | ||
diff --git a/include/trace/events/v4l2.h b/include/trace/events/v4l2.h index ef94ecad1c94..b9bb1f204693 100644 --- a/include/trace/events/v4l2.h +++ b/include/trace/events/v4l2.h | |||
@@ -18,6 +18,7 @@ | |||
18 | { V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, "VIDEO_OUTPUT_OVERLAY" },\ | 18 | { V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, "VIDEO_OUTPUT_OVERLAY" },\ |
19 | { V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, "VIDEO_CAPTURE_MPLANE" },\ | 19 | { V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, "VIDEO_CAPTURE_MPLANE" },\ |
20 | { V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, "VIDEO_OUTPUT_MPLANE" }, \ | 20 | { V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, "VIDEO_OUTPUT_MPLANE" }, \ |
21 | { V4L2_BUF_TYPE_SDR_CAPTURE, "SDR_CAPTURE" }, \ | ||
21 | { V4L2_BUF_TYPE_PRIVATE, "PRIVATE" }) | 22 | { V4L2_BUF_TYPE_PRIVATE, "PRIVATE" }) |
22 | 23 | ||
23 | #define show_field(field) \ | 24 | #define show_field(field) \ |
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 1cf20765482e..27bed7c99b46 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h | |||
@@ -139,6 +139,7 @@ enum v4l2_buf_type { | |||
139 | #endif | 139 | #endif |
140 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, | 140 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, |
141 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, | 141 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, |
142 | V4L2_BUF_TYPE_SDR_CAPTURE = 11, | ||
142 | /* Deprecated, do not use */ | 143 | /* Deprecated, do not use */ |
143 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 144 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
144 | }; | 145 | }; |
@@ -1695,6 +1696,15 @@ struct v4l2_pix_format_mplane { | |||
1695 | } __attribute__ ((packed)); | 1696 | } __attribute__ ((packed)); |
1696 | 1697 | ||
1697 | /** | 1698 | /** |
1699 | * struct v4l2_format_sdr - SDR format definition | ||
1700 | * @pixelformat: little endian four character code (fourcc) | ||
1701 | */ | ||
1702 | struct v4l2_format_sdr { | ||
1703 | __u32 pixelformat; | ||
1704 | __u8 reserved[28]; | ||
1705 | } __attribute__ ((packed)); | ||
1706 | |||
1707 | /** | ||
1698 | * struct v4l2_format - stream data format | 1708 | * struct v4l2_format - stream data format |
1699 | * @type: enum v4l2_buf_type; type of the data stream | 1709 | * @type: enum v4l2_buf_type; type of the data stream |
1700 | * @pix: definition of an image format | 1710 | * @pix: definition of an image format |
@@ -1712,6 +1722,7 @@ struct v4l2_format { | |||
1712 | struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ | 1722 | struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ |
1713 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ | 1723 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ |
1714 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ | 1724 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ |
1725 | struct v4l2_format_sdr sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */ | ||
1715 | __u8 raw_data[200]; /* user-defined */ | 1726 | __u8 raw_data[200]; /* user-defined */ |
1716 | } fmt; | 1727 | } fmt; |
1717 | }; | 1728 | }; |