From patchwork Sat Jan 10 13:38:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 1700 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0ADZf7x012642 for ; Sat, 10 Jan 2009 05:35:41 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752161AbZAJNj3 (ORCPT ); Sat, 10 Jan 2009 08:39:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751283AbZAJNj3 (ORCPT ); Sat, 10 Jan 2009 08:39:29 -0500 Received: from smtp-vbr6.xs4all.nl ([194.109.24.26]:4082 "EHLO smtp-vbr6.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752161AbZAJNj2 (ORCPT ); Sat, 10 Jan 2009 08:39:28 -0500 Received: from tschai.lan ([84.208.85.194]) (authenticated bits=0) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id n0ADcxD0007358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Jan 2009 14:39:00 +0100 (CET) (envelope-from hverkuil@xs4all.nl) From: Hans Verkuil To: linux-media@vger.kernel.org Subject: Re: [PULL] http://www.linuxtv.org/hg/~hverkuil/v4l-dvb Date: Sat, 10 Jan 2009 14:38:58 +0100 User-Agent: KMail/1.9.9 Cc: Mauro Carvalho Chehab , Mike Krufky , Martin Dauskardt References: <200901101239.16225.hverkuil@xs4all.nl> In-Reply-To: <200901101239.16225.hverkuil@xs4all.nl> MIME-Version: 1.0 Message-Id: <200901101438.59094.hverkuil@xs4all.nl> X-Virus-Scanned: by XS4ALL Virus Scanner Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Saturday 10 January 2009 12:39:16 Hans Verkuil wrote: > Hi Mauro, > > Please pull from http://www.linuxtv.org/hg/~hverkuil/v4l-dvb for the > following: > > - Fix 'stb0899_get_srate' defined but not used warning > - pxa_camera needs 2.6.27 at minimum. > > This fixes most of the compile warnings in the daily build. > > The 'CICR0' redefines are still present, though. I saw some > discussions about that so I didn't want to touch that. > > Thanks, > > Hans > > diffstat: > linux/drivers/media/dvb/frontends/stb0899_algo.c | 3 +++ > v4l/versions.txt | 6 ++++-- > 2 files changed, 7 insertions(+), 2 deletions(-) Mauro, Mike, I've added this change as well from Martin Dauskardt: - saa7127: fix broken S-Video with saa7129 This fixes a long-standing bug, but another fix done in 2.6.28 made this bug much more visible in that kernel. Mike, can you push this to the 2.6.28 stable team as well? I've attached the patch for the 2.6.28 kernel. Thanks, Hans --- linux-2.6.28/drivers/media/video/saa7127.c.org 2009-01-10 14:19:32.000000000 +0100 +++ linux-2.6.28/drivers/media/video/saa7127.c 2009-01-10 14:20:21.000000000 +0100 @@ -149,7 +149,7 @@ { SAA7127_REG_COPYGEN_0, 0x77 }, { SAA7127_REG_COPYGEN_1, 0x41 }, { SAA7127_REG_COPYGEN_2, 0x00 }, /* Macrovision enable/disable */ - { SAA7127_REG_OUTPUT_PORT_CONTROL, 0x9e }, + { SAA7127_REG_OUTPUT_PORT_CONTROL, 0xbf }, { SAA7127_REG_GAIN_LUMINANCE_RGB, 0x00 }, { SAA7127_REG_GAIN_COLORDIFF_RGB, 0x00 }, { SAA7127_REG_INPUT_PORT_CONTROL_1, 0x80 }, /* for color bars */ @@ -479,12 +479,18 @@ break; case SAA7127_OUTPUT_TYPE_COMPOSITE: - state->reg_2d = 0x08; /* 00001000 CVBS only, RGB DAC's off (high impedance mode) */ + if (state->ident == V4L2_IDENT_SAA7129) + state->reg_2d = 0x20; /* CVBS only */ + else + state->reg_2d = 0x08; /* 00001000 CVBS only, RGB DAC's off (high impedance mode) */ state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ break; case SAA7127_OUTPUT_TYPE_SVIDEO: - state->reg_2d = 0xff; /* 11111111 croma -> R, luma -> CVBS + G + B */ + if (state->ident == V4L2_IDENT_SAA7129) + state->reg_2d = 0x18; /* Y + C */ + else + state->reg_2d = 0xff; /*11111111 croma -> R, luma -> CVBS + G + B */ state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ break; @@ -499,7 +505,10 @@ break; case SAA7127_OUTPUT_TYPE_BOTH: - state->reg_2d = 0xbf; + if (state->ident == V4L2_IDENT_SAA7129) + state->reg_2d = 0x38; + else + state->reg_2d = 0xbf; state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ break; @@ -691,24 +700,6 @@ i2c_set_clientdata(client, state); - /* Configure Encoder */ - - v4l_dbg(1, debug, client, "Configuring encoder\n"); - saa7127_write_inittab(client, saa7127_init_config_common); - saa7127_set_std(client, V4L2_STD_NTSC); - saa7127_set_output_type(client, SAA7127_OUTPUT_TYPE_BOTH); - saa7127_set_vps(client, &vbi); - saa7127_set_wss(client, &vbi); - saa7127_set_cc(client, &vbi); - saa7127_set_xds(client, &vbi); - if (test_image == 1) - /* The Encoder has an internal Colorbar generator */ - /* This can be used for debugging */ - saa7127_set_input_type(client, SAA7127_INPUT_TYPE_TEST_IMAGE); - else - saa7127_set_input_type(client, SAA7127_INPUT_TYPE_NORMAL); - saa7127_set_video_enable(client, 1); - if (id->driver_data) { /* Chip type is already known */ state->ident = id->driver_data; } else { /* Needs detection */ @@ -730,6 +721,23 @@ v4l_info(client, "%s found @ 0x%x (%s)\n", client->name, client->addr << 1, client->adapter->name); + + v4l_dbg(1, debug, client, "Configuring encoder\n"); + saa7127_write_inittab(client, saa7127_init_config_common); + saa7127_set_std(client, V4L2_STD_NTSC); + saa7127_set_output_type(client, SAA7127_OUTPUT_TYPE_BOTH); + saa7127_set_vps(client, &vbi); + saa7127_set_wss(client, &vbi); + saa7127_set_cc(client, &vbi); + saa7127_set_xds(client, &vbi); + if (test_image == 1) + /* The Encoder has an internal Colorbar generator */ + /* This can be used for debugging */ + saa7127_set_input_type(client, SAA7127_INPUT_TYPE_TEST_IMAGE); + else + saa7127_set_input_type(client, SAA7127_INPUT_TYPE_NORMAL); + saa7127_set_video_enable(client, 1); + if (state->ident == V4L2_IDENT_SAA7129) saa7127_write_inittab(client, saa7129_init_config_extra); return 0;