From 3ae45ce9d9bfb75dec4a17b5ca17f5086e0185e0 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 28 May 2009 04:58:57 +0000 Subject: big rework of TS for saa7134 From: Dmitri Belimov 1. Add start/stop TS function. 2. Move setup DMA of TS to DMA function. 3. Write support cupture via MMAP 4. Rework startup and finish process, remove simple FSM. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov Signed-off-by: Alexey Osipov Tested-by: Hermann Pitton Tested-by: Beholder Intl. Ltd. Dmitry Belimov Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/saa7134/saa7134-empress.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'linux/drivers/media/video/saa7134/saa7134-empress.c') diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c index dd22a5215..96334a20b 100644 --- a/linux/drivers/media/video/saa7134/saa7134-empress.c +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c @@ -255,6 +255,16 @@ static int empress_s_fmt_vid_cap(struct file *file, void *priv, return 0; } +static int empress_try_fmt_vid_cap(struct file *file, void *priv, + struct v4l2_format *f) +{ + struct saa7134_dev *dev = file->private_data; + + f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; + f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets; + + return 0; +} static int empress_reqbufs(struct file *file, void *priv, struct v4l2_requestbuffers *p) @@ -450,6 +460,7 @@ static const struct v4l2_file_operations ts_fops = static const struct v4l2_ioctl_ops ts_ioctl_ops = { .vidioc_querycap = empress_querycap, .vidioc_enum_fmt_vid_cap = empress_enum_fmt_vid_cap, + .vidioc_try_fmt_vid_cap = empress_try_fmt_vid_cap, .vidioc_s_fmt_vid_cap = empress_s_fmt_vid_cap, .vidioc_g_fmt_vid_cap = empress_g_fmt_vid_cap, .vidioc_reqbufs = empress_reqbufs, -- cgit v1.2.3