Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 460b6c08 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[media] tvp5150: Add s_stream subdev operation support



This patch adds the .s_stream subdev operation to the driver.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent b1950b8d
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -952,6 +952,21 @@ static int tvp5150_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a)
			I2C Command
 ****************************************************************************/

static int tvp5150_s_stream(struct v4l2_subdev *sd, int enable)
{
	/* Initializes TVP5150 to its default values */
	/* # set PCLK (27MHz) */
	tvp5150_write(sd, TVP5150_CONF_SHARED_PIN, 0x00);

	/* Output format: 8-bit ITU-R BT.656 with embedded syncs */
	if (enable)
		tvp5150_write(sd, TVP5150_MISC_CTL, 0x09);
	else
		tvp5150_write(sd, TVP5150_MISC_CTL, 0x00);

	return 0;
}

static int tvp5150_s_routing(struct v4l2_subdev *sd,
			     u32 input, u32 output, u32 config)
{
@@ -1073,6 +1088,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,
	.s_stream = tvp5150_s_stream,
	.s_routing = tvp5150_s_routing,
	.s_crop = tvp5150_s_crop,
	.g_crop = tvp5150_g_crop,