summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-empress.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-empress.c')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-empress.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c
index 9d356f9ab..c74f1ee01 100644
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-empress.c,v 1.6 2004/11/18 14:05:57 kraxel Exp $
+ * $Id: saa7134-empress.c,v 1.7 2004/11/19 18:07:12 kraxel Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -69,10 +69,10 @@ static void ts_reset_encoder(struct saa7134_dev* dev)
dev->empress_started = 0;
}
-static int ts_init_encoder(struct saa7134_dev* dev, void* arg)
+static int ts_init_encoder(struct saa7134_dev* dev)
{
ts_reset_encoder(dev);
- saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, arg);
+ saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, NULL);
dev->empress_started = 1;
return 0;
}
@@ -133,7 +133,7 @@ ts_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
struct saa7134_dev *dev = file->private_data;
if (!dev->empress_started)
- ts_init_encoder(dev, NULL);
+ ts_init_encoder(dev);
return videobuf_read_stream(&dev->empress_tsq,
data, count, ppos, 0,
@@ -298,7 +298,9 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
return saa7134_common_ioctl(dev, cmd, arg);
case VIDIOC_S_MPEGCOMP:
- return ts_init_encoder(dev, arg);
+ saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, arg);
+ ts_init_encoder(dev);
+ return 0;
case VIDIOC_G_MPEGCOMP:
saa7134_i2c_call_clients(dev, VIDIOC_G_MPEGCOMP, arg);
return 0;
@@ -348,7 +350,8 @@ static void empress_signal_update(void* data)
ts_reset_encoder(dev);
} else {
dprintk("video signal acquired\n");
- ts_init_encoder(dev, NULL);
+ if (dev->empress_users)
+ ts_init_encoder(dev);
}
}