diff options
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-empress.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-empress.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index 9db3472667e5..add1757f8930 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -255,6 +255,16 @@ static int empress_s_fmt_vid_cap(struct file *file, void *priv, | |||
255 | return 0; | 255 | return 0; |
256 | } | 256 | } |
257 | 257 | ||
258 | static int empress_try_fmt_vid_cap(struct file *file, void *priv, | ||
259 | struct v4l2_format *f) | ||
260 | { | ||
261 | struct saa7134_dev *dev = file->private_data; | ||
262 | |||
263 | f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; | ||
264 | f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets; | ||
265 | |||
266 | return 0; | ||
267 | } | ||
258 | 268 | ||
259 | static int empress_reqbufs(struct file *file, void *priv, | 269 | static int empress_reqbufs(struct file *file, void *priv, |
260 | struct v4l2_requestbuffers *p) | 270 | struct v4l2_requestbuffers *p) |
@@ -450,6 +460,7 @@ static const struct v4l2_file_operations ts_fops = | |||
450 | static const struct v4l2_ioctl_ops ts_ioctl_ops = { | 460 | static const struct v4l2_ioctl_ops ts_ioctl_ops = { |
451 | .vidioc_querycap = empress_querycap, | 461 | .vidioc_querycap = empress_querycap, |
452 | .vidioc_enum_fmt_vid_cap = empress_enum_fmt_vid_cap, | 462 | .vidioc_enum_fmt_vid_cap = empress_enum_fmt_vid_cap, |
463 | .vidioc_try_fmt_vid_cap = empress_try_fmt_vid_cap, | ||
453 | .vidioc_s_fmt_vid_cap = empress_s_fmt_vid_cap, | 464 | .vidioc_s_fmt_vid_cap = empress_s_fmt_vid_cap, |
454 | .vidioc_g_fmt_vid_cap = empress_g_fmt_vid_cap, | 465 | .vidioc_g_fmt_vid_cap = empress_g_fmt_vid_cap, |
455 | .vidioc_reqbufs = empress_reqbufs, | 466 | .vidioc_reqbufs = empress_reqbufs, |
@@ -491,11 +502,8 @@ static void empress_signal_update(struct work_struct *work) | |||
491 | 502 | ||
492 | if (dev->nosignal) { | 503 | if (dev->nosignal) { |
493 | dprintk("no video signal\n"); | 504 | dprintk("no video signal\n"); |
494 | ts_reset_encoder(dev); | ||
495 | } else { | 505 | } else { |
496 | dprintk("video signal acquired\n"); | 506 | dprintk("video signal acquired\n"); |
497 | if (atomic_read(&dev->empress_users)) | ||
498 | ts_init_encoder(dev); | ||
499 | } | 507 | } |
500 | } | 508 | } |
501 | 509 | ||