Skip to content

Commit

Permalink
[media] saa7115: allow input standard autodetection for more chips
Browse files Browse the repository at this point in the history
Autodetect input's standard using field frequency detection
feature (FIDT in status byte at 0x1F) of the chips saa7111/
saa7111a/saa7113/saa7114/saa7118.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Anatolij Gustschin authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 641d211 commit f9d7d78
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/media/video/saa7115.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,8 +1348,17 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
int reg1e;

*std = V4L2_STD_ALL;
if (state->ident != V4L2_IDENT_SAA7115)
if (state->ident != V4L2_IDENT_SAA7115) {
int reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);

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

return 0;
}

reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);

switch (reg1e & 0x03) {
Expand Down

0 comments on commit f9d7d78

Please sign in to comment.