Commit 45cc29af authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] v4l2-ctrls: add V4L2_CID_DV_RX/TX_IT_CONTENT_TYPE controls

HDMI and DisplayPort both support IT Content Type information that
tells the receiver what type of material the video is, graphics such
as from a PC desktop, Photo, Cinema or Game (low-latency).

This patch adds controls for receivers and transmitters to get/set
this information.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent bd3e275f
...@@ -462,6 +462,14 @@ const char * const *v4l2_ctrl_get_menu(u32 id) ...@@ -462,6 +462,14 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
"RGB full range (0-255)", "RGB full range (0-255)",
NULL, NULL,
}; };
static const char * const dv_it_content_type[] = {
"Graphics",
"Photo",
"Cinema",
"Game",
"No IT Content",
NULL,
};
static const char * const detect_md_mode[] = { static const char * const detect_md_mode[] = {
"Disabled", "Disabled",
"Global", "Global",
...@@ -560,6 +568,9 @@ const char * const *v4l2_ctrl_get_menu(u32 id) ...@@ -560,6 +568,9 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
case V4L2_CID_DV_TX_RGB_RANGE: case V4L2_CID_DV_TX_RGB_RANGE:
case V4L2_CID_DV_RX_RGB_RANGE: case V4L2_CID_DV_RX_RGB_RANGE:
return dv_rgb_range; return dv_rgb_range;
case V4L2_CID_DV_TX_IT_CONTENT_TYPE:
case V4L2_CID_DV_RX_IT_CONTENT_TYPE:
return dv_it_content_type;
case V4L2_CID_DETECT_MD_MODE: case V4L2_CID_DETECT_MD_MODE:
return detect_md_mode; return detect_md_mode;
...@@ -881,8 +892,10 @@ const char *v4l2_ctrl_get_name(u32 id) ...@@ -881,8 +892,10 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_DV_TX_EDID_PRESENT: return "EDID Present"; case V4L2_CID_DV_TX_EDID_PRESENT: return "EDID Present";
case V4L2_CID_DV_TX_MODE: return "Transmit Mode"; case V4L2_CID_DV_TX_MODE: return "Transmit Mode";
case V4L2_CID_DV_TX_RGB_RANGE: return "Tx RGB Quantization Range"; case V4L2_CID_DV_TX_RGB_RANGE: return "Tx RGB Quantization Range";
case V4L2_CID_DV_TX_IT_CONTENT_TYPE: return "Tx IT Content Type";
case V4L2_CID_DV_RX_POWER_PRESENT: return "Power Present"; case V4L2_CID_DV_RX_POWER_PRESENT: return "Power Present";
case V4L2_CID_DV_RX_RGB_RANGE: return "Rx RGB Quantization Range"; case V4L2_CID_DV_RX_RGB_RANGE: return "Rx RGB Quantization Range";
case V4L2_CID_DV_RX_IT_CONTENT_TYPE: return "Rx IT Content Type";
case V4L2_CID_FM_RX_CLASS: return "FM Radio Receiver Controls"; case V4L2_CID_FM_RX_CLASS: return "FM Radio Receiver Controls";
case V4L2_CID_TUNE_DEEMPHASIS: return "De-Emphasis"; case V4L2_CID_TUNE_DEEMPHASIS: return "De-Emphasis";
...@@ -1038,7 +1051,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, ...@@ -1038,7 +1051,9 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_SCENE_MODE: case V4L2_CID_SCENE_MODE:
case V4L2_CID_DV_TX_MODE: case V4L2_CID_DV_TX_MODE:
case V4L2_CID_DV_TX_RGB_RANGE: case V4L2_CID_DV_TX_RGB_RANGE:
case V4L2_CID_DV_TX_IT_CONTENT_TYPE:
case V4L2_CID_DV_RX_RGB_RANGE: case V4L2_CID_DV_RX_RGB_RANGE:
case V4L2_CID_DV_RX_IT_CONTENT_TYPE:
case V4L2_CID_TEST_PATTERN: case V4L2_CID_TEST_PATTERN:
case V4L2_CID_TUNE_DEEMPHASIS: case V4L2_CID_TUNE_DEEMPHASIS:
case V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL: case V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL:
...@@ -1185,6 +1200,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, ...@@ -1185,6 +1200,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_DV_TX_RXSENSE: case V4L2_CID_DV_TX_RXSENSE:
case V4L2_CID_DV_TX_EDID_PRESENT: case V4L2_CID_DV_TX_EDID_PRESENT:
case V4L2_CID_DV_RX_POWER_PRESENT: case V4L2_CID_DV_RX_POWER_PRESENT:
case V4L2_CID_DV_RX_IT_CONTENT_TYPE:
case V4L2_CID_RDS_RX_PTY: case V4L2_CID_RDS_RX_PTY:
case V4L2_CID_RDS_RX_PS_NAME: case V4L2_CID_RDS_RX_PS_NAME:
case V4L2_CID_RDS_RX_RADIO_TEXT: case V4L2_CID_RDS_RX_RADIO_TEXT:
......
...@@ -912,8 +912,18 @@ enum v4l2_dv_rgb_range { ...@@ -912,8 +912,18 @@ enum v4l2_dv_rgb_range {
V4L2_DV_RGB_RANGE_FULL = 2, V4L2_DV_RGB_RANGE_FULL = 2,
}; };
#define V4L2_CID_DV_TX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 6)
enum v4l2_dv_it_content_type {
V4L2_DV_IT_CONTENT_TYPE_GRAPHICS = 0,
V4L2_DV_IT_CONTENT_TYPE_PHOTO = 1,
V4L2_DV_IT_CONTENT_TYPE_CINEMA = 2,
V4L2_DV_IT_CONTENT_TYPE_GAME = 3,
V4L2_DV_IT_CONTENT_TYPE_NO_ITC = 4,
};
#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100) #define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101) #define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)
#define V4L2_CID_DV_RX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 102)
#define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900) #define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900)
#define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1) #define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment