aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-empress.c
diff options
context:
space:
mode:
authorFrederic CAND <frederic.cand@anevia.com>2005-05-05 19:15:52 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 19:36:42 -0400
commit0a4c9c93c2fb5d09259136531d3e8e70fdcd6027 (patch)
tree07f8f2723b9339a2246d32c1bcff4a96df5eec00 /drivers/media/video/saa7134/saa7134-empress.c
parentac5f34c028a043405de087e43699195ab3974dbf (diff)
[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 <frederic.cand@anevia.com> Acked-by: Gerd Knorr <kraxel@bytesex.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-empress.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 2021e099e35a..fa1357336907 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,
233 memset(f,0,sizeof(*f)); 233 memset(f,0,sizeof(*f));
234 f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 234 f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
235 235
236 /* FIXME: translate subsampling type EMPRESS into 236 saa7134_i2c_call_clients(dev, cmd, arg);
237 * width/height: */
238 f->fmt.pix.width = 720; /* D1 */
239 f->fmt.pix.height = 576;
240 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; 237 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
241 f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets; 238 f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
242 return 0; 239 return 0;
@@ -249,20 +246,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
249 if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 246 if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
250 return -EINVAL; 247 return -EINVAL;
251 248
252 /* 249 saa7134_i2c_call_clients(dev, cmd, arg);
253 FIXME: translate and round width/height into EMPRESS
254 subsample type:
255
256 type | PAL | NTSC
257 ---------------------------
258 SIF | 352x288 | 352x240
259 1/2 D1 | 352x576 | 352x480
260 2/3 D1 | 480x576 | 480x480
261 D1 | 720x576 | 720x480
262 */
263
264 f->fmt.pix.width = 720; /* D1 */
265 f->fmt.pix.height = 576;
266 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; 250 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
267 f->fmt.pix.sizeimage = TS_PACKET_SIZE* dev->ts.nr_packets; 251 f->fmt.pix.sizeimage = TS_PACKET_SIZE* dev->ts.nr_packets;
268 return 0; 252 return 0;