Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366821
b: refs/heads/master
c: d4a2cea
h: refs/heads/master
i:
  366819: 65251dc
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 25, 2013
1 parent 32d0ecc commit d13d382
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59aea928d57f171453474a883f087e4fccb83e94
refs/heads/master: d4a2cea4f2fd9c935f30666e4acdb1065ff60544
19 changes: 13 additions & 6 deletions trunk/drivers/media/i2c/tw9903.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,22 @@ static int tw9903_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
{
struct tw9903 *dec = to_state(sd);
bool is_60hz = norm & V4L2_STD_525_60;
u8 regs[] = {
0x05, is_60hz ? 0x80 : 0x00,
0x07, is_60hz ? 0x02 : 0x12,
0x08, is_60hz ? 0x14 : 0x18,
0x09, is_60hz ? 0xf0 : 0x20,
static const u8 config_60hz[] = {
0x05, 0x80,
0x07, 0x02,
0x08, 0x14,
0x09, 0xf0,
0, 0,
};
static const u8 config_50hz[] = {
0x05, 0x00,
0x07, 0x12,
0x08, 0x18,
0x09, 0x20,
0, 0,
};

write_regs(sd, regs);
write_regs(sd, is_60hz ? config_60hz : config_50hz);
dec->norm = norm;
return 0;
}
Expand Down
19 changes: 13 additions & 6 deletions trunk/drivers/media/i2c/tw9906.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,22 @@ static int tw9906_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
{
struct tw9906 *dec = to_state(sd);
bool is_60hz = norm & V4L2_STD_525_60;
u8 regs[] = {
0x05, is_60hz ? 0x81 : 0x01,
0x07, is_60hz ? 0x02 : 0x12,
0x08, is_60hz ? 0x14 : 0x18,
0x09, is_60hz ? 0xf0 : 0x20,
static const u8 config_60hz[] = {
0x05, 0x81,
0x07, 0x02,
0x08, 0x14,
0x09, 0xf0,
0, 0,
};
static const u8 config_50hz[] = {
0x05, 0x01,
0x07, 0x12,
0x08, 0x18,
0x09, 0x20,
0, 0,
};

write_regs(sd, regs);
write_regs(sd, is_60hz ? config_60hz : config_50hz);
dec->norm = norm;
return 0;
}
Expand Down

0 comments on commit d13d382

Please sign in to comment.