From: Anatolij Gustschin Date: Wed, 22 Dec 2010 20:31:58 +0000 (-0300) Subject: [media] saa7115: allow input standard autodetection for more chips X-Git-Tag: firefly_0821_release~7613^2~3116^2~58 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f9d7d787842e92bc768d282f37fc3056c5441ddb;p=firefly-linux-kernel-4.4.55.git [media] saa7115: allow input standard autodetection for more chips 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 301c62b88cad..f35459d1f42f 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c @@ -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) {