Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271935
b: refs/heads/master
c: e41567a
h: refs/heads/master
i:
  271933: 771989b
  271931: 29acbce
  271927: c02d043
  271919: 0302def
  271903: ef69bac
  271871: ccf9a98
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Oct 8, 2011
1 parent 2cf0cd8 commit ee30139
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 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: 8715e6cbae2ec8b451920496a73786402a5d879d
refs/heads/master: e41567a61dff8f63ad7b56a325bd4d2350428999
19 changes: 12 additions & 7 deletions trunk/drivers/media/video/saa7115.c
Original file line number Diff line number Diff line change
Expand Up @@ -1346,17 +1346,23 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
struct saa711x_state *state = to_state(sd);
int reg1f, reg1e;

/*
* The V4L2 core already initializes std with all supported
* Standards. All driver needs to do is to mask it, to remove
* standards that don't apply from the mask
*/

reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
v4l2_dbg(1, debug, sd, "Status byte 2 (0x1f)=0x%02x\n", reg1f);
if (reg1f & 0x40) {
/* horizontal/vertical not locked */
*std = V4L2_STD_ALL;

/* horizontal/vertical not locked */
if (reg1f & 0x40)
goto ret;
}

if (reg1f & 0x20)
*std = V4L2_STD_525_60;
*std &= V4L2_STD_525_60;
else
*std = V4L2_STD_625_50;
*std &= V4L2_STD_625_50;

if (state->ident != V4L2_IDENT_SAA7115)
goto ret;
Expand All @@ -1381,7 +1387,6 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
break;
default:
/* Can't detect anything */
*std = V4L2_STD_ALL;
break;
}

Expand Down

0 comments on commit ee30139

Please sign in to comment.