Commit 31bf95fb authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB: saa7134: convert to use the new mbus API

Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 51623ef9
...@@ -860,16 +860,6 @@ static int saa6752hs_g_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefm ...@@ -860,16 +860,6 @@ static int saa6752hs_g_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefm
return 0; return 0;
} }
static int saa6752hs_g_fmt(struct v4l2_subdev *sd, struct v4l2_format *f)
{
struct v4l2_mbus_framefmt mbus_fmt;
int err = saa6752hs_g_mbus_fmt(sd, &mbus_fmt);
f->fmt.pix.width = mbus_fmt.width;
f->fmt.pix.height = mbus_fmt.height;
return err;
}
static int saa6752hs_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f) static int saa6752hs_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f)
{ {
struct saa6752hs_state *h = to_state(sd); struct saa6752hs_state *h = to_state(sd);
...@@ -917,16 +907,6 @@ static int saa6752hs_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefm ...@@ -917,16 +907,6 @@ static int saa6752hs_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefm
return 0; return 0;
} }
static int saa6752hs_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f)
{
struct v4l2_mbus_framefmt mbus_fmt;
mbus_fmt.width = f->fmt.pix.width;
mbus_fmt.height = f->fmt.pix.height;
mbus_fmt.code = V4L2_MBUS_FMT_FIXED;
return saa6752hs_s_mbus_fmt(sd, &mbus_fmt);
}
static int saa6752hs_s_std(struct v4l2_subdev *sd, v4l2_std_id std) static int saa6752hs_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
{ {
struct saa6752hs_state *h = to_state(sd); struct saa6752hs_state *h = to_state(sd);
...@@ -958,8 +938,6 @@ static const struct v4l2_subdev_core_ops saa6752hs_core_ops = { ...@@ -958,8 +938,6 @@ static const struct v4l2_subdev_core_ops saa6752hs_core_ops = {
}; };
static const struct v4l2_subdev_video_ops saa6752hs_video_ops = { static const struct v4l2_subdev_video_ops saa6752hs_video_ops = {
.s_fmt = saa6752hs_s_fmt,
.g_fmt = saa6752hs_g_fmt,
.s_mbus_fmt = saa6752hs_s_mbus_fmt, .s_mbus_fmt = saa6752hs_s_mbus_fmt,
.g_mbus_fmt = saa6752hs_g_mbus_fmt, .g_mbus_fmt = saa6752hs_g_mbus_fmt,
}; };
......
...@@ -223,9 +223,11 @@ static int empress_g_fmt_vid_cap(struct file *file, void *priv, ...@@ -223,9 +223,11 @@ static int empress_g_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f) struct v4l2_format *f)
{ {
struct saa7134_dev *dev = file->private_data; struct saa7134_dev *dev = file->private_data;
struct v4l2_mbus_framefmt mbus_fmt;
saa_call_all(dev, video, g_fmt, f); saa_call_all(dev, video, g_mbus_fmt, &mbus_fmt);
v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets; f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
...@@ -236,8 +238,11 @@ static int empress_s_fmt_vid_cap(struct file *file, void *priv, ...@@ -236,8 +238,11 @@ static int empress_s_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f) struct v4l2_format *f)
{ {
struct saa7134_dev *dev = file->private_data; struct saa7134_dev *dev = file->private_data;
struct v4l2_mbus_framefmt mbus_fmt;
saa_call_all(dev, video, s_fmt, f); v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED);
saa_call_all(dev, video, s_mbus_fmt, &mbus_fmt);
v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets; f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
......
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