]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: em28xx-v4l: fix video buffer field order reporting in progressive mode
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Sat, 9 Aug 2014 09:37:21 +0000 (06:37 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 18:10:27 +0000 (10:10 -0800)
commit 662c97cf8f9e9d67d45d0a9f0c1565a1ede364c2 upstream.

The correct field order in progressive mode is V4L2_FIELD_NONE, not V4L2_FIELD_INTERLACED.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/em28xx/em28xx-video.c

index 8097499d3fbe2ae69b952ac089d42f9b9ae897d3..5122cbe085f14ee21d26685d9531a21656120730 100644 (file)
@@ -435,7 +435,10 @@ static inline void finish_buffer(struct em28xx *dev,
        em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->top_field);
 
        buf->vb.v4l2_buf.sequence = dev->v4l2->field_count++;
-       buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED;
+       if (dev->v4l2->progressive)
+               buf->vb.v4l2_buf.field = V4L2_FIELD_NONE;
+       else
+               buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED;
        v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp);
 
        vb2_buffer_done(&buf->vb, VB2_BUF_STATE_DONE);