V4L/DVB (7599): em28xx-dvb: videobuf callbacks are waiting for em28xx_fh
Thanks to Devin Heitmueller <devin.heitmueller@gmail.com> for pointing this issue. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
bdfbf95203
commit
52284c3e47
|
@ -45,6 +45,7 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
|
||||||
struct em28xx_fh *fh = vq->priv_data;
|
struct em28xx_fh *fh = vq->priv_data;
|
||||||
struct em28xx *dev = fh->dev;
|
struct em28xx *dev = fh->dev;
|
||||||
|
|
||||||
|
/* FIXME: The better would be to allocate a smaller buffer */
|
||||||
*size = 16 * fh->dev->width * fh->dev->height >> 3;
|
*size = 16 * fh->dev->width * fh->dev->height >> 3;
|
||||||
if (0 == *count)
|
if (0 == *count)
|
||||||
*count = EM28XX_DEF_BUF;
|
*count = EM28XX_DEF_BUF;
|
||||||
|
@ -109,11 +110,16 @@ static int dvb_init(struct em28xx *dev)
|
||||||
|
|
||||||
dev->qops->buf_setup = buffer_setup;
|
dev->qops->buf_setup = buffer_setup;
|
||||||
|
|
||||||
|
/* FIXME: Do we need more initialization here? */
|
||||||
|
memset(&dev->dvb_fh, 0, sizeof (dev->dvb_fh));
|
||||||
|
dev->dvb_fh.dev = dev;
|
||||||
|
dev->dvb_fh.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||||
|
|
||||||
videobuf_queue_vmalloc_init(&dev->dvb.dvbq, dev->qops,
|
videobuf_queue_vmalloc_init(&dev->dvb.dvbq, dev->qops,
|
||||||
&dev->udev->dev, &dev->slock,
|
&dev->udev->dev, &dev->slock,
|
||||||
V4L2_BUF_TYPE_VIDEO_CAPTURE,
|
V4L2_BUF_TYPE_VIDEO_CAPTURE,
|
||||||
V4L2_FIELD_ALTERNATE,
|
V4L2_FIELD_ALTERNATE,
|
||||||
sizeof(struct em28xx_buffer), dev);
|
sizeof(struct em28xx_buffer), &dev->dvb_fh);
|
||||||
|
|
||||||
/* init frontend */
|
/* init frontend */
|
||||||
switch (dev->model) {
|
switch (dev->model) {
|
||||||
|
|
|
@ -304,6 +304,18 @@ struct em28xx_audio {
|
||||||
spinlock_t slock;
|
spinlock_t slock;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct em28xx;
|
||||||
|
|
||||||
|
struct em28xx_fh {
|
||||||
|
struct em28xx *dev;
|
||||||
|
unsigned int stream_on:1; /* Locks streams */
|
||||||
|
int radio;
|
||||||
|
|
||||||
|
struct videobuf_queue vb_vidq;
|
||||||
|
|
||||||
|
enum v4l2_buf_type type;
|
||||||
|
};
|
||||||
|
|
||||||
/* main device struct */
|
/* main device struct */
|
||||||
struct em28xx {
|
struct em28xx {
|
||||||
/* generic device properties */
|
/* generic device properties */
|
||||||
|
@ -401,19 +413,10 @@ struct em28xx {
|
||||||
#if defined(CONFIG_VIDEO_EM28XX_DVB) || defined(CONFIG_VIDEO_EM28XX_DVB_MODULE)
|
#if defined(CONFIG_VIDEO_EM28XX_DVB) || defined(CONFIG_VIDEO_EM28XX_DVB_MODULE)
|
||||||
struct videobuf_dvb dvb;
|
struct videobuf_dvb dvb;
|
||||||
struct videobuf_queue_ops *qops;
|
struct videobuf_queue_ops *qops;
|
||||||
|
struct em28xx_fh dvb_fh;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct em28xx_fh {
|
|
||||||
struct em28xx *dev;
|
|
||||||
unsigned int stream_on:1; /* Locks streams */
|
|
||||||
int radio;
|
|
||||||
|
|
||||||
struct videobuf_queue vb_vidq;
|
|
||||||
|
|
||||||
enum v4l2_buf_type type;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct em28xx_ops {
|
struct em28xx_ops {
|
||||||
struct list_head next;
|
struct list_head next;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
Loading…
Reference in New Issue