diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-i2c.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7115.c | 21 |
2 files changed, 11 insertions, 12 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 5a1114666..79cf9d9ee 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -6,7 +6,9 @@ & Marcus Metzler (mocm@thp.uni-koeln.de) (c) 2002 Yurij Sysoev <yurij@naturesoft.net> (c) 1999-2003 Gerd Knorr <kraxel@bytesex.org> + (c) 2005 Mauro Carvalho Chehab <mchehab@infradead.org> + - Multituner support and i2c address binding This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index 54336578a..31d9ee396 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -109,19 +109,23 @@ static int saa711x_has_reg(const int id, const u8 reg) if (reg>0x1f || reg==1 || reg==0x0f || reg==0x14 || reg==0x18 || reg==0x19 || reg==0x1d || reg==0x1e) return 0; + break; case V4L2_IDENT_SAA7113: if (reg>0x62 || reg==0x14 || (reg>=0x18 && reg<=0x1e) || (reg>=0x20 && reg<=0x3f) ||reg==0x5f ) return 0; + break; 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; + break; case V4L2_IDENT_SAA7115: if ((reg>=0x20 && reg<=0x2f) || (reg==0x5c) || (reg>=0xfc && reg<=0xfe) ) return 0; + break; case V4L2_IDENT_SAA7118: if (reg>=0xf0 || (reg>=0x1a && reg<=0x1d) || (reg>=0x63 && reg<=0x6f) ) @@ -134,7 +138,6 @@ static int saa711x_has_reg(const int id, const u8 reg) (reg>=0x3b && reg<=0x3f) || (reg==0x5f) || (reg>=0x63 && reg<=0x6f) ) ) return 0; - return 1; } @@ -152,6 +155,8 @@ static int saa711x_writeregs(struct i2c_client *client, const unsigned char *reg if (saa711x_has_reg(state->ident,reg)) { if (saa711x_write(client, reg, data) < 0) return -1; + } else { + v4l_dbg(1, debug, client, "tried to access reserved reg 0x%02x\n", reg); } } return 0; @@ -1064,7 +1069,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 +1086,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 +1101,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)); |