static ssize_t 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); return videobuf_read_stream(&dev->empress_tsq, data, count, ppos, 0, file->f_flags & O_NONBLOCK); }
static void empress_signal_update(struct work_struct *work) { struct saa7134_dev* dev = container_of(work, struct saa7134_dev, empress_workqueue); if (dev->nosignal) { dprintk("no video signal\n"); ts_reset_encoder(dev); } else { dprintk("video signal acquired\n"); if (dev->empress_users) ts_init_encoder(dev); } }
static int empress_s_ext_ctrls(struct file *file, void *priv, struct v4l2_ext_controls *ctrls) { struct saa7134_dev *dev = file->private_data; int err; /* count == 0 is abused in saa6752hs.c, so that special case is handled here explicitly. */ if (ctrls->count == 0) return 0; if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) return -EINVAL; err = saa_call_empress(dev, core, s_ext_ctrls, ctrls); ts_init_encoder(dev); return err; }
static int empress_s_ext_ctrls(struct file *file, void *priv, struct v4l2_ext_controls *ctrls) { struct saa7134_fh *fh = priv; struct saa7134_dev *dev = fh->dev; /* count == 0 is abused in saa6752hs.c, so that special case is handled here explicitly. */ if (ctrls->count == 0) return 0; if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) return -EINVAL; saa7134_i2c_call_clients(dev, VIDIOC_S_EXT_CTRLS, ctrls); ts_init_encoder(dev); return 0; }