All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] media: saa7115: allow input standard autodetection for SAA7113
@ 2010-12-13 18:19 Anatolij Gustschin
  2010-12-13 18:19 ` [PATCH 2/2] media: fsl_viu: add VIDIOC_QUERYSTD and VIDIOC_G_STD support Anatolij Gustschin
  2010-12-22 16:50 ` [1/2] media: saa7115: allow input standard autodetection for SAA7113 Mauro Carvalho Chehab
  0 siblings, 2 replies; 6+ messages in thread
From: Anatolij Gustschin @ 2010-12-13 18:19 UTC (permalink / raw)
  To: linux-media; +Cc: Mauro Carvalho Chehab, Hans Verkuil, Detlev Zundel

Autodetect input's standard using field frequency detection
feature (FIDT in status byte at 0x1F) of the SAA7113.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/media/video/saa7115.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c
index 301c62b..f28a4c7 100644
--- a/drivers/media/video/saa7115.c
+++ b/drivers/media/video/saa7115.c
@@ -1348,6 +1348,18 @@ static int saa711x_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
 	int reg1e;
 
 	*std = V4L2_STD_ALL;
+
+	if (state->ident == V4L2_IDENT_SAA7113) {
+		int reg1f = saa711x_read(sd, R_1F_STATUS_BYTE_2_VD_DEC);
+
+		if (reg1f & 0x20)
+			*std = V4L2_STD_NTSC;
+		else
+			*std = V4L2_STD_PAL;
+
+		return 0;
+	}
+
 	if (state->ident != V4L2_IDENT_SAA7115)
 		return 0;
 	reg1e = saa711x_read(sd, R_1E_STATUS_BYTE_1_VD_DEC);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-12-22 20:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-13 18:19 [PATCH 1/2] media: saa7115: allow input standard autodetection for SAA7113 Anatolij Gustschin
2010-12-13 18:19 ` [PATCH 2/2] media: fsl_viu: add VIDIOC_QUERYSTD and VIDIOC_G_STD support Anatolij Gustschin
2010-12-22 17:03   ` [2/2] " Mauro Carvalho Chehab
2010-12-22 16:50 ` [1/2] media: saa7115: allow input standard autodetection for SAA7113 Mauro Carvalho Chehab
2010-12-22 20:31   ` [PATCH v2 1/2] media: saa7115: allow input standard autodetection for more chips Anatolij Gustschin
2010-12-22 20:31   ` [PATCH v2 2/2] media: fsl_viu: add VIDIOC_QUERYSTD and VIDIOC_G_STD support Anatolij Gustschin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.