summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-09-01 03:01:44 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-01 03:01:44 -0300
commiteb706c154c6ea0c8827ceb8b644e8ab2858f2b77 (patch)
tree6d108604797cb48d7c3b81ce4ec03f7097c200df /linux/drivers
parent5a3de175c8db2821c8ed908310db372c249ca18f (diff)
downloadmediapointer-dvb-s2-eb706c154c6ea0c8827ceb8b644e8ab2858f2b77.tar.gz
mediapointer-dvb-s2-eb706c154c6ea0c8827ceb8b644e8ab2858f2b77.tar.bz2
saa7115 seems to need initializing some reserved registers
From: Mauro Carvalho Chehab <mchehab@infradead.org> Also fixed a scaling trouble Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/saa7115.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c
index 54336578a..ca27c8c4d 100644
--- a/linux/drivers/media/video/saa7115.c
+++ b/linux/drivers/media/video/saa7115.c
@@ -104,6 +104,8 @@ static inline int saa711x_write(struct i2c_client *client, u8 reg, u8 value)
/* Sanity routine to check if a register is present */
static int saa711x_has_reg(const int id, const u8 reg)
{
+#if 0
+ /* saa7115 seems to needing to initialize some "reserved" registers */
switch (id) {
case V4L2_IDENT_SAA7111:
if (reg>0x1f || reg==1 || reg==0x0f || reg==0x14 || reg==0x18
@@ -115,7 +117,7 @@ static int saa711x_has_reg(const int id, const u8 reg)
return 0;
case V4L2_IDENT_SAA7114:
if (reg>=0xf0 || (reg>=0x1a && reg<=0x1e) ||
- (reg>=0x20 && reg<=0x2f) ||
+ (reg>=0x20 && reg<=0x2f) ||
(reg>=0x63 && reg<=0x7f) )
return 0;
case V4L2_IDENT_SAA7115:
@@ -134,7 +136,7 @@ static int saa711x_has_reg(const int id, const u8 reg)
(reg>=0x3b && reg<=0x3f) || (reg==0x5f) ||
(reg>=0x63 && reg<=0x6f) ) )
return 0;
-
+#endif
return 1;
}
@@ -1064,7 +1066,7 @@ static int saa711x_set_size(struct i2c_client *client, int width, int height)
int VSCY;
int res;
int is_50hz = state->std & V4L2_STD_625_50;
- int Vsrc = is_50hz ? 576 : 480;
+ int Vsrc = is_50hz ? 576 : 480+16;
v4l_dbg(1, debug, client, "decoder set size to %ix%i\n",width,height);
@@ -1081,7 +1083,7 @@ static int saa711x_set_size(struct i2c_client *client, int width, int height)
if (height != Vsrc)
return -EINVAL;
}
- if (!saa711x_has_reg(state->ident,R_CC_B_HORIZ_OUTPUT_WINDOW_LENGTH))
+ if (!saa711x_has_reg(state->ident,R_CC_B_HORIZ_OUTPUT_WINDOW_LENGTH))
return 0;
/* probably have a valid size, let's set it */
@@ -1096,14 +1098,6 @@ static int saa711x_set_size(struct i2c_client *client, int width, int height)
/* Vertical Scaling uses height/2 */
res=height/2;
- /*FIXME: This code seems weird, however, this is how it is
- * working right now.
- */
- if (height == Vsrc) {
- if (!is_50hz)
- res+=8;
- }
-
/* height */
saa711x_write(client, R_CE_B_VERT_OUTPUT_WINDOW_LENGTH,
(u8) (res & 0xff));