From patchwork Mon Jul 15 19:12:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2827726 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E2889C0AB2 for ; Mon, 15 Jul 2013 19:12:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1515520219 for ; Mon, 15 Jul 2013 19:12:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 60015202BE for ; Mon, 15 Jul 2013 19:12:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754815Ab3GOTM0 (ORCPT ); Mon, 15 Jul 2013 15:12:26 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:55616 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754762Ab3GOTMZ (ORCPT ); Mon, 15 Jul 2013 15:12:25 -0400 Received: by mail-lb0-f178.google.com with SMTP id y6so9480474lbh.23 for ; Mon, 15 Jul 2013 12:12:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=to:subject:cc:from:organization:date:mime-version:content-type :content-transfer-encoding:message-id:x-gm-message-state; bh=y8VpqzD+ISumPv9QLi5sLzXgHZd9SJBX58ZSJF8uAXU=; b=U/v6McTnldAqlhESkJf6HXmqpRP7Vn+TR9nWhreIcaYzPlOeN82PNVvCqoyR7seF6Z /r9Cq+hUyM4hRxnXqAWEzreiBvy2xyz9jW1DXPQw6sqIzmCP8kzm10NWIDbvxpPTxgoF B0HwhSd2CvNva6LsL1alr4ZOQ4RPunkKiQxlLhaJuNLZl4vRJ0Op1IBE1JoFAc5hvUA1 qD4LMb9CzdipUU0gH+hU+PwwdvuTy+Tvvwj8wB42fRL9l5GG+j9kDOCdYX2DcqMeYsRz q6Ixpw3qjIkRLRgCNJtaIaP1bmQgW/PdywU5gLbBZJkmEjCVRKpRa2XzGNncRh4MXBOS pmvg== X-Received: by 10.152.8.72 with SMTP id p8mr26040819laa.70.1373915543445; Mon, 15 Jul 2013 12:12:23 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-147-205.pppoe.mtu-net.ru. [91.76.147.205]) by mx.google.com with ESMTPSA id p10sm19663710lap.8.2013.07.15.12.12.21 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 15 Jul 2013 12:12:22 -0700 (PDT) To: mchehab@redhat.com, linux-media@vger.kernel.org, hverkuil@xs4all.nl Subject: [PATCH] ml86v7667: override default field interlace order Cc: matsu@igel.co.jp, linux-sh@vger.kernel.org, vladimir.barinov@cogentembedded.com From: Sergei Shtylyov Organization: Cogent Embedded Date: Mon, 15 Jul 2013 23:12:21 +0400 MIME-Version: 1.0 Message-Id: <201307152312.22371.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQmJiqQB3yfi3rzTmd/09vFmY13s+txDY4Ob/OwjtoZTL8rQUyREnreI7PcGB8XIRl0Vq6ON Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vladimir Barinov 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 Signed-off-by: Vladimir Barinov [Sergei: added a comment.] Signed-off-by: Sergei Shtylyov Tested-by: Katsuya MATSUBARA --- 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 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;