Commit 98088ec9 authored by Ronald Bultje's avatar Ronald Bultje Committed by Linus Torvalds

[PATCH] zr36067 driver - correct subfrequency carrier

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).
Signed-off-by: default avatarRonald Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: default avatarDouglas Fraser <ds-fraser@comcast.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1cbe8fd7
......@@ -156,6 +156,22 @@ adv7175_write_block (struct i2c_client *client,
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 @@ adv7175_command (struct i2c_client *client,
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 @@ adv7175_command (struct i2c_client *client,
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 @@ adv7175_command (struct i2c_client *client,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment