Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357148
b: refs/heads/master
c: 948a49a
h: refs/heads/master
v: v3
  • Loading branch information
Frank Schaefer authored and Mauro Carvalho Chehab committed Dec 22, 2012
1 parent c4cb9d7 commit 5ab3a8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24a6d8497f7e64a8870018ed1ed561755b2075ec
refs/heads/master: 948a49aa692e12cc33558e407898c467b22bf9b4
34 changes: 5 additions & 29 deletions trunk/drivers/media/usb/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,37 +154,15 @@ static struct v4l2_queryctrl ac97_qctrl[] = {
------------------------------------------------------------------*/

/*
* Announces that a buffer were filled and request the next
* Finish the current buffer
*/
static inline void buffer_filled(struct em28xx *dev,
struct em28xx_dmaqueue *dma_q,
struct em28xx_buffer *buf)
static inline void finish_buffer(struct em28xx *dev,
struct em28xx_buffer *buf)
{
/* Advice that buffer was filled */
em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i);
buf->vb.state = VIDEOBUF_DONE;
buf->vb.field_count++;
v4l2_get_timestamp(&buf->vb.ts);

dev->usb_ctl.vid_buf = NULL;

list_del(&buf->vb.queue);
wake_up(&buf->vb.done);
}

static inline void vbi_buffer_filled(struct em28xx *dev,
struct em28xx_dmaqueue *dma_q,
struct em28xx_buffer *buf)
{
/* Advice that buffer was filled */
em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i);

buf->vb.state = VIDEOBUF_DONE;
buf->vb.field_count++;
v4l2_get_timestamp(&buf->vb.ts);

dev->usb_ctl.vbi_buf = NULL;

list_del(&buf->vb.queue);
wake_up(&buf->vb.done);
}
Expand Down Expand Up @@ -485,9 +463,7 @@ static inline int em28xx_urb_data_copy(struct em28xx *dev, struct urb *urb)
if (dev->vbi_read == 0 && dev->top_field) {
/* Brand new frame */
if (vbi_buf != NULL)
vbi_buffer_filled(dev,
vbi_dma_q,
vbi_buf);
finish_buffer(dev, vbi_buf);
vbi_buf = get_next_buf(dev, vbi_dma_q);
dev->usb_ctl.vbi_buf = vbi_buf;
if (vbi_buf == NULL)
Expand Down Expand Up @@ -524,7 +500,7 @@ static inline int em28xx_urb_data_copy(struct em28xx *dev, struct urb *urb)
dev->capture_type = 2;
if (dev->progressive || dev->top_field) {
if (buf != NULL)
buffer_filled(dev, dma_q, buf);
finish_buffer(dev, buf);
buf = get_next_buf(dev, dma_q);
dev->usb_ctl.vid_buf = buf;
if (buf == NULL)
Expand Down

0 comments on commit 5ab3a8a

Please sign in to comment.