From 6d04203c7f49a4d93304b5754de5457297fa04eb Mon Sep 17 00:00:00 2001 From: Frej Drejhammar Date: Sun, 23 Mar 2008 22:43:21 -0300 Subject: V4L/DVB (7451): cx88: Add user control for chroma AGC The cx2388x family has support for chroma AGC. This patch implements a the V4L2_CID_CHROMA_AGC control for the cx2388x family. By default chroma AGC is disabled, as in previous versions of the driver. Signed-off-by: "Frej Drejhammar " Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx88/cx88-core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/media/video/cx88/cx88-core.c') diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index 75b581048f6..dca9f3ae5fd 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c @@ -929,7 +929,11 @@ int cx88_set_tvnorm(struct cx88_core *core, v4l2_std_id norm) dprintk(1,"set_tvnorm: MO_INPUT_FORMAT 0x%08x [old=0x%08x]\n", cxiformat, cx_read(MO_INPUT_FORMAT) & 0x0f); - cx_andor(MO_INPUT_FORMAT, 0xf, cxiformat); + /* Chroma AGC must be disabled if SECAM is used */ + if (norm & V4L2_STD_SECAM) + cx_andor(MO_INPUT_FORMAT, 0x40f, cxiformat); + else + cx_andor(MO_INPUT_FORMAT, 0xf, cxiformat); // FIXME: as-is from DScaler dprintk(1,"set_tvnorm: MO_OUTPUT_FORMAT 0x%08x [old=0x%08x]\n", -- cgit v1.2.3