提交 045290b2 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

V4L/DVB (5290): Add support for VIDIOC_INT_G/S_STD_OUTPUT

Added VIDIOC_INT_G_STD_OUTPUT and VIDIOC_INT_S_STD_OUTPUT to allow drivers
to set the TV standard for video output separately from the video capture.
This is needed for cx23415 support where the decoder is separate from the
encoder and can have a different TV standard.
Modified the saa7127 module to listen to VIDIOC_INT_G/S_STD_OUTPUT instead
of VIDIOC_G/S_STD.
Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 b2787845
...@@ -550,12 +550,12 @@ static int saa7127_command(struct i2c_client *client, ...@@ -550,12 +550,12 @@ static int saa7127_command(struct i2c_client *client,
struct v4l2_routing *route = arg; struct v4l2_routing *route = arg;
switch (cmd) { switch (cmd) {
case VIDIOC_S_STD: case VIDIOC_INT_S_STD_OUTPUT:
if (state->std == *(v4l2_std_id *)arg) if (state->std == *(v4l2_std_id *)arg)
break; break;
return saa7127_set_std(client, *(v4l2_std_id *)arg); return saa7127_set_std(client, *(v4l2_std_id *)arg);
case VIDIOC_G_STD: case VIDIOC_INT_G_STD_OUTPUT:
*(v4l2_std_id *)arg = state->std; *(v4l2_std_id *)arg = state->std;
break; break;
......
...@@ -420,7 +420,10 @@ static const char *v4l2_int_ioctls[] = { ...@@ -420,7 +420,10 @@ static const char *v4l2_int_ioctls[] = {
[_IOC_NR(VIDIOC_INT_G_AUDIO_ROUTING)] = "VIDIOC_INT_G_AUDIO_ROUTING", [_IOC_NR(VIDIOC_INT_G_AUDIO_ROUTING)] = "VIDIOC_INT_G_AUDIO_ROUTING",
[_IOC_NR(VIDIOC_INT_S_VIDEO_ROUTING)] = "VIDIOC_INT_S_VIDEO_ROUTING", [_IOC_NR(VIDIOC_INT_S_VIDEO_ROUTING)] = "VIDIOC_INT_S_VIDEO_ROUTING",
[_IOC_NR(VIDIOC_INT_G_VIDEO_ROUTING)] = "VIDIOC_INT_G_VIDEO_ROUTING", [_IOC_NR(VIDIOC_INT_G_VIDEO_ROUTING)] = "VIDIOC_INT_G_VIDEO_ROUTING",
[_IOC_NR(VIDIOC_INT_S_CRYSTAL_FREQ)] = "VIDIOC_INT_S_CRYSTAL_FREQ" [_IOC_NR(VIDIOC_INT_S_CRYSTAL_FREQ)] = "VIDIOC_INT_S_CRYSTAL_FREQ",
[_IOC_NR(VIDIOC_INT_INIT)] = "VIDIOC_INT_INIT",
[_IOC_NR(VIDIOC_INT_G_STD_OUTPUT)] = "VIDIOC_INT_G_STD_OUTPUT",
[_IOC_NR(VIDIOC_INT_S_STD_OUTPUT)] = "VIDIOC_INT_S_STD_OUTPUT",
}; };
#define V4L2_INT_IOCTLS ARRAY_SIZE(v4l2_int_ioctls) #define V4L2_INT_IOCTLS ARRAY_SIZE(v4l2_int_ioctls)
......
...@@ -254,4 +254,12 @@ struct v4l2_crystal_freq { ...@@ -254,4 +254,12 @@ struct v4l2_crystal_freq {
default values. */ default values. */
#define VIDIOC_INT_INIT _IOW ('d', 114, u32) #define VIDIOC_INT_INIT _IOW ('d', 114, u32)
/* Set v4l2_std_id for video OUTPUT devices. This is ignored by
video input devices. */
#define VIDIOC_INT_S_STD_OUTPUT _IOW ('d', 115, v4l2_std_id)
/* Get v4l2_std_id for video OUTPUT devices. This is ignored by
video input devices. */
#define VIDIOC_INT_G_STD_OUTPUT _IOW ('d', 116, v4l2_std_id)
#endif /* V4L2_COMMON_H_ */ #endif /* V4L2_COMMON_H_ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册