aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx/cx231xx-avcore.c
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@hauppauge.com>2010-07-09 12:29:31 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:17:21 -0400
commit435b4f7897b7e2f233c313e65ac82bd1d3599c43 (patch)
treeceba75faf996b25a98677ca56b44dd04b3cc6431 /drivers/media/video/cx231xx/cx231xx-avcore.c
parentd5a1754d523f5145a6e4ec8fa3a592cc57400467 (diff)
[media] cx231xx: make video scaler work properly
Move the responsibility for setting up the horizontal and vertical scalers entirely to the cx25840 driver. The cx231xx-avcore was actually programming garbage into the HSCALE_CTRL and VSCALE_CTRL registers (because of differences in how the em28xx driver worked, which the cx231xx driver was derived from). The net effect is that the scaler now works properly (tested with both PAL and NTSC under mplayer and tvtime). This patch also gets rid of cx25840 errors showing up in dmesg which say "720x480 is not a valid size" (since we now properly setup the size of the active video area). Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-avcore.c')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-avcore.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c
index 64e07d335e77..362a4311cdee 100644
--- a/drivers/media/video/cx231xx/cx231xx-avcore.c
+++ b/drivers/media/video/cx231xx/cx231xx-avcore.c
@@ -992,7 +992,7 @@ int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev)
992 VID_BLK_I2C_ADDRESS, 992 VID_BLK_I2C_ADDRESS,
993 VERT_TIM_CTRL, 993 VERT_TIM_CTRL,
994 FLD_VACTIVE_CNT, 994 FLD_VACTIVE_CNT,
995 0x1E6000); 995 0x1E7000);
996 status = cx231xx_read_modify_write_i2c_dword(dev, 996 status = cx231xx_read_modify_write_i2c_dword(dev,
997 VID_BLK_I2C_ADDRESS, 997 VID_BLK_I2C_ADDRESS,
998 VERT_TIM_CTRL, 998 VERT_TIM_CTRL,
@@ -1220,20 +1220,6 @@ int cx231xx_set_audio_decoder_input(struct cx231xx *dev,
1220 return status; 1220 return status;
1221} 1221}
1222 1222
1223/* Set resolution of the video */
1224int cx231xx_resolution_set(struct cx231xx *dev)
1225{
1226 /* set horzontal scale */
1227 int status = vid_blk_write_word(dev, HSCALE_CTRL, dev->hscale);
1228 if (status)
1229 return status;
1230
1231 /* set vertical scale */
1232 status = vid_blk_write_word(dev, VSCALE_CTRL, dev->vscale);
1233
1234 return status;
1235}
1236
1237/****************************************************************************** 1223/******************************************************************************
1238 * C H I P Specific C O N T R O L functions * 1224 * C H I P Specific C O N T R O L functions *
1239 ******************************************************************************/ 1225 ******************************************************************************/