diff mbox

ml86v7667: override default field interlace order

Message ID 201307152312.22371.sergei.shtylyov@cogentembedded.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sergei Shtylyov July 15, 2013, 7:12 p.m. UTC
From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>

ML86V7667 always transmits top field first for both PAL and  NTSC -- that makes
application incorrectly  treat interlaced  fields when relying on the standard.
Hence we must set V4L2_FIELD_INTERLACED_TB format explicitly.

Reported-by: Katsuya MATSUBARA <matsu@igel.co.jp>
Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
[Sergei: added a comment.]
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against the 'media_tree.git' repo.

 drivers/media/i2c/ml86v7667.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Katsuya Matsubara July 25, 2013, 7:32 a.m. UTC | #1
Hi Vladimir,

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Subject: [PATCH] ml86v7667: override default field interlace order
Date: Mon, 15 Jul 2013 23:12:21 +0400

> From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> 
> ML86V7667 always transmits top field first for both PAL and  NTSC -- that makes
> application incorrectly  treat interlaced  fields when relying on the standard.
> Hence we must set V4L2_FIELD_INTERLACED_TB format explicitly.
> 
> Reported-by: Katsuya MATSUBARA <matsu@igel.co.jp>
> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> [Sergei: added a comment.]
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
(snip)

I made sure that it works well on the Renesas BOCK-W board.

Tested-by: Katsuya MATSUBARA <matsu@igel.co.jp>

---
Katsuya Matsubara / IGEL Co., Ltd
matsu@igel.co.jp
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov July 27, 2013, 10:20 p.m. UTC | #2
Hello.

On 15.07.2013 23:12, I wrote:

> From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>

> ML86V7667 always transmits top field first for both PAL and  NTSC -- that makes
> application incorrectly  treat interlaced  fields when relying on the standard.
> Hence we must set V4L2_FIELD_INTERLACED_TB format explicitly.

> Reported-by: Katsuya MATSUBARA <matsu@igel.co.jp>
> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> [Sergei: added a comment.]
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

> ---
> This patch is against the 'media_tree.git' repo.

    I forgot to mention that it was against the 'fixes' branch, and we 
intended it as a fix (I'm seeing this patch committed to the 'master' branch).

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: media_tree/drivers/media/i2c/ml86v7667.c
===================================================================
--- media_tree.orig/drivers/media/i2c/ml86v7667.c
+++ media_tree/drivers/media/i2c/ml86v7667.c
@@ -209,7 +209,8 @@  static int ml86v7667_mbus_fmt(struct v4l
 
 	fmt->code = V4L2_MBUS_FMT_YUYV8_2X8;
 	fmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
-	fmt->field = V4L2_FIELD_INTERLACED;
+	/* The top field is always transferred first by the chip */
+	fmt->field = V4L2_FIELD_INTERLACED_TB;
 	fmt->width = 720;
 	fmt->height = priv->std & V4L2_STD_525_60 ? 480 : 576;