mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-13 01:44:28 +00:00
[media] usb: Make use of media_bus_format enum
In order to have subsytem agnostic media bus format definitions we've moved media bus definition to include/uapi/linux/media-bus-format.h and prefixed enum values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Reference new definitions in all usb drivers. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
27ffaeb0ab
commit
18cb5ec38f
5 changed files with 6 additions and 6 deletions
|
@ -1887,7 +1887,7 @@ static int cx231xx_s_video_encoding(struct cx2341x_handler *cxhdl, u32 val)
|
||||||
/* fix videodecoder resolution */
|
/* fix videodecoder resolution */
|
||||||
fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1);
|
fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1);
|
||||||
fmt.height = cxhdl->height;
|
fmt.height = cxhdl->height;
|
||||||
fmt.code = V4L2_MBUS_FMT_FIXED;
|
fmt.code = MEDIA_BUS_FMT_FIXED;
|
||||||
v4l2_subdev_call(dev->sd_cx25840, video, s_mbus_fmt, &fmt);
|
v4l2_subdev_call(dev->sd_cx25840, video, s_mbus_fmt, &fmt);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -968,7 +968,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
|
||||||
dev->height = f->fmt.pix.height;
|
dev->height = f->fmt.pix.height;
|
||||||
dev->format = fmt;
|
dev->format = fmt;
|
||||||
|
|
||||||
v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED);
|
v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED);
|
||||||
call_all(dev, video, s_mbus_fmt, &mbus_fmt);
|
call_all(dev, video, s_mbus_fmt, &mbus_fmt);
|
||||||
v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
|
v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
|
||||||
|
|
||||||
|
@ -1013,7 +1013,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
|
||||||
resolution (since a standard change effects things like the number
|
resolution (since a standard change effects things like the number
|
||||||
of lines in VACT, etc) */
|
of lines in VACT, etc) */
|
||||||
memset(&mbus_fmt, 0, sizeof(mbus_fmt));
|
memset(&mbus_fmt, 0, sizeof(mbus_fmt));
|
||||||
mbus_fmt.code = V4L2_MBUS_FMT_FIXED;
|
mbus_fmt.code = MEDIA_BUS_FMT_FIXED;
|
||||||
mbus_fmt.width = dev->width;
|
mbus_fmt.width = dev->width;
|
||||||
mbus_fmt.height = dev->height;
|
mbus_fmt.height = dev->height;
|
||||||
call_all(dev, video, s_mbus_fmt, &mbus_fmt);
|
call_all(dev, video, s_mbus_fmt, &mbus_fmt);
|
||||||
|
|
|
@ -430,7 +430,7 @@ int em28xx_init_camera(struct em28xx *dev)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.code = V4L2_MBUS_FMT_YUYV8_2X8;
|
fmt.code = MEDIA_BUS_FMT_YUYV8_2X8;
|
||||||
fmt.width = 640;
|
fmt.width = 640;
|
||||||
fmt.height = 480;
|
fmt.height = 480;
|
||||||
v4l2_subdev_call(subdev, video, s_mbus_fmt, &fmt);
|
v4l2_subdev_call(subdev, video, s_mbus_fmt, &fmt);
|
||||||
|
|
|
@ -252,7 +252,7 @@ static int set_capture_size(struct go7007 *go, struct v4l2_format *fmt, int try)
|
||||||
if (go->board_info->sensor_flags & GO7007_SENSOR_SCALING) {
|
if (go->board_info->sensor_flags & GO7007_SENSOR_SCALING) {
|
||||||
struct v4l2_mbus_framefmt mbus_fmt;
|
struct v4l2_mbus_framefmt mbus_fmt;
|
||||||
|
|
||||||
mbus_fmt.code = V4L2_MBUS_FMT_FIXED;
|
mbus_fmt.code = MEDIA_BUS_FMT_FIXED;
|
||||||
mbus_fmt.width = fmt ? fmt->fmt.pix.width : width;
|
mbus_fmt.width = fmt ? fmt->fmt.pix.width : width;
|
||||||
mbus_fmt.height = height;
|
mbus_fmt.height = height;
|
||||||
go->encoder_h_halve = 0;
|
go->encoder_h_halve = 0;
|
||||||
|
|
|
@ -2966,7 +2966,7 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw)
|
||||||
memset(&fmt, 0, sizeof(fmt));
|
memset(&fmt, 0, sizeof(fmt));
|
||||||
fmt.width = hdw->res_hor_val;
|
fmt.width = hdw->res_hor_val;
|
||||||
fmt.height = hdw->res_ver_val;
|
fmt.height = hdw->res_ver_val;
|
||||||
fmt.code = V4L2_MBUS_FMT_FIXED;
|
fmt.code = MEDIA_BUS_FMT_FIXED;
|
||||||
pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_size(%dx%d)",
|
pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_size(%dx%d)",
|
||||||
fmt.width, fmt.height);
|
fmt.width, fmt.height);
|
||||||
v4l2_device_call_all(&hdw->v4l2_dev, 0, video, s_mbus_fmt, &fmt);
|
v4l2_device_call_all(&hdw->v4l2_dev, 0, video, s_mbus_fmt, &fmt);
|
||||||
|
|
Loading…
Add table
Reference in a new issue