summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-empress.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-05-28 04:58:57 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-05-28 04:58:57 +0000
commit3ae45ce9d9bfb75dec4a17b5ca17f5086e0185e0 (patch)
tree1a35615aff4d76059f5732ba10cdf5abab6cef40 /linux/drivers/media/video/saa7134/saa7134-empress.c
parent82e50d5ad9d80f0a346a46ec6363a72a9b6d9aa7 (diff)
downloadmediapointer-dvb-s2-3ae45ce9d9bfb75dec4a17b5ca17f5086e0185e0.tar.gz
mediapointer-dvb-s2-3ae45ce9d9bfb75dec4a17b5ca17f5086e0185e0.tar.bz2
big rework of TS for saa7134
From: Dmitri Belimov <d.belimov@gmail.com> 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 <d.belimov@gmail.com> Signed-off-by: Alexey Osipov <lion-simba@pridelands.ru> Tested-by: Hermann Pitton <hermann-pitton@arcor.de> Tested-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-empress.c')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-empress.c11
1 files changed, 11 insertions, 0 deletions
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,