mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jon Arne Jørgensen" <jonarne@jonarne.no>
To: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mchehab@redhat.com,
	hans.verkuil@cisco.com, prabhakar.csengg@gmail.com,
	g.liakhovetski@gmx.de, ezequiel.garcia@free-electrons.com,
	timo.teras@iki.fi
Subject: [RFC 2/3] saa7115: Remove unneeded register change for gm7113c
Date: Wed, 29 May 2013 22:41:17 +0200	[thread overview]
Message-ID: <1369860078-10334-3-git-send-email-jonarne@jonarne.no> (raw)
In-Reply-To: <1369860078-10334-1-git-send-email-jonarne@jonarne.no>

On video std change, the driver would disable the automatic field
detection on the gm7113c chip, and force either 50Hz or 60Hz.
Don't do this any more.

Signed-off-by: Jon Arne Jørgensen <jonarne@jonarne.no>
---
 drivers/media/i2c/saa7115.c | 25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c
index 4403679..ccfaac9 100644
--- a/drivers/media/i2c/saa7115.c
+++ b/drivers/media/i2c/saa7115.c
@@ -453,23 +453,6 @@ static const unsigned char saa7115_cfg_50hz_video[] = {
 
 /* ============== SAA7715 VIDEO templates (end) =======  */
 
-/* ============== GM7113C VIDEO templates =============  */
-static const unsigned char gm7113c_cfg_60hz_video[] = {
-	R_08_SYNC_CNTL, 0x68,			/* 0xBO: auto detection, 0x68 = NTSC */
-	R_0E_CHROMA_CNTL_1, 0x07,		/* video autodetection is on */
-
-	0x00, 0x00
-};
-
-static const unsigned char gm7113c_cfg_50hz_video[] = {
-	R_08_SYNC_CNTL, 0x28,			/* 0x28 = PAL */
-	R_0E_CHROMA_CNTL_1, 0x07,
-
-	0x00, 0x00
-};
-
-/* ============== GM7113C VIDEO templates (end) =======  */
-
 
 static const unsigned char saa7115_cfg_vbi_on[] = {
 	R_80_GLOBAL_CNTL_1, 0x00,			/* reset tasks */
@@ -955,16 +938,12 @@ static void saa711x_set_v4lstd(struct v4l2_subdev *sd, v4l2_std_id std)
 	// This works for NTSC-M, SECAM-L and the 50Hz PAL variants.
 	if (std & V4L2_STD_525_60) {
 		v4l2_dbg(1, debug, sd, "decoder set standard 60 Hz\n");
-		if (state->ident == V4L2_IDENT_GM7113C)
-			saa711x_writeregs(sd, gm7113c_cfg_60hz_video);
-		else
+		if (state->ident != V4L2_IDENT_GM7113C)
 			saa711x_writeregs(sd, saa7115_cfg_60hz_video);
 		saa711x_set_size(sd, 720, 480);
 	} else {
 		v4l2_dbg(1, debug, sd, "decoder set standard 50 Hz\n");
-		if (state->ident == V4L2_IDENT_GM7113C)
-			saa711x_writeregs(sd, gm7113c_cfg_50hz_video);
-		else
+		if (state->ident != V4L2_IDENT_GM7113C)
 			saa711x_writeregs(sd, saa7115_cfg_50hz_video);
 		saa711x_set_size(sd, 720, 576);
 	}
-- 
1.8.2.3


  parent reply	other threads:[~2013-05-29 20:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 20:41 [RFC 0/3] saa7115: Implement i2c_board_info.platform_data Jon Arne Jørgensen
2013-05-29 20:41 ` [RFC 1/3] saa7115: Set saa7113 init to values from datasheet Jon Arne Jørgensen
2013-05-30  0:35   ` Mauro Carvalho Chehab
2013-05-30  2:19     ` Andy Walls
2013-05-30  5:21       ` Jon Arne Jørgensen
2013-05-30  5:33         ` Timo Teras
2013-05-30 19:00           ` Jon Arne Jørgensen
2013-05-31 13:08             ` Mauro Carvalho Chehab
2013-05-31 14:08               ` Timo Teras
2013-05-31 14:14               ` Jon Arne Jørgensen
2013-05-29 20:41 ` Jon Arne Jørgensen [this message]
2013-05-29 20:41 ` [RFC 3/3] saa7115: Implement i2c_board_info.platform data Jon Arne Jørgensen
2013-05-29 20:49   ` Jon Arne Jørgensen
2013-05-30  0:42   ` Mauro Carvalho Chehab
2013-05-29 20:48 ` [RFC 0/3] saa7115: Implement i2c_board_info.platform_data Jon Arne Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369860078-10334-3-git-send-email-jonarne@jonarne.no \
    --to=jonarne@jonarne.no \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=timo.teras@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®