aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaibhav Hiremath <hvaibhav@ti.com>2009-11-10 11:32:53 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:42:02 -0500
commit85213630731605503c8fd4df9bf06beefb2cc7c4 (patch)
tree928ca88cac320a569b2953364d78ae60ead3b9a4
parent1ead696b4c1b719eeae313618bca89e7b37c7d9b (diff)
V4L/DVB (13467): V4L2: Added CID's V4L2_CID_ROTATE/BG_COLOR
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--Documentation/DocBook/v4l/videodev2.h.xml4
-rw-r--r--drivers/media/video/v4l2-common.c9
-rw-r--r--include/linux/videodev2.h4
3 files changed, 15 insertions, 2 deletions
diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml
index bb6b07f9ea14..7162b9ffc2b3 100644
--- a/Documentation/DocBook/v4l/videodev2.h.xml
+++ b/Documentation/DocBook/v4l/videodev2.h.xml
@@ -915,8 +915,10 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> {
915#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) 915#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
916#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) 916#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
917 917
918#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
919#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
918/* last CID + 1 */ 920/* last CID + 1 */
919#define V4L2_CID_LASTP1 (V4L2_CID_BASE+34) 921#define V4L2_CID_LASTP1 (V4L2_CID_BASE+36)
920 922
921/* MPEG-class control IDs defined by V4L2 */ 923/* MPEG-class control IDs defined by V4L2 */
922#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) 924#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index f5a93ae3cdf9..e8e5affbabce 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -431,6 +431,8 @@ const char *v4l2_ctrl_get_name(u32 id)
431 case V4L2_CID_CHROMA_AGC: return "Chroma AGC"; 431 case V4L2_CID_CHROMA_AGC: return "Chroma AGC";
432 case V4L2_CID_COLOR_KILLER: return "Color Killer"; 432 case V4L2_CID_COLOR_KILLER: return "Color Killer";
433 case V4L2_CID_COLORFX: return "Color Effects"; 433 case V4L2_CID_COLORFX: return "Color Effects";
434 case V4L2_CID_ROTATE: return "Rotate";
435 case V4L2_CID_BG_COLOR: return "Background color";
434 436
435 /* MPEG controls */ 437 /* MPEG controls */
436 case V4L2_CID_MPEG_CLASS: return "MPEG Encoder Controls"; 438 case V4L2_CID_MPEG_CLASS: return "MPEG Encoder Controls";
@@ -587,6 +589,13 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
587 qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY; 589 qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
588 min = max = step = def = 0; 590 min = max = step = def = 0;
589 break; 591 break;
592 case V4L2_CID_BG_COLOR:
593 qctrl->type = V4L2_CTRL_TYPE_INTEGER;
594 step = 1;
595 min = 0;
596 /* Max is calculated as RGB888 that is 2^24 */
597 max = 0xFFFFFF;
598 break;
590 default: 599 default:
591 qctrl->type = V4L2_CTRL_TYPE_INTEGER; 600 qctrl->type = V4L2_CTRL_TYPE_INTEGER;
592 break; 601 break;
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index b9a799a35763..54395460a414 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -913,8 +913,10 @@ enum v4l2_colorfx {
913#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) 913#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
914#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) 914#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
915 915
916#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
917#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
916/* last CID + 1 */ 918/* last CID + 1 */
917#define V4L2_CID_LASTP1 (V4L2_CID_BASE+34) 919#define V4L2_CID_LASTP1 (V4L2_CID_BASE+36)
918 920
919/* MPEG-class control IDs defined by V4L2 */ 921/* MPEG-class control IDs defined by V4L2 */
920#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) 922#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)