Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164278
b: refs/heads/master
c: bb87165
h: refs/heads/master
v: v3
  • Loading branch information
Pete Eberlein authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent 10ef9d5 commit 9bc5ae7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4135b69cf9cb13ad4d639a1b368e14ccbb6348b
refs/heads/master: bb871652d9523d5be811c0c36b04c05c4ac37f92
52 changes: 35 additions & 17 deletions trunk/drivers/staging/go7007/go7007-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,24 @@ static int vidioc_enum_frameintervals(struct file *filp, void *priv,
return 0;
}

static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *std)
{
struct go7007 *go = ((struct go7007_file *) priv)->go;

switch (go->standard) {
case GO7007_STD_NTSC:
*std = V4L2_STD_NTSC;
break;
case GO7007_STD_PAL:
*std = V4L2_STD_PAL;
break;
default:
return -EINVAL;
}

return 0;
}

static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *std)
{
struct go7007 *go = ((struct go7007_file *) priv)->go;
Expand Down Expand Up @@ -1154,24 +1172,22 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *std)
return 0;
}

#if 0
case VIDIOC_QUERYSTD:
{
v4l2_std_id *std = arg;
static int vidioc_querystd(struct file *file, void *priv, v4l2_std_id *std)
{
struct go7007 *go = ((struct go7007_file *) priv)->go;

if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) &&
go->input == go->board_info->num_inputs - 1) {
if (!go->i2c_adapter_online)
return -EIO;
i2c_clients_command(&go->i2c_adapter,
VIDIOC_QUERYSTD, arg);
} else if (go->board_info->sensor_flags & GO7007_SENSOR_TV)
*std = V4L2_STD_NTSC | V4L2_STD_PAL | V4L2_STD_SECAM;
else
*std = 0;
return 0;
}
#endif
if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) &&
go->input == go->board_info->num_inputs - 1) {
if (!go->i2c_adapter_online)
return -EIO;
i2c_clients_command(&go->i2c_adapter, VIDIOC_QUERYSTD, std);
} else if (go->board_info->sensor_flags & GO7007_SENSOR_TV)
*std = V4L2_STD_NTSC | V4L2_STD_PAL | V4L2_STD_SECAM;
else
*std = 0;

return 0;
}

static int vidioc_enum_input(struct file *file, void *priv,
struct v4l2_input *inp)
Expand Down Expand Up @@ -1768,7 +1784,9 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
.vidioc_querybuf = vidioc_querybuf,
.vidioc_qbuf = vidioc_qbuf,
.vidioc_dqbuf = vidioc_dqbuf,
.vidioc_g_std = vidioc_g_std,
.vidioc_s_std = vidioc_s_std,
.vidioc_querystd = vidioc_querystd,
.vidioc_enum_input = vidioc_enum_input,
.vidioc_g_input = vidioc_g_input,
.vidioc_s_input = vidioc_s_input,
Expand Down

0 comments on commit 9bc5ae7

Please sign in to comment.