From 0a4c9c93c2fb5d09259136531d3e8e70fdcd6027 Mon Sep 17 00:00:00 2001 From: Frederic CAND Date: Thu, 5 May 2005 16:15:52 -0700 Subject: [PATCH] saa6752hs: resolutions handling This patch handles the VIDIOC_S_FMT and VIDIOC_G_FMT ioctls for the saa6752hs. As only 4 preset video formats are supported (SIF, 1/2D1, 2/3D1, D1), we compute to which the asked resolution is the nearest and apply it. Signed-off-by: Frederic Cand Acked-by: Gerd Knorr Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/media/video/saa7134/saa7134-empress.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'drivers/media/video/saa7134/saa7134-empress.c') diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 2021e099e35..fa135733690 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c @@ -233,10 +233,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file, memset(f,0,sizeof(*f)); f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - /* FIXME: translate subsampling type EMPRESS into - * width/height: */ - f->fmt.pix.width = 720; /* D1 */ - f->fmt.pix.height = 576; + saa7134_i2c_call_clients(dev, cmd, arg); f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets; return 0; @@ -249,20 +246,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file, if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; - /* - FIXME: translate and round width/height into EMPRESS - subsample type: - - type | PAL | NTSC - --------------------------- - SIF | 352x288 | 352x240 - 1/2 D1 | 352x576 | 352x480 - 2/3 D1 | 480x576 | 480x480 - D1 | 720x576 | 720x480 - */ - - f->fmt.pix.width = 720; /* D1 */ - f->fmt.pix.height = 576; + saa7134_i2c_call_clients(dev, cmd, arg); f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; f->fmt.pix.sizeimage = TS_PACKET_SIZE* dev->ts.nr_packets; return 0; -- cgit v1.2.3