From 222c43520513f308ad50308d134c8ea62d7d5cf1 Mon Sep 17 00:00:00 2001 From: Devin Heitmueller Date: Thu, 19 Aug 2010 13:45:56 -0300 Subject: [PATCH] [media] cx231xx: properly set active line count for PAL/SECAM The cx231xx_do_mode_ctrl_overrides() function was not touching the vactive line count for PAL/SECAM modes, which in some use cases results in it being left in the chip default state of 480 (NTSC). Explicitly set the values, as is already done for NTSC. Signed-off-by: Devin Heitmueller Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx231xx/cx231xx-avcore.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c index 580fe535b644..ebbdd90cac06 100644 --- a/drivers/media/video/cx231xx/cx231xx-avcore.c +++ b/drivers/media/video/cx231xx/cx231xx-avcore.c @@ -1016,6 +1016,13 @@ int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev) status = cx231xx_read_modify_write_i2c_dword(dev, VID_BLK_I2C_ADDRESS, VERT_TIM_CTRL, + FLD_VACTIVE_CNT, + cx231xx_set_field + (FLD_VACTIVE_CNT, + 0x240)); + status = cx231xx_read_modify_write_i2c_dword(dev, + VID_BLK_I2C_ADDRESS, + VERT_TIM_CTRL, FLD_V656BLANK_CNT, cx231xx_set_field (FLD_V656BLANK_CNT, @@ -1036,6 +1043,13 @@ int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev) status = cx231xx_read_modify_write_i2c_dword(dev, VID_BLK_I2C_ADDRESS, VERT_TIM_CTRL, + FLD_VACTIVE_CNT, + cx231xx_set_field + (FLD_VACTIVE_CNT, + 0x240)); + status = cx231xx_read_modify_write_i2c_dword(dev, + VID_BLK_I2C_ADDRESS, + VERT_TIM_CTRL, FLD_V656BLANK_CNT, cx231xx_set_field (FLD_V656BLANK_CNT, -- 2.11.0