summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/tvp5150.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2018-06-28 18:20:48 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-17 19:33:08 +0200
commitee9a6ff6a6979c2c374b434ff1c800780b193af4 (patch)
treeddf24c42c421e17f7a181eff66ab1b92b035ede2 /drivers/media/i2c/tvp5150.c
parentmedia: tvp5150: add g_std callback (diff)
downloadlinux-ee9a6ff6a6979c2c374b434ff1c800780b193af4.tar.xz
linux-ee9a6ff6a6979c2c374b434ff1c800780b193af4.zip
media: tvp5150: add querystd
Add the querystd video_op and make it return V4L2_STD_UNKNOWN while the TVP5150 is not locked to a signal. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c/tvp5150.c')
-rw-r--r--drivers/media/i2c/tvp5150.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index 28385a1f6b1b..cbb19001c9e4 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -810,6 +810,15 @@ static v4l2_std_id tvp5150_read_std(struct v4l2_subdev *sd)
}
}
+static int tvp5150_querystd(struct v4l2_subdev *sd, v4l2_std_id *std_id)
+{
+ struct tvp5150 *decoder = to_tvp5150(sd);
+
+ *std_id = decoder->lock ? tvp5150_read_std(sd) : V4L2_STD_UNKNOWN;
+
+ return 0;
+}
+
static const struct v4l2_event tvp5150_ev_fmt = {
.type = V4L2_EVENT_SOURCE_CHANGE,
.u.src_change.changes = V4L2_EVENT_SRC_CH_RESOLUTION,
@@ -1385,6 +1394,7 @@ static const struct v4l2_subdev_tuner_ops tvp5150_tuner_ops = {
static const struct v4l2_subdev_video_ops tvp5150_video_ops = {
.s_std = tvp5150_s_std,
.g_std = tvp5150_g_std,
+ .querystd = tvp5150_querystd,
.s_stream = tvp5150_s_stream,
.s_routing = tvp5150_s_routing,
.g_mbus_config = tvp5150_g_mbus_config,