aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-05-09 08:41:41 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-06-01 00:21:26 -0400
commit31bf95fb5725013fd7d95d6d5b1e45f4c88b1f56 (patch)
tree92278ec83f7d426058f038ce868d4102b8f362a0
parent51623ef9aedd8b786a12a4475201827ee85d285c (diff)
V4L/DVB: saa7134: convert to use the new mbus API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/saa7134/saa6752hs.c22
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c9
2 files changed, 7 insertions, 24 deletions
diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c
index 852040b6b5a6..40fd31ca7716 100644
--- a/drivers/media/video/saa7134/saa6752hs.c
+++ b/drivers/media/video/saa7134/saa6752hs.c
@@ -860,16 +860,6 @@ static int saa6752hs_g_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefm
860 return 0; 860 return 0;
861} 861}
862 862
863static int saa6752hs_g_fmt(struct v4l2_subdev *sd, struct v4l2_format *f)
864{
865 struct v4l2_mbus_framefmt mbus_fmt;
866 int err = saa6752hs_g_mbus_fmt(sd, &mbus_fmt);
867
868 f->fmt.pix.width = mbus_fmt.width;
869 f->fmt.pix.height = mbus_fmt.height;
870 return err;
871}
872
873static int saa6752hs_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f) 863static int saa6752hs_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f)
874{ 864{
875 struct saa6752hs_state *h = to_state(sd); 865 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 return 0; 907 return 0;
918} 908}
919 909
920static int saa6752hs_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f)
921{
922 struct v4l2_mbus_framefmt mbus_fmt;
923
924 mbus_fmt.width = f->fmt.pix.width;
925 mbus_fmt.height = f->fmt.pix.height;
926 mbus_fmt.code = V4L2_MBUS_FMT_FIXED;
927 return saa6752hs_s_mbus_fmt(sd, &mbus_fmt);
928}
929
930static int saa6752hs_s_std(struct v4l2_subdev *sd, v4l2_std_id std) 910static int saa6752hs_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
931{ 911{
932 struct saa6752hs_state *h = to_state(sd); 912 struct saa6752hs_state *h = to_state(sd);
@@ -958,8 +938,6 @@ static const struct v4l2_subdev_core_ops saa6752hs_core_ops = {
958}; 938};
959 939
960static const struct v4l2_subdev_video_ops saa6752hs_video_ops = { 940static const struct v4l2_subdev_video_ops saa6752hs_video_ops = {
961 .s_fmt = saa6752hs_s_fmt,
962 .g_fmt = saa6752hs_g_fmt,
963 .s_mbus_fmt = saa6752hs_s_mbus_fmt, 941 .s_mbus_fmt = saa6752hs_s_mbus_fmt,
964 .g_mbus_fmt = saa6752hs_g_mbus_fmt, 942 .g_mbus_fmt = saa6752hs_g_mbus_fmt,
965}; 943};
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index ea877a50f52d..e763f9fd0133 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -223,9 +223,11 @@ static int empress_g_fmt_vid_cap(struct file *file, void *priv,
223 struct v4l2_format *f) 223 struct v4l2_format *f)
224{ 224{
225 struct saa7134_dev *dev = file->private_data; 225 struct saa7134_dev *dev = file->private_data;
226 struct v4l2_mbus_framefmt mbus_fmt;
226 227
227 saa_call_all(dev, video, g_fmt, f); 228 saa_call_all(dev, video, g_mbus_fmt, &mbus_fmt);
228 229
230 v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
229 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; 231 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
230 f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets; 232 f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
231 233
@@ -236,8 +238,11 @@ static int empress_s_fmt_vid_cap(struct file *file, void *priv,
236 struct v4l2_format *f) 238 struct v4l2_format *f)
237{ 239{
238 struct saa7134_dev *dev = file->private_data; 240 struct saa7134_dev *dev = file->private_data;
241 struct v4l2_mbus_framefmt mbus_fmt;
239 242
240 saa_call_all(dev, video, s_fmt, f); 243 v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, V4L2_MBUS_FMT_FIXED);
244 saa_call_all(dev, video, s_mbus_fmt, &mbus_fmt);
245 v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt);
241 246
242 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; 247 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
243 f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets; 248 f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;