summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2007-11-15 17:37:35 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2007-11-15 17:37:35 -0200
commitcd2c96baa6952ecab7cadbbf026afa9293d9bd79 (patch)
treea687c601130509d2f4a23fa1676e78be940a08ae /linux/drivers
parent5c8e36a5860b09fe0257d73844e52333433bb58a (diff)
downloadmediapointer-dvb-s2-cd2c96baa6952ecab7cadbbf026afa9293d9bd79.tar.gz
mediapointer-dvb-s2-cd2c96baa6952ecab7cadbbf026afa9293d9bd79.tar.bz2
tm6000: follow videobuf API changes
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/staging/tm6000/tm6000-video.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/linux/drivers/staging/tm6000/tm6000-video.c b/linux/drivers/staging/tm6000/tm6000-video.c
index 0fb0acb57..754a0e774 100644
--- a/linux/drivers/staging/tm6000/tm6000-video.c
+++ b/linux/drivers/staging/tm6000/tm6000-video.c
@@ -172,7 +172,7 @@ static void inline buffer_filled (struct tm6000_core *dev,
/* Advice that buffer was filled */
dprintk(dev, V4L2_DEBUG_ISOC, "[%p/%d] wakeup\n",buf,buf->vb.i);
- buf->vb.state = STATE_DONE;
+ buf->vb.state = VIDEOBUF_DONE;
buf->vb.field_count++;
do_gettimeofday(&buf->vb.ts);
@@ -788,7 +788,7 @@ static int restart_video_queue(struct tm6000_dmaqueue *dma_q)
buf = list_entry(item, struct tm6000_buffer, vb.queue);
list_del(&buf->vb.queue);
- buf->vb.state = STATE_ERROR;
+ buf->vb.state = VIDEOBUF_ERROR;
wake_up(&buf->vb.done);
}
mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT);
@@ -809,7 +809,7 @@ static int restart_video_queue(struct tm6000_dmaqueue *dma_q)
tm6000_stop_thread(dma_q);
tm6000_start_thread(dma_q, buf);
- buf->vb.state = STATE_ACTIVE;
+ buf->vb.state = VIDEOBUF_ACTIVE;
mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT);
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] restart_queue -"
" first active\n", buf, buf->vb.i);
@@ -819,7 +819,7 @@ static int restart_video_queue(struct tm6000_dmaqueue *dma_q)
prev->fmt == buf->fmt) {
list_del(&buf->vb.queue);
list_add_tail(&buf->vb.queue,&dma_q->active);
- buf->vb.state = STATE_ACTIVE;
+ buf->vb.state = VIDEOBUF_ACTIVE;
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] restart_queue -"
" move to active\n",buf,buf->vb.i);
} else {
@@ -841,7 +841,7 @@ static void tm6000_vid_timeout(unsigned long data)
buf = list_entry(vidq->active.next, struct tm6000_buffer,
vb.queue);
list_del(&buf->vb.queue);
- buf->vb.state = STATE_ERROR;
+ buf->vb.state = VIDEOBUF_ERROR;
wake_up(&buf->vb.done);
dprintk(dev, V4L2_DEBUG_QUEUE, "tm6000/0: [%p/%d] timeout\n",
buf, buf->vb.i);
@@ -881,7 +881,7 @@ static void free_buffer(struct videobuf_queue *vq, struct tm6000_buffer *buf)
videobuf_waiton(&buf->vb,0,0);
videobuf_vmalloc_free(&buf->vb);
- buf->vb.state = STATE_NEEDS_INIT;
+ buf->vb.state = VIDEOBUF_NEEDS_INIT;
}
static int
@@ -921,10 +921,10 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
buf->vb.width = fh->width;
buf->vb.height = fh->height;
buf->vb.field = field;
- buf->vb.state = STATE_NEEDS_INIT;
+ buf->vb.state = VIDEOBUF_NEEDS_INIT;
}
- if (STATE_NEEDS_INIT == buf->vb.state) {
+ if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
if (0 != (rc = videobuf_iolock(vq,&buf->vb,NULL)))
goto fail;
urb_init=1;
@@ -978,7 +978,7 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
goto fail;
}
- buf->vb.state = STATE_PREPARED;
+ buf->vb.state = VIDEOBUF_PREPARED;
return 0;
fail:
@@ -997,12 +997,12 @@ buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
if (!list_empty(&vidq->queued)) {
list_add_tail(&buf->vb.queue,&vidq->queued);
- buf->vb.state = STATE_QUEUED;
+ buf->vb.state = VIDEOBUF_QUEUED;
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] buffer_queue - "
"append to queued\n", buf, buf->vb.i);
} else if (list_empty(&vidq->active)) {
list_add_tail(&buf->vb.queue,&vidq->active);
- buf->vb.state = STATE_ACTIVE;
+ buf->vb.state = VIDEOBUF_ACTIVE;
mod_timer(&vidq->timeout, jiffies+BUFFER_TIMEOUT);
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] buffer_queue - "
"first active\n", buf, buf->vb.i);
@@ -1013,12 +1013,12 @@ buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
prev->vb.height == buf->vb.height &&
prev->fmt == buf->fmt) {
list_add_tail(&buf->vb.queue,&vidq->active);
- buf->vb.state = STATE_ACTIVE;
+ buf->vb.state = VIDEOBUF_ACTIVE;
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] buffer_queue -"
" append to active\n", buf, buf->vb.i);
} else {
list_add_tail(&buf->vb.queue,&vidq->queued);
- buf->vb.state = STATE_QUEUED;
+ buf->vb.state = VIDEOBUF_QUEUED;
dprintk(dev, V4L2_DEBUG_QUEUE, "[%p/%d] buffer_queue -"
" first queued\n", buf, buf->vb.i);
}
@@ -1032,6 +1032,9 @@ static void buffer_release(struct videobuf_queue *vq, struct videobuf_buffer *vb
struct tm6000_core *dev = (struct tm6000_core*)fh->dev;
struct tm6000_dmaqueue *vidq = &dev->vidq;
+#if 0
+ videobuf_stop(&fh->vb_vidq);
+#endif
tm6000_stop_thread(vidq);
free_buffer(vq,buf);
@@ -1656,8 +1659,8 @@ tm6000_poll(struct file *file, struct poll_table_struct *wait)
#endif
}
poll_wait(file, &buf->vb.done, wait);
- if (buf->vb.state == STATE_DONE ||
- buf->vb.state == STATE_ERROR)
+ if (buf->vb.state == VIDEOBUF_DONE ||
+ buf->vb.state == VIDEOBUF_ERROR)
return POLLIN|POLLRDNORM;
return 0;
}