mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ronald Bultje <rbultje@ronald.bitfreak.net>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org,
	Douglas Fraser <ds-fraser@comcast.net>,
	mjpeg-developer@lists.sourceforge.net
Subject: [PATCH] 3/3: 2.6.8 zr36067 driver - correct subfrequency carrier
Date: Sun, 29 Aug 2004 21:29:23 +0200	[thread overview]
Message-ID: <1093807763.26498.1.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

Hi,

attached patch changes the subfrequency carrier value in the adv7175
video output driver which is part of the zr36067 driver package. The
practical consequence is that the picture will be more stable on
non-passthrough video mode in NTSC. It does not affect PAL/SECAM. Patch
originally submitted by Douglas Fraser <ds-fraser@comcast.net> (8/21).

Ronald

Signed-off-by: Ronald Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Douglas Fraser <ds-fraser@comcast.net>

-- 
Ronald Bultje <rbultje@ronald.bitfreak.net>

[-- Attachment #2: zoran-adv7175-scf.diff --]
[-- Type: text/x-patch, Size: 1643 bytes --]

Index: linux/drivers/media/video/adv7175.c
--- linux~zoran-adv7175-scf/drivers/media/video/adv7175.c	2004-08-14 12:56:22.000000000 +0200
+++ linux/drivers/media/video/adv7175.c	2004-08-29 18:33:18.392719048 +0200
@@ -156,6 +156,22 @@
 	return ret;
 }
 
+static void
+set_subcarrier_freq (struct i2c_client *client,
+		     int                pass_through)
+{
+	/* for some reason pass_through NTSC needs
+	 * a different sub-carrier freq to remain stable. */
+	if(pass_through)
+		adv7175_write(client, 0x02, 0x00);
+	else
+		adv7175_write(client, 0x02, 0x55);
+
+	adv7175_write(client, 0x03, 0x55);
+	adv7175_write(client, 0x04, 0x55);
+	adv7175_write(client, 0x05, 0x25);
+}
+
 #ifdef ENCODER_DUMP
 static void
 dump (struct i2c_client *client)
@@ -322,6 +338,10 @@
 
 		case 0:
 			adv7175_write(client, 0x01, 0x00);
+
+			if (encoder->norm == VIDEO_MODE_NTSC)
+				set_subcarrier_freq(client, 1);
+
 			adv7175_write(client, 0x0c, TR1CAPT);	/* TR1 */
 			if (encoder->norm == VIDEO_MODE_SECAM)
 				adv7175_write(client, 0x0d, 0x49);	// Disable genlock
@@ -334,6 +354,10 @@
 
 		case 1:
 			adv7175_write(client, 0x01, 0x00);
+
+			if (encoder->norm == VIDEO_MODE_NTSC)
+				set_subcarrier_freq(client, 0);
+
 			adv7175_write(client, 0x0c, TR1PLAY);	/* TR1 */
 			adv7175_write(client, 0x0d, 0x49);
 			adv7175_write(client, 0x07, TR0MODE | TR0RST);
@@ -343,6 +367,10 @@
 
 		case 2:
 			adv7175_write(client, 0x01, 0x80);
+
+			if (encoder->norm == VIDEO_MODE_NTSC)
+				set_subcarrier_freq(client, 0);
+
 			adv7175_write(client, 0x0d, 0x49);
 			adv7175_write(client, 0x07, TR0MODE | TR0RST);
 			adv7175_write(client, 0x07, TR0MODE);

                 reply	other threads:[~2004-08-29 19:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1093807763.26498.1.camel@localhost.localdomain \
    --to=rbultje@ronald.bitfreak.net \
    --cc=akpm@osdl.org \
    --cc=ds-fraser@comcast.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjpeg-developer@lists.sourceforge.net \
    /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

Powered by JetHome