[media] tm6000: remove deprecated current_norm
Replace current_norm by g_std. Also initialize the standard to the more common NTSC-M format (which is also what current_norm used). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Родитель
28221f88ef
Коммит
804be2d493
|
@ -1114,7 +1114,7 @@ static int tm6000_init_dev(struct tm6000_core *dev)
|
||||||
/* Default values for STD and resolutions */
|
/* Default values for STD and resolutions */
|
||||||
dev->width = 720;
|
dev->width = 720;
|
||||||
dev->height = 480;
|
dev->height = 480;
|
||||||
dev->norm = V4L2_STD_PAL_M;
|
dev->norm = V4L2_STD_NTSC_M;
|
||||||
|
|
||||||
/* Configure tuner */
|
/* Configure tuner */
|
||||||
tm6000_config_tuner(dev);
|
tm6000_config_tuner(dev);
|
||||||
|
|
|
@ -1076,6 +1076,15 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *norm)
|
||||||
|
{
|
||||||
|
struct tm6000_fh *fh = priv;
|
||||||
|
struct tm6000_core *dev = fh->dev;
|
||||||
|
|
||||||
|
*norm = dev->norm;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const char *iname[] = {
|
static const char *iname[] = {
|
||||||
[TM6000_INPUT_TV] = "Television",
|
[TM6000_INPUT_TV] = "Television",
|
||||||
[TM6000_INPUT_COMPOSITE1] = "Composite 1",
|
[TM6000_INPUT_COMPOSITE1] = "Composite 1",
|
||||||
|
@ -1134,7 +1143,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
|
||||||
|
|
||||||
dev->input = i;
|
dev->input = i;
|
||||||
|
|
||||||
rc = vidioc_s_std(file, priv, dev->vfd->current_norm);
|
rc = vidioc_s_std(file, priv, dev->norm);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -1547,6 +1556,7 @@ static const struct v4l2_ioctl_ops video_ioctl_ops = {
|
||||||
.vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
|
.vidioc_try_fmt_vid_cap = vidioc_try_fmt_vid_cap,
|
||||||
.vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
|
.vidioc_s_fmt_vid_cap = vidioc_s_fmt_vid_cap,
|
||||||
.vidioc_s_std = vidioc_s_std,
|
.vidioc_s_std = vidioc_s_std,
|
||||||
|
.vidioc_g_std = vidioc_g_std,
|
||||||
.vidioc_enum_input = vidioc_enum_input,
|
.vidioc_enum_input = vidioc_enum_input,
|
||||||
.vidioc_g_input = vidioc_g_input,
|
.vidioc_g_input = vidioc_g_input,
|
||||||
.vidioc_s_input = vidioc_s_input,
|
.vidioc_s_input = vidioc_s_input,
|
||||||
|
@ -1570,7 +1580,6 @@ static struct video_device tm6000_template = {
|
||||||
.ioctl_ops = &video_ioctl_ops,
|
.ioctl_ops = &video_ioctl_ops,
|
||||||
.release = video_device_release,
|
.release = video_device_release,
|
||||||
.tvnorms = TM6000_STD,
|
.tvnorms = TM6000_STD,
|
||||||
.current_norm = V4L2_STD_NTSC_M,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct v4l2_file_operations radio_fops = {
|
static const struct v4l2_file_operations radio_fops = {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче