Commit 8a55ddd9 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] au0828: fix broken streaming

Commit c5036d61 ("media: au0828: drop
vbi_buffer_filled() and re-use buffer_filled()") broke video and vbi streaming.

The vb2_buffer struct was copied instead of taking a pointer to it, but
vb2_buffer_done() needs the real object, not a copy, since it is hooking
the buffer into a different list.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent ba445432
...@@ -302,20 +302,20 @@ static inline void buffer_filled(struct au0828_dev *dev, ...@@ -302,20 +302,20 @@ static inline void buffer_filled(struct au0828_dev *dev,
struct au0828_dmaqueue *dma_q, struct au0828_dmaqueue *dma_q,
struct au0828_buffer *buf) struct au0828_buffer *buf)
{ {
struct vb2_buffer vb = buf->vb; struct vb2_buffer *vb = &buf->vb;
struct vb2_queue *q = vb.vb2_queue; struct vb2_queue *q = vb->vb2_queue;
/* Advice that buffer was filled */ /* Advice that buffer was filled */
au0828_isocdbg("[%p/%d] wakeup\n", buf, buf->top_field); au0828_isocdbg("[%p/%d] wakeup\n", buf, buf->top_field);
if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
vb.v4l2_buf.sequence = dev->frame_count++; vb->v4l2_buf.sequence = dev->frame_count++;
else else
vb.v4l2_buf.sequence = dev->vbi_frame_count++; vb->v4l2_buf.sequence = dev->vbi_frame_count++;
vb.v4l2_buf.field = V4L2_FIELD_INTERLACED; vb->v4l2_buf.field = V4L2_FIELD_INTERLACED;
v4l2_get_timestamp(&vb.v4l2_buf.timestamp); v4l2_get_timestamp(&vb->v4l2_buf.timestamp);
vb2_buffer_done(&vb, VB2_BUF_STATE_DONE); vb2_buffer_done(vb, VB2_BUF_STATE_DONE);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment